From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] virtio: small cleanups
Date: Tue, 21 Jul 2015 04:57:30 +0000 [thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F962511C0EBA2@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1437417646-11221-3-git-send-email-stephen@networkplumber.org>
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, July 21, 2015 2:41 AM
> To: Ouyang, Changchun
> Cc: dev@dpdk.org; Stephen Hemminger
> Subject: [PATCH v2 2/2] virtio: small cleanups
>
> Some minor cleanups.
> * pass constant to virtio_dev_queue_setup
> * fix message on rx_queue_setup
> * get rid of extra double spaces
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 7 +++----
> drivers/net/virtio/virtio_ethdev.h | 2 +-
> drivers/net/virtio/virtio_rxtx.c | 2 +-
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index d460d89..465d3cd 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -254,7 +254,7 @@ virtio_dev_queue_release(struct virtqueue *vq) { int
> virtio_dev_queue_setup(struct rte_eth_dev *dev,
> int queue_type,
> uint16_t queue_idx,
> - uint16_t vtpci_queue_idx,
> + uint16_t vtpci_queue_idx,
> uint16_t nb_desc,
> unsigned int socket_id,
> struct virtqueue **pvq)
> @@ -264,7 +264,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
> uint16_t vq_size;
> int size;
> struct virtio_hw *hw = dev->data->dev_private;
> - struct virtqueue *vq = NULL;
> + struct virtqueue *vq = NULL;
>
> /* Write the virtqueue index to the Queue Select Field */
> VIRTIO_WRITE_REG_2(hw, VIRTIO_PCI_QUEUE_SEL,
> vtpci_queue_idx); @@ -413,13 +413,12 @@
> virtio_dev_cq_queue_setup(struct rte_eth_dev *dev, uint16_t
> vtpci_queue_idx,
> uint32_t socket_id)
> {
> struct virtqueue *vq;
> - uint16_t nb_desc = 0;
> int ret;
> struct virtio_hw *hw = dev->data->dev_private;
>
> PMD_INIT_FUNC_TRACE();
> ret = virtio_dev_queue_setup(dev, VTNET_CQ,
> VTNET_SQ_CQ_QUEUE_IDX,
> - vtpci_queue_idx, nb_desc, socket_id, &vq);
> + vtpci_queue_idx, 0, socket_id, &vq);
> if (ret < 0) {
> PMD_INIT_LOG(ERR, "control vq initialization failed");
> return ret;
> diff --git a/drivers/net/virtio/virtio_ethdev.h
> b/drivers/net/virtio/virtio_ethdev.h
> index 3858b00..9026d42 100644
> --- a/drivers/net/virtio/virtio_ethdev.h
> +++ b/drivers/net/virtio/virtio_ethdev.h
> @@ -79,7 +79,7 @@ void virtio_dev_rxtx_start(struct rte_eth_dev *dev);
> int virtio_dev_queue_setup(struct rte_eth_dev *dev,
> int queue_type,
> uint16_t queue_idx,
> - uint16_t vtpci_queue_idx,
> + uint16_t vtpci_queue_idx,
> uint16_t nb_desc,
> unsigned int socket_id,
> struct virtqueue **pvq);
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 5388caa..c5b53bb 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -390,7 +390,7 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
> ret = virtio_dev_queue_setup(dev, VTNET_RQ, queue_idx,
> vtpci_queue_idx,
> nb_desc, socket_id, &vq);
> if (ret < 0) {
> - PMD_INIT_LOG(ERR, "tvq initialization failed");
> + PMD_INIT_LOG(ERR, "rvq initialization failed");
> return ret;
> }
>
> --
> 2.1.4
next prev parent reply other threads:[~2015-07-21 4:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 18:40 [dpdk-dev] [PATCH v2 0/2] virtio: fixes for 2.1-rc1 Stephen Hemminger
2015-07-20 18:40 ` [dpdk-dev] [PATCH v2 1/2] virtio: fix queue size and number of descriptors Stephen Hemminger
2015-07-21 5:06 ` Ouyang, Changchun
2015-07-22 8:55 ` Thomas Monjalon
2015-07-20 18:40 ` [dpdk-dev] [PATCH v2 2/2] virtio: small cleanups Stephen Hemminger
2015-07-21 4:57 ` Ouyang, Changchun [this message]
2015-07-21 5:00 ` [dpdk-dev] [PATCH v2 0/2] virtio: fixes for 2.1-rc1 Ouyang, Changchun
2015-07-22 8:59 ` Thomas Monjalon
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=F52918179C57134FAEC9EA62FA2F962511C0EBA2@shsmsx102.ccr.corp.intel.com \
--to=changchun.ouyang@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).