diff options
author | Thomas Monjalon <thomas@monjalon.net> | 2018-10-26 23:23:36 +0200 |
---|---|---|
committer | Thomas Monjalon <thomas@monjalon.net> | 2018-10-27 00:18:06 +0200 |
commit | c6c36fe28a7bfd8ca21784b2b8b62241f89de06e (patch) | |
tree | 80715d2d1bbf1ed44ee5380ac96c1c4b1c307930 /kernel | |
parent | 6e5765deb72b765a79b6560f644d0c6ed004a0dc (diff) | |
download | dpdk-draft-windows-c6c36fe28a7bfd8ca21784b2b8b62241f89de06e.zip dpdk-draft-windows-c6c36fe28a7bfd8ca21784b2b8b62241f89de06e.tar.gz dpdk-draft-windows-c6c36fe28a7bfd8ca21784b2b8b62241f89de06e.tar.xz |
kni: fix build on Linux < 3.14
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/linux/kni/kni_fifo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/linux/kni/kni_fifo.h b/kernel/linux/kni/kni_fifo.h index 2cb3a4a..3f4781c 100644 --- a/kernel/linux/kni/kni_fifo.h +++ b/kernel/linux/kni/kni_fifo.h @@ -8,6 +8,14 @@ #include <exec-env/rte_kni_common.h> +/* 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 */ |