On Mon, 2026-11-23 at 10:49 -0800, Alexander H Duyck wrote:
> I'm not sure this is the best fix for this. If we are needing all NICs
> that support CHECKSUM_COMPLETE *and* XDP to report CHECKSUM_NONE in the
> event of a frame being modified by XDP it really feels like we should
> probably look at moving this further up the stack.

Thanks for the review, Alex.

IMHO we should first make sure XDP programs do not cause "hw csum
failure" in current kernels. Whatever an XDP program does, it should
not be able to trigger a hw csum failure. It's not an uncommon use
case, e.g., Katran from Meta [3] and Cloudflare's load balancer. And
existing selftests already do it (test_xdp_native_adjst_head_* and
test_xdp_native_adjst_tail_* in
tools/testing/selftests/drivers/net/xdp.py).

> Also even if we go the multiple driver fix route I wonder if we
> shouldn't look at adding a new XDP return type to indicate that we are
> passing a modified frame

IMHO that is for net-next. There we can add optimizations, such as a
way to keep CHECKSUM_COMPLETE for programs that do not change the
frame, potentially after [1] or [2] is accepted.


[3] 
https://github.com/facebookincubator/katran/blob/13a0d69221e43b4941b81303e6726ddc61a12169/katran/lib/bpf/pckt_encap.h#L137

Reply via email to