From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org,
pshelar@nicira.com, joseph.gasparakis@intel.com
Subject: Re: [PATCH net] gso: Update tunnel segmentation to support Tx checksum offload
Date: Wed, 10 Jul 2013 14:21:46 -0700 [thread overview]
Message-ID: <1373491306.4600.17.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130710203439.14927.20911.stgit@ahduyck-hc1.jf.intel.com>
On Wed, 2013-07-10 at 13:43 -0700, Alexander Duyck wrote:
> This change makes it so that the GRE and VXLAN tunnels can make use of Tx
> checksum offload support provided by some drivers via the hw_enc_features.
> This resolves a performance regression seen when using TSO versus just
> using the Tx checksum offload.
>
> To achieve this it was necessary to address two items. First
> netif_skb_features needed to be updated so that it would correctly handle
> the Trans Ether Bridging protocol. To that end the reference to
> skb->protocol was replaced with a call to skb_network_protocol.
>
> Second it was necessary to update the GRE and UDP tunnel segmentation
> offloads so that they would reset the encapsulation bit and inner header
> offsets after the offload was complete.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>
> I am submitting this as a fix for 3.11 and stable, however the fix for
> stable would likely need some modification since it seems that gre.c was
> renamed to gre_offload.c at some point between 3.10 and 3.11. If needed
> I can submit a separate patch for stable.
>
> net/core/dev.c | 2 +-
> net/ipv4/gre_offload.c | 3 +++
> net/ipv4/udp.c | 4 +++-
> 3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 560dafd..0419961 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2495,7 +2495,7 @@ static netdev_features_t harmonize_features(struct sk_buff *skb,
>
> netdev_features_t netif_skb_features(struct sk_buff *skb)
> {
> - __be16 protocol = skb->protocol;
> + __be16 protocol = skb_network_protocol(skb);
> netdev_features_t features = skb->dev->features;
>
If we call skb_network_protocol() here, do we still need following tests
in netif_skb_features() ?
if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) {
...
} else if (!vlan_tx_tag_present(skb)) {
}
next prev parent reply other threads:[~2013-07-10 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 20:43 [PATCH net] gso: Update tunnel segmentation to support Tx checksum offload Alexander Duyck
2013-07-10 21:21 ` Eric Dumazet [this message]
2013-07-10 21:50 ` Alexander Duyck
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=1373491306.4600.17.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=joseph.gasparakis@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=stephen@networkplumber.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