aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2010-12-12 14:03:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-16 16:16:05 -0500
commit411204a5a1ec1a35363d8ef450c77e2b8235da4d (patch)
tree6f40217c3a6d3f7395507880a86aad1a158b047b /drivers/net/bonding
parentad6bad3efbb82206837daad8cba2bc9343d778bf (diff)
bonding: migrate some macros from bond_alb.c to bond_alb.h
This patch simply migrates some macros from bond_alb.c to bond_alb.h. Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_alb.c36
-rw-r--r--drivers/net/bonding/bond_alb.h38
2 files changed, 38 insertions, 36 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 26bb118c4533..f4e638c65129 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -44,42 +44,6 @@
44#include "bond_alb.h" 44#include "bond_alb.h"
45 45
46 46
47#define ALB_TIMER_TICKS_PER_SEC 10 /* should be a divisor of HZ */
48#define BOND_TLB_REBALANCE_INTERVAL 10 /* In seconds, periodic re-balancing.
49 * Used for division - never set
50 * to zero !!!
51 */
52#define BOND_ALB_LP_INTERVAL 1 /* In seconds, periodic send of
53 * learning packets to the switch
54 */
55
56#define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \
57 * ALB_TIMER_TICKS_PER_SEC)
58
59#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \
60 * ALB_TIMER_TICKS_PER_SEC)
61
62#define TLB_HASH_TABLE_SIZE 256 /* The size of the clients hash table.
63 * Note that this value MUST NOT be smaller
64 * because the key hash table is BYTE wide !
65 */
66
67
68#define TLB_NULL_INDEX 0xffffffff
69#define MAX_LP_BURST 3
70
71/* rlb defs */
72#define RLB_HASH_TABLE_SIZE 256
73#define RLB_NULL_INDEX 0xffffffff
74#define RLB_UPDATE_DELAY 2*ALB_TIMER_TICKS_PER_SEC /* 2 seconds */
75#define RLB_ARP_BURST_SIZE 2
76#define RLB_UPDATE_RETRY 3 /* 3-ticks - must be smaller than the rlb
77 * rebalance interval (5 min).
78 */
79/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
80 * promiscuous after failover
81 */
82#define RLB_PROMISC_TIMEOUT 10*ALB_TIMER_TICKS_PER_SEC
83 47
84#ifndef __long_aligned 48#ifndef __long_aligned
85#define __long_aligned __attribute__((aligned((sizeof(long))))) 49#define __long_aligned __attribute__((aligned((sizeof(long)))))
diff --git a/drivers/net/bonding/bond_alb.h b/drivers/net/bonding/bond_alb.h
index 50968f8196cf..118c28aa471e 100644
--- a/drivers/net/bonding/bond_alb.h
+++ b/drivers/net/bonding/bond_alb.h
@@ -31,6 +31,44 @@ 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
34struct tlb_client_info { 72struct 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