代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ef72dacdec6c5dca8773854906159f7bc75eeb5c Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 9 Nov 2021 15:57:26 +0800
Subject: [PATCH] net/bonding: fix offloading configuration
Currently, part offloadings of the bonding device will not take effect
by using dev_configure(). Because the related configuration will not be
delivered to the slave devices in this way.
The offloading capability of the bonding device is the intersection of
the capability of all slave devices. Based on this, the following
functions are added to the bonding driver:
1. If a Tx offloading is within the capability of the bonding device
(i.e, all the slave devices support this Tx offloading), the enabling
status of the offloading of all slave devices depends on the
configuration of the bonding device.
2. For the Tx offloading that is not within the Tx offloading capability
of the bonding device, the enabling status of the offloading on the
slave devices is irrelevant to the bonding device configuration. And
it depends on the original configuration of the slave devices.
Fixes: e8b3e1a9b1bb ("net/bonding: switch to new offloading API")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 84f4900ee5..0f11a2f5a8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1713,17 +1713,24 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
}
- if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
- RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
- slave_eth_dev->data->dev_conf.rxmode.offloads |=
- RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
- else
- slave_eth_dev->data->dev_conf.rxmode.offloads &=
- ~RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
-
slave_eth_dev->data->dev_conf.rxmode.mtu =
bonded_eth_dev->data->dev_conf.rxmode.mtu;
+ slave_eth_dev->data->dev_conf.txmode.offloads |=
+ bonded_eth_dev->data->dev_conf.txmode.offloads;
+
+ slave_eth_dev->data->dev_conf.txmode.offloads &=
+ (bonded_eth_dev->data->dev_conf.txmode.offloads |
+ ~internals->tx_offload_capa);
+
+ slave_eth_dev->data->dev_conf.rxmode.offloads |=
+ bonded_eth_dev->data->dev_conf.rxmode.offloads;
+
+ slave_eth_dev->data->dev_conf.rxmode.offloads &=
+ (bonded_eth_dev->data->dev_conf.rxmode.offloads |
+ ~internals->rx_offload_capa);
+
+
nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。