Skip to contentSkip to conversation

netvsc: Remove redundant use of ipv6_hdr()

PATCH In review Mohammed Gamal 4 participants 7 messages Jul 19, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +1 -1
index 63c98bb..06d591c 100644
@@ -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;
 	}
 
Signature · 1 line
2.9.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines

-----Original Message-----
From: Mohammed Gamal [mailto:[email protected]]
Sent: Wednesday, July 19, 2017 9:19 AM
To: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mohammed Gamal <[email protected]>
Subject: [PATCH] netvsc: Remove redundant use of ipv6_hdr()

Quoted 4 lines

This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr

Thanks.

#2 lore raw
In reply to Mohammed Gamal
Quoted 13 lines · On Wed, 19 Jul 2017 15:19:28 +0200 Mohammed Gamal <[email protected]> wrote:

This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index 63c98bb..06d591c 100644

drivers/net/hyperv/netvsc_drv.c static u32 net_checksum_info(struct sk_buff *skb) · line 345

Quoted 8 lines
drivers/net/hyperv/netvsc_drv.c +1 -1
@@ -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 [email protected] not linux driver mailing list. I will add it to my next patch of patches that are going to netdev for net-next.

#3 lore raw

----- Original Message -----

Quoted 18 lines
Quoted 15 lines · On Wed, 19 Jul 2017 15:19:28 +0200 Mohammed Gamal <[email protected]> wrote:

This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index 63c98bb..06d591c 100644
@@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
 
Quoted 14 lines

drivers/net/hyperv/netvsc_drv.c static u32 net_checksum_info(struct sk_buff *skb) · line 345

Quoted 7 lines
drivers/net/hyperv/netvsc_drv.c +1 -1
 		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 [email protected] 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 [email protected]. Perhaps that should be updated.

#4 lore raw
Quoted 33 lines · On Wed, 19 Jul 2017 13:48:03 -0400 (EDT) Mohammed Gamal <[email protected]>…

----- Original Message -----

Quoted 18 lines
Quoted 15 lines · On Wed, 19 Jul 2017 15:19:28 +0200 Mohammed Gamal <[email protected]> wrote:

This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index 63c98bb..06d591c 100644
@@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
 
Quoted 14 lines

drivers/net/hyperv/netvsc_drv.c static u32 net_checksum_info(struct sk_buff *skb) · line 345

Quoted 7 lines
drivers/net/hyperv/netvsc_drv.c +1 -1
 		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 [email protected] not linux driver mailing list.
I will add it to my next patch of patches that are going to netdev for net-next.

Quoted 5 lines

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 [email protected]. Perhaps that should be updated.

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

maintainer
#5 lore raw
In reply to Mohammed Gamal
Quoted 49 lines

-----Original Message-----
From: Mohammed Gamal [mailto:[email protected]]
Sent: Wednesday, July 19, 2017 1:48 PM
To: Stephen Hemminger <[email protected]>
Cc: KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr()

----- Original Message -----

Quoted 4 lines
Quoted 1 line · On Wed, 19 Jul 2017 15:19:28 +0200 Mohammed Gamal <[email protected]> wrote:

This condition already uses an object of type ipv6hdr in the line

above.

Quoted 14 lines
Quoted 14 lines

Use the object directly instead of calling ipv6_hdr

---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +0 -0
index 63c98bb..06d591c 100644
@@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb)
 
Quoted 10 lines

drivers/net/hyperv/netvsc_drv.c static u32 net_checksum_info(struct sk_buff *skb) · line 345

Quoted 7 lines
drivers/net/hyperv/netvsc_drv.c +1 -1
 		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 [email protected] not linux driver

mailing

Quoted 4 lines

list.
I will add it to my next patch of patches that are going to netdev for net-next.

Quoted 5 lines

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 [email protected]. Perhaps that should be updated.

I will update [email protected] in MAINTAINERS to the new mailing list name of the Linux driver project.

Thanks,
- Haiyang

#6 lore raw
In reply to Mohammed Gamal
Quoted 3 lines · Mohammed Gamal

It's worth pointing out that MAINTAINERS points that files under drivers/net/hyperv are to be sent to [email protected]. Perhaps that should be updated.

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

regards,
dan carpenter