DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question Regarding Bonding 802.3ad defaulted status
@ 2020-06-29  5:02 李伟峰
  0 siblings, 0 replies; only message in thread
From: 李伟峰 @ 2020-06-29  5:02 UTC (permalink / raw)
  To: dev

hi,
    Recently, I discovered such a phenomenon about dpdk bonding 802.3ad:
    I have a dpdk bonding 802.3ad network here. The network diagram is as follows:
   Switch_port1-----------dpdk_slave1
  Switch_pory2-----------dpdk_slave2

    If the member port link has a single-pass failure (slave1---->port1, port1--x-->slave1),dpdk bonding 802.3ad "slave1" will enter a timeout state, and packets cannot be send from this port.
    However, "port1" is still in the selected state, and packets will still choose the port. As a result, some packets from the switch to dpdk bonding 802.3ad are lost.

    So i checked the document of ieee 802.3ad. If no LACPDU is receive before the current while timer expired again, It will change to DEFAULTED state.But dpdk bonding 802.3ad did not do any processing on current_while timer expires again. 
    My dpdk version is 19.11.3(LTS)
   
    So i want to know:
    1. Why does not dpdk do anything after current_while timer expires again ? 
    2. Can i change the function according to the following modification?

rte_eth_bond_8023ad_private.h
52    #define SM_FLAGS_NTT                        0x0400
53 +    #define SM_FLAGS_EXPIRED               0x0800

105    struct port_params partner;
106 +  struct port_params partner_admin;

rte_eth_bond_8023ad.c 
357 timer_set(&port->current_while_timer, timeout);
358 ACTOR_STATE_CLR(port, EXPIRED);
359 + SM_FLAG_CLR(port, EXPIRED);
360 return; /* No state change */
361 }
362
363 /* If CURRENT state timer is not running (stopped or expired)
364 * transit to EXPIRED state from DISABLED or CURRENT */
365 if (!timer_is_running(&port->current_while_timer)) {
366 - ACTOR_STATE_SET(port, EXPIRED);
367 - PARTNER_STATE_CLR(port, SYNCHRONIZATION);
368 - PARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);
369 - timer_set(&port->current_while_timer, internals->mode4.short_timeout);
366 + if (SM_FLAG(port, EXPIRED)) {
368 + port->selected = UNSELECTED;
369 + memcpy(&port->partner, &port->partner_admin, sizeof(struct port_params));
370 + record_default(port);
371 + ACTOR_STATE_CLR(port, EXPIRED);
372 + timer_cancel(&port->current_while_timer);
373 + } else {
374 + SM_FLAG_SET(port, EXPIRED);
375 + ACTOR_STATE_SET(port, EXPIRED);
376 + PARTNER_STATE_CLR(port, SYNCHRONIZATION);
377 + PARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);
378 + timer_set(&port->current_while_timer, internals->mode4.short_timeout);
}

1022 memcpy(&port->partner, &initial, sizeof(struct port_params));    
1023 + memcpy(&port->partner_admin, &initial, sizeof(struct port_params));    


    thank you.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-30  7:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29  5:02 [dpdk-dev] Question Regarding Bonding 802.3ad defaulted status 李伟峰

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).