aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2006-02-21 19:36:44 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-03 20:58:00 -0500
commit8f903c708fcc2b579ebf16542bf6109bad593a1d (patch)
tree8fb890c05d962c2dd63f8dbc960efbd0b09802d2 /drivers/net/bonding/bonding.h
parentebe19a4ed78d4a11a7e01cdeda25f91b7f2fcb5a (diff)
[PATCH] bonding: suppress duplicate packets
Originally submitted by Kenzo Iwami; his original description is: The current bonding driver receives duplicate packets when broadcast/ multicast packets are sent by other devices or packets are flooded by the switch. In this patch, new flags are added in priv_flags of net_device structure to let the bonding driver discard duplicate packets in dev.c:skb_bond(). Modified by Jay Vosburgh to change a define name, update some comments, rearrange the new skb_bond() for clarity, clear all bonding priv_flags on slave release, and update the driver version. Signed-off-by: Kenzo Iwami <k-iwami@cj.jp.nec.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r--drivers/net/bonding/bonding.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 3dd78d048c3e..ce9dc9b4e2dc 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -22,8 +22,8 @@
22#include "bond_3ad.h" 22#include "bond_3ad.h"
23#include "bond_alb.h" 23#include "bond_alb.h"
24 24
25#define DRV_VERSION "3.0.1" 25#define DRV_VERSION "3.0.2"
26#define DRV_RELDATE "January 9, 2006" 26#define DRV_RELDATE "February 21, 2006"
27#define DRV_NAME "bonding" 27#define DRV_NAME "bonding"
28#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" 28#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
29 29
@@ -230,14 +230,37 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
230 230
231static inline void bond_set_slave_inactive_flags(struct slave *slave) 231static inline void bond_set_slave_inactive_flags(struct slave *slave)
232{ 232{
233 slave->state = BOND_STATE_BACKUP; 233 struct bonding *bond = slave->dev->master->priv;
234 slave->dev->flags |= IFF_NOARP; 234 if (bond->params.mode != BOND_MODE_TLB &&
235 bond->params.mode != BOND_MODE_ALB)
236 slave->state = BOND_STATE_BACKUP;
237 slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
235} 238}
236 239
237static inline void bond_set_slave_active_flags(struct slave *slave) 240static inline void bond_set_slave_active_flags(struct slave *slave)
238{ 241{
239 slave->state = BOND_STATE_ACTIVE; 242 slave->state = BOND_STATE_ACTIVE;
240 slave->dev->flags &= ~IFF_NOARP; 243 slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE;
244}
245
246static inline void bond_set_master_3ad_flags(struct bonding *bond)
247{
248 bond->dev->priv_flags |= IFF_MASTER_8023AD;
249}
250
251static inline void bond_unset_master_3ad_flags(struct bonding *bond)
252{
253 bond->dev->priv_flags &= ~IFF_MASTER_8023AD;
254}
255
256static inline void bond_set_master_alb_flags(struct bonding *bond)
257{
258 bond->dev->priv_flags |= IFF_MASTER_ALB;
259}
260
261static inline void bond_unset_master_alb_flags(struct bonding *bond)
262{
263 bond->dev->priv_flags &= ~IFF_MASTER_ALB;
241} 264}
242 265
243struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); 266struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);