Skip to content

Commit 411204a

Browse files
izumi777davem330
authored andcommitted
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 <[email protected]> Signed-off-by: Jay Vosburgh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ad6bad3 commit 411204a

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

drivers/net/bonding/bond_alb.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,42 +44,6 @@
4444
#include "bond_alb.h"
4545

4646

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
8347

8448
#ifndef __long_aligned
8549
#define __long_aligned __attribute__((aligned((sizeof(long)))))

drivers/net/bonding/bond_alb.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,44 @@ struct slave;
3131
#define BOND_ALB_INFO(bond) ((bond)->alb_info)
3232
#define SLAVE_TLB_INFO(slave) ((slave)->tlb_info)
3333

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+
3472
struct tlb_client_info {
3573
struct slave *tx_slave; /* A pointer to slave used for transmiting
3674
* packets to a Client that the Hash function

0 commit comments

Comments
 (0)