Lines Matching refs:lacpdu

99 static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port);
453 static void __choose_matched(struct lacpdu *lacpdu, struct port *port) in __choose_matched() argument
459 if (((ntohs(lacpdu->partner_port) == port->actor_port_number) && in __choose_matched()
460 (ntohs(lacpdu->partner_port_priority) == port->actor_port_priority) && in __choose_matched()
461 MAC_ADDRESS_EQUAL(&(lacpdu->partner_system), &(port->actor_system)) && in __choose_matched()
462 (ntohs(lacpdu->partner_system_priority) == port->actor_system_priority) && in __choose_matched()
463 (ntohs(lacpdu->partner_key) == port->actor_oper_port_key) && in __choose_matched()
464 …((lacpdu->partner_state & LACP_STATE_AGGREGATION) == (port->actor_oper_port_state & LACP_STATE_AGG… in __choose_matched()
465 ((lacpdu->actor_state & LACP_STATE_AGGREGATION) == 0) in __choose_matched()
482 static void __record_pdu(struct lacpdu *lacpdu, struct port *port) in __record_pdu() argument
484 if (lacpdu && port) { in __record_pdu()
487 __choose_matched(lacpdu, port); in __record_pdu()
491 partner->port_number = ntohs(lacpdu->actor_port); in __record_pdu()
492 partner->port_priority = ntohs(lacpdu->actor_port_priority); in __record_pdu()
493 partner->system = lacpdu->actor_system; in __record_pdu()
494 partner->system_priority = ntohs(lacpdu->actor_system_priority); in __record_pdu()
495 partner->key = ntohs(lacpdu->actor_key); in __record_pdu()
496 partner->port_state = lacpdu->actor_state; in __record_pdu()
505 (lacpdu->actor_state & LACP_STATE_SYNCHRONIZATION)) { in __record_pdu()
550 static void __update_selected(struct lacpdu *lacpdu, struct port *port) in __update_selected() argument
552 if (lacpdu && port) { in __update_selected()
558 if (ntohs(lacpdu->actor_port) != partner->port_number || in __update_selected()
559 ntohs(lacpdu->actor_port_priority) != partner->port_priority || in __update_selected()
560 !MAC_ADDRESS_EQUAL(&lacpdu->actor_system, &partner->system) || in __update_selected()
561 ntohs(lacpdu->actor_system_priority) != partner->system_priority || in __update_selected()
562 ntohs(lacpdu->actor_key) != partner->key || in __update_selected()
563 …(lacpdu->actor_state & LACP_STATE_AGGREGATION) != (partner->port_state & LACP_STATE_AGGREGATION)) { in __update_selected()
614 static void __update_ntt(struct lacpdu *lacpdu, struct port *port) in __update_ntt() argument
617 if (lacpdu && port) { in __update_ntt()
621 if ((ntohs(lacpdu->partner_port) != port->actor_port_number) || in __update_ntt()
622 (ntohs(lacpdu->partner_port_priority) != port->actor_port_priority) || in __update_ntt()
623 !MAC_ADDRESS_EQUAL(&(lacpdu->partner_system), &(port->actor_system)) || in __update_ntt()
624 (ntohs(lacpdu->partner_system_priority) != port->actor_system_priority) || in __update_ntt()
625 (ntohs(lacpdu->partner_key) != port->actor_oper_port_key) || in __update_ntt()
626 …((lacpdu->partner_state & LACP_STATE_LACP_ACTIVITY) != (port->actor_oper_port_state & LACP_STATE_L… in __update_ntt()
627 …((lacpdu->partner_state & LACP_STATE_LACP_TIMEOUT) != (port->actor_oper_port_state & LACP_STATE_LA… in __update_ntt()
628 …((lacpdu->partner_state & LACP_STATE_SYNCHRONIZATION) != (port->actor_oper_port_state & LACP_STATE… in __update_ntt()
629 …((lacpdu->partner_state & LACP_STATE_AGGREGATION) != (port->actor_oper_port_state & LACP_STATE_AGG… in __update_ntt()
788 struct lacpdu *lacpdu = &port->lacpdu; in __update_lacpdu_from_port() local
798 lacpdu->actor_system_priority = htons(port->actor_system_priority); in __update_lacpdu_from_port()
799 lacpdu->actor_system = port->actor_system; in __update_lacpdu_from_port()
800 lacpdu->actor_key = htons(port->actor_oper_port_key); in __update_lacpdu_from_port()
801 lacpdu->actor_port_priority = htons(port->actor_port_priority); in __update_lacpdu_from_port()
802 lacpdu->actor_port = htons(port->actor_port_number); in __update_lacpdu_from_port()
803 lacpdu->actor_state = port->actor_oper_port_state; in __update_lacpdu_from_port()
813 lacpdu->partner_system_priority = htons(partner->system_priority); in __update_lacpdu_from_port()
814 lacpdu->partner_system = partner->system; in __update_lacpdu_from_port()
815 lacpdu->partner_key = htons(partner->key); in __update_lacpdu_from_port()
816 lacpdu->partner_port_priority = htons(partner->port_priority); in __update_lacpdu_from_port()
817 lacpdu->partner_port = htons(partner->port_number); in __update_lacpdu_from_port()
818 lacpdu->partner_state = partner->port_state; in __update_lacpdu_from_port()
869 lacpdu_header->lacpdu = port->lacpdu; in ad_lacpdu_send()
1091 static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) in ad_rx_machine() argument
1100 if (lacpdu) { in ad_rx_machine()
1114 else if (lacpdu && ((port->sm_rx_state == AD_RX_EXPIRED) || in ad_rx_machine()
1155 if ((port->sm_rx_state != last_state) || (lacpdu)) { in ad_rx_machine()
1206 if (MAC_ADDRESS_EQUAL(&(lacpdu->actor_system), in ad_rx_machine()
1212 __update_selected(lacpdu, port); in ad_rx_machine()
1213 __update_ntt(lacpdu, port); in ad_rx_machine()
1214 __record_pdu(lacpdu, port); in ad_rx_machine()
1847 static const struct lacpdu lacpdu = { in ad_initialize_port() local
1895 memcpy(&port->lacpdu, &lacpdu, sizeof(lacpdu)); in ad_initialize_port()
2397 static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave) in bond_3ad_rx_indication() argument
2412 switch (lacpdu->subtype) { in bond_3ad_rx_indication()
2420 ad_rx_machine(lacpdu, port); in bond_3ad_rx_indication()
2428 marker = (struct bond_marker *)lacpdu; in bond_3ad_rx_indication()
2679 struct lacpdu *lacpdu, _lacpdu; in bond_3ad_lacpdu_recv() local
2687 lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu); in bond_3ad_lacpdu_recv()
2688 if (!lacpdu) { in bond_3ad_lacpdu_recv()
2694 return bond_3ad_rx_indication(lacpdu, slave); in bond_3ad_lacpdu_recv()