On 7/24/25 10:57, Paolo Abeni wrote: > On 7/23/25 2:32 AM, Chenyuan Yang wrote: >> The xdp_convert_buff_to_frame() function can return NULL when there is >> insufficient headroom in the buffer to store the xdp_frame structure >> or when the driver didn't reserve enough tailroom for skb_shared_info. > > AFAIC the sfc driver reserves both enough headroom and tailroom, but > this is after ebpf run, which in turn could consume enough headroom to > cause a failure, so I think this makes sense. Your reasoning seems plausible to me. However, I think the error path ought to more closely follow the existing error cases in logging a ratelimited message and calling the tracepoint. I think the cleanest way to do this would be: if (unlikely(!xdpf)) err = -ENOBUFS; else err = efx_xdp_tx_buffers(efx, 1, &xdpf, true); so that it can make use of the existing failure path. Adding the check to efx_xdp_tx_buffers() is also an option. -ed