DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Huisong Li <lihuisong@huawei.com>
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: Tue, 8 Nov 2022 10:01:26 -0800	[thread overview]
Message-ID: <20221108100126.3b963338@hermes.local> (raw)
In-Reply-To: <20221108084038.25136-3-lihuisong@huawei.com>

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.

  reply	other threads:[~2022-11-08 18:01 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 [this message]
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=20221108100126.3b963338@hermes.local \
    --to=stephen@networkplumber.org \
    --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=lihuisong@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 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).