diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/bonding/bond_alb.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/bonding/bond_alb.h')
-rw-r--r-- | drivers/net/bonding/bond_alb.h | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h index 50968f8196cf..90f140a2d197 100644 --- a/drivers/net/bonding/bond_alb.h +++ b/drivers/net/bonding/bond_alb.h | |||
@@ -31,14 +31,52 @@ struct slave; | |||
31 | #define BOND_ALB_INFO(bond) ((bond)->alb_info) | 31 | #define BOND_ALB_INFO(bond) ((bond)->alb_info) |
32 | #define SLAVE_TLB_INFO(slave) ((slave)->tlb_info) | 32 | #define SLAVE_TLB_INFO(slave) ((slave)->tlb_info) |
33 | 33 | ||
34 | #define ALB_TIMER_TICKS_PER_SEC 10 /* should be a divisor of HZ */ | ||
35 | #define BOND_TLB_REBALANCE_INTERVAL 10 /* In seconds, periodic re-balancing. | ||
36 | * Used for division - never set | ||
37 | * to zero !!! | ||
38 | */ | ||
39 | #define BOND_ALB_LP_INTERVAL 1 /* In seconds, periodic send of | ||
40 | * learning packets to the switch | ||
41 | */ | ||
42 | |||
43 | #define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \ | ||
44 | * ALB_TIMER_TICKS_PER_SEC) | ||
45 | |||
46 | #define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \ | ||
47 | * ALB_TIMER_TICKS_PER_SEC) | ||
48 | |||
49 | #define TLB_HASH_TABLE_SIZE 256 /* The size of the clients hash table. | ||
50 | * Note that this value MUST NOT be smaller | ||
51 | * because the key hash table is BYTE wide ! | ||
52 | */ | ||
53 | |||
54 | |||
55 | #define TLB_NULL_INDEX 0xffffffff | ||
56 | #define MAX_LP_BURST 3 | ||
57 | |||
58 | /* rlb defs */ | ||
59 | #define RLB_HASH_TABLE_SIZE 256 | ||
60 | #define RLB_NULL_INDEX 0xffffffff | ||
61 | #define RLB_UPDATE_DELAY (2*ALB_TIMER_TICKS_PER_SEC) /* 2 seconds */ | ||
62 | #define RLB_ARP_BURST_SIZE 2 | ||
63 | #define RLB_UPDATE_RETRY 3 /* 3-ticks - must be smaller than the rlb | ||
64 | * rebalance interval (5 min). | ||
65 | */ | ||
66 | /* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is | ||
67 | * promiscuous after failover | ||
68 | */ | ||
69 | #define RLB_PROMISC_TIMEOUT (10*ALB_TIMER_TICKS_PER_SEC) | ||
70 | |||
71 | |||
34 | struct tlb_client_info { | 72 | struct tlb_client_info { |
35 | struct slave *tx_slave; /* A pointer to slave used for transmiting | 73 | struct slave *tx_slave; /* A pointer to slave used for transmiting |
36 | * packets to a Client that the Hash function | 74 | * packets to a Client that the Hash function |
37 | * gave this entry index. | 75 | * gave this entry index. |
38 | */ | 76 | */ |
39 | u32 tx_bytes; /* Each Client acumulates the BytesTx that | 77 | u32 tx_bytes; /* Each Client accumulates the BytesTx that |
40 | * were tranmitted to it, and after each | 78 | * were transmitted to it, and after each |
41 | * CallBack the LoadHistory is devided | 79 | * CallBack the LoadHistory is divided |
42 | * by the balance interval | 80 | * by the balance interval |
43 | */ | 81 | */ |
44 | u32 load_history; /* This field contains the amount of Bytes | 82 | u32 load_history; /* This field contains the amount of Bytes |
@@ -84,7 +122,6 @@ struct tlb_slave_info { | |||
84 | }; | 122 | }; |
85 | 123 | ||
86 | struct alb_bond_info { | 124 | struct alb_bond_info { |
87 | struct timer_list alb_timer; | ||
88 | struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */ | 125 | struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */ |
89 | spinlock_t tx_hashtbl_lock; | 126 | spinlock_t tx_hashtbl_lock; |
90 | u32 unbalanced_load; | 127 | u32 unbalanced_load; |
@@ -92,7 +129,6 @@ struct alb_bond_info { | |||
92 | int lp_counter; | 129 | int lp_counter; |
93 | /* -------- rlb parameters -------- */ | 130 | /* -------- rlb parameters -------- */ |
94 | int rlb_enabled; | 131 | int rlb_enabled; |
95 | struct packet_type rlb_pkt_type; | ||
96 | struct rlb_client_info *rx_hashtbl; /* Receive hash table */ | 132 | struct rlb_client_info *rx_hashtbl; /* Receive hash table */ |
97 | spinlock_t rx_hashtbl_lock; | 133 | spinlock_t rx_hashtbl_lock; |
98 | u32 rx_hashtbl_head; | 134 | u32 rx_hashtbl_head; |
@@ -102,7 +138,6 @@ struct alb_bond_info { | |||
102 | struct slave *next_rx_slave;/* next slave to be assigned | 138 | struct slave *next_rx_slave;/* next slave to be assigned |
103 | * to a new rx client for | 139 | * to a new rx client for |
104 | */ | 140 | */ |
105 | u32 rlb_interval_counter; | ||
106 | u8 primary_is_promisc; /* boolean */ | 141 | u8 primary_is_promisc; /* boolean */ |
107 | u32 rlb_promisc_timeout_counter;/* counts primary | 142 | u32 rlb_promisc_timeout_counter;/* counts primary |
108 | * promiscuity time | 143 | * promiscuity time |