aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_3ad.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_3ad.h')
-rw-r--r--drivers/net/bonding/bond_3ad.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 2c46a154f2c6..0ee3f1632c46 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -39,7 +39,7 @@
39 39
40typedef struct mac_addr { 40typedef struct mac_addr {
41 u8 mac_addr_value[ETH_ALEN]; 41 u8 mac_addr_value[ETH_ALEN];
42} mac_addr_t; 42} __packed mac_addr_t;
43 43
44enum { 44enum {
45 BOND_AD_STABLE = 0, 45 BOND_AD_STABLE = 0,
@@ -134,12 +134,12 @@ typedef struct lacpdu {
134 u8 tlv_type_terminator; // = terminator 134 u8 tlv_type_terminator; // = terminator
135 u8 terminator_length; // = 0 135 u8 terminator_length; // = 0
136 u8 reserved_50[50]; // = 0 136 u8 reserved_50[50]; // = 0
137} lacpdu_t; 137} __packed lacpdu_t;
138 138
139typedef struct lacpdu_header { 139typedef struct lacpdu_header {
140 struct ethhdr hdr; 140 struct ethhdr hdr;
141 struct lacpdu lacpdu; 141 struct lacpdu lacpdu;
142} lacpdu_header_t; 142} __packed lacpdu_header_t;
143 143
144// Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) 144// Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard)
145typedef struct bond_marker { 145typedef struct bond_marker {
@@ -155,12 +155,12 @@ typedef struct bond_marker {
155 u8 tlv_type_terminator; // = 0x00 155 u8 tlv_type_terminator; // = 0x00
156 u8 terminator_length; // = 0x00 156 u8 terminator_length; // = 0x00
157 u8 reserved_90[90]; // = 0 157 u8 reserved_90[90]; // = 0
158} bond_marker_t; 158} __packed bond_marker_t;
159 159
160typedef struct bond_marker_header { 160typedef struct bond_marker_header {
161 struct ethhdr hdr; 161 struct ethhdr hdr;
162 struct bond_marker marker; 162 struct bond_marker marker;
163} bond_marker_header_t; 163} __packed bond_marker_header_t;
164 164
165#pragma pack() 165#pragma pack()
166 166
@@ -258,13 +258,13 @@ struct ad_bond_info {
258 * requested 258 * requested
259 */ 259 */
260 struct timer_list ad_timer; 260 struct timer_list ad_timer;
261 struct packet_type ad_pkt_type;
262}; 261};
263 262
264struct ad_slave_info { 263struct ad_slave_info {
265 struct aggregator aggregator; // 802.3ad aggregator structure 264 struct aggregator aggregator; // 802.3ad aggregator structure
266 struct port port; // 802.3ad port structure 265 struct port port; // 802.3ad port structure
267 spinlock_t rx_machine_lock; // To avoid race condition between callback and receive interrupt 266 spinlock_t state_machine_lock; /* mutex state machines vs.
267 incoming LACPDU */
268 u16 id; 268 u16 id;
269}; 269};
270 270
@@ -279,7 +279,8 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave);
279void bond_3ad_handle_link_change(struct slave *slave, char link); 279void bond_3ad_handle_link_change(struct slave *slave, char link);
280int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info); 280int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info);
281int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev); 281int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev);
282int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype, struct net_device *orig_dev); 282void bond_3ad_lacpdu_recv(struct sk_buff *skb, struct bonding *bond,
283 struct slave *slave);
283int bond_3ad_set_carrier(struct bonding *bond); 284int bond_3ad_set_carrier(struct bonding *bond);
284#endif //__BOND_3AD_H__ 285#endif //__BOND_3AD_H__
285 286