DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: allow VF to configure pctype mapping
Date: Mon, 27 May 2019 16:36:07 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115338839D@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <638bf7c9-8f9f-0281-052d-bf9666587291@intel.com>



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, May 24, 2019 6:53 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: allow VF to configure pctype
> mapping
> 
> On 5/23/2019 2:37 AM, Beilei Xing wrote:
> > This patch allows VF to get/update/reset pctype mapping info.
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> > ---
> > v2 changes:
> >  - Allow VF update/reset pctype mapping.
> >
> >  drivers/net/i40e/rte_pmd_i40e.c | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/drivers/net/i40e/rte_pmd_i40e.c
> > b/drivers/net/i40e/rte_pmd_i40e.c index 7ae78e4..b3bdc61 100644
> > --- a/drivers/net/i40e/rte_pmd_i40e.c
> > +++ b/drivers/net/i40e/rte_pmd_i40e.c
> > @@ -2405,8 +2405,6 @@ int
> > rte_pmd_i40e_flow_type_mapping_reset(uint16_t port)
> >
> >  	dev = &rte_eth_devices[port];
> >
> > -	if (!is_i40e_supported(dev))
> > -		return -ENOTSUP;
> 
> Hi Beilei,
> 
> Since these are public APIs, these checks are to prevent possible issues user
> call these APIs with a port_id that is not 'i40e' at all, in that case the API still
> will try to work on that device and this may lead a crash or corruption in that
> device.
> 
> Instead of removing these checks, can it be possible to extend it to cover both
> PF and VF? If there are APIs in this file that requires device explicitly to be PF
> or VF, perhaps we can create two version of the check and use appropriate one
> for the API.

+1 

> 
> 
> >
> >  	i40e_set_default_pctype_table(dev);
> >
> > @@ -2425,9 +2423,6 @@ int rte_pmd_i40e_flow_type_mapping_get(
> >
> >  	dev = &rte_eth_devices[port];
> >
> > -	if (!is_i40e_supported(dev))
> > -		return -ENOTSUP;
> > -
> >  	ad = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
> >
> >  	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++) { @@ -2453,9 +2448,6 @@
> > rte_pmd_i40e_flow_type_mapping_update(
> >
> >  	dev = &rte_eth_devices[port];
> >
> > -	if (!is_i40e_supported(dev))
> > -		return -ENOTSUP;
> > -
> >  	if (count > I40E_FLOW_TYPE_MAX)
> >  		return -EINVAL;
> >
> >


  reply	other threads:[~2019-05-27 16:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  6:34 [dpdk-dev] [PATCH] net/i40e: allow VF to get pctype mapping info Beilei Xing
2019-05-23  1:37 ` [dpdk-dev] [PATCH v2] net/i40e: allow VF to configure pctype mapping Beilei Xing
2019-05-24 13:52   ` Ferruh Yigit
2019-05-27 16:36     ` Zhang, Qi Z [this message]
2019-06-12  7:10   ` [dpdk-dev] [PATCH v3] " Beilei Xing
2019-06-17  3:17     ` [dpdk-dev] [PATCH v4] " Beilei Xing
2019-06-18 13:14       ` Zhang, Qi Z
2019-06-18 13:16       ` Zhang, Qi Z

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=039ED4275CED7440929022BC67E706115338839D@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).