DPDK patches and discussions
 help / color / mirror / Atom feed
From: luyicai <luyicai@huawei.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "chas3@att.com" <chas3@att.com>,
	"zhangliang@bigo.sg" <zhangliang@bigo.sg>,
	"Zhoujingbin (Robin, Russell Lab)" <zhoujingbin@huawei.com>,
	chenchanghu <chenchanghu@huawei.com>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>
Subject: [dpdk-dev] [PATCH] drivers/net/bonding: fix bug for lacp negotiation failed
Date: Tue, 19 May 2020 07:53:20 +0000	[thread overview]
Message-ID: <F307C87D9848864C95E295D76F550C530C08F167@dggemi525-mbx.china.huawei.com> (raw)

When two host is connected directly without any devices like switch,
and also enable dedicated tx/rx queues on bonding devices slaves,
rx_machine_update would recieving partner lacp negotiation packets,
which partner's port mac filled with zeros. So in this situation,
it would never go rx_machine branch with correct mac!
Thus bond mode 4 will negotiation failed.

Signed-off-by: Lu Yicai <luyicai@huawei.com>
 drivers/net/bonding/rte_eth_bond_8023ad.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index b77a37ddb..2002ec04a 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -798,7 +798,8 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
                RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP);

                partner = &lacp->lacpdu.partner;
-               if (rte_is_same_ether_addr(&partner->port_params.system,
+               if (rte_is_zero_ether_addr(&partner->port_params.system) ||
+                       rte_is_same_ether_addr(&partner->port_params.system,
                        &internals->mode4.mac_addr)) {
                        /* This LACP frame is sending to the bonding port
                         * so pass it to rx_machine.

             reply	other threads:[~2020-05-19  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  7:53 luyicai [this message]
2020-05-19 11:18 luyicai
2020-06-24 10:43 ` Thomas Monjalon
2020-07-10 21:07   ` Thomas Monjalon
2020-07-11  1:42     ` Wei Hu (Xavier)

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F307C87D9848864C95E295D76F550C530C08F167@dggemi525-mbx.china.huawei.com \
    --to=luyicai@huawei.com \
    --cc=chas3@att.com \
    --cc=chenchanghu@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=zhangliang@bigo.sg \
    --cc=zhoujingbin@huawei.com \


* 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).