DPDK patches and discussions
 help / color / mirror / Atom feed
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
Subject: Re: [dpdk-dev] [PATCH] kni: fix build on Linux < 3.14
Date: Fri, 26 Oct 2018 23:56:53 +0200	[thread overview]
Message-ID: <4880956.RWMF3eIYHy@xps> (raw)
In-Reply-To: <20181026214027.29465-1-thomas@monjalon.net>

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:
> 
> 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 <thomas@monjalon.net>
> ---
>  kernel/linux/kni/kni_fifo.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- 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) = (b)
> +#endif

  reply	other threads:[~2018-10-26 21:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 21:40 Thomas Monjalon
2018-10-26 21:56 ` Thomas Monjalon [this message]
2018-10-26 22:42   ` Ferruh Yigit
2018-10-26 23:25     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4880956.RWMF3eIYHy@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=phil.yang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).