netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* non-linear xdp fix for enetc driver
@ 2022-12-01 21:34 Lorenzo Bianconi
  0 siblings, 0 replies; only message in thread
From: Lorenzo Bianconi @ 2022-12-01 21:34 UTC (permalink / raw)
  To: claudiu.manoil; +Cc: netdev, lorenzo.bianconi

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

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 --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++;
 }
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-01 21:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 21:34 non-linear xdp fix for enetc driver Lorenzo Bianconi

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).