Netdev List
 help / color / mirror / Atom feed
From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: pravin <pravin.shelar@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] ip_gre: propogate target device GSO capability to the tunnel device
Date: Fri, 22 Feb 2013 00:30:05 +0200	[thread overview]
Message-ID: <1361485805.21950.6.camel@lb-tlvb-dmitry> (raw)
In-Reply-To: <CANvJab2wKiQjZ=ZEuJO1A=jCnja==a0qL8XULSAU2dc6W-rh3A@mail.gmail.com>

On Tue, 2013-02-19 at 10:39 -0800, pravin wrote:
> On Mon, Feb 18, 2013 at 11:50 AM, Dmitry Kravkov <dmitry@broadcom.com> wrote:
> >
> > Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> > ---
> > Changes from v1: fixed email address
> >
> >
> >  net/ipv4/ip_gre.c |   10 ++++++++--
> >  1 files changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> > index cdc31ac..31bc941 100644
> > --- a/net/ipv4/ip_gre.c
> > +++ b/net/ipv4/ip_gre.c
> > @@ -1103,8 +1103,14 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
> >         tunnel->hlen = addend;
> >         /* TCP offload with GRE SEQ is not supported. */
> >         if (!(tunnel->parms.o_flags & GRE_SEQ)) {
> > -               dev->features           |= NETIF_F_GSO_SOFTWARE;
> > -               dev->hw_features        |= NETIF_F_GSO_SOFTWARE;
> > +               /* device supports enc gso offload*/
> > +               if (tdev->hw_enc_features & NETIF_F_GRE_GSO) {
> > +                       dev->features           |= NETIF_F_TSO;
> > +                       dev->hw_features        |= NETIF_F_TSO;
> > +               } else {
> > +                       dev->features           |= NETIF_F_GSO_SOFTWARE;
> > +                       dev->hw_features        |= NETIF_F_GSO_SOFTWARE;
> > +               }
> >         }
> 
> I am not sure about this change, Are you trying to limit GRE TSO to
> just IPV4  in case of GRE offload in hardware?


This mostly reverts previous patch, but also disables GSO when CSUM is
set.

---
 net/ipv4/ip_gre.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 0de54cd..aae2d4b 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1107,16 +1107,10 @@ static int ipgre_tunnel_bind_dev(struct
net_device *dev)
 		mtu = 68;
 
 	tunnel->hlen = addend;
-	/* TCP offload with GRE SEQ is not supported. */
-	if (!(tunnel->parms.o_flags & GRE_SEQ)) {
-		/* device supports enc gso offload*/
-		if (tdev->hw_enc_features & NETIF_F_GRE_GSO) {
-			dev->features		|= NETIF_F_TSO;
-			dev->hw_features	|= NETIF_F_TSO;
-		} else {
-			dev->features		|= NETIF_F_GSO_SOFTWARE;
-			dev->hw_features	|= NETIF_F_GSO_SOFTWARE;
-		}
+	/* TCP offload with GRE SEQ or CSUM is not supported. */
+	if (!(tunnel->parms.o_flags & (GRE_SEQ|GRE_CSUM))) {
+		dev->features		|= NETIF_F_GSO_SOFTWARE;
+		dev->hw_features	|= NETIF_F_GSO_SOFTWARE;
 	}
 
 	return mtu;
-- 
1.7.7.2


> >
> >         return mtu;
> > --
> > 1.7.7.2
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2013-02-21 22:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 19:50 [PATCH net-next v2 1/2] ip_gre: allow CSUM capable devices to handle packets Dmitry Kravkov
2013-02-18 19:50 ` [PATCH net-next v2 2/2] ip_gre: propogate target device GSO capability to the tunnel device Dmitry Kravkov
2013-02-19  5:53   ` David Miller
2013-02-19 18:39   ` pravin
2013-02-19 19:31     ` Dmitry Kravkov
2013-02-19 22:51       ` pravin
2013-02-21 22:30     ` Dmitry Kravkov [this message]
2013-02-21 23:53       ` pravin
2013-02-24 16:45         ` Dmitry Kravkov
2013-02-25  6:07           ` Pravin Shelar
2013-02-19  5:53 ` [PATCH net-next v2 1/2] ip_gre: allow CSUM capable devices to handle packets David Miller
2013-02-19 18:28 ` pravin
2013-02-19 19:20   ` Dmitry Kravkov
2013-02-19 23:03     ` pravin
2013-02-20 14:45       ` Dmitry Kravkov
2013-02-21 22:26       ` Dmitry Kravkov
2013-02-21 23:46         ` pravin
2013-02-22  7:19           ` pravin
2013-02-24 16:56             ` Dmitry Kravkov
2013-02-25  6:09               ` Pravin Shelar

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=1361485805.21950.6.camel@lb-tlvb-dmitry \
    --to=dmitry@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pravin.shelar@gmail.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