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 826A547CD for ; Fri, 22 Jul 2016 04:25:08 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 21 Jul 2016 19:25:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,402,1464678000"; d="scan'208";a="1011661918" Received: from dpdk06.sh.intel.com ([10.239.129.195]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2016 19:25:02 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, tiwei.bie@intel.com, Jianfeng Tan Date: Fri, 22 Jul 2016 02:24:47 +0000 Message-Id: <1469154287-88523-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/virtio_user: fix inconsistent name 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: Fri, 22 Jul 2016 02:25:09 -0000 The commit cb6696d22023 ("drivers: update registration macro usage") changes the name from virtio-user to virtio_user, because hyphen cannot be used in a C symbol name. However, this commit does not update the strings in docs and source code, which could lead to failure to start this device as per the docs. This patch updates related strings in the docs and source code. Fixes: cb6696d22023 ("drivers: update registration macro usage") Reported-by: Tiwei Bie Signed-off-by: Jianfeng Tan --- doc/guides/rel_notes/release_16_07.rst | 2 +- doc/guides/sample_app_ug/vhost.rst | 12 ++++++------ drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_user_ethdev.c | 6 +++--- drivers/net/virtio/virtqueue.h | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index d3a144f..0740d4f 100644 --- a/doc/guides/rel_notes/release_16_07.rst +++ b/doc/guides/rel_notes/release_16_07.rst @@ -90,7 +90,7 @@ New Features * **Virtio support for containers.** - Add a new virtual device, named virtio-user, to support virtio for containers. + Add a new virtual device, named virtio_user, to support virtio for containers. Known limitations: diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst index a93e54d..2b7defc 100644 --- a/doc/guides/sample_app_ug/vhost.rst +++ b/doc/guides/sample_app_ug/vhost.rst @@ -834,19 +834,19 @@ The above message indicates that device 0 has been registered with MAC address c Any packets received on the NIC with these values is placed on the devices receive queue. When a virtio-net device transmits packets, the VLAN tag is added to the packet by the DPDK vhost sample code. -Running virtio-user with vhost-switch +Running virtio_user with vhost-switch ------------------------------------- -We can also use virtio-user with vhost-switch now. -Virtio-user is a virtual device that can be run in a application (container) parallelly with vhost in the same OS, +We can also use virtio_user with vhost-switch now. +Virtio_user is a virtual device that can be run in a application (container) parallelly with vhost in the same OS, aka, there is no need to start a VM. We just run it with a different --file-prefix to avoid startup failure. .. code-block:: console cd ${RTE_SDK}/x86_64-native-linuxapp-gcc/app - ./testpmd -c 0x3 -n 4 --socket-mem 1024 --no-pci --file-prefix=virtio-user-testpmd \ - --vdev=virtio-user0,mac=00:01:02:03:04:05,path=$path_vhost \ + ./testpmd -c 0x3 -n 4 --socket-mem 1024 --no-pci --file-prefix=virtio_user-testpmd \ + --vdev=virtio_user0,mac=00:01:02:03:04:05,path=$path_vhost \ -- -i --txqflags=0xf01 --disable-hw-vlan There is no difference on the vhost side. -Pleae note that there are some limitations (see release note for more information) in the usage of virtio-user. +Pleae note that there are some limitations (see release note for more information) in the usage of virtio_user. diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 850e3ba..c1ff2ac 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -452,7 +452,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev, *pvq = cvq; } - /* For virtio-user case (that is when dev->pci_dev is NULL), we use + /* For virtio_user case (that is when dev->pci_dev is NULL), we use * virtual address. And we need properly set _offset_, please see * MBUF_DATA_DMA_ADDR in virtqueue.h for more information. */ @@ -1541,7 +1541,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) if (dev->pci_dev) dev_info->driver_name = dev->driver->pci_drv.name; else - dev_info->driver_name = "virtio-user PMD"; + dev_info->driver_name = "virtio_user PMD"; dev_info->max_rx_queues = (uint16_t)hw->max_rx_queues; dev_info->max_tx_queues = (uint16_t)hw->max_tx_queues; dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE; diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 6b4f66e..daef09b 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -331,7 +331,7 @@ virtio_user_pmd_devinit(const char *name, const char *params) int ret = -1; if (!params || params[0] == '\0') { - PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio-user", + PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio_user", VIRTIO_USER_ARG_QUEUE_SIZE); goto end; } @@ -351,7 +351,7 @@ virtio_user_pmd_devinit(const char *name, const char *params) goto end; } } else { - PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio-user\n", + PMD_INIT_LOG(ERR, "arg %s is mandatory for virtio_user\n", VIRTIO_USER_ARG_QUEUE_SIZE); goto end; } @@ -405,7 +405,7 @@ virtio_user_pmd_devinit(const char *name, const char *params) eth_dev = virtio_user_eth_dev_alloc(name); if (!eth_dev) { - PMD_INIT_LOG(ERR, "virtio-user fails to alloc device"); + PMD_INIT_LOG(ERR, "virtio_user fails to alloc device"); goto end; } diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 455aaaf..db409d6 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -183,7 +183,7 @@ struct virtqueue { unsigned int vq_ring_size; phys_addr_t vq_ring_mem; /**< physical address of vring */ - /**< use virtual address for virtio-user. */ + /**< use virtual address for virtio_user. */ /** * Head of the free chain in the descriptor table. If -- 2.7.4