1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef _LINUX_IF_EQL_H
20 #define _LINUX_IF_EQL_H
21
22 #define EQL_DEFAULT_SLAVE_PRIORITY 28800
23 #define EQL_DEFAULT_MAX_SLAVES 4
24 #define EQL_DEFAULT_MTU 576
25 #define EQL_DEFAULT_RESCHED_IVAL 100
26
27 #define EQL_ENSLAVE (SIOCDEVPRIVATE)
28 #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1)
29
30 #define EQL_GETSLAVECFG (SIOCDEVPRIVATE + 2)
31 #define EQL_SETSLAVECFG (SIOCDEVPRIVATE + 3)
32
33 #define EQL_GETMASTRCFG (SIOCDEVPRIVATE + 4)
34 #define EQL_SETMASTRCFG (SIOCDEVPRIVATE + 5)
35
36 typedef struct slave {
37 struct device *dev;
38 long priority;
39 long priority_bps;
40 long priority_Bps;
41 long bytes_queued;
42 struct slave *next;
43 } slave_t;
44
45 typedef struct slave_queue {
46 slave_t *head;
47 slave_t *best_slave;
48 int num_slaves;
49 struct device *master_dev;
50 char lock;
51 } slave_queue_t;
52
53 typedef struct equalizer {
54 slave_queue_t *queue;
55 int min_slaves;
56 int max_slaves;
57 struct enet_statistics *stats;
58 struct timer_list timer;
59 char timer_on;
60 } equalizer_t;
61
62 typedef struct master_config {
63 char master_name[16];
64 int max_slaves;
65 int min_slaves;
66 } master_config_t;
67
68 typedef struct slave_config {
69 char slave_name[16];
70 long priority;
71 } slave_config_t;
72
73 typedef struct slaving_request {
74 char slave_name[16];
75 long priority;
76 } slaving_request_t;
77
78
79 #endif