Skip to contentSkip to conversation

non-linear xdp fix for enetc driver

PATCH Lorenzo Bianconi 1 participant 1 message Dec 1, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

drivers/net/ethernet/freescale/enetc/enetc.c +1 -0
index 8671591cb750..9ddd6c1c6e0e 100644
@@ -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++;
 }