From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by dpdk.org (Postfix) with ESMTP id 5BF4DB3DA for ; Thu, 25 Sep 2014 11:24:43 +0200 (CEST) Received: by mail-we0-f182.google.com with SMTP id u57so5679095wes.13 for ; Thu, 25 Sep 2014 02:31:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=A/GtJqRvbiy2Gs1PvcXa5s8Sl41kyDCiIUs4ooMUf80=; b=OSGPubWutIzJgnYZJPnrk5w3pbHGJNx3Mv74/3daqKUmNIjMAJBxmadXV/jFpTCwsr V1/FyTVywaahYaRwzOGzCyRnNaEw1j3flov9r7ky//R5qlx/0YuK4KD4YqsbPGlSEXsg ai+kToEPdb1/vUjB5ZepzUQcieNIpSYou4HNdFq5Qc8LjmAkxvBx51tiUZ7kmuofvOLX Ka4Xd97uAAf0NGnajMLghj+I2qmqGg+/V/kVuMjyEL8e4E4+aXBr/wv7WVCQ3URZY00X EQd2Yahhw9PjY4fQQ+fNsM3ghSSx044Qgm4TXdeWGzD1+gmL1MWVSZMeAAzPXixaQj7X mJtA== X-Gm-Message-State: ALoCoQnrs+WI39ElZt9V5akoER4lV2gXJJt3xFiA3k/PIGrIzybo4jH3M0wKuWnlVSzAz/sRvMcR X-Received: by 10.180.95.163 with SMTP id dl3mr18101767wib.79.1411637460284; Thu, 25 Sep 2014 02:31:00 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id mx5sm8610409wic.0.2014.09.25.02.30.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Sep 2014 02:30:59 -0700 (PDT) From: Thomas Monjalon To: Ouyang Changchun Date: Thu, 25 Sep 2014 11:30:51 +0200 Message-ID: <1577833.5iZA1XeDyr@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <1406090907-24347-1-git-send-email-changchun.ouyang@intel.com> References: <1406090907-24347-1-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] ethdev: Rename RX/TX enable queue field for queue start and stop 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: Thu, 25 Sep 2014 09:24:43 -0000 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