Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
bond_alb.h File Reference
#include <linux/if_ether.h>

Go to the source code of this file.

Data Structures

struct  tlb_client_info
 
struct  rlb_client_info
 
struct  tlb_slave_info
 
struct  alb_bond_info
 

Macros

#define BOND_ALB_INFO(bond)   ((bond)->alb_info)
 
#define SLAVE_TLB_INFO(slave)   ((slave)->tlb_info)
 
#define ALB_TIMER_TICKS_PER_SEC   10 /* should be a divisor of HZ */
 
#define BOND_TLB_REBALANCE_INTERVAL
 
#define BOND_ALB_LP_INTERVAL
 
#define BOND_TLB_REBALANCE_TICKS
 
#define BOND_ALB_LP_TICKS
 
#define TLB_HASH_TABLE_SIZE
 
#define TLB_NULL_INDEX   0xffffffff
 
#define MAX_LP_BURST   3
 
#define RLB_HASH_TABLE_SIZE   256
 
#define RLB_NULL_INDEX   0xffffffff
 
#define RLB_UPDATE_DELAY   (2*ALB_TIMER_TICKS_PER_SEC) /* 2 seconds */
 
#define RLB_ARP_BURST_SIZE   2
 
#define RLB_UPDATE_RETRY
 
#define RLB_PROMISC_TIMEOUT   (10*ALB_TIMER_TICKS_PER_SEC)
 

Functions

int bond_alb_initialize (struct bonding *bond, int rlb_enabled)
 
void bond_alb_deinitialize (struct bonding *bond)
 
int bond_alb_init_slave (struct bonding *bond, struct slave *slave)
 
void bond_alb_deinit_slave (struct bonding *bond, struct slave *slave)
 
void bond_alb_handle_link_change (struct bonding *bond, struct slave *slave, char link)
 
void bond_alb_handle_active_change (struct bonding *bond, struct slave *new_slave)
 
int bond_alb_xmit (struct sk_buff *skb, struct net_device *bond_dev)
 
void bond_alb_monitor (struct work_struct *)
 
int bond_alb_set_mac_address (struct net_device *bond_dev, void *addr)
 
void bond_alb_clear_vlan (struct bonding *bond, unsigned short vlan_id)
 

Macro Definition Documentation

#define ALB_TIMER_TICKS_PER_SEC   10 /* should be a divisor of HZ */

Definition at line 34 of file bond_alb.h.

#define BOND_ALB_INFO (   bond)    ((bond)->alb_info)

Definition at line 31 of file bond_alb.h.

#define BOND_ALB_LP_INTERVAL
Value:
1 /* In seconds, periodic send of
* learning packets to the switch
*/

Definition at line 36 of file bond_alb.h.

#define BOND_ALB_LP_TICKS
Value:

Definition at line 41 of file bond_alb.h.

#define BOND_TLB_REBALANCE_INTERVAL
Value:
10 /* In seconds, periodic re-balancing.
* Used for division - never set
* to zero !!!
*/

Definition at line 35 of file bond_alb.h.

#define BOND_TLB_REBALANCE_TICKS
Value:

Definition at line 38 of file bond_alb.h.

#define MAX_LP_BURST   3

Definition at line 48 of file bond_alb.h.

#define RLB_ARP_BURST_SIZE   2

Definition at line 54 of file bond_alb.h.

#define RLB_HASH_TABLE_SIZE   256

Definition at line 51 of file bond_alb.h.

#define RLB_NULL_INDEX   0xffffffff

Definition at line 52 of file bond_alb.h.

#define RLB_PROMISC_TIMEOUT   (10*ALB_TIMER_TICKS_PER_SEC)

Definition at line 59 of file bond_alb.h.

#define RLB_UPDATE_DELAY   (2*ALB_TIMER_TICKS_PER_SEC) /* 2 seconds */

Definition at line 53 of file bond_alb.h.

#define RLB_UPDATE_RETRY
Value:
3 /* 3-ticks - must be smaller than the rlb
* rebalance interval (5 min).
*/

Definition at line 55 of file bond_alb.h.

#define SLAVE_TLB_INFO (   slave)    ((slave)->tlb_info)

Definition at line 32 of file bond_alb.h.

#define TLB_HASH_TABLE_SIZE
Value:
256 /* The size of the clients hash table.
* Note that this value MUST NOT be smaller
* because the key hash table is BYTE wide !
*/

Definition at line 44 of file bond_alb.h.

#define TLB_NULL_INDEX   0xffffffff

Definition at line 47 of file bond_alb.h.

Function Documentation

void bond_alb_clear_vlan ( struct bonding bond,
unsigned short  vlan_id 
)

Definition at line 1701 of file bond_alb.c.

void bond_alb_deinit_slave ( struct bonding bond,
struct slave slave 
)

Definition at line 1512 of file bond_alb.c.

void bond_alb_deinitialize ( struct bonding bond)

Definition at line 1216 of file bond_alb.c.

void bond_alb_handle_active_change ( struct bonding bond,
struct slave new_slave 
) -> curr_slave_lock) __releases(&bond->lock) __acquires(&bond->lock) __acquires(&bond->curr_slave_lock)

bond_alb_handle_active_change - assign new curr_active_slave : our bonding struct : new slave to assign

Set the bond->curr_active_slave to and handle mac address swapping and promiscuity changes as needed.

If new_slave is NULL, caller must hold curr_slave_lock or bond->lock for write.

If new_slave is not NULL, caller must hold RTNL, bond->lock for read and curr_slave_lock for write. Processing here may sleep, so no other locks may be held.

Definition at line 1565 of file bond_alb.c.

void bond_alb_handle_link_change ( struct bonding bond,
struct slave slave,
char  link 
)

Definition at line 1527 of file bond_alb.c.

int bond_alb_init_slave ( struct bonding bond,
struct slave slave 
)

Definition at line 1472 of file bond_alb.c.

int bond_alb_initialize ( struct bonding bond,
int  rlb_enabled 
)

Definition at line 1192 of file bond_alb.c.

void bond_alb_monitor ( struct work_struct )

Definition at line 1358 of file bond_alb.c.

int bond_alb_set_mac_address ( struct net_device bond_dev,
void addr 
)

Definition at line 1644 of file bond_alb.c.

int bond_alb_xmit ( struct sk_buff skb,
struct net_device bond_dev 
)

Definition at line 1227 of file bond_alb.c.