From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 08 Jun 2016 10:42:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,440,1459839600"; d="scan'208";a="971646729" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.221.53]) ([10.237.221.53]) by orsmga001.jf.intel.com with ESMTP; 08 Jun 2016 10:42:27 -0700 To: Jerin Jacob , dev@dpdk.org 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> Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki From: Ferruh Yigit Message-ID: <57585902.60905@intel.com> Date: Wed, 8 Jun 2016 18:42:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1465317632-11471-16-git-send-email-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 15/20] thunderx/nicvf: add rx queue start and stop support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 17:42:42 -0000 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(+) > > 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_dev *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 qidx); These declarations not required, there are more usages in other patches. ... > > static int > +nicvf_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + int ret; > + > + if (qidx >= nicvf_pmd_priv(dev)->eth_dev->data->nb_rx_queues) > + return -EINVAL; This check already done by librte_ether > + > + ret = nicvf_start_rx_queue(dev, qidx); > + if (ret) > + return ret; > + > + ret = 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 >= nicvf_pmd_priv(dev)->eth_dev->data->nb_rx_queues) > + return -EINVAL; Same for this case > + > + ret = nicvf_stop_rx_queue(dev, qidx); > + ret |= nicvf_configure_cpi(dev); > + ret |= nicvf_configure_rss_reta(dev); > + return ret; > +} > + ...