Hi Thomas, Thanks very much for your comments! I will rework this patch and also update for i40e.
Thanks and best regards, Changchun > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Thursday, September 25, 2014 5:31 PM > To: Ouyang, Changchun > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] ethdev: Rename RX/TX enable queue > field for queue start and stop > > Hi Ouyang, > > 2014-07-23 12:48, Ouyang Changchun: > > Update comments for the field start_rx_per_q for better readability. > > Rename the field name to rx_enable_queue for better readability too. > > Accordingly Update its reference in sample vhost. > > > - uint8_t start_rx_per_q; /**< start rx per queue. */ > > + /**< If rx_enable_queue is true, rte_eth_dev_rx_queue_start > should be > > + invocated to start RX for one queue after rte_eth_dev_start > is > > + invocated, and rte_eth_dev_rx_queue_start instead of > > + rte_eth_dev_start is responsible for allocating mbuf from > > + mempool and setup the DMA physical address. It is useful in > > + such scenario: buffer address is not available at the point of > > + rte_eth_dev_start's invocating but available later, e.g. in > > + VHOST zero copy case, the buffer address used to setup > DMA > > + address is available only after one VM(guest) startup. */ > > + uint8_t rx_enable_queue; > > }; > > I have many comments here. > > The doxygen comment /**< must be used only after the symbol you are > commenting: > http://doxygen.org/manual/docblocks.html#memberdoc > > The comment is too long. > The use case would be in the manual, not in doxygen. > The comment about rte_eth_dev_rx_queue_start would be in the doxygen > comment of rte_eth_dev_rx_queue_start. > > When this variable is set, it doesn't enable anything. It only disables the > queue when doing a global start. Its name should be rx_deferred_start. > All fields of this structure are about one queue, so the "queue" word is not > needed. > > > - uint8_t start_tx_per_q; /**< start tx per queue. */ > > + /**< If tx_enable_queue is true, rte_eth_dev_tx_queue_start must > be > > + invocated to start TX for one queue after rte_eth_dev_start > is > > + invocated. Refer to start_rx_per_q for the use case. */ > > + uint8_t tx_enable_queue; > > }; > > You refer to the old name (start_rx_per_q). > By the way, a one line description (without referral) for both fields should > be > enough. Something like "do not start with rte_eth_dev_start()". > > > @@ -3652,13 +3652,13 @@ ixgbe_dev_rxtx_start(struct rte_eth_dev *dev) > > > > for (i = 0; i < dev->data->nb_tx_queues; i++) { > > txq = dev->data->tx_queues[i]; > > - if (!txq->start_tx_per_q) > > + if (!txq->tx_enable_queue) > > ixgbe_dev_tx_queue_start(dev, i); > > } > > Here it's clear that this field is about disabling start. > > Please rework this patch and update i40e accordingly. > Thanks > -- > Thomas