From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 00FD3952 for ; Tue, 21 Jul 2015 06:57:34 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 20 Jul 2015 21:57:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,513,1432623600"; d="scan'208";a="527515536" Received: from kmsmsx154.gar.corp.intel.com ([172.21.73.14]) by FMSMGA003.fm.intel.com with ESMTP; 20 Jul 2015 21:57:32 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by KMSMSX154.gar.corp.intel.com (172.21.73.14) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 21 Jul 2015 12:57:31 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Tue, 21 Jul 2015 12:57:30 +0800 From: "Ouyang, Changchun" To: Stephen Hemminger Thread-Topic: [PATCH v2 2/2] virtio: small cleanups Thread-Index: AQHQwxuWrI1ZuqTDz0q/CVFaqUUPs53lXN0Q Date: Tue, 21 Jul 2015 04:57:30 +0000 Message-ID: References: <1437417646-11221-1-git-send-email-stephen@networkplumber.org> <1437417646-11221-3-git-send-email-stephen@networkplumber.org> In-Reply-To: <1437417646-11221-3-git-send-email-stephen@networkplumber.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 2/2] 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: Tue, 21 Jul 2015 04:57:35 -0000 > -----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 >=20 > Some minor cleanups. > * pass constant to virtio_dev_queue_setup > * fix message on rx_queue_setup > * get rid of extra double spaces >=20 > Signed-off-by: Stephen Hemminger Acked-by: Changchun Ouyang > --- > 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(-) >=20 > 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 =3D dev->data->dev_private; > - struct virtqueue *vq =3D NULL; > + struct virtqueue *vq =3D NULL; >=20 > /* 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 =3D 0; > int ret; > struct virtio_hw *hw =3D dev->data->dev_private; >=20 > PMD_INIT_FUNC_TRACE(); > ret =3D 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 =3D 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; > } >=20 > -- > 2.1.4