From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id C3011C326 for ; Mon, 20 Jul 2015 19:25:02 +0200 (CEST) Received: by pdjr16 with SMTP id r16so106609079pdj.3 for ; Mon, 20 Jul 2015 10:25:02 -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:in-reply-to :references; bh=1qUmWqG5lEeOPbKBeRAkzBU8ZaFjY1nq/I8Up7s06F4=; b=HDvyHCSTmQQNAQzp9aS2eI7NKWTtev4m3gDR+KrA8QUeK15j5MLSstq/41cDDnLafN kleEUQdKroD0m/mDMDvKNwk8x4qCrYwNxUJl/rhtBOLb/jIeJjud27iXDmb83z+WLSPG ebBQp0XHDh6SfUKjF+XcB+0w/YG4VKUlBjgmdxbDdk9PkeRxa+QgfqRVhALZ2tRH17Qt mPlryZ95g7tzR5otYraeK5KPYPlSYBvoT6IqvsL2IWqnlPVtmyzhH/84oT7As1LXIbkp Zu7PG2I55+qJdkw0A9TiePtAyoI29ZQZJm5hcOKjfR8jzSYyJNFASMt/7h6ENFbB3+8i rQOw== X-Gm-Message-State: ALoCoQlKrMdNsfusm9I6EcVd1tT2ZSDaH+nQAzE9HcxZywn6MDRLYYMhb66SdstrGkXphtq78KqG X-Received: by 10.66.119.239 with SMTP id kx15mr63287154pab.156.1437413102203; Mon, 20 Jul 2015 10:25:02 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id fv5sm22906763pdb.19.2015.07.20.10.25.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jul 2015 10:25:01 -0700 (PDT) From: Stephen Hemminger To: changchun.ouyang@intel.com Date: Mon, 20 Jul 2015 10:25:06 -0700 Message-Id: <1437413106-16069-4-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437413106-16069-1-git-send-email-stephen@networkplumber.org> References: <1437413106-16069-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2 3/3] virtio: small cleanups 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: Mon, 20 Jul 2015 17:25:03 -0000 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 --- 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