From: Tom Herbert <therbert@google.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net-next 0/3] net: Eliminate gso_send_check
Date: Sat, 20 Sep 2014 14:52:27 -0700 [thread overview]
Message-ID: <1411249950-6795-1-git-send-email-therbert@google.com> (raw)
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(-)
--
2.1.0.rc2.206.gedb03e5
next reply other threads:[~2014-09-20 21:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-20 21:52 Tom Herbert [this message]
2014-09-20 21:52 ` [PATCH net-next 1/3] tcp: move logic out of tcp_v[64]_gso_send_check Tom Herbert
2014-09-21 1:04 ` Eric Dumazet
2014-09-20 21:52 ` [PATCH net-next 2/3] udp: move logic out of udp[46]_ufo_send_check Tom Herbert
2014-09-21 1:12 ` Eric Dumazet
2014-09-21 1:29 ` Tom Herbert
2014-09-20 21:52 ` [PATCH net-next 3/3] net: Remove gso_send_check as an offload callback Tom Herbert
2014-09-21 1:04 ` [PATCH net-next 0/3] net: Eliminate gso_send_check Eric Dumazet
2014-09-26 4:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411249950-6795-1-git-send-email-therbert@google.com \
--to=therbert@google.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).