netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next 1/2] net: Pre-step for supporting GRO on vxlan traffic
@ 2014-01-04 21:38 Or Gerlitz
  0 siblings, 0 replies; 3+ messages in thread
From: Or Gerlitz @ 2014-01-04 21:38 UTC (permalink / raw)
  To: David Miller; +Cc: Or Gerlitz, Jerry Chu, Eric Dumazet, Herbert Xu, netdev

On Sat, Jan 4, 2014 at 2:34 AM, David Miller <davem@davemloft.net> wrote:
>
> From: Or Gerlitz <ogerlitz@mellanox.com>
> Date: Thu,  2 Jan 2014 15:27:55 +0200
>
>
> Never start conditional continuation lines with the conditional operator.
> Operators in a chain always _end_ a line, never begin them.



OK, will do. I will also rebase patch 2/2 on top of Jerry's gre-gro
patch to use the gro_find_xxx_by_type helpers.

Or.

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

* Re: [PATCH net-next 1/2] net: Pre-step for supporting GRO on vxlan traffic
  2014-01-02 13:27 Or Gerlitz
@ 2014-01-04  0:34 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-04  0:34 UTC (permalink / raw)
  To: ogerlitz; +Cc: hkchu, edumazet, herbert, netdev

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu,  2 Jan 2014 15:27:55 +0200

> @@ -1125,8 +1119,8 @@ static void vxlan_rcv(struct vxlan_sock *vs,
>  	 * leave the CHECKSUM_UNNECESSARY, the device checksummed it
>  	 * for us. Otherwise force the upper layers to verify it.
>  	 */
> -	if (skb->ip_summed != CHECKSUM_UNNECESSARY || !skb->encapsulation ||
> -	    !(vxlan->dev->features & NETIF_F_RXCSUM))
> +	if ((skb->ip_summed != CHECKSUM_UNNECESSARY && skb->ip_summed != CHECKSUM_PARTIAL)
> +	    || !skb->encapsulation || !(vxlan->dev->features & NETIF_F_RXCSUM))

Never start conditional continuation lines with the conditional operator.

Operators in a chain always _end_ a line, never begin them.

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

* [PATCH net-next 1/2] net: Pre-step for supporting GRO on vxlan traffic
@ 2014-01-02 13:27 Or Gerlitz
  2014-01-04  0:34 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Or Gerlitz @ 2014-01-02 13:27 UTC (permalink / raw)
  To: hkchu, edumazet, herbert; +Cc: netdev, davem, Or Gerlitz

As a pre-step for supporting vxlan with the GRO stack, move the
vxlan header structure definition to common header file and
enhance the vxlan code not to alter the ip_summed field for RX
skb's marked with CHECKSUM_PARTIAL, as done by the TCP GRO code.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
 drivers/net/vxlan.c |   10 ++--------
 include/net/vxlan.h |    6 ++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ea203c1..438d8ef 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -64,12 +64,6 @@
 
 #define VXLAN_FLAGS 0x08000000	/* struct vxlanhdr.vx_flags required value. */
 
-/* VXLAN protocol header */
-struct vxlanhdr {
-	__be32 vx_flags;
-	__be32 vx_vni;
-};
-
 /* UDP port for VXLAN traffic.
  * The IANA assigned port is 4789, but the Linux default is 8472
  * for compatibility with early adopters.
@@ -1125,8 +1119,8 @@ static void vxlan_rcv(struct vxlan_sock *vs,
 	 * leave the CHECKSUM_UNNECESSARY, the device checksummed it
 	 * for us. Otherwise force the upper layers to verify it.
 	 */
-	if (skb->ip_summed != CHECKSUM_UNNECESSARY || !skb->encapsulation ||
-	    !(vxlan->dev->features & NETIF_F_RXCSUM))
+	if ((skb->ip_summed != CHECKSUM_UNNECESSARY && skb->ip_summed != CHECKSUM_PARTIAL)
+	    || !skb->encapsulation || !(vxlan->dev->features & NETIF_F_RXCSUM))
 		skb->ip_summed = CHECKSUM_NONE;
 
 	skb->encapsulation = 0;
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 6b6d180..dede91c 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -5,6 +5,12 @@
 #include <linux/netdevice.h>
 #include <linux/udp.h>
 
+/* VXLAN protocol header */
+struct vxlanhdr {
+	__be32 vx_flags;
+	__be32 vx_vni;
+};
+
 #define VNI_HASH_BITS	10
 #define VNI_HASH_SIZE	(1<<VNI_HASH_BITS)
 
-- 
1.7.1

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

end of thread, other threads:[~2014-01-04 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-04 21:38 [PATCH net-next 1/2] net: Pre-step for supporting GRO on vxlan traffic Or Gerlitz
  -- strict thread matches above, loose matches on Subject: below --
2014-01-02 13:27 Or Gerlitz
2014-01-04  0:34 ` 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).