[PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration
Huisong Li
lihuisong at huawei.com
Thu Dec 1 07:08:25 CET 2022
[ upstream commit b5145667785e8954077c593480ddfb2bdd708eac ]
Normally, the Rx/Tx offload capability of bonding interface is
the intersection of the capability of all slave devices. And
Rx/Tx offloads configuration of slave device comes from bonding
interface. But now there is a risk that slave device retains its
previous offload configurations which is not within the offload
configurations of bond interface.
Signed-off-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a182e4306f..0e7498b150 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1737,13 +1737,10 @@ 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 &
- DEV_RX_OFFLOAD_VLAN_FILTER)
- slave_eth_dev->data->dev_conf.rxmode.offloads |=
- DEV_RX_OFFLOAD_VLAN_FILTER;
- else
- slave_eth_dev->data->dev_conf.rxmode.offloads &=
- ~DEV_RX_OFFLOAD_VLAN_FILTER;
+ slave_eth_dev->data->dev_conf.txmode.offloads =
+ bonded_eth_dev->data->dev_conf.txmode.offloads;
+ slave_eth_dev->data->dev_conf.rxmode.offloads =
+ bonded_eth_dev->data->dev_conf.rxmode.offloads;
nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;
--
2.33.0
More information about the stable
mailing list