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.