diff mbox series

non-linear xdp fix for enetc driver

Message ID Y4kd2f0563PVof5O@lore-desk (mailing list archive)
State Not Applicable
Headers show
Series non-linear xdp fix for enetc driver | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 9 maintainers not CCed: bpf@vger.kernel.org edumazet@google.com ast@kernel.org davem@davemloft.net daniel@iogearbox.net kuba@kernel.org pabeni@redhat.com john.fastabend@gmail.com hawk@kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff fail author Signed-off-by missing
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Lorenzo Bianconi Dec. 1, 2022, 9:34 p.m. UTC
Hi Claudiu,

I am not very familiar with enetc driver codebase but I guess we are missing to
set frag bit in xdp_buff flag whenever the driver receives a non linear packet
in xdp mode (frag bit is needed by xdp stack). Can you please check the patch
below? (if it is ok I will post a formal fix).

Regards,
Lorenzo
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 8671591cb750..9ddd6c1c6e0e 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1416,6 +1416,7 @@  static void enetc_add_rx_buff_to_xdp(struct enetc_bdr *rx_ring, int i,
 	skb_frag_size_set(frag, size);
 	__skb_frag_set_page(frag, rx_swbd->page);
 
+	xdp_buff_set_frags_flag(xdp_buff);
 	shinfo->nr_frags++;
 }