From: 李伟峰 <liweifeng96@126.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Question Regarding Bonding 802.3ad defaulted status
Date: Mon, 29 Jun 2020 13:02:37 +0800 (GMT+08:00) [thread overview]
Message-ID: <294afd08.3b34.172fe74a7f7.Coremail.liweifeng96@126.com> (raw)
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.
reply other threads:[~2020-06-30 7:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=294afd08.3b34.172fe74a7f7.Coremail.liweifeng96@126.com \
--to=liweifeng96@126.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).