[dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
Nithin Kumar Dabilpuram
ndabilpuram at marvell.com
Sun Mar 31 20:58:52 CEST 2019
Hi Ferruh Yigit,
Sorry, missed to see your inline comment about the check in v1.
>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>> if (vlan_id_is_invalid(vlan_id))
>> return;
>>
>> - vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>> - if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>> - printf("Error, as QinQ has been enabled.\n");
>> - return;
>> - }
> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.
> What do you think keeping same logic?
> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.
Since tx_vlan_set() and tx_qinq_set() are they themselves are resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads',
do you think having such a check before clearing and setting flags be consistent ?
Current behavior is to override last setting with new setting. All the settings could be completely disabled by cmdline "tx vlan reset"
--
Thanks
Nithin
-----Original Message-----
From: Ferruh Yigit <ferruh.yigit at intel.com>
Sent: Thursday, March 21, 2019 10:41 PM
To: Nithin Kumar Dabilpuram <ndabilpuram at marvell.com>; Wenzhuo Lu <wenzhuo.lu at intel.com>; Jingjing Wu <jingjing.wu at intel.com>; Bernard Iremonger <bernard.iremonger at intel.com>
Cc: dev at dpdk.org; xiao.w.wang at intel.com
Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
External Email
----------------------------------------------------------------------
On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> ETH_VLAN_EXTEND_OFFLOAD.
>
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> VLAN")
> Cc: xiao.w.wang at intel.com
>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
<...>
> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> if (vlan_id_is_invalid(vlan_id))
> return;
>
> - vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> - if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> - printf("Error, as QinQ has been enabled.\n");
> - return;
> - }
It looks like you didn't take account comment on this in previous version, can you please check it?
More information about the dev
mailing list