net: Eliminate gso_send_check
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tcp: move logic out of tcp_v[64]_gso_send_checknet/ net/ | +47 | 1 reply | |
| 2/3 | udp: move logic out of udp[46]_ufo_send_checknet/ net/ | +33 | 2 replies | |
| 3/3 | net: Remove gso_send_check as an offload callbackinclude/ net/ net/ +7 more | +3 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Dumazet |
|---|---|
| Series | A-b |
| 1/3 | A-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/3] net: Eliminate gso_send_check
gso_send_check presents a lot of complexity for what it is being used for. It seems that there are only two cases where it might be effective:
TCP and UFO paths. In these cases, the gso_send_check function initializes the TCP or UDP checksum respectively to the pseudo header checksum so that the checksum computation is appropriately offloaded or computed in the gso_segment functions. The gso_send_check functions are only called from dev.c in skb_mac_gso_segment when ip_summed != CHECKSUM_PARTIAL (which seems very unlikely in TCP case). We can move the logic of this into the respective gso_segment functions where the checksum is initialized if ip_summed != CHECKSUM_PARTIAL.
With the above cases handled, gso_send_check is no longer needed, so we can remove all uses of it and the fields in the offload callbacks. With this change, ip_summed in the skb should be preserved though all the layers of gso_segment calls.
In follow-on patches, we may be able to remove the check setup code in tcp_gso_segment if we can guarantee that ip_summed will always be CHECKSUM_PARTIAL (verify all paths and probably add an assert in tcp_gro_segment).
Tested these patches by:
- netperf TCP_STREAM test with GSO enabled
- Forced ip_summed != CHECKSUM_PARTIAL with above
- Ran UDP_RR with 10000 request size over GRE tunnel. This exercised UFO path.
Tom Herbert (3):
tcp: move logic out of tcp_v[64]_gso_send_check
udp: move logic out of udp[46]_ufo_send_check
net: Remove gso_send_check as an offload callback
include/linux/netdevice.h | 1 - net/core/dev.c | 10 ---------- net/ipv4/af_inet.c | 36 ------------------------------------ net/ipv4/gre_offload.c | 11 +++-------- net/ipv4/tcp_offload.c | 45 +++++++++++++++++++++++---------------------- net/ipv4/udp_offload.c | 43 +++++++++++++++---------------------------- net/ipv6/ip6_offload.c | 27 --------------------------- net/ipv6/tcpv6_offload.c | 43 ++++++++++++++++++++++++------------------- net/ipv6/udp_offload.c | 46 ++++++++++++++++++---------------------------- net/mpls/mpls_gso.c | 7 ------- 10 files changed, 83 insertions(+), 186 deletions(-)
Signature · 1 line
2.1.0.rc2.206.gedb03e5