Thread (20 messages) 20 messages, 5 authors, 2025-08-07

Re: [PATCH net-next 5/9] eth: fbnic: Add XDP pass, drop, abort support

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-07-24 16:51:10

On Thu, 24 Jul 2025 08:47:20 -0700 Mohsin Bashir wrote:
quoted
quoted
+	if (xdp_buff_has_frags(&pkt->buff) && !xdp_prog->aux->xdp_has_frags)
+		return ERR_PTR(-FBNIC_XDP_LEN_ERR);  
when can this happen and couldn't you catch this within ndo_bpf? i suppose
it's related to hds setup.
It is important to avoid passing a packet with frags to a single-buff 
XDP program. The implication being that a single-buff XDP program would 
fail to access packet linearly. For example, we can send a jumbo UDP 
packet to the SUT with a single-buffer XDP program attached and in the 
XDP program, attempt to access payload linearly.

I believe handling this case within ndo_bpf may not be possible.
Herm, we are handling it in ndo_bpf..
This check is just a safety in case somehow we get a packet larger 
than MTU, and therefore crossing the "safe" HDS threshold.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help