From cb97379dc575e62bb7d6771bd1a709202172d56d Mon Sep 17 00:00:00 2001 From: Bjarne von Horn Date: Wed, 31 May 2023 16:13:47 +0200 Subject: [PATCH] xdp workaround for leap 15.5 --- devices/igb/igb_main-5.14-ethercat.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/devices/igb/igb_main-5.14-ethercat.c b/devices/igb/igb_main-5.14-ethercat.c index bd8f10e9..29c5656c 100644 --- a/devices/igb/igb_main-5.14-ethercat.c +++ b/devices/igb/igb_main-5.14-ethercat.c @@ -40,6 +40,17 @@ #include #include "igb-5.14-ethercat.h" +#ifdef CONFIG_SUSE_KERNEL +#include +#else +# ifndef SUSE_VERSION +# define SUSE_VERSION 0 +# endif +# ifndef SUSE_PATCHLEVEL +# define SUSE_PATCHLEVEL 0 +# endif +#endif + enum queue_mode { QUEUE_MODE_STRICT_PRIORITY, QUEUE_MODE_STREAM_RESERVATION, @@ -8532,7 +8543,11 @@ static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter, result = IGB_XDP_REDIR; break; default: +#if SUSE_VERSION == 15 && SUSE_PATCHLEVEL == 5 + bpf_warn_invalid_xdp_action(adapter->netdev, xdp_prog, act); +#else bpf_warn_invalid_xdp_action(act); +#endif fallthrough; case XDP_ABORTED: out_failure: