Linux Kernel
3.7.1
|
#include <asm/byteorder.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/if_ether.h>
Go to the source code of this file.
Data Structures | |
struct | mac_addr |
struct | lacpdu |
struct | lacpdu_header |
struct | bond_marker |
struct | bond_marker_header |
struct | aggregator |
struct | port_params |
struct | port |
struct | ad_system |
struct | ad_bond_info |
struct | ad_slave_info |
Macros | |
#define | PKT_TYPE_LACPDU cpu_to_be16(ETH_P_SLOW) |
#define | AD_TIMER_INTERVAL 100 /*msec*/ |
#define | MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} |
#define | AD_LACP_SLOW 0 |
#define | AD_LACP_FAST 1 |
#define | BOND_AD_INFO(bond) ((bond)->ad_info) |
#define | SLAVE_AD_INFO(slave) ((slave)->ad_info) |
Typedefs | |
typedef struct mac_addr | mac_addr_t |
typedef struct lacpdu | lacpdu_t |
typedef struct lacpdu_header | lacpdu_header_t |
typedef struct bond_marker | bond_marker_t |
typedef struct bond_marker_header | bond_marker_header_t |
typedef struct aggregator | aggregator_t |
typedef struct port | port_t |
Enumerations | |
enum | { BOND_AD_STABLE = 0, BOND_AD_BANDWIDTH = 1, BOND_AD_COUNT = 2 } |
enum | rx_states_t { AD_RX_DUMMY, AD_RX_INITIALIZE, AD_RX_PORT_DISABLED, AD_RX_LACP_DISABLED, AD_RX_EXPIRED, AD_RX_DEFAULTED, AD_RX_CURRENT } |
enum | periodic_states_t { AD_PERIODIC_DUMMY, AD_NO_PERIODIC, AD_FAST_PERIODIC, AD_SLOW_PERIODIC, AD_PERIODIC_TX } |
enum | mux_states_t { AD_MUX_DUMMY, AD_MUX_DETACHED, AD_MUX_WAITING, AD_MUX_ATTACHED, AD_MUX_COLLECTING_DISTRIBUTING } |
enum | tx_states_t { AD_TX_DUMMY, AD_TRANSMIT } |
enum | pdu_type_t { AD_TYPE_LACPDU = 1, AD_TYPE_MARKER } |
enum | bond_marker_subtype_t { AD_MARKER_INFORMATION_SUBTYPE = 1, AD_MARKER_RESPONSE_SUBTYPE } |
enum | ad_timers_t { AD_CURRENT_WHILE_TIMER, AD_ACTOR_CHURN_TIMER, AD_PERIODIC_TIMER, AD_PARTNER_CHURN_TIMER, AD_WAIT_WHILE_TIMER } |
Functions | |
void | bond_3ad_initialize (struct bonding *bond, u16 tick_resolution) |
int | bond_3ad_bind_slave (struct slave *slave) |
void | bond_3ad_unbind_slave (struct slave *slave) |
void | bond_3ad_state_machine_handler (struct work_struct *) |
void | bond_3ad_initiate_agg_selection (struct bonding *bond, int timeout) |
void | bond_3ad_adapter_speed_changed (struct slave *slave) |
void | bond_3ad_adapter_duplex_changed (struct slave *slave) |
void | bond_3ad_handle_link_change (struct slave *slave, char link) |
int | bond_3ad_get_active_agg_info (struct bonding *bond, struct ad_info *ad_info) |
int | bond_3ad_xmit_xor (struct sk_buff *skb, struct net_device *dev) |
int | bond_3ad_lacpdu_recv (const struct sk_buff *skb, struct bonding *bond, struct slave *slave) |
int | bond_3ad_set_carrier (struct bonding *bond) |
void | bond_3ad_update_lacp_rate (struct bonding *bond) |
#define AD_LACP_FAST 1 |
Definition at line 38 of file bond_3ad.h.
#define AD_LACP_SLOW 0 |
Definition at line 37 of file bond_3ad.h.
#define AD_TIMER_INTERVAL 100 /*msec*/ |
Definition at line 33 of file bond_3ad.h.
#define BOND_AD_INFO | ( | bond | ) | ((bond)->ad_info) |
Definition at line 250 of file bond_3ad.h.
#define MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} |
Definition at line 35 of file bond_3ad.h.
#define PKT_TYPE_LACPDU cpu_to_be16(ETH_P_SLOW) |
Definition at line 32 of file bond_3ad.h.
Definition at line 251 of file bond_3ad.h.
typedef struct aggregator aggregator_t |
typedef struct bond_marker bond_marker_t |
typedef struct lacpdu_header lacpdu_header_t |
typedef struct mac_addr mac_addr_t |
anonymous enum |
Definition at line 44 of file bond_3ad.h.
enum ad_timers_t |
AD_CURRENT_WHILE_TIMER | |
AD_ACTOR_CHURN_TIMER | |
AD_PERIODIC_TIMER | |
AD_PARTNER_CHURN_TIMER | |
AD_WAIT_WHILE_TIMER |
Definition at line 98 of file bond_3ad.h.
Definition at line 92 of file bond_3ad.h.
enum mux_states_t |
AD_MUX_DUMMY | |
AD_MUX_DETACHED | |
AD_MUX_WAITING | |
AD_MUX_ATTACHED | |
AD_MUX_COLLECTING_DISTRIBUTING |
Definition at line 71 of file bond_3ad.h.
enum pdu_type_t |
Definition at line 86 of file bond_3ad.h.
enum periodic_states_t |
Definition at line 62 of file bond_3ad.h.
enum rx_states_t |
AD_RX_DUMMY | |
AD_RX_INITIALIZE | |
AD_RX_PORT_DISABLED | |
AD_RX_LACP_DISABLED | |
AD_RX_EXPIRED | |
AD_RX_DEFAULTED | |
AD_RX_CURRENT |
Definition at line 51 of file bond_3ad.h.
enum tx_states_t |
Definition at line 80 of file bond_3ad.h.
bond_3ad_adapter_duplex_changed - handle a slave's duplex change indication : slave struct to work on
Handle reselection of aggregator (if needed) for this port.
Definition at line 2262 of file bond_3ad.c.
bond_3ad_adapter_speed_changed - handle a slave's speed change indication : slave struct to work on
Handle reselection of aggregator (if needed) for this port.
Definition at line 2234 of file bond_3ad.c.
bond_3ad_bind_slave - initialize a slave's port : slave struct to work on
Returns: 0 on success < 0 on error
Definition at line 1893 of file bond_3ad.c.
bond_3ad_get_active_agg_info - get information of the active aggregator : bonding struct to work on : ad_info struct to fill with the bond's info
Returns: 0 on success < 0 on error
Definition at line 2371 of file bond_3ad.c.
bond_3ad_handle_link_change - handle a slave's link status change indication : slave struct to work on : whether the link is now up or down
Handle reselection of aggregator (if needed) for this port.
Definition at line 2291 of file bond_3ad.c.
bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures : bonding struct to work on : tick duration (millisecond resolution)
Can be called only after the mac address of the bond is set.
Definition at line 1866 of file bond_3ad.c.
Definition at line 1852 of file bond_3ad.c.
int bond_3ad_lacpdu_recv | ( | const struct sk_buff * | skb, |
struct bonding * | bond, | ||
struct slave * | slave | ||
) |
Definition at line 2463 of file bond_3ad.c.
Definition at line 2337 of file bond_3ad.c.
void bond_3ad_state_machine_handler | ( | struct work_struct * | work | ) |
bond_3ad_state_machine_handler - handle state machines timeout : bonding struct to work on
The state machine handling concept in this module is to check every tick which state machine should operate any function. The execution order is round robin, so when we have an interaction between state machines, the reply of one to each other might be delayed until next tick.
This function also complete the initialization when the agg_select_timer times out, and it selects an aggregator for the ports that are yet not related to any aggregator, and selects the active aggregator for a bond.
Definition at line 2104 of file bond_3ad.c.
bond_3ad_unbind_slave - deinitialize a slave's port : slave struct to work on
Search for the aggregator that is related to this port, remove the aggregator and assign another aggregator for other port related to it (if any), and remove the port.
Definition at line 1961 of file bond_3ad.c.
Definition at line 2490 of file bond_3ad.c.
int bond_3ad_xmit_xor | ( | struct sk_buff * | skb, |
struct net_device * | dev | ||
) |
Definition at line 2395 of file bond_3ad.c.