From: Huisong Li <lihuisong@huawei.com>
To: <stable@dpdk.org>, <christian.ehrhardt@canonical.com>
Cc: <liudongdong3@huawei.com>, <fengchengwen@huawei.com>,
<huangdaode@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH 19.11 1/2] net/bonding: fix slave device Rx/Tx offload configuration
Date: Thu, 1 Dec 2022 14:08:25 +0800 [thread overview]
Message-ID: <20221201060826.55104-2-lihuisong@huawei.com> (raw)
In-Reply-To: <20221201060826.55104-1-lihuisong@huawei.com>
[ 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@huawei.com>
Acked-by: Min Hu (Connor) <humin29@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
next prev parent reply other threads:[~2022-12-01 6:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 6:08 [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Huisong Li
2022-12-01 6:08 ` Huisong Li [this message]
2022-12-01 6:08 ` [PATCH 19.11 2/2] net/hns3: delete unused markup Huisong Li
2022-12-05 6:55 ` [PATCH 19.11 0/2] backport two patches for bonding and hns3 driver Christian Ehrhardt
2022-12-06 1:27 ` lihuisong (C)
2022-12-06 6:43 ` Christian Ehrhardt
2022-12-06 6:54 ` lihuisong (C)
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=20221201060826.55104-2-lihuisong@huawei.com \
--to=lihuisong@huawei.com \
--cc=christian.ehrhardt@canonical.com \
--cc=fengchengwen@huawei.com \
--cc=huangdaode@huawei.com \
--cc=liudongdong3@huawei.com \
--cc=stable@dpdk.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).