[dpdk-dev] [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

Chen, Jing D jing.d.chen at intel.com
Tue Feb 17 14:01:57 CET 2015


Hi,

From: David Marchand [mailto:david.marchand at 6wind.com] 
Sent: Friday, February 13, 2015 7:08 PM
To: Chen, Jing D
Cc: dev at dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

Hello, 

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen at intel.com> wrote:

[snip] 

+static int
+fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+       uint16_t nb_desc, unsigned int socket_id,
+       const struct rte_eth_rxconf *conf, struct rte_mempool *mp)
+{
+       struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+       struct fm10k_rx_queue *q;
+       const struct rte_memzone *mz;
+
+       PMD_INIT_FUNC_TRACE();
+
+       /* make sure the mempool element size can account for alignment. Use
+        * RTE_LOG directly to make sure this error is seen. */

Comment is not valid anymore since you call PMD_INIT_LOG.

[Mark] Thanks! I'll change the comments.
 
+       if (!mempool_element_size_valid(mp)) {
+               PMD_INIT_LOG(ERR, "Error : Mempool element size is too small");
+               return (-EINVAL);
+       }
+

-- 
David Marchand 



More information about the dev mailing list