From: Huisong Li <lihuisong@huawei.com>
To: <dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>
Cc: <ferruh.yigit@amd.com>, <humin29@huawei.com>, <3chas3@gmail.com>,
<liudongdong3@huawei.com>, <huangdaode@huawei.com>,
<lihuisong@huawei.com>
Subject: [PATCH 1/2] net/bonding: fix bond3 and bond4 process mbuf fast free
Date: Tue, 8 Nov 2022 16:40:37 +0800 [thread overview]
Message-ID: <20221108084038.25136-2-lihuisong@huawei.com> (raw)
In-Reply-To: <20221108084038.25136-1-lihuisong@huawei.com>
The RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload can't be used in bonding
mode Broadcast and mode 8023AD. Currently, bonding driver forcibly removes
from the dev->data->dev_conf.txmode.offloads and processes as success in
bond_ethdev_configure(). But this still cause that rte_eth_dev_configure()
fails to execute because of the failure of validating Tx offload in the
eth_dev_validate_offloads(). So bonding driver shouldn't modify offloads
in dev->data->dev_conf.txmode and should return error in this case.
Fixes: 18c41457cbae ("net/bonding: fix mbuf fast free usage")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 864e073db8..b5e832276a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3712,10 +3712,8 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
(internals->mode == BONDING_MODE_8023AD ||
internals->mode == BONDING_MODE_BROADCAST)) {
- RTE_BOND_LOG(WARNING,
- "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it.");
- offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
- dev->data->dev_conf.txmode.offloads = offloads;
+ RTE_BOND_LOG(ERR, "bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload.");
+ return -EINVAL;
}
link_speeds = dev->data->dev_conf.link_speeds;
--
2.33.0
next prev parent reply other threads:[~2022-11-08 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 8:40 [PATCH 0/2] net/bonding: fix mbuf fast free for bond3 and bond4 Huisong Li
2022-11-08 8:40 ` Huisong Li [this message]
2022-11-08 8:40 ` [PATCH 2/2] app/testpmd: remove fast free offload " Huisong Li
2022-11-08 18:01 ` Stephen Hemminger
2022-11-09 1:11 ` lihuisong (C)
2022-11-09 2:22 ` [PATCH V2] net/bonding: fix bond3 and bond4 process mbuf fast free Huisong Li
2022-11-09 3:24 ` Stephen Hemminger
2022-11-09 10:37 ` Andrew Rybchenko
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=20221108084038.25136-2-lihuisong@huawei.com \
--to=lihuisong@huawei.com \
--cc=3chas3@gmail.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=huangdaode@huawei.com \
--cc=humin29@huawei.com \
--cc=liudongdong3@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.