netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Jason Baron <jbaron@akamai.com>
Cc: David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>, Joshua Hunt <johunt@akamai.com>,
	Willem de Bruijn <willemb@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next] gso: enable udp gso for virtual devices
Date: Thu, 13 Jun 2019 10:15:33 -0700	[thread overview]
Message-ID: <CAKgT0Uej5CkBJpqsBnB61ozo2kAFKyAH8WY9KVbFQ67ZxPiDag@mail.gmail.com> (raw)
In-Reply-To: <1560381160-19584-1-git-send-email-jbaron@akamai.com>

On Wed, Jun 12, 2019 at 4:14 PM Jason Baron <jbaron@akamai.com> wrote:
>
> Now that the stack supports UDP GRO, we can enable udp gso for virtual
> devices. If packets are looped back locally, and UDP GRO is not enabled
> then they will be segmented to gso_size via udp_rcv_segment(). This
> essentiallly just reverts: 8eea1ca gso: limit udp gso to egress-only
> virtual devices.
>
> Tested by connecting two namespaces via macvlan and then ran
> udpgso_bench_tx:
>
> before:
> udp tx:   2068 MB/s    35085 calls/s  35085 msg/s
>
> after (no UDP_GRO):
> udp tx:   3438 MB/s    58319 calls/s  58319 msg/s
>
> after (UDP_GRO):
> udp tx:   8037 MB/s   136314 calls/s 136314 msg/s
>
> Signed-off-by: Jason Baron <jbaron@akamai.com>
> Co-developed-by: Joshua Hunt <johunt@akamai.com>
> Signed-off-by: Joshua Hunt <johunt@akamai.com>
> Cc: Alexander Duyck <alexander.duyck@gmail.com>
> Cc: Willem de Bruijn <willemb@google.com>
> Cc: Paolo Abeni <pabeni@redhat.com>
> ---
>  drivers/net/bonding/bond_main.c | 5 ++---
>  drivers/net/team/team.c         | 5 ++---
>  include/linux/netdev_features.h | 1 +
>  3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 4f5b3ba..c4260be 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1120,8 +1120,7 @@ static void bond_compute_features(struct bonding *bond)
>
>  done:
>         bond_dev->vlan_features = vlan_features;
> -       bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
> -                                   NETIF_F_GSO_UDP_L4;
> +       bond_dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL;
>         bond_dev->mpls_features = mpls_features;
>         bond_dev->gso_max_segs = gso_max_segs;
>         netif_set_gso_max_size(bond_dev, gso_max_size);
> @@ -4308,7 +4307,7 @@ void bond_setup(struct net_device *bond_dev)
>                                 NETIF_F_HW_VLAN_CTAG_RX |
>                                 NETIF_F_HW_VLAN_CTAG_FILTER;
>
> -       bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
> +       bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL;
>         bond_dev->features |= bond_dev->hw_features;
>  }
>
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index b48006e..30299e3 100644
> --- a/drivers/net/team/team.c
> +++ b/drivers/net/team/team.c
> @@ -1003,8 +1003,7 @@ static void __team_compute_features(struct team *team)
>         }
>
>         team->dev->vlan_features = vlan_features;
> -       team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
> -                                    NETIF_F_GSO_UDP_L4;
> +       team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL;
>         team->dev->hard_header_len = max_hard_header_len;
>
>         team->dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
> @@ -2132,7 +2131,7 @@ static void team_setup(struct net_device *dev)
>                            NETIF_F_HW_VLAN_CTAG_RX |
>                            NETIF_F_HW_VLAN_CTAG_FILTER;
>
> -       dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4;
> +       dev->hw_features |= NETIF_F_GSO_ENCAP_ALL;
>         dev->features |= dev->hw_features;
>  }
>
> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> index 4b19c54..188127c 100644
> --- a/include/linux/netdev_features.h
> +++ b/include/linux/netdev_features.h
> @@ -237,6 +237,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
>                                  NETIF_F_GSO_GRE_CSUM |                 \
>                                  NETIF_F_GSO_IPXIP4 |                   \
>                                  NETIF_F_GSO_IPXIP6 |                   \
> +                                NETIF_F_GSO_UDP_L4 |                   \
>                                  NETIF_F_GSO_UDP_TUNNEL |               \
>                                  NETIF_F_GSO_UDP_TUNNEL_CSUM)

Are you adding this to NETIF_F_GSO_ENCAP_ALL? Wouldn't it make more
sense to add it to NETIF_F_GSO_SOFTWARE?

  reply	other threads:[~2019-06-13 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 23:12 [PATCH net-next] gso: enable udp gso for virtual devices Jason Baron
2019-06-13 17:15 ` Alexander Duyck [this message]
2019-06-13 19:03   ` Jason Baron
2019-06-13 21:20     ` Willem de Bruijn
2019-06-14 20:53       ` Jason Baron
2019-06-26 19:15         ` Jason Baron
2019-06-26 23:41           ` Willem de Bruijn
2019-08-09 18:58             ` Josh Hunt
2019-08-09 19:13               ` Willem de Bruijn

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=CAKgT0Uej5CkBJpqsBnB61ozo2kAFKyAH8WY9KVbFQ67ZxPiDag@mail.gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jbaron@akamai.com \
    --cc=johunt@akamai.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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).