DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, arybchenko@solarflare.com,
	tangchengchang@huawei.com, hyonkim@cisco.com,
	sachin.saxena@oss.nxp.com, cloud.wangxiaoyun@huawei.com,
	hkalra@marvell.com, viacheslavo@mellanox.com
Subject: Re: [dpdk-dev] [PATCH v6 2/2] ethdev: fix VLAN offloads set if no relative capabilities
Date: Wed, 08 Jul 2020 12:14:46 +0200	[thread overview]
Message-ID: <4862684.ztQDoVm40t@thomas> (raw)
In-Reply-To: <40e3a1b0-3c7e-1807-67e1-41dd2850e350@huawei.com>

08/07/2020 05:37, Wei Hu (Xavier):
> On 2020/7/7 22:11, Thomas Monjalon wrote:
> > 06/07/2020 09:06, Wei Hu (Xavier):
> >> 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.
[...]
> >> @@ -3317,6 +3319,25 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
> >>   	if (mask == 0)
> >>   		return ret;
> >>   
> >> +	ret = rte_eth_dev_info_get(port_id, &dev_info);
> >> +	if (ret != 0)
> >> +		return ret;
> >> +
> >> +	/*
> >> +	 * New added Rx VLAN offloading which are not enabled in
> >> +	 * rte_eth_dev_configure() must be within its device capabilities
> >> +	 */
> > What means "New added Rx VLAN offloading"?
> 
> The parameter offload_mask of rte_eth_dev_set_vlan_offload() function
> includes some Rx VLAN offload, and some of them maybe are not enabled
> in rte_eth_dev_configure().

OK

I don't understand why checking only new features.
All enabled features must be within capabilities, right?




  reply	other threads:[~2020-07-08 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06  7:06 [dpdk-dev] [PATCH v6 0/2] ethdev: minor bugfixes Wei Hu (Xavier)
2020-07-06  7:06 ` [dpdk-dev] [PATCH v6 1/2] ethdev: fix data room size verification in Rx queue setup Wei Hu (Xavier)
2020-07-07 13:37   ` Slava Ovsiienko
2020-07-06  7:06 ` [dpdk-dev] [PATCH v6 2/2] ethdev: fix VLAN offloads set if no relative capabilities Wei Hu (Xavier)
2020-07-07  7:35   ` Jeff Guo
2020-07-07 13:38     ` Slava Ovsiienko
2020-07-08  3:53       ` Wei Hu (Xavier)
2020-07-07 14:11   ` Thomas Monjalon
2020-07-08  3:37     ` Wei Hu (Xavier)
2020-07-08 10:14       ` Thomas Monjalon [this message]
2020-07-09  7:39         ` Wei Hu (Xavier)
2020-07-09  9:04           ` Thomas Monjalon

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=4862684.ztQDoVm40t@thomas \
    --to=thomas@monjalon.net \
    --cc=arybchenko@solarflare.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hkalra@marvell.com \
    --cc=hyonkim@cisco.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=tangchengchang@huawei.com \
    --cc=viacheslavo@mellanox.com \
    --cc=xavier.huwei@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).