From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1081DC12C for ; Wed, 8 Jun 2016 19:47:16 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 08 Jun 2016 10:46:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,440,1459839600"; d="scan'208";a="971649746" 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:46:55 -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-17-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: <57585A0F.9000505@intel.com> Date: Wed, 8 Jun 2016 18:46:55 +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-17-git-send-email-jerin.jacob@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 16/20] thunderx/nicvf: add tx 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:47:17 -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 ... > +static inline int > +nicvf_start_tx_queue(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + struct nicvf_txq *txq; > + int ret; > + > + if (dev->data->tx_queue_state[qidx] == > + RTE_ETH_QUEUE_STATE_STARTED) Is line wrap required? ... > > static inline int > nicvf_configure_cpi(struct rte_eth_dev *dev) > @@ -912,6 +960,24 @@ nicvf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) > } > > static int > +nicvf_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + if (qidx >= nicvf_pmd_priv(dev)->eth_dev->data->nb_tx_queues) > + return -EINVAL; This check already done by librte_ether > + > + return nicvf_start_tx_queue(dev, qidx); > +} > + > +static int > +nicvf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) > +{ > + if (qidx >= nicvf_pmd_priv(dev)->eth_dev->data->nb_tx_queues) > + return -EINVAL; Same here > + > + return nicvf_stop_tx_queue(dev, qidx); > +} > + ...