]> Pileus Git - ~andy/linux/blobdiff - drivers/net/bonding/bonding.h
bonding: Convert balance-rr transmit to new locking
[~andy/linux] / drivers / net / bonding / bonding.h
index 2a6af7d23728357c1d60f091b6a6864bb26593be..d1ed14bf1ccba358d4e1e8b9a6044d16f1056f2f 100644 (file)
@@ -22,8 +22,8 @@
 #include "bond_3ad.h"
 #include "bond_alb.h"
 
-#define DRV_VERSION    "3.1.3"
-#define DRV_RELDATE    "June 13, 2007"
+#define DRV_VERSION    "3.2.1"
+#define DRV_RELDATE    "October 15, 2007"
 #define DRV_NAME       "bonding"
 #define DRV_DESCRIPTION        "Ethernet Channel Bonding Driver"
 
@@ -128,6 +128,7 @@ struct bond_params {
        int arp_interval;
        int arp_validate;
        int use_carrier;
+       int fail_over_mac;
        int updelay;
        int downdelay;
        int lacp_fast;
@@ -156,6 +157,7 @@ struct slave {
        s8     link;    /* one of BOND_LINK_XXXX */
        s8     state;   /* one of BOND_STATE_XXXX */
        u32    original_flags;
+       u32    original_mtu;
        u32    link_failure_count;
        u16    speed;
        u8     duplex;
@@ -182,9 +184,9 @@ struct bonding {
        s32      slave_cnt; /* never change this value outside the attach/detach wrappers */
        rwlock_t lock;
        rwlock_t curr_slave_lock;
-       struct   timer_list mii_timer;
-       struct   timer_list arp_timer;
        s8       kill_timers;
+       s8       send_grat_arp;
+       s8       setup_by_slave;
        struct   net_device_stats stats;
 #ifdef CONFIG_PROC_FS
        struct   proc_dir_entry *proc_entry;
@@ -195,12 +197,18 @@ struct bonding {
        int      (*xmit_hash_policy)(struct sk_buff *, struct net_device *, int);
        __be32   master_ip;
        u16      flags;
+       u16      rr_tx_counter;
        struct   ad_bond_info ad_info;
        struct   alb_bond_info alb_info;
        struct   bond_params params;
        struct   list_head vlan_list;
        struct   vlan_group *vlgrp;
        struct   packet_type arp_mon_pt;
+       struct   workqueue_struct *wq;
+       struct   delayed_work mii_work;
+       struct   delayed_work arp_work;
+       struct   delayed_work alb_work;
+       struct   delayed_work ad_work;
 };
 
 /**
@@ -292,6 +300,8 @@ static inline void bond_unset_master_alb_flags(struct bonding *bond)
 struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
 int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
 int bond_create(char *name, struct bond_params *params, struct bonding **newbond);
+void bond_destroy(struct bonding *bond);
+int  bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev);
 void bond_deinit(struct net_device *bond_dev);
 int bond_create_sysfs(void);
 void bond_destroy_sysfs(void);
@@ -301,9 +311,9 @@ int bond_create_slave_symlinks(struct net_device *master, struct net_device *sla
 void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave);
 int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
 int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
-void bond_mii_monitor(struct net_device *bond_dev);
-void bond_loadbalance_arp_mon(struct net_device *bond_dev);
-void bond_activebackup_arp_mon(struct net_device *bond_dev);
+void bond_mii_monitor(struct work_struct *);
+void bond_loadbalance_arp_mon(struct work_struct *);
+void bond_activebackup_arp_mon(struct work_struct *);
 void bond_set_mode_ops(struct bonding *bond, int mode);
 int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl);
 void bond_select_active_slave(struct bonding *bond);