All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5 net-next 01/14] gso: Remove arbitrary checks for unsupported GSO
Date: Mon, 16 May 2016 09:49:33 -0700	[thread overview]
Message-ID: <CAKgT0UceFCg+uC8ehZTvxvP6gg+i+QWy72uv+7bGjUAycZQ=9g@mail.gmail.com> (raw)
In-Reply-To: <1463355755-3481375-2-git-send-email-tom@herbertland.com>

On Sun, May 15, 2016 at 4:42 PM, Tom Herbert <tom@herbertland.com> wrote:
> In several gso_segment functions there are checks of gso_type against
> a seemingly arbitrary list of SKB_GSO_* flags. This seems like an
> attempt to identify unsupported GSO types, but since the stack is
> the one that set these GSO types in the first place this seems
> unnecessary to do. If a combination isn't valid in the first
> place that stack should not allow setting it.
>
> This is a code simplication especially for add new GSO types.
>
> Signed-off-by: Tom Herbert <tom@herbertland.com>
> ---
>  net/ipv4/af_inet.c     | 18 ------------------
>  net/ipv4/gre_offload.c | 14 --------------
>  net/ipv4/tcp_offload.c | 19 -------------------
>  net/ipv4/udp_offload.c | 10 ----------
>  net/ipv6/ip6_offload.c | 18 ------------------
>  net/ipv6/udp_offload.c | 13 -------------
>  net/mpls/mpls_gso.c    |  9 ---------
>  7 files changed, 101 deletions(-)
>

<...>

> diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
> index bbcf604..6de1e13 100644
> --- a/net/mpls/mpls_gso.c
> +++ b/net/mpls/mpls_gso.c
> @@ -26,15 +26,6 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
>         netdev_features_t mpls_features;
>         __be16 mpls_protocol;
>
> -       if (unlikely(skb_shinfo(skb)->gso_type &
> -                               ~(SKB_GSO_TCPV4 |
> -                                 SKB_GSO_TCPV6 |
> -                                 SKB_GSO_UDP |
> -                                 SKB_GSO_DODGY |
> -                                 SKB_GSO_TCP_FIXEDID |
> -                                 SKB_GSO_TCP_ECN)))
> -               goto out;
> -
>         /* Setup inner SKB. */
>         mpls_protocol = skb->protocol;
>         skb->protocol = skb->inner_protocol;

So this last bit here introduces a warning:

net/mpls/mpls_gso.c: In function ‘mpls_gso_segment’:
net/mpls/mpls_gso.c:51:1: warning: label ‘out’ defined but not used
[-Wunused-label]
 out:
 ^

If you drop the label out from mpls_gso_segment then that should resolve it.

- Alex

  reply	other threads:[~2016-05-16 16:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-15 23:42 [PATCH v5 net-next 00/14] ipv6: Enable GUEoIPv6 and more fixes for v6 tunneling Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 01/14] gso: Remove arbitrary checks for unsupported GSO Tom Herbert
2016-05-16 16:49   ` Alexander Duyck [this message]
2016-05-15 23:42 ` [PATCH v5 net-next 02/14] net: define gso types for IPx over IPv4 and IPv6 Tom Herbert
2016-05-16  0:34   ` Jeff Kirsher
2016-05-16 16:32   ` Alexander Duyck
2016-05-16 18:07     ` Tom Herbert
2016-05-16 18:13       ` Alexander Duyck
2016-05-16 18:28         ` Tom Herbert
2016-05-16 18:31           ` Alexander Duyck
2016-05-16 16:52   ` Alexander Duyck
2016-05-16 17:04   ` Alexander Duyck
2016-05-15 23:42 ` [PATCH v5 net-next 03/14] ipv6: Fix nexthdr for reinjection Tom Herbert
2016-05-16 18:19   ` Shmulik Ladkani
2016-05-16 18:35     ` Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 04/14] ipv6: Change "final" protocol processing for encapsulation Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 05/14] net: Cleanup encap items in ip_tunnels.h Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 06/14] fou: Call setup_udp_tunnel_sock Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 07/14] fou: Split out {fou,gue}_build_header Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 08/14] fou: Support IPv6 in fou Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 09/14] ip6_tun: Add infrastructure for doing encapsulation Tom Herbert
2016-05-16 19:24   ` Alexander Duyck
2016-05-16 19:28     ` Tom Herbert
2016-05-16 20:16       ` Alexander Duyck
2016-05-15 23:42 ` [PATCH v5 net-next 10/14] fou: Add encap ops for IPv6 tunnels Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 11/14] ip6_gre: Add support for fou/gue encapsulation Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 12/14] ip6_tunnel: " Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 13/14] ip6ip6: Support for GSO/GRO Tom Herbert
2016-05-15 23:42 ` [PATCH v5 net-next 14/14] ip4ip6: " 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='CAKgT0UceFCg+uC8ehZTvxvP6gg+i+QWy72uv+7bGjUAycZQ=9g@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.