DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
To: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"sachin.saxena@nxp.com" <sachin.saxena@nxp.com>,
	"John Daley (johndale)" <johndale@cisco.com>,
	"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>,
	"xuanziyang2@huawei.com" <xuanziyang2@huawei.com>,
	"cloud.wangxiaoyun@huawei.com" <cloud.wangxiaoyun@huawei.com>,
	"zhouguoyang@huawei.com" <zhouguoyang@huawei.com>,
	"beilei.xing@intel.com" <beilei.xing@intel.com>,
	"jia.guo@intel.com" <jia.guo@intel.com>,
	"heinrich.kuhn@netronome.com" <heinrich.kuhn@netronome.com>,
	"hkalra@marvell.com" <hkalra@marvell.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"ndabilpuram@marvell.com" <ndabilpuram@marvell.com>,
	"kirankumark@marvell.com" <kirankumark@marvell.com>,
	"rmody@marvell.com" <rmody@marvell.com>,
	"shshaikh@marvell.com" <shshaikh@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 2/2] ethdev: fix VLAN offloads set if no relative capabilities
Date: Mon, 22 Jun 2020 03:05:17 +0000	[thread overview]
Message-ID: <BN7PR11MB2738C0ABB7DC0F894EA66FDEBF970@BN7PR11MB2738.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1592794047-51529-3-git-send-email-xavier.huwei@huawei.com>

> -----Original Message-----
> From: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Sent: Monday, June 22, 2020 11:47 AM
> To: thomas@monjalon.net; ferruh.yigit@intel.com;
> arybchenko@solarflare.com; anatoly.burakov@intel.com;
> hemant.agrawal@nxp.com; sachin.saxena@nxp.com; John Daley (johndale)
> <johndale@cisco.com>; Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>;
> qi.z.zhang@intel.com; xiao.w.wang@intel.com; xuanziyang2@huawei.com;
> cloud.wangxiaoyun@huawei.com; zhouguoyang@huawei.com;
> beilei.xing@intel.com; jia.guo@intel.com; heinrich.kuhn@netronome.com;
> hkalra@marvell.com; jerinj@marvell.com; ndabilpuram@marvell.com;
> kirankumark@marvell.com; rmody@marvell.com; shshaikh@marvell.com
> Cc: dev@dpdk.org; xavier.huwei@huawei.com
> Subject: [PATCH v3 2/2] ethdev: fix VLAN offloads set if no relative
> capabilities
> 
> Currently, there is a potential problem that calling the API function
> rte_eth_dev_set_vlan_offload to start VLAN hardware offloads which the
> driver does not support. If the PMD driver does not support certain VLAN
> hardware offloads and does not check for it, the hardware setting will
> not change, but the VLAN offloads in dev->data->dev_conf.rxmode.offloads
> will be turned on.
> 
> It is supposed to check the hardware capabilities to decide whether the
> relative callback needs to be called just like the behavior in the API
> function named rte_eth_dev_configure. And it is also needed to cleanup
> duplicated checks which are done in some PMDs. Also, note that it is
> behaviour change for some PMDs which simply ignore (with error/warning
> log
> message) unsupported VLAN offloads, but now it will fail.
> 
> Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> v2 -> v3: Add __rte_unused to avoid unused parameter 'dev' and 'mask'
> 	  warning.
> v1 -> v2: cleanup duplicated checks which are done in some PMDs.
> ---
>  drivers/net/dpaa2/dpaa2_ethdev.c           |  5 -----
>  drivers/net/enic/enic_ethdev.c             | 12 ------------
>  drivers/net/fm10k/fm10k_ethdev.c           | 23 ++---------------------
>  drivers/net/hinic/hinic_pmd_ethdev.c       |  6 ------
>  drivers/net/i40e/i40e_ethdev.c             |  5 -----
>  drivers/net/nfp/nfp_net.c                  |  5 -----
>  drivers/net/octeontx/octeontx_ethdev_ops.c | 10 ----------
>  drivers/net/octeontx2/otx2_vlan.c          |  5 -----
>  drivers/net/qede/qede_ethdev.c             |  3 ---
>  lib/librte_ethdev/rte_ethdev.c             | 21 +++++++++++++++++++++
>  10 files changed, 23 insertions(+), 72 deletions(-)
> 
[...]
> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
> index 32d5397..ef8900d 100644
> --- a/drivers/net/enic/enic_ethdev.c
> +++ b/drivers/net/enic/enic_ethdev.c
> @@ -374,18 +374,6 @@ static int enicpmd_vlan_offload_set(struct
> rte_eth_dev *eth_dev, int mask)
>  			enic->ig_vlan_strip_en = 0;
>  	}
> 
> -	if ((mask & ETH_VLAN_FILTER_MASK) &&
> -	    (offloads & DEV_RX_OFFLOAD_VLAN_FILTER)) {
> -		dev_warning(enic,
> -			"Configuration of VLAN filter is not supported\n");
> -	}
> -
> -	if ((mask & ETH_VLAN_EXTEND_MASK) &&
> -	    (offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)) {
> -		dev_warning(enic,
> -			"Configuration of extended VLAN is not
> supported\n");
> -	}
> -
>  	return enic_set_vlan_strip(enic);
>  }
> 

For enic,

Acked-by: Hyong Youb Kim <hyonkim@cisco.com>

Thanks.
-Hyong


  reply	other threads:[~2020-06-22  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  2:47 [dpdk-dev] [PATCH v3 0/2] ethdev: minor bugfixes Wei Hu (Xavier)
2020-06-22  2:47 ` [dpdk-dev] [PATCH v3 1/2] ethdev: fix data room size verification in Rx queue setup Wei Hu (Xavier)
2020-06-22  2:47 ` [dpdk-dev] [PATCH v3 2/2] ethdev: fix VLAN offloads set if no relative capabilities Wei Hu (Xavier)
2020-06-22  3:05   ` Hyong Youb Kim (hyonkim) [this message]
2020-06-22  5:10   ` Sachin Saxena (OSS)
2020-06-22  7:06     ` Wei Hu (Xavier)

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=BN7PR11MB2738C0ABB7DC0F894EA66FDEBF970@BN7PR11MB2738.namprd11.prod.outlook.com \
    --to=hyonkim@cisco.com \
    --cc=anatoly.burakov@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=heinrich.kuhn@netronome.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=jia.guo@intel.com \
    --cc=johndale@cisco.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rmody@marvell.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shshaikh@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=xavier.huwei@huawei.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xuanziyang2@huawei.com \
    --cc=zhouguoyang@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).