54 { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x02 };
69 default:
return "<invalid>";
85 default:
return "<invalid>";
96 static char state_chars[] =
"AFGSCDLX";
99 for ( i = 0 ; i < 8 ; i++ ) {
100 state_chars[i] |= 0x20;
101 if (
state & ( 1 << i ) )
102 state_chars[i] &= ~0x20;
116 const char *
label ) {
121 "SLOW %s %s LACP actor (%04x,%s,%04x,%02x,%04x) [%s]\n",
129 "SLOW %s %s LACP partner (%04x,%s,%04x,%02x,%04x) [%s]\n",
136 DBGC (
netdev,
"SLOW %s %s LACP collector %04x (%d us)\n",
138 (
ntohs (
lacp->collector.max_delay ) * 10 ) );
153 unsigned int interval;
159 sizeof (
lacp->actor.system ) ) == 0 ) {
160 DBGC (
netdev,
"SLOW %s RX loopback detected\n",
179 DBGC (
netdev,
"SLOW %s LACP partner is up\n",
195 sizeof (
lacp->partner.reserved ) );
201 sizeof (
lacp->actor.system ) );
227 const char *
label ) {
231 DBGC (
netdev,
"SLOW %s %s marker %s port %04x system %s xact %08x\n",
285 if (
iob_len ( iobuf ) <
sizeof ( *eth_slow ) ) {
300 DBGC (
netdev,
"SLOW %s RX unknown subtype %02x\n",
uint32_t type
Operating system type.
static int eth_slow_lacp_rx(struct io_buffer *iobuf, struct net_device *netdev)
Process incoming LACP packet.
static int eth_slow_rx(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest __unused, const void *ll_source __unused, unsigned int flags __unused)
Process incoming slow packet.
static const uint8_t eth_slow_address[ETH_ALEN]
Slow protocols multicast address.
static const char * eth_slow_marker_tlv_name(uint8_t type)
Name marker TLV type.
static void eth_slow_lacp_dump(struct io_buffer *iobuf, struct net_device *netdev, const char *label)
Dump LACP packet.
static int eth_slow_marker_rx(struct io_buffer *iobuf, struct net_device *netdev)
Process incoming marker packet.
static const char * eth_slow_lacp_tlv_name(uint8_t type)
Name LACP TLV type.
static const char * eth_slow_lacp_state_name(uint8_t state)
Name LACP state.
static void eth_slow_marker_dump(struct io_buffer *iobuf, struct net_device *netdev, const char *label)
Dump marker packet.
#define LACP_STATE_COLLECTING
LACP link is collecting (receiving)
#define ETH_SLOW_TLV_LACP_COLLECTOR
LACP collector type.
#define LACP_STATE_AGGREGATABLE
LACP link is aggregateable.
#define ETH_SLOW_TLV_LACP_COLLECTOR_LEN
LACP collector length.
#define ETH_SLOW_TLV_LACP_ACTOR_LEN
LACP actor length.
#define LACP_INTERVAL_FAST
LACP fast interval (1 second)
#define ETH_SLOW_SUBTYPE_LACP
LACP subtype.
#define LACP_SYSTEM_PRIORITY_MAX
Maximum system priority.
#define ETH_SLOW_LACP_VERSION
LACP version number.
#define LACP_STATE_FAST
LACP timeout is short.
#define LACP_INTERVAL_SLOW
LACP slow interval (30 seconds)
#define LACP_STATE_IN_SYNC
LACP link is in synchronisation.
#define ETH_SLOW_TLV_LACP_ACTOR
LACP actor type.
#define ETH_SLOW_TLV_LACP_PARTNER
LACP partner type.
#define ETH_SLOW_SUBTYPE_MARKER
Marker subtype.
#define ETH_SLOW_TLV_TERMINATOR
Terminator type.
#define ETH_SLOW_TLV_LACP_PARTNER_LEN
LACP partner length.
#define ETH_SLOW_TLV_MARKER_RESPONSE
Marker response type.
#define LACP_STATE_DISTRIBUTING
LACP link is distributing (transmitting)
#define ETH_SLOW_TLV_MARKER_REQUEST
Marker request type.
#define LACP_PORT_PRIORITY_MAX
Maximum port priority.
struct eth_slow_marker_tlv marker
Marker information.
struct eth_slow_lacp lacp
LACP packet.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
static struct net_device * netdev
#define __unused
Declare a variable or data structure as unused.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define EINVAL
Invalid argument.
#define ELOOP
Too many levels of symbolic links.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define TICKS_PER_SEC
Number of ticks per second.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
#define iob_unput(iobuf, len)
int net_tx(struct io_buffer *iobuf, struct net_device *netdev, struct net_protocol *net_protocol, const void *ll_dest, const void *ll_source)
Transmit network-layer packet.
void netdev_link_block(struct net_device *netdev, unsigned long timeout)
Mark network device link as being blocked.
void netdev_link_unblock(struct net_device *netdev)
Mark network device link as being unblocked.
Network device management.
static int netdev_link_blocked(struct net_device *netdev)
Check link block state of network device.
#define __net_protocol
Declare a network-layer protocol.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
void * data
Start of data.
A network-layer protocol.
struct eth_slow_header header
Slow protocols header.
struct eth_slow_lacp lacp
LACP packet.
struct eth_slow_marker marker
Marker packet.