bonding: migrate some macros from bond_alb.c to bond_alb.h
authorTaku Izumi <izumi.taku@jp.fujitsu.com>
Sun, 12 Dec 2010 19:03:24 +0000 (19:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Dec 2010 21:16:05 +0000 (13:16 -0800)
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>
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.h

index 26bb118c45334074ef4c8a51deda39e4161fba44..f4e638c651298aba65bae970216d4c0e7a7dfd00 100644 (file)
 #include "bond_alb.h"
 
 
-#define ALB_TIMER_TICKS_PER_SEC            10  /* should be a divisor of HZ */
-#define BOND_TLB_REBALANCE_INTERVAL 10 /* In seconds, periodic re-balancing.
-                                        * Used for division - never set
-                                        * to zero !!!
-                                        */
-#define BOND_ALB_LP_INTERVAL       1   /* In seconds, periodic send of
-                                        * learning packets to the switch
-                                        */
-
-#define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \
-                                 * ALB_TIMER_TICKS_PER_SEC)
-
-#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \
-                          * ALB_TIMER_TICKS_PER_SEC)
-
-#define TLB_HASH_TABLE_SIZE 256        /* The size of the clients hash table.
-                                * Note that this value MUST NOT be smaller
-                                * because the key hash table is BYTE wide !
-                                */
-
-
-#define TLB_NULL_INDEX         0xffffffff
-#define MAX_LP_BURST           3
-
-/* rlb defs */
-#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       3       /* 3-ticks - must be smaller than the rlb
-                                        * rebalance interval (5 min).
-                                        */
-/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
- * promiscuous after failover
- */
-#define RLB_PROMISC_TIMEOUT    10*ALB_TIMER_TICKS_PER_SEC
 
 #ifndef __long_aligned
 #define __long_aligned __attribute__((aligned((sizeof(long)))))
index 50968f8196cfa10e40cb5ba7367a6e611dda6d60..118c28aa471e7365aadcb17f09e40db23282f794 100644 (file)
@@ -31,6 +31,44 @@ struct slave;
 #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 10 /* In seconds, periodic re-balancing.
+                                        * Used for division - never set
+                                        * to zero !!!
+                                        */
+#define BOND_ALB_LP_INTERVAL       1   /* In seconds, periodic send of
+                                        * learning packets to the switch
+                                        */
+
+#define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \
+                                 * ALB_TIMER_TICKS_PER_SEC)
+
+#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \
+                          * ALB_TIMER_TICKS_PER_SEC)
+
+#define TLB_HASH_TABLE_SIZE 256        /* The size of the clients hash table.
+                                * Note that this value MUST NOT be smaller
+                                * because the key hash table is BYTE wide !
+                                */
+
+
+#define TLB_NULL_INDEX         0xffffffff
+#define MAX_LP_BURST           3
+
+/* rlb defs */
+#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       3 /* 3-ticks - must be smaller than the rlb
+                                  * rebalance interval (5 min).
+                                  */
+/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
+ * promiscuous after failover
+ */
+#define RLB_PROMISC_TIMEOUT    (10*ALB_TIMER_TICKS_PER_SEC)
+
+
 struct tlb_client_info {
        struct slave *tx_slave; /* A pointer to slave used for transmiting
                                 * packets to a Client that the Hash function