On Mon, 2026-11-23, Alexander H Duyck wrote: > For example, one recent one I saw was an issue on the Tx side where > an outgoing XDP program was modifying the frame and actually not > updating the pseudoheader checksum. As a result it was breaking Tx > checksum offloads for NICs that were using the HW_CSUM that used > that checksum header. We could have fixed it by forcing all the > drivers to recalculate the pseudo-header checksum, but instead we > pushed back on the program that was making that change.
Thank you for the explanation, Alex. On Tx the checksum is in the frame, so the program can fix it. On Rx the program can't touch skb->csum at all, so there is nothing to push back on. > The point is you are fixing things for your use case, but anybody > who is using the CHECKSUM_COMPLETE to compute the checksum on the > frames and using XDP without changing the frames will see this as a > significant performance regression. Without GCS, TCP and UDP still get CHECKSUM_UNNECESSARY, same as E810. GCS only came in v6.15, so this just puts E830 with XDP back to where it was. The cases I can think of that are truly impacted are IPv6 with extension headers, and UDP tunnels that the NIC does not parse and that have a zero outer checksum. These fall back to software checksum. And programs that do change the frame are worse off today. Every packet gets summed again in software, plus the "hw csum failure". I don't see a fix that meets all of these: 1. It is small enough and can be backported to stable. 2. It fixes the problem fully. We could drop CHECKSUM_COMPLETE only when the program moved data or data_end, but some in-place writes, e.g. NAT or the IPv6 hop limit, would still trigger "hw csum failure". IMO that brings more problems. 3. It keeps CHECKSUM_COMPLETE for programs that do not change the frame. But that looks like a bigger change, which doesn't fit net. If you have one, I am happy to take it. Otherwise, as I understand it, the choice is between: 1. A performance regression for some programs, but no "hw csum failure". 2. No regression for those programs, but "hw csum failure" stays for programs that change the frame. I would like to know how the community normally decides between these.
