代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 7ec0325f9c2bfe2ea961e66588f8ba9e22bb6483 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 21 Oct 2022 15:36:47 +0800
Subject: [PATCH 171/189] net/bonding: fix double slave link status query
When link status polling mode is used, the slave link status is
queried twice, which may be inconsistent. To fix this, we can keep
the latest queried link state.
Fixes: a45b288ef21a ("bond: support link status polling")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 828fb5f96d..3be2b08128 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2400,9 +2400,6 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
* event callback */
if (slave_ethdev->data->dev_link.link_status !=
internals->slaves[i].last_link_status) {
- internals->slaves[i].last_link_status =
- slave_ethdev->data->dev_link.link_status;
-
bond_ethdev_lsc_event_callback(internals->slaves[i].port_id,
RTE_ETH_EVENT_INTR_LSC,
&bonded_ethdev->data->port_id,
@@ -2901,7 +2898,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
uint8_t lsc_flag = 0;
int valid_slave = 0;
- uint16_t active_pos;
+ uint16_t active_pos, slave_idx;
uint16_t i;
if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL)
@@ -2922,6 +2919,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
for (i = 0; i < internals->slave_count; i++) {
if (internals->slaves[i].port_id == port_id) {
valid_slave = 1;
+ slave_idx = i;
break;
}
}
@@ -3010,6 +3008,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
* slaves
*/
bond_ethdev_link_update(bonded_eth_dev, 0);
+ internals->slaves[slave_idx].last_link_status = link.link_status;
if (lsc_flag) {
/* Cancel any possible outstanding interrupts if delays are enabled */
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。