DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
Date: Mon, 1 Apr 2019 20:10:09 +0100	[thread overview]
Message-ID: <47a1867d-9cf5-e3c7-2020-f845430b38ea@intel.com> (raw)
Message-ID: <20190401191009.p_jA-s9EliAWv9ZvElwlWOhveI5hsWKyH-5KJRibJns@z> (raw)
In-Reply-To: <DM6PR18MB2427628A0CD3332D96265D8CAF540@DM6PR18MB2427.namprd18.prod.outlook.com>

On 3/31/2019 7:58 PM, Nithin Kumar Dabilpuram wrote:
> 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"

When QINQ offload is enabled:
  'vlan_id' & 'vlan_id_outer' should be set together via 'tx_qinq_set()'
  This is "tx_vlan set <port_id> <vlan_id> <outer_vlan_id>" command

When VLAN offload is enabled:
  'vlan_id' should be set via 'tx_vlan_set()'
  This is "tx_vlan set <port_id> <vlan_id>" command

basically, the check above is to prevent to setting only 'vlan_id' once both
"<vlan_id> <outer_vlan_id>" set.

I don't know the main reason of the intention of current implementation, I
assume it is to help user to prevent make mistake.

This patch is to prevent 'ETH_VLAN_EXTEND_OFFLOAD' dependency, I believe it
makes sense.

But my concern this patch is also changing above intention silently, and if we
should keep the intention?

If you think that QINQ protection is also should removed, that is OK, only
please make it separate patch with describing the impact.

Thanks,
ferruh

> 
> --
> Thanks
> Nithin
> 
> 
> 
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com> 
> Sent: Thursday, March 21, 2019 10:41 PM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; xiao.w.wang@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@intel.com
>>
>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@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?
> 


  parent reply	other threads:[~2019-04-01 19:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
2019-03-01 16:29 ` Ferruh Yigit
2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
2019-03-18  9:56   ` Nithin Kumar Dabilpuram
2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
2019-03-18  9:56     ` Nithin Kumar Dabilpuram
2019-03-26 17:40     ` Iremonger, Bernard
2019-03-26 17:40       ` Iremonger, Bernard
2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
2019-03-21 17:11     ` Ferruh Yigit
2019-03-26 17:33     ` Iremonger, Bernard
2019-03-26 17:33       ` Iremonger, Bernard
2019-03-27  9:52       ` Iremonger, Bernard
2019-03-27  9:52         ` Iremonger, Bernard
2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
2019-03-31 18:58       ` Nithin Kumar Dabilpuram
2019-04-01 19:10       ` Ferruh Yigit [this message]
2019-04-01 19:10         ` Ferruh Yigit
2019-04-02  2:35         ` Wang, Xiao W
2019-04-02  2:35           ` Wang, Xiao W
2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
2019-04-05  7:36   ` Nithin Kumar Dabilpuram
2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
2019-04-05  7:36     ` Nithin Kumar Dabilpuram
2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 13:36     ` Ferruh Yigit
2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
2019-04-05 12:04   ` Nithin Dabilpuram
2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
2019-04-05 12:04     ` Nithin Dabilpuram
2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 12:06     ` Ferruh Yigit
2019-04-05 13:10     ` Nithin Kumar D
2019-04-05 13:10       ` Nithin Kumar D
2019-04-05 13:32       ` Ferruh Yigit
2019-04-05 13:32         ` Ferruh Yigit

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=47a1867d-9cf5-e3c7-2020-f845430b38ea@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=ndabilpuram@marvell.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.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).