netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too large
@ 2012-11-09 23:35 Alexander Duyck
  2012-11-13 19:37 ` David Miller
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Duyck @ 2012-11-09 23:35 UTC (permalink / raw)
  To: netdev; +Cc: davem, shemminger

This change fixes an issue I found where VXLAN frames were fragmented when
they were up to the VXLAN MTU size.  I root caused the issue to the fact that
the headroom was 4 + 20 + 8 + 8.  This math doesn't appear to be correct
because we are not inserting a VLAN header, but instead a 2nd Ethernet header.
As such the math for the overhead should be 20 + 8 + 8 + 14 to account for the
extra headers that are inserted for VXLAN.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---

 drivers/net/vxlan.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 410ebc8..0b75c19 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -51,8 +51,8 @@
 
 #define VXLAN_N_VID	(1u << 24)
 #define VXLAN_VID_MASK	(VXLAN_N_VID - 1)
-/* VLAN + IP header + UDP + VXLAN */
-#define VXLAN_HEADROOM (4 + 20 + 8 + 8)
+/* IP header + UDP + VXLAN + Ethernet header */
+#define VXLAN_HEADROOM (20 + 8 + 8 + 14)
 
 #define VXLAN_FLAGS 0x08000000	/* struct vxlanhdr.vx_flags required value. */
 

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

end of thread, other threads:[~2012-12-04 17:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09 23:35 [PATCH] vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too large Alexander Duyck
2012-11-13 19:37 ` David Miller
2012-11-13 21:33   ` Stephen Hemminger
2012-11-13 23:10     ` [PATCH] vxlan: Update hard_header_len based on lowerdev when instantiating VXLAN Alexander Duyck
2012-11-13 23:12       ` Stephen Hemminger
2012-11-13 23:20         ` David Miller
2012-11-19 11:33     ` [PATCH] vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too large Joseph Glanville
2012-11-19 16:03       ` Stephen Hemminger
2012-11-19 23:37         ` Joseph Glanville
2012-12-03 15:26         ` Joseph Glanville
2012-12-04  0:48           ` Re[2]: " Naoto MATSUMOTO
2012-12-04 17:12             ` Alexander Duyck

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