From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>, Jay Vosburgh <fubar@us.ibm.com>
Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
Jesse Gross <jesse@nicira.com>
Subject: [PATCH net-2.6 1/3] bonding/vlan: Remove redundant VLAN tag insertion logic
Date: Mon, 13 Dec 2010 18:19:28 +0000 [thread overview]
Message-ID: <1292264368.9860.13.camel@bwh-desktop> (raw)
In-Reply-To: <1292264216.9860.11.camel@bwh-desktop>
A bond may have a mixture of slave devices with and without hardware
VLAN tag insertion capability. Therefore it always claims this
capability and performs software VLAN tag insertion if the slave does
not.
Since commit 7b9c60903714bf0a19d746b228864bad3497284e, this has
also been done by dev_hard_start_xmit(). The result is that VLAN-
tagged skbs are now double-tagged when transmitted through slave
devices without hardware VLAN tag insertion!
Remove the now-redundant logic from bond_dev_queue_xmit().
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/bonding/bond_main.c | 27 +--------------------------
1 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d0ea760..ef370c9 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -418,36 +418,11 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
* @bond: bond device that got this skb for tx.
* @skb: hw accel VLAN tagged skb to transmit
* @slave_dev: slave that is supposed to xmit this skbuff
- *
- * When the bond gets an skb to transmit that is
- * already hardware accelerated VLAN tagged, and it
- * needs to relay this skb to a slave that is not
- * hw accel capable, the skb needs to be "unaccelerated",
- * i.e. strip the hwaccel tag and re-insert it as part
- * of the payload.
*/
int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
struct net_device *slave_dev)
{
- unsigned short uninitialized_var(vlan_id);
-
- /* Test vlan_list not vlgrp to catch and handle 802.1p tags */
- if (!list_empty(&bond->vlan_list) &&
- !(slave_dev->features & NETIF_F_HW_VLAN_TX) &&
- vlan_get_tag(skb, &vlan_id) == 0) {
- skb->dev = slave_dev;
- skb = vlan_put_tag(skb, vlan_id);
- if (!skb) {
- /* vlan_put_tag() frees the skb in case of error,
- * so return success here so the calling functions
- * won't attempt to free is again.
- */
- return 0;
- }
- } else {
- skb->dev = slave_dev;
- }
-
+ skb->dev = slave_dev;
skb->priority = 1;
#ifdef CONFIG_NET_POLL_CONTROLLER
if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) {
--
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 18:19 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 ` Ben Hutchings [this message]
2010-12-13 19:58 ` [PATCH net-2.6 1/3] bonding/vlan: Remove redundant VLAN tag insertion logic 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
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=1292264368.9860.13.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--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 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).