From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Ouyang Changchun <changchun.ouyang@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] ethdev: Rename RX/TX enable queue field for queue start and stop
Date: Thu, 25 Sep 2014 11:30:51 +0200 [thread overview]
Message-ID: <1577833.5iZA1XeDyr@xps13> (raw)
In-Reply-To: <1406090907-24347-1-git-send-email-changchun.ouyang@intel.com>
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
next prev parent reply other threads:[~2014-09-25 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 4:48 Ouyang Changchun
2014-07-23 6:46 ` Chen, Jing D
2014-09-25 9:30 ` Thomas Monjalon [this message]
2014-09-25 14:26 ` Ouyang, Changchun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1577833.5iZA1XeDyr@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=changchun.ouyang@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).