[PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4

lihuisong (C) lihuisong at huawei.com
Wed Nov 9 02:11:00 CET 2022


在 2022/11/9 2:01, Stephen Hemminger 写道:
> On Tue, 8 Nov 2022 16:40:38 +0800
> Huisong Li <lihuisong at 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 at 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.
> .


More information about the dev mailing list