* [dpdk-dev] [Bug 256] Transmit or receive packets use the bond MAC is failed when switch backup port to active
@ 2019-04-18 2:13 bugzilla
2019-04-18 2:13 ` bugzilla
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2019-04-18 2:13 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=256
Bug ID: 256
Summary: Transmit or receive packets use the bond MAC is failed
when switch backup port to active
Product: DPDK
Version: 18.11
Hardware: All
OS: All
Status: CONFIRMED
Severity: major
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: fengchunsong@huawei.com
Target Milestone: ---
1.Problem Description
Create a active-backup bond device, when primary port link down,slave port
changes to primary,but new primary mac is not change to the bonding MAC.
Transmit or receive packets use the bond MAC is failed.
2.analyze
The bonding pmd call mac_address_slaves_update to modify the MAC of all
slaves:the primary use bond mac addrs, and other slaves to use the slave's MAC.
The code is incorrect using primary_port instead of current_primary_port.
diff --git a/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
b/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
index 44deaf1..1c5bc2d 100644
--- a/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1627,7 +1627,7 @@ mac_address_slaves_update(struct rte_eth_dev
*bonded_eth_dev)
if (internals->slaves[i].port_id ==
internals->current_primary_port) {
if (rte_eth_dev_default_mac_addr_set(
- internals->primary_port,
+
internals->current_primary_port,
bonded_eth_dev->data->mac_addrs)) {
RTE_BOND_LOG(ERR, "Failed to update
port Id %d MAC address",
internals->current_primary_port);
Bonding pmd sets slave's mac according to current_primary_port. The
current_primary_port changes in the following scenario:
1. add slave to bond, the first slave will set the current_primary_port, change
the order of adding the slave, current_primary_port will be different.
2. The user specifies primary_port via rte_eth_bond_primary_set
3. delete the primary slave
4
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [Bug 256] Transmit or receive packets use the bond MAC is failed when switch backup port to active
2019-04-18 2:13 [dpdk-dev] [Bug 256] Transmit or receive packets use the bond MAC is failed when switch backup port to active bugzilla
@ 2019-04-18 2:13 ` bugzilla
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla @ 2019-04-18 2:13 UTC (permalink / raw)
To: dev
https://bugs.dpdk.org/show_bug.cgi?id=256
Bug ID: 256
Summary: Transmit or receive packets use the bond MAC is failed
when switch backup port to active
Product: DPDK
Version: 18.11
Hardware: All
OS: All
Status: CONFIRMED
Severity: major
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: fengchunsong@huawei.com
Target Milestone: ---
1.Problem Description
Create a active-backup bond device, when primary port link down,slave port
changes to primary,but new primary mac is not change to the bonding MAC.
Transmit or receive packets use the bond MAC is failed.
2.analyze
The bonding pmd call mac_address_slaves_update to modify the MAC of all
slaves:the primary use bond mac addrs, and other slaves to use the slave's MAC.
The code is incorrect using primary_port instead of current_primary_port.
diff --git a/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
b/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
index 44deaf1..1c5bc2d 100644
--- a/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/dpdk-18.11.0/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1627,7 +1627,7 @@ mac_address_slaves_update(struct rte_eth_dev
*bonded_eth_dev)
if (internals->slaves[i].port_id ==
internals->current_primary_port) {
if (rte_eth_dev_default_mac_addr_set(
- internals->primary_port,
+
internals->current_primary_port,
bonded_eth_dev->data->mac_addrs)) {
RTE_BOND_LOG(ERR, "Failed to update
port Id %d MAC address",
internals->current_primary_port);
Bonding pmd sets slave's mac according to current_primary_port. The
current_primary_port changes in the following scenario:
1. add slave to bond, the first slave will set the current_primary_port, change
the order of adding the slave, current_primary_port will be different.
2. The user specifies primary_port via rte_eth_bond_primary_set
3. delete the primary slave
4
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-18 2:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 2:13 [dpdk-dev] [Bug 256] Transmit or receive packets use the bond MAC is failed when switch backup port to active bugzilla
2019-04-18 2:13 ` bugzilla
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).