From: Stephen Hemminger <shemminger@vyatta.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] vxlan: Update hard_header_len based on lowerdev when instantiating VXLAN
Date: Tue, 13 Nov 2012 15:12:00 -0800 [thread overview]
Message-ID: <20121113151200.16afce74@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20121113230955.16102.62399.stgit@ahduyck-cp1.jf.intel.com>
On Tue, 13 Nov 2012 15:10:59 -0800
Alexander Duyck <alexander.h.duyck@intel.com> wrote:
> In the event of a VXLAN device being linked to a device that has a
> hard_header_len greater than that of standard ethernet we could end up with
> the hard_header_len not being large enough for outgoing frames. In order to
> prevent this we should update the length when a lowerdev is provided.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>
> drivers/net/vxlan.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 44bcc20..6b666eb 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1110,6 +1110,10 @@ static int vxlan_newlink(struct net *net, struct net_device *dev,
>
> if (!tb[IFLA_MTU])
> dev->mtu = lowerdev->mtu - VXLAN_HEADROOM;
> +
> + /* update header length based on lower device */
> + dev->hard_header_len = lowerdev->hard_header_len +
> + VXLAN_HEADROOM;
> }
>
> if (data[IFLA_VXLAN_TOS])
>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
next prev parent reply other threads:[~2012-11-13 23:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121113151200.16afce74@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.