patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: fix API parameter checking
Date: Wed, 11 Jan 2017 17:05:50 +0000	[thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C224D1CE0F@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <daac85e4-5687-920c-2047-5d0467c2723f@intel.com>

Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, January 11, 2017 3:15 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org;
> Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-stable] [PATCH] net/ixgbe: fix API parameter checking
> 
> On 1/11/2017 2:25 PM, Bernard Iremonger wrote:
> > Add checks to rte_pmd_ixgbe_* API's to ensure that the port is an
> > ixgbe port.
> >
> > Fixes: 49e248223e9f ("net/ixgbe: add API for VF management")
> >
> > CC: stable@dpdk.org
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 71
> > ++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 69 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index b7ddd4f..ca14104 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -1,7 +1,7 @@
> >  /*-
> >   *   BSD LICENSE
> >   *
> > - *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
> > + *   Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
> >   *   All rights reserved.
> >   *
> >   *   Redistribution and use in source and binary forms, with or without
> > @@ -4066,6 +4066,12 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port,
> uint16_t vf,
> >  	dev = &rte_eth_devices[port];
> >  	rte_eth_dev_info_get(port, &dev_info);
> >
> > +	if (!strstr(dev_info.driver_name, "ixgbe"))
> > +		return -ENOTSUP;
> > +
> > +	if (strstr(dev_info.driver_name, "ixgbe_vf"))
> > +		return -ENOTSUP;
> > +
> 
> This part seems common for all functions, what do you think exporting this
> into a static function?
> 
> Also in the feature if you need to update the method to decide if this port_id
> is supported or not, only that function will be effected.
> 
> <...>
Ok, I will put the checks into a static function and send a v2.

Regards,

Bernard.

  reply	other threads:[~2017-01-11 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 14:25 Bernard Iremonger
2017-01-11 15:15 ` Ferruh Yigit
2017-01-11 17:05   ` Iremonger, Bernard [this message]
2017-01-11 17:24 ` [dpdk-stable] [PATCH v2] " Bernard Iremonger
2017-01-11 18:21   ` 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=8CEF83825BEC744B83065625E567D7C224D1CE0F@IRSMSX108.ger.corp.intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@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).