From: "lihuisong (C)" <lihuisong@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>,
<ferruh.yigit@amd.com>, <humin29@huawei.com>, <3chas3@gmail.com>,
<liudongdong3@huawei.com>, <huangdaode@huawei.com>
Subject: Re: [PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4
Date: Wed, 9 Nov 2022 09:11:00 +0800 [thread overview]
Message-ID: <da00346c-a130-81fa-5ede-2e1fd2626667@huawei.com> (raw)
In-Reply-To: <20221108100126.3b963338@hermes.local>
在 2022/11/9 2:01, Stephen Hemminger 写道:
> On Tue, 8 Nov 2022 16:40:38 +0800
> Huisong Li <lihuisong@huawei.com> wrote:
>
>> The port configurations of bonding device need to be updated when add a
>> slave device. But mbuf fast free offload can't be used in bonding mode
>> Broadcast and mode 8023AD. So remove this offload for both mode in case
>> of failing to initialize bonding device.
>>
>> Fixes: 76376bd9cd49 ("app/testpmd: update bond port configurations when add slave")
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> int ret;
>>
>> @@ -2825,6 +2826,13 @@ update_bonding_port_dev_conf(portid_t bond_pid)
>> if (port->dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
>> port->dev_conf.txmode.offloads |=
>> RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
>> + /* Bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload */
>> + bonding_mode = rte_eth_bond_mode_get(bond_pid);
>> + if (bonding_mode == BONDING_MODE_8023AD ||
>> + bonding_mode == BONDING_MODE_BROADCAST)
>> + port->dev_conf.txmode.offloads &=
>> + ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
>> +
> This would be better handled in the bonding driver.
> It should return the correct txmode offloads based on bonding mode.
> That way it would work for any application not just testpmd.
Good idea. I will fix it in v2.
> .
next prev parent reply other threads:[~2022-11-09 1:11 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 " Huisong Li
2022-11-08 8:40 ` [PATCH 1/2] net/bonding: fix bond3 and bond4 process mbuf fast free Huisong Li
2022-11-08 8:40 ` [PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4 Huisong Li
2022-11-08 18:01 ` Stephen Hemminger
2022-11-09 1:11 ` lihuisong (C) [this message]
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=da00346c-a130-81fa-5ede-2e1fd2626667@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 \
--cc=stephen@networkplumber.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).