netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag
@ 2017-04-27 21:11 Girish Moodalbail
  2017-04-28 18:58 ` Pravin Shelar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Girish Moodalbail @ 2017-04-27 21:11 UTC (permalink / raw)
  To: davem; +Cc: netdev, pshelar

Creating a geneve link with 'udpcsum' set results in a creation of link
for which UDP checksum will NOT be computed on outbound packets, as can
be seen below.

11: gen0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether c2:85:27:b6:b4:15 brd ff:ff:ff:ff:ff:ff promiscuity 0
    geneve id 200 remote 192.168.13.1 dstport 6081 noudpcsum

Similarly, creating a link with 'noudpcsum' set results in a creation
of link for which UDP checksum will be computed on outbound packets.

Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.")
Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
---
 drivers/net/geneve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 7074b40..dec5d56 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1244,7 +1244,7 @@ static int geneve_newlink(struct net *net, struct net_device *dev,
 		metadata = true;
 
 	if (data[IFLA_GENEVE_UDP_CSUM] &&
-	    !nla_get_u8(data[IFLA_GENEVE_UDP_CSUM]))
+	    nla_get_u8(data[IFLA_GENEVE_UDP_CSUM]))
 		info.key.tun_flags |= TUNNEL_CSUM;
 
 	if (data[IFLA_GENEVE_UDP_ZERO_CSUM6_TX] &&
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag
  2017-04-27 21:11 [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag Girish Moodalbail
@ 2017-04-28 18:58 ` Pravin Shelar
  2017-04-28 18:59 ` Lance Richardson
  2017-05-01  2:31 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Pravin Shelar @ 2017-04-28 18:58 UTC (permalink / raw)
  To: Girish Moodalbail; +Cc: David S. Miller, Linux Kernel Network Developers

On Thu, Apr 27, 2017 at 2:11 PM, Girish Moodalbail
<girish.moodalbail@oracle.com> wrote:
> Creating a geneve link with 'udpcsum' set results in a creation of link
> for which UDP checksum will NOT be computed on outbound packets, as can
> be seen below.
>
> 11: gen0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
>     link/ether c2:85:27:b6:b4:15 brd ff:ff:ff:ff:ff:ff promiscuity 0
>     geneve id 200 remote 192.168.13.1 dstport 6081 noudpcsum
>
> Similarly, creating a link with 'noudpcsum' set results in a creation
> of link for which UDP checksum will be computed on outbound packets.
>
> Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.")
> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>

LGTM.
Acked-by: Pravin B Shelar <pshelar@ovn.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag
  2017-04-27 21:11 [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag Girish Moodalbail
  2017-04-28 18:58 ` Pravin Shelar
@ 2017-04-28 18:59 ` Lance Richardson
  2017-05-01  2:31 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Lance Richardson @ 2017-04-28 18:59 UTC (permalink / raw)
  To: Girish Moodalbail; +Cc: davem, netdev, pshelar

> From: "Girish Moodalbail" <girish.moodalbail@oracle.com>
> To: davem@davemloft.net
> Cc: netdev@vger.kernel.org, pshelar@ovn.org
> Sent: Thursday, 27 April, 2017 5:11:53 PM
> Subject: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag
> 
> Creating a geneve link with 'udpcsum' set results in a creation of link
> for which UDP checksum will NOT be computed on outbound packets, as can
> be seen below.
> 
> 11: gen0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
>     link/ether c2:85:27:b6:b4:15 brd ff:ff:ff:ff:ff:ff promiscuity 0
>     geneve id 200 remote 192.168.13.1 dstport 6081 noudpcsum
> 
> Similarly, creating a link with 'noudpcsum' set results in a creation
> of link for which UDP checksum will be computed on outbound packets.
> 
> Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.")
> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
> ---
>  drivers/net/geneve.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index 7074b40..dec5d56 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -1244,7 +1244,7 @@ static int geneve_newlink(struct net *net, struct
> net_device *dev,
>  		metadata = true;
>  
>  	if (data[IFLA_GENEVE_UDP_CSUM] &&
> -	    !nla_get_u8(data[IFLA_GENEVE_UDP_CSUM]))
> +	    nla_get_u8(data[IFLA_GENEVE_UDP_CSUM]))
>  		info.key.tun_flags |= TUNNEL_CSUM;
>  
>  	if (data[IFLA_GENEVE_UDP_ZERO_CSUM6_TX] &&
> --
> 1.8.3.1
> 
> 

Verified issue on 4.10.10 kernel. Note that this doesn't impact
lightweight geneve tunnels (e.g. as used by openvswitch).

Acked-by: Lance Richardson <lrichard@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag
  2017-04-27 21:11 [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag Girish Moodalbail
  2017-04-28 18:58 ` Pravin Shelar
  2017-04-28 18:59 ` Lance Richardson
@ 2017-05-01  2:31 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-05-01  2:31 UTC (permalink / raw)
  To: girish.moodalbail; +Cc: netdev, pshelar

From: Girish Moodalbail <girish.moodalbail@oracle.com>
Date: Thu, 27 Apr 2017 14:11:53 -0700

> Creating a geneve link with 'udpcsum' set results in a creation of link
> for which UDP checksum will NOT be computed on outbound packets, as can
> be seen below.
> 
> 11: gen0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
>     link/ether c2:85:27:b6:b4:15 brd ff:ff:ff:ff:ff:ff promiscuity 0
>     geneve id 200 remote 192.168.13.1 dstport 6081 noudpcsum
> 
> Similarly, creating a link with 'noudpcsum' set results in a creation
> of link for which UDP checksum will be computed on outbound packets.
> 
> Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.")
> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>

Applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-01  2:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 21:11 [PATCH net-next] geneve: fix incorrect setting of UDP checksum flag Girish Moodalbail
2017-04-28 18:58 ` Pravin Shelar
2017-04-28 18:59 ` Lance Richardson
2017-05-01  2:31 ` David Miller

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).