Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691676 > unrolled thread

[PATCH] netvsc: Remove redundant use of ipv6_hdr()

Started byMohammed Gamal <mgamal@redhat.com>
First post2017-07-19 15:30 +0200
Last post2017-07-19 21:20 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] netvsc: Remove redundant use of ipv6_hdr() Mohammed Gamal <mgamal@redhat.com> - 2017-07-19 15:30 +0200
    RE: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Haiyang Zhang <haiyangz@microsoft.com> - 2017-07-19 17:20 +0200
    Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Stephen Hemminger <stephen@networkplumber.org> - 2017-07-19 18:50 +0200
      Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Mohammed Gamal <mgamal@redhat.com> - 2017-07-19 19:50 +0200
        Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Stephen Hemminger <stephen@networkplumber.org> - 2017-07-19 20:00 +0200
        RE: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Haiyang Zhang <haiyangz@microsoft.com> - 2017-07-19 21:00 +0200
        Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-19 21:20 +0200

#1691676 — [PATCH] netvsc: Remove redundant use of ipv6_hdr()

FromMohammed Gamal <mgamal@redhat.com>
Date2017-07-19 15:30 +0200
Subject[PATCH] netvsc: Remove redundant use of ipv6_hdr()
Message-ID<u4Xd8-Hy-9@gated-at.bofh.it>
This condition already uses an object of type ipv6hdr in the line above.
Use the object directly instead of calling ipv6_hdr

Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 63c98bb..06d591c 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
 
 		if (ip6->nexthdr == IPPROTO_TCP)
 			return TRANSPORT_INFO_IPV6_TCP;
-		else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP)
+		else if (ip6->nexthdr == IPPROTO_UDP)
 			return TRANSPORT_INFO_IPV6_UDP;
 	}
 
-- 
2.9.4

[toc] | [next] | [standalone]


#1691837

FromHaiyang Zhang <haiyangz@microsoft.com>
Date2017-07-19 17:20 +0200
Message-ID<u4YVA-1TU-15@gated-at.bofh.it>
In reply to#1691676

> -----Original Message-----
> From: Mohammed Gamal [mailto:mgamal@redhat.com]
> Sent: Wednesday, July 19, 2017 9:19 AM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>
> Cc: devel@linuxdriverproject.org; linux-kernel@vger.kernel.org;
> vkuznets@redhat.com; cavery@redhat.com; otubo@redhat.com; Mohammed Gamal
> <mgamal@redhat.com>
> Subject: [PATCH] netvsc: Remove redundant use of ipv6_hdr()
> 
> This condition already uses an object of type ipv6hdr in the line above.
> Use the object directly instead of calling ipv6_hdr
> 
> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

Thanks.

[toc] | [prev] | [next] | [standalone]


#1692021

FromStephen Hemminger <stephen@networkplumber.org>
Date2017-07-19 18:50 +0200
Message-ID<u50kF-2PJ-1@gated-at.bofh.it>
In reply to#1691676
On Wed, 19 Jul 2017 15:19:28 +0200
Mohammed Gamal <mgamal@redhat.com> wrote:

> This condition already uses an object of type ipv6hdr in the line above.
> Use the object directly instead of calling ipv6_hdr
> 
> Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index 63c98bb..06d591c 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
>  
>  		if (ip6->nexthdr == IPPROTO_TCP)
>  			return TRANSPORT_INFO_IPV6_TCP;
> -		else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP)
> +		else if (ip6->nexthdr == IPPROTO_UDP)
>  			return TRANSPORT_INFO_IPV6_UDP;
>  	}
>  

Patch looks fine.
Network patches go through netdev@vger.kernel.org not linux driver mailing list.
I will add it to my next patch of patches that are going to netdev for net-next.

[toc] | [prev] | [next] | [standalone]


#1692069

FromMohammed Gamal <mgamal@redhat.com>
Date2017-07-19 19:50 +0200
Message-ID<u51gL-3tP-27@gated-at.bofh.it>
In reply to#1692021

----- Original Message -----
> On Wed, 19 Jul 2017 15:19:28 +0200
> Mohammed Gamal <mgamal@redhat.com> wrote:
> 
> > This condition already uses an object of type ipv6hdr in the line above.
> > Use the object directly instead of calling ipv6_hdr
> > 
> > Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> > ---
> >  drivers/net/hyperv/netvsc_drv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/hyperv/netvsc_drv.c
> > b/drivers/net/hyperv/netvsc_drv.c
> > index 63c98bb..06d591c 100644
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
> >  
> >  		if (ip6->nexthdr == IPPROTO_TCP)
> >  			return TRANSPORT_INFO_IPV6_TCP;
> > -		else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP)
> > +		else if (ip6->nexthdr == IPPROTO_UDP)
> >  			return TRANSPORT_INFO_IPV6_UDP;
> >  	}
> >  
> 
> Patch looks fine.
> Network patches go through netdev@vger.kernel.org not linux driver mailing
> list.
> I will add it to my next patch of patches that are going to netdev for
> net-next.
> 
Thanks for the heads up. Will take that into consideration next time.

It's worth pointing out that MAINTAINERS points that files under 
drivers/net/hyperv are to be sent to devel@linuxdriverproject.org.
Perhaps that should be updated.

[toc] | [prev] | [next] | [standalone]


#1692076

FromStephen Hemminger <stephen@networkplumber.org>
Date2017-07-19 20:00 +0200
Message-ID<u51qr-3xJ-35@gated-at.bofh.it>
In reply to#1692069
On Wed, 19 Jul 2017 13:48:03 -0400 (EDT)
Mohammed Gamal <mgamal@redhat.com> wrote:

> ----- Original Message -----
> > On Wed, 19 Jul 2017 15:19:28 +0200
> > Mohammed Gamal <mgamal@redhat.com> wrote:
> >   
> > > This condition already uses an object of type ipv6hdr in the line above.
> > > Use the object directly instead of calling ipv6_hdr
> > > 
> > > Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> > > ---
> > >  drivers/net/hyperv/netvsc_drv.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/net/hyperv/netvsc_drv.c
> > > b/drivers/net/hyperv/netvsc_drv.c
> > > index 63c98bb..06d591c 100644
> > > --- a/drivers/net/hyperv/netvsc_drv.c
> > > +++ b/drivers/net/hyperv/netvsc_drv.c
> > > @@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
> > >  
> > >  		if (ip6->nexthdr == IPPROTO_TCP)
> > >  			return TRANSPORT_INFO_IPV6_TCP;
> > > -		else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP)
> > > +		else if (ip6->nexthdr == IPPROTO_UDP)
> > >  			return TRANSPORT_INFO_IPV6_UDP;
> > >  	}
> > >    
> > 
> > Patch looks fine.
> > Network patches go through netdev@vger.kernel.org not linux driver mailing
> > list.
> > I will add it to my next patch of patches that are going to netdev for
> > net-next.
> >   
> Thanks for the heads up. Will take that into consideration next time.
> 
> It's worth pointing out that MAINTAINERS points that files under 
> drivers/net/hyperv are to be sent to devel@linuxdriverproject.org.
> Perhaps that should be updated.

MAINTAINERS doesn't have a good way to handle dual sub-trees.

[toc] | [prev] | [next] | [standalone]


#1692106

FromHaiyang Zhang <haiyangz@microsoft.com>
Date2017-07-19 21:00 +0200
Message-ID<u52mu-4bx-1@gated-at.bofh.it>
In reply to#1692069

> -----Original Message-----
> From: Mohammed Gamal [mailto:mgamal@redhat.com]
> Sent: Wednesday, July 19, 2017 1:48 PM
> To: Stephen Hemminger <stephen@networkplumber.org>
> Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>;
> otubo@redhat.com; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; vkuznets@redhat.com
> Subject: Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr()
> 
> 
> 
> ----- Original Message -----
> > On Wed, 19 Jul 2017 15:19:28 +0200
> > Mohammed Gamal <mgamal@redhat.com> wrote:
> >
> > > This condition already uses an object of type ipv6hdr in the line
> above.
> > > Use the object directly instead of calling ipv6_hdr
> > >
> > > Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
> > > ---
> > >  drivers/net/hyperv/netvsc_drv.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/hyperv/netvsc_drv.c
> > > b/drivers/net/hyperv/netvsc_drv.c
> > > index 63c98bb..06d591c 100644
> > > --- a/drivers/net/hyperv/netvsc_drv.c
> > > +++ b/drivers/net/hyperv/netvsc_drv.c
> > > @@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
> > >
> > >  		if (ip6->nexthdr == IPPROTO_TCP)
> > >  			return TRANSPORT_INFO_IPV6_TCP;
> > > -		else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP)
> > > +		else if (ip6->nexthdr == IPPROTO_UDP)
> > >  			return TRANSPORT_INFO_IPV6_UDP;
> > >  	}
> > >
> >
> > Patch looks fine.
> > Network patches go through netdev@vger.kernel.org not linux driver
> mailing
> > list.
> > I will add it to my next patch of patches that are going to netdev for
> > net-next.
> >
> Thanks for the heads up. Will take that into consideration next time.
> 
> It's worth pointing out that MAINTAINERS points that files under
> drivers/net/hyperv are to be sent to devel@linuxdriverproject.org.
> Perhaps that should be updated.

I will update devel@linuxdriverproject.org in MAINTAINERS to the new
mailing list name of the Linux driver project.

Thanks,
- Haiyang

[toc] | [prev] | [next] | [standalone]


#1692134

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-07-19 21:20 +0200
Message-ID<u52FR-4y1-41@gated-at.bofh.it>
In reply to#1692069
On Wed, Jul 19, 2017 at 01:48:03PM -0400, Mohammed Gamal wrote:
> It's worth pointing out that MAINTAINERS points that files under 
> drivers/net/hyperv are to be sent to devel@linuxdriverproject.org.
> Perhaps that should be updated.

get_maintainer.pl gives you both because drivers/net/ is netdev.  Just
use the script.

regards,
dan carpenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web