* [dpdk-stable] [PATCH 18.11] kni: fix ethtool build error on kernel 5.9
@ 2020-11-23 14:49 Kevin Traynor
2020-11-23 15:05 ` Luca Boccassi
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Traynor @ 2020-11-23 14:49 UTC (permalink / raw)
To: stable, ferruh.yigit; +Cc: bluca, Kevin Traynor
read_barrier_depends() is removed from kernel 5.9 as per Linux
commit 93fab07c2293 ("locking/barriers: Remove definitions for [smp_]read_barrier_depends()")
It is used by ethtool and produces an error when building on kernel 5.9:
/kernel/linux/kni/ethtool/igb/igb_main.c: In function ‘igb_clean_tx_irq’:
/dpdk-stable/kernel/linux/kni/ethtool/igb/igb_main.c:7067:3:
error: implicit declaration of function ‘read_barrier_depends’
[-Werror=implicit-function-declaration]
7067 | read_barrier_depends();
| ^~~~~~~~~~~~~~~~~~~~
Fix by replacing with rmb() as is done for < 2.6 kernels.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 459fda3dad..e89033818a 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3974,3 +3974,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
+#define read_barrier_depends() rmb()
+#endif
+
#endif /* _KCOMPAT_H_ */
--
2.26.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH 18.11] kni: fix ethtool build error on kernel 5.9
2020-11-23 14:49 [dpdk-stable] [PATCH 18.11] kni: fix ethtool build error on kernel 5.9 Kevin Traynor
@ 2020-11-23 15:05 ` Luca Boccassi
0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2020-11-23 15:05 UTC (permalink / raw)
To: Kevin Traynor, stable, ferruh.yigit
On Mon, 2020-11-23 at 14:49 +0000, Kevin Traynor wrote:
> read_barrier_depends() is removed from kernel 5.9 as per Linux
> commit 93fab07c2293 ("locking/barriers: Remove definitions for [smp_]read_barrier_depends()")
>
> It is used by ethtool and produces an error when building on kernel 5.9:
>
> /kernel/linux/kni/ethtool/igb/igb_main.c: In function ‘igb_clean_tx_irq’:
> /dpdk-stable/kernel/linux/kni/ethtool/igb/igb_main.c:7067:3:
> error: implicit declaration of function ‘read_barrier_depends’
> [-Werror=implicit-function-declaration]
> 7067 | read_barrier_depends();
> | ^~~~~~~~~~~~~~~~~~~~
>
> Fix by replacing with rmb() as is done for < 2.6 kernels.
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
> kernel/linux/kni/ethtool/igb/kcompat.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
> index 459fda3dad..e89033818a 100644
> --- a/kernel/linux/kni/ethtool/igb/kcompat.h
> +++ b/kernel/linux/kni/ethtool/igb/kcompat.h
> @@ -3974,3 +3974,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
> #endif
>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
> +#define read_barrier_depends() rmb()
> +#endif
> +
> #endif /* _KCOMPAT_H_ */
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-23 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 14:49 [dpdk-stable] [PATCH 18.11] kni: fix ethtool build error on kernel 5.9 Kevin Traynor
2020-11-23 15:05 ` Luca Boccassi
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).