* GRE with GRO very slow when forwarding starting with 3.14.24 @ 2014-11-24 16:13 Wolfgang Walter 2014-11-24 16:48 ` Eric Dumazet 0 siblings, 1 reply; 4+ messages in thread From: Wolfgang Walter @ 2014-11-24 16:13 UTC (permalink / raw) To: netdev; +Cc: Stable Kernel Hello, starting with 3.14.24 GRE with GRO on is very slow. To be more specific: yyyy <--> GRO_endpoint <-_> .... <--> |eth0<->GRO-endpoint | eth1 |<-> xxxx routing (IPv4) between xxxx and yyyy is very slow when GRO is enabled on eth0 and/or eth1 starting with stable kernel 3.14.24 Regards, -- Wolfgang Walter Studentenwerk München Anstalt des öffentlichen Rechts ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GRE with GRO very slow when forwarding starting with 3.14.24 2014-11-24 16:13 GRE with GRO very slow when forwarding starting with 3.14.24 Wolfgang Walter @ 2014-11-24 16:48 ` Eric Dumazet 2014-11-24 18:16 ` Tom Herbert 0 siblings, 1 reply; 4+ messages in thread From: Eric Dumazet @ 2014-11-24 16:48 UTC (permalink / raw) To: Wolfgang Walter; +Cc: netdev, Tom Herbert, Alexander Duyck On Mon, 2014-11-24 at 17:13 +0100, Wolfgang Walter wrote: > Hello, > > starting with 3.14.24 GRE with GRO on is very slow. To be more specific: > > yyyy <--> GRO_endpoint <-_> .... <--> |eth0<->GRO-endpoint | eth1 |<-> xxxx > > routing (IPv4) between xxxx and yyyy is very slow when GRO is enabled on eth0 > and/or eth1 starting with stable kernel 3.14.24 > > Regards, tcpdump might help, but I presume GSO is no longer working properly on egress. Can you try to revert : commit abe640984aa492652232b65d3579361cf6d461f5 Author: Tom Herbert <therbert@google.com> Date: Thu Oct 30 08:40:56 2014 -0700 gre: Use inner mac length when computing tunnel length [ Upstream commit 14051f0452a2c26a3f4791e6ad6a435e8f1945ff ] Currently, skb_inner_network_header is used but this does not account for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which handles TEB and also should work with IP encapsulation in which case inner mac and inner network headers are the same. Tested: Ran TCP_STREAM over GRE, worked as expected. Signed-off-by: Tom Herbert <therbert@google.com> Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c index 2d24f293f977..8c8493ea6b1c 100644 --- a/net/ipv4/gre_offload.c +++ b/net/ipv4/gre_offload.c @@ -50,7 +50,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, greh = (struct gre_base_hdr *)skb_transport_header(skb); - ghl = skb_inner_network_header(skb) - skb_transport_header(skb); + ghl = skb_inner_mac_header(skb) - skb_transport_header(skb); if (unlikely(ghl < sizeof(*greh))) goto out; ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: GRE with GRO very slow when forwarding starting with 3.14.24 2014-11-24 16:48 ` Eric Dumazet @ 2014-11-24 18:16 ` Tom Herbert 2014-11-25 16:55 ` Wolfgang Walter 0 siblings, 1 reply; 4+ messages in thread From: Tom Herbert @ 2014-11-24 18:16 UTC (permalink / raw) To: Eric Dumazet; +Cc: Wolfgang Walter, Linux Netdev List, Alexander Duyck On Mon, Nov 24, 2014 at 8:48 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote: > > On Mon, 2014-11-24 at 17:13 +0100, Wolfgang Walter wrote: > > Hello, > > > > starting with 3.14.24 GRE with GRO on is very slow. To be more specific: > > > > yyyy <--> GRO_endpoint <-_> .... <--> |eth0<->GRO-endpoint | eth1 |<-> xxxx > > > > routing (IPv4) between xxxx and yyyy is very slow when GRO is enabled on eth0 > > and/or eth1 starting with stable kernel 3.14.24 > > > > Regards, > > > tcpdump might help, but I presume GSO is no longer working properly on > egress. > Inner mac header is probably not being set in GRO->GSO GRE path. Please try this also: diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c index bb5947b..51973dd 100644 --- a/net/ipv4/gre_offload.c +++ b/net/ipv4/gre_offload.c @@ -247,6 +247,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff) err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); rcu_read_unlock(); + + skb_set_inner_mac_header(skb, nhoff + grehlen); + return err; } > Can you try to revert : > > commit abe640984aa492652232b65d3579361cf6d461f5 > Author: Tom Herbert <therbert@google.com> > Date: Thu Oct 30 08:40:56 2014 -0700 > > gre: Use inner mac length when computing tunnel length > > [ Upstream commit 14051f0452a2c26a3f4791e6ad6a435e8f1945ff ] > > Currently, skb_inner_network_header is used but this does not account > for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which > handles TEB and also should work with IP encapsulation in which case > inner mac and inner network headers are the same. > > Tested: Ran TCP_STREAM over GRE, worked as expected. > > Signed-off-by: Tom Herbert <therbert@google.com> > Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c > index 2d24f293f977..8c8493ea6b1c 100644 > --- a/net/ipv4/gre_offload.c > +++ b/net/ipv4/gre_offload.c > @@ -50,7 +50,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, > > greh = (struct gre_base_hdr *)skb_transport_header(skb); > > - ghl = skb_inner_network_header(skb) - skb_transport_header(skb); > + ghl = skb_inner_mac_header(skb) - skb_transport_header(skb); > if (unlikely(ghl < sizeof(*greh))) > goto out; > > ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: GRE with GRO very slow when forwarding starting with 3.14.24 2014-11-24 18:16 ` Tom Herbert @ 2014-11-25 16:55 ` Wolfgang Walter 0 siblings, 0 replies; 4+ messages in thread From: Wolfgang Walter @ 2014-11-25 16:55 UTC (permalink / raw) To: Tom Herbert; +Cc: Eric Dumazet, Linux Netdev List, Alexander Duyck Am Montag, 24. November 2014, 10:16:26 schrieb Tom Herbert: > On Mon, Nov 24, 2014 at 8:48 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote: > > On Mon, 2014-11-24 at 17:13 +0100, Wolfgang Walter wrote: > > > Hello, > > > > > > starting with 3.14.24 GRE with GRO on is very slow. To be more specific: > > > > > > yyyy <--> GRO_endpoint <-_> .... <--> |eth0<->GRO-endpoint | eth1 |<-> > > > xxxx > > > > > > routing (IPv4) between xxxx and yyyy is very slow when GRO is enabled on > > > eth0 and/or eth1 starting with stable kernel 3.14.24 > > > > > > Regards, > > > > tcpdump might help, but I presume GSO is no longer working properly on > > egress. > > Inner mac header is probably not being set in GRO->GSO GRE path. > Please try this also: Thanks, this patch fixes the problem. > > diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c > index bb5947b..51973dd 100644 > --- a/net/ipv4/gre_offload.c > +++ b/net/ipv4/gre_offload.c > @@ -247,6 +247,9 @@ static int gre_gro_complete(struct sk_buff *skb, int > nhoff) err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); > > rcu_read_unlock(); > + > + skb_set_inner_mac_header(skb, nhoff + grehlen); > + > return err; > } > > > Can you try to revert : > > > > commit abe640984aa492652232b65d3579361cf6d461f5 > > Author: Tom Herbert <therbert@google.com> > > Date: Thu Oct 30 08:40:56 2014 -0700 > > > > gre: Use inner mac length when computing tunnel length > > > > [ Upstream commit 14051f0452a2c26a3f4791e6ad6a435e8f1945ff ] > > > > Currently, skb_inner_network_header is used but this does not account > > for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which > > handles TEB and also should work with IP encapsulation in which case > > inner mac and inner network headers are the same. > > > > Tested: Ran TCP_STREAM over GRE, worked as expected. > > > > Signed-off-by: Tom Herbert <therbert@google.com> > > Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com> > > Signed-off-by: David S. Miller <davem@davemloft.net> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c > > index 2d24f293f977..8c8493ea6b1c 100644 > > --- a/net/ipv4/gre_offload.c > > +++ b/net/ipv4/gre_offload.c > > @@ -50,7 +50,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff > > *skb,> > > greh = (struct gre_base_hdr *)skb_transport_header(skb); > > > > - ghl = skb_inner_network_header(skb) - skb_transport_header(skb); > > + ghl = skb_inner_mac_header(skb) - skb_transport_header(skb); > > > > if (unlikely(ghl < sizeof(*greh))) > > > > goto out; Regards, -- Wolfgang Walter Studentenwerk München Anstalt des öffentlichen Rechts ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-25 16:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-24 16:13 GRE with GRO very slow when forwarding starting with 3.14.24 Wolfgang Walter 2014-11-24 16:48 ` Eric Dumazet 2014-11-24 18:16 ` Tom Herbert 2014-11-25 16:55 ` Wolfgang Walter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox