From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <thomas@monjalon.net> Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 7D4F84CC7 for <dev@dpdk.org>; Fri, 26 Oct 2018 23:56:49 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E8B1821BF1; Fri, 26 Oct 2018 17:56:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 26 Oct 2018 17:56:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=32yHXiTKk0YN/pATlbQovZ3rfLOl09ZjYBFZLI05jCM=; b=QnC/P0T9FfKx z3El8A6SNrVG5isN2STUSnQIJBy4u/cqfemTZ7/glquaq5ZzCiMxF3RAUkV9PWpp StzKo0jzpbpheerpqisuv7GNNISu1HwN6AyJqq3kZEeYFhEf92616DgxRxev79W0 X1oGXNQqZRAoE8p1FpqNLMx1TncZqPY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=32yHXiTKk0YN/pATlbQovZ3rfLOl09ZjYBFZLI05j CM=; b=bhOOMqrkMWJs3M4N9f5+tps7J09EWNLnlbu/KOKPzKkGjXvXEu05Q6foS tStw00Jeh1184vp2YYFsiHopbogf6RwEcTIXtvT4qwz2uovaLC2DJep1l/DLzXmj P9qODusBIezqoLUNIqmroRHqGfQN3o5ySX9SLSfVtTCpddAiOJxwj2G8Z6M3386N /86F0a4KQiIUzRJRACTxMcKD0X8N+476wuZwQkCAsDovCq8C2fjlF824R6TxEZqH z2niI7LS90UDTs1PkkeQN8vPQ8fv/HE0hthBOxtgQqDV16SbAlUESaNBascjKo/v spC6PeFVgXXczU9gX06suYDByXCCg== X-ME-Sender: <xms:oI3TW68JpKGWJGT9YqSmEfvfVxWBHzSqhHy85SeC-PRisspnvP8Pvg> X-ME-Proxy: <xmx:oI3TW5WqZY2X3-yWyxPJaTiYP_UTTqpBbLhAUeo1buoPiGPNhYrLwg> <xmx:oI3TWwdFLa3LQveIpmrHMMptkJ3kcSr20GeiFxa-KZvepWPHt802kA> <xmx:oI3TW3BSck82Deboe668G3wL4X1-D8IrtIPDLyIyEkhV_6EKUjgdZw> <xmx:oI3TWzgL5iepmZacr_8LDcPOFi5s-0HoF6d5IiZtK-9Efx3HzPDk7Q> <xmx:oI3TW_D_o0V9ZRNJKRQNxu6XNsUTKvrejxWKW2-y3JFtiYrHub2uQA> <xmx:oI3TW689jzAHH2ejqXJ5khGrSwn2EZmQ_rcTumtiEGxw0841FWFUEA> Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A724CE4071; Fri, 26 Oct 2018 17:56:47 -0400 (EDT) From: Thomas Monjalon <thomas@monjalon.net> To: Ferruh Yigit <ferruh.yigit@intel.com> Cc: dev@dpdk.org, phil.yang@arm.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com Date: Fri, 26 Oct 2018 23:56:53 +0200 Message-ID: <4880956.RWMF3eIYHy@xps> In-Reply-To: <20181026214027.29465-1-thomas@monjalon.net> References: <20181026214027.29465-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] kni: fix build on Linux < 3.14 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> X-List-Received-Date: Fri, 26 Oct 2018 21:56:49 -0000 26/10/2018 23:40, Thomas Monjalon: > The atomic functions smp_load_acquire() and smp_store_release() > were introduced in Linux 3.14. Older kernels miss the functions: >=20 > kni_fifo.h:19:2: error: > implicit declaration of function =E2=80=98smp_load_acquire=E2=80=99 > kni_fifo.h:30:2: error: > implicit declaration of function =E2=80=98smp_store_release=E2=80=99 >=20 > The fallback is to drop the atomic barrier, as it was before > the commit below. >=20 > Fixes: 711859cd0d07 ("kni: fix kernel FIFO synchronization") >=20 > Signed-off-by: Thomas Monjalon <thomas@monjalon.net> > --- > kernel/linux/kni/kni_fifo.h | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > --- a/kernel/linux/kni/kni_fifo.h > +++ b/kernel/linux/kni/kni_fifo.h We could add a comment here: /* 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) =3D (b) > +#endif