>> I've noticed that we could get cleaner code in our driver if we remove >> these two lines from net/ipv4/udp_offload.c: >> if (skb_is_gso(segs)) >> mss *= skb_shinfo(segs)->gso_segs; >> >> I think that this is correct in case of GSO_PARTIAL segmentation for the >> following reasons: >> 1. After this change the UDP payload field is consistent with the IP >> header payload length field. Currently, IPv4 length is 1500 and UDP >> total length is the full unsegmented length.
How does this simplify the driver? Does it currently have to change the udph->length field to the mss on the wire, because the device only splits + replicates the headers + computes the csum? > I don’t recall that the UDP header length field will match the IP length > field. I had intentionally left it at the original value used to compute > the UDP header checksum. That way you could just adjust it by > cancelling out the length from the partial checksum. >> 2. AFAIU, in GSO_PARTIAL no tunnel headers should be modified except the >> IP ID field, including the UDP length field. >> What do you think? > > > For outer headers this is correct. For inner headers this is not. The inner > UDP header will need to have the length updated and the checksum > recomputed as a part of the segmentation.