From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 15/20] thunderx/nicvf: add rx queue start and stop support Date: Wed, 8 Jun 2016 18:42:26 +0100 Message-ID: <57585902.60905@intel.com> References: <1464540424-12631-1-git-send-email-jerin.jacob@caviumnetworks.com> <1465317632-11471-1-git-send-email-jerin.jacob@caviumnetworks.com> <1465317632-11471-16-git-send-email-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki To: Jerin Jacob , dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 851F1C12C for ; Wed, 8 Jun 2016 19:42:42 +0200 (CEST) In-Reply-To: <1465317632-11471-16-git-send-email-jerin.jacob@caviumnetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/7/2016 5:40 PM, Jerin Jacob wrote: > Signed-off-by: Jerin Jacob > Signed-off-by: Maciej Czekaj > Signed-off-by: Kamil Rytarowski > Signed-off-by: Zyta Szpak > Signed-off-by: Slawomir Rosek > Signed-off-by: Radoslaw Biernacki > --- > drivers/net/thunderx/nicvf_ethdev.c | 175 ++++++++++++++++++++++++++++= ++++++++ > drivers/net/thunderx/nicvf_rxtx.c | 18 ++++ > drivers/net/thunderx/nicvf_rxtx.h | 1 + > 3 files changed, 194 insertions(+) >=20 > diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx= /nicvf_ethdev.c > index 5da07da..ba32803 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -88,6 +88,8 @@ static int nicvf_dev_rss_hash_update(struct rte_eth_d= ev *dev, > struct rte_eth_rss_conf *rss_conf); > static int nicvf_dev_rss_hash_conf_get(struct rte_eth_dev *dev, > struct rte_eth_rss_conf *rss_conf); > +static int nicvf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t = qidx); > +static int nicvf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t q= idx); These declarations not required, there are more usages in other patches. ... > =20 > static int > +nicvf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + int ret; > + > + if (qidx >=3D nicvf_pmd_priv(dev)->eth_dev->data->nb_rx_queues) > + return -EINVAL; This check already done by librte_ether > + > + ret =3D nicvf_start_rx_queue(dev, qidx); > + if (ret) > + return ret; > + > + ret =3D nicvf_configure_cpi(dev); > + if (ret) > + return ret; > + > + return nicvf_configure_rss_reta(dev); > +} > + > +static int > +nicvf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + int ret; > + > + if (qidx >=3D nicvf_pmd_priv(dev)->eth_dev->data->nb_rx_queues) > + return -EINVAL; Same for this case > + > + ret =3D nicvf_stop_rx_queue(dev, qidx); > + ret |=3D nicvf_configure_cpi(dev); > + ret |=3D nicvf_configure_rss_reta(dev); > + return ret; > +} > + ...