From: Alexander Duyck <alexander.duyck@gmail.com>
To: Tom Herbert <tom@herbertland.com>
Cc: David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>, Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 next-next 04/12] udp: Don't set skb->encapsulation with RCO
Date: Fri, 6 May 2016 13:23:57 -0700 [thread overview]
Message-ID: <CAKgT0UepRt3dP9=g2+cdM1iL6t5j5YA_hfGcFRK40aUFCxFaXg@mail.gmail.com> (raw)
In-Reply-To: <1462565096-4076043-5-git-send-email-tom@herbertland.com>
On Fri, May 6, 2016 at 1:04 PM, Tom Herbert <tom@herbertland.com> wrote:
> When RCO is in effect we want to ensure that the outer checksum is
> properly offloaded. Don't set skb->encapsulation in this case to
> ensure that checksum offload is later considered for hw_features
> instead of hw_enc_features.
>
> Signed-off-by: Tom Herbert <tom@herbertland.com>
> ---
> net/ipv4/udp_offload.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
> index b556ef6..92a9222 100644
> --- a/net/ipv4/udp_offload.c
> +++ b/net/ipv4/udp_offload.c
> @@ -94,11 +94,12 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
> do {
> unsigned int len;
>
> - if (remcsum)
> + if (remcsum) {
> skb->ip_summed = CHECKSUM_NONE;
> -
> - /* Set up inner headers if we are offloading inner checksum */
> - if (skb->ip_summed == CHECKSUM_PARTIAL) {
> + } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
> + /* Set up inner headers if we are offloading inner
> + * checksum
> + */
> skb_reset_inner_headers(skb);
> skb->encapsulation = 1;
> }
You can just drop this patch. It doesn't actually change anything
behaviorwise. If remcsum is set then skb->ip_summed is set to
CHECKSUM_NONE so it isn't going to hit the CHECKSUM_PARTIAL code so
you don't need the else.
- Alex
next prev parent reply other threads:[~2016-05-06 20:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 20:04 [PATCH v2 next-next 00/12] ipv6: Enable GUEoIPv6 and more fixes for v6 tunneling Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 01/12] gso: Remove arbitrary checks for unsupported GSO Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 02/12] net: define gso types for IPx over IPv4 and IPv6 Tom Herbert
2016-05-06 20:34 ` Alexander Duyck
2016-05-06 20:43 ` Tom Herbert
2016-05-06 20:54 ` Alexander Duyck
2016-05-06 20:04 ` [PATCH v2 next-next 03/12] gre6: Fix flag translations Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 04/12] udp: Don't set skb->encapsulation with RCO Tom Herbert
2016-05-06 20:23 ` Alexander Duyck [this message]
2016-05-06 20:04 ` [PATCH v2 next-next 05/12] fou: Call setup_udp_tunnel_sock Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 06/12] fou: Split out {fou,gue}_build_header Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 07/12] fou: Add encap ops for IPv6 tunnels Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 08/12] ipv6: Fix nexthdr for reinjection Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 09/12] ipv6: Change "final" protocol processing for encapsulation Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 10/12] fou: Support IPv6 in fou Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 11/12] ip6_tun: Add infrastructure for doing encapsulation Tom Herbert
2016-05-06 20:04 ` [PATCH v2 next-next 12/12] ip6_gre: Add support for fou/gue encapsulation Tom Herbert
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='CAKgT0UepRt3dP9=g2+cdM1iL6t5j5YA_hfGcFRK40aUFCxFaXg@mail.gmail.com' \
--to=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/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).