DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <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 14:26:56 +0000	[thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F96251185B434@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1577833.5iZA1XeDyr@xps13>

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@6wind.com]
> Sent: Thursday, September 25, 2014 5:31 PM
> To: Ouyang, Changchun
> Cc: dev@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

      reply	other threads:[~2014-09-25 14:20 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
2014-09-25 14:26   ` Ouyang, Changchun [this message]

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=F52918179C57134FAEC9EA62FA2F96251185B434@shsmsx102.ccr.corp.intel.com \
    --to=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /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).