From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 55CCC1F1C for ; Mon, 29 Oct 2018 13:54:04 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id l26-v6so8107910wmh.3 for ; Mon, 29 Oct 2018 05:54:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+jvXnaFAm+aqcHq5jwEBolpV9Iaiaupa1Tmso70jQas=; b=SfOJX6nicv4iIAwD+/MqFn8drOC0SXyoPmiEPY9QE9PSXEWTnFlTwb5FuMcplW3N2u F/aIfgSoryvF70ydzLmsYYcrd9BwE/VJqKy26hBhF7kJtsaCV/BfxQk+aVa5kFanCjfk 14rzBqRlGXS1eIwSqQE6KPimY+/LxKl/5Ki24uRZAEv1hvHxcmp6iXDUAFGQSaE7Pb1W oKA2G5x+vPcDCcVhPppGK4FYPTAeSPw0k2xIMt5qfsoyitjGglV7kUFYYi2yXpg8K+TZ GtLzFitI9QLGkHJkDHUujrVfauLP7Lb2gehbuPnr3sU/DNR6h/Hv6RfZVHfv7clGxJo6 xuzg== X-Gm-Message-State: AGRZ1gLlWrSmoK8cUihOMHQU4EMhOWLg5/SM9AmH7IbOm1rmsihGfHCd Z9eajSAcY7xc/4ItxFv8vnMy5QAN X-Google-Smtp-Source: AJdET5cXYfSgRD+KfFvZ/byUHhw4REDyfUWTGmZZ+jx4J9tPjnpILR3XYg2tT3aYk9Vi1x6SUc90DA== X-Received: by 2002:a1c:e355:: with SMTP id a82-v6mr5049553wmh.74.1540817643908; Mon, 29 Oct 2018 05:54:03 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id 68-v6sm2998918wmg.26.2018.10.29.05.54.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 05:54:02 -0700 (PDT) From: Luca Boccassi To: Thomas Monjalon Cc: dpdk stable Date: Mon, 29 Oct 2018 12:53:20 +0000 Message-Id: <20181029125329.17729-11-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181029125329.17729-1-bluca@debian.org> References: <20181015115144.27626-1-bluca@debian.org> <20181029125329.17729-1-bluca@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'kni: fix build on Linux < 3.14' has been queued to LTS release 16.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 12:54:04 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/31/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Luca Boccassi --- >>From 19bdb06486c269ad840e036109aded6e27c186dd Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 26 Oct 2018 23:23:36 +0200 Subject: [PATCH] kni: fix build on Linux < 3.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit c6c36fe28a7bfd8ca21784b2b8b62241f89de06e ] The atomic functions smp_load_acquire() and smp_store_release() were introduced in Linux 3.14. Older kernels miss the functions: kni_fifo.h:19:2: error: implicit declaration of function ‘smp_load_acquire’ kni_fifo.h:30:2: error: implicit declaration of function ‘smp_store_release’ The fallback is to drop the atomic barrier, as it was before the commit below. Fixes: 711859cd0d07 ("kni: fix kernel FIFO synchronization") Signed-off-by: Thomas Monjalon --- lib/librte_eal/linuxapp/kni/kni_fifo.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/kni_fifo.h b/lib/librte_eal/linuxapp/kni/kni_fifo.h index 7f1d32c54..208d34bf0 100644 --- a/lib/librte_eal/linuxapp/kni/kni_fifo.h +++ b/lib/librte_eal/linuxapp/kni/kni_fifo.h @@ -27,6 +27,14 @@ #include +/* Skip some memory barriers on Linux < 3.14 */ +#ifndef smp_load_acquire +#define smp_load_acquire(a) (*(a)) +#endif +#ifndef smp_store_release +#define smp_store_release(a, b) *(a) = (b) +#endif + /** * Adds num elements into the fifo. Return the number actually written */ -- 2.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-29 12:48:14.678246093 +0000 +++ 0011-kni-fix-build-on-Linux-3.14.patch 2018-10-29 12:48:14.446417982 +0000 @@ -1,4 +1,4 @@ -From c6c36fe28a7bfd8ca21784b2b8b62241f89de06e Mon Sep 17 00:00:00 2001 +From 19bdb06486c269ad840e036109aded6e27c186dd Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 26 Oct 2018 23:23:36 +0200 Subject: [PATCH] kni: fix build on Linux < 3.14 @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit c6c36fe28a7bfd8ca21784b2b8b62241f89de06e ] + The atomic functions smp_load_acquire() and smp_store_release() were introduced in Linux 3.14. Older kernels miss the functions: @@ -21,14 +23,14 @@ Signed-off-by: Thomas Monjalon --- - kernel/linux/kni/kni_fifo.h | 8 ++++++++ + lib/librte_eal/linuxapp/kni/kni_fifo.h | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/kernel/linux/kni/kni_fifo.h b/kernel/linux/kni/kni_fifo.h -index 2cb3a4a7b..3f4781c2e 100644 ---- a/kernel/linux/kni/kni_fifo.h -+++ b/kernel/linux/kni/kni_fifo.h -@@ -8,6 +8,14 @@ +diff --git a/lib/librte_eal/linuxapp/kni/kni_fifo.h b/lib/librte_eal/linuxapp/kni/kni_fifo.h +index 7f1d32c54..208d34bf0 100644 +--- a/lib/librte_eal/linuxapp/kni/kni_fifo.h ++++ b/lib/librte_eal/linuxapp/kni/kni_fifo.h +@@ -27,6 +27,14 @@ #include