From: Jay Vosburgh <fubar@us.ibm.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
Jesse Gross <jesse@nicira.com>
Subject: Re: [PATCH net-2.6 3/3] bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion
Date: Mon, 13 Dec 2010 12:43:06 -0800 [thread overview]
Message-ID: <32094.1292272986@death> (raw)
In-Reply-To: <1292264424.9860.15.camel@bwh-desktop>
Ben Hutchings <bhutchings@solarflare.com> wrote:
>bond_na_send() attempts to insert a VLAN tag in between building and
>sending packets of the respective formats. If the slave does not
>implement hardware VLAN tag insertion then vlan_put_tag() will mangle
>the network-layer header because the Ethernet header is not present at
>this point (unlike in bond_arp_send()).
>
>Fix this by adding the tag out-of-line and relying on
>dev_hard_start_xmit() to insert it inline if necessary.
>
>Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
>---
> drivers/net/bonding/bond_ipv6.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c
>index 121b073..84fbd4e 100644
>--- a/drivers/net/bonding/bond_ipv6.c
>+++ b/drivers/net/bonding/bond_ipv6.c
>@@ -88,7 +88,12 @@ static void bond_na_send(struct net_device *slave_dev,
> }
>
> if (vlan_id) {
>- skb = vlan_put_tag(skb, vlan_id);
>+ /* The Ethernet header is not present yet, so it is
>+ * too early to insert a VLAN tag. Force use of an
>+ * out-of-line tag here and let dev_hard_start_xmit()
>+ * insert it if the slave hardware can't.
>+ */
>+ skb = __vlan_hwaccel_put_tag(skb, vlan_id);
> if (!skb) {
> pr_err("failed to insert VLAN tag\n");
> return;
>--
>1.7.3.2
>
>
>--
>Ben Hutchings, Senior Software Engineer, Solarflare Communications
>Not speaking for my employer; that's the marketing department's job.
>They asked us to note that Solarflare product names are trademarked.
>
next prev parent reply other threads:[~2010-12-13 20:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 18:16 [PATCH net-next-2.6 0/3] bonding fixes Ben Hutchings
2010-12-13 18:18 ` Ben Hutchings
2010-12-16 20:42 ` David Miller
2010-12-13 18:19 ` [PATCH net-2.6 1/3] bonding/vlan: Remove redundant VLAN tag insertion logic Ben Hutchings
2010-12-13 19:58 ` Jay Vosburgh
2010-12-13 22:08 ` Jesse Gross
2010-12-13 18:19 ` [PATCH net-2.6 2/3] bonding: Change active slave quietly when bond is down Ben Hutchings
2010-12-13 20:41 ` Jay Vosburgh
2010-12-13 21:06 ` Ben Hutchings
2010-12-21 2:46 ` Flavio Leitner
2010-12-13 18:20 ` [PATCH net-2.6 3/3] bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion Ben Hutchings
2010-12-13 20:43 ` Jay Vosburgh [this message]
2010-12-13 22:20 ` Jesse Gross
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=32094.1292272986@death \
--to=fubar@us.ibm.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=linux-net-drivers@solarflare.com \
--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.