patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luyicai <luyicai@huawei.com>
To: <dev@dpdk.org>
Cc: <chas3@att.com>, <xavier.huwei@huawei.com>, <zhangliang@bigo.sg>,
	<chenchanghu@huawei.com>, <jerry.lilijun@huawei.com>,
	<haifeng.lin@huawei.com>, <guohongzhi1@huawei.com>,
	Yicai Lu <luyicai@huawei.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH V2] net/bonding: fix lacp negotiation failed
Date: Fri, 10 Jul 2020 11:29:35 +0800
Message-ID: <1594351775-30864-1-git-send-email-luyicai@huawei.com> (raw)
In-Reply-To: <1589887092-26360-1>

From: Yicai Lu <luyicai@huawei.com>

When two host is connected directly without any devices like switch,
rx_machine_update would recieving partner lacp negotiation packets,
and partner's port mac is filled with zeros in this packet,
which is different with internal's mode4 mac. So in this situation,
it would never go rx_machine branch and then execute mac swap for negotiation!
Thus bond mode 4 will negotiation failed.

Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")
Cc: stable@dpdk.org

Signed-off-by: luyicai <luyicai@huawei.com>
---
v1 -> v2: Adjust commit info style
---
 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 b77a37d..2002ec0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -798,7 +798,8 @@
 		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.
-- 
1.9.5.msysgit.1



  parent reply	other threads:[~2020-07-10  3:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1589887092-26360-1>
2020-07-08  8:59 ` luyicai
2020-07-10  3:29 ` luyicai [this message]
2020-07-11  1:20   ` Wei Hu (Xavier)
2020-07-11  3:07     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2019-03-21 10:22 [dpdk-stable] [PATCH v2] " Liang Zhang

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=1594351775-30864-1-git-send-email-luyicai@huawei.com \
    --to=luyicai@huawei.com \
    --cc=chas3@att.com \
    --cc=chenchanghu@huawei.com \
    --cc=dev@dpdk.org \
    --cc=guohongzhi1@huawei.com \
    --cc=haifeng.lin@huawei.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=xavier.huwei@huawei.com \
    --cc=zhangliang@bigo.sg \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git