[v1,1/2] net/virtio: fix for out of date comment

Message ID 20200307132235.210168-2-xiaolong.ye@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series small fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Xiaolong Ye March 7, 2020, 1:22 p.m. UTC
  Fix the comment that's incorrect as the code evolves.

Fixes: 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
Cc: stable@dpdk.org

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Comments

Maxime Coquelin April 9, 2020, 2:20 p.m. UTC | #1
On 3/7/20 2:22 PM, Xiaolong Ye wrote:
> Fix the comment that's incorrect as the code evolves.
> 
> Fixes: 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index f9d0ea70d..35203940a 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -466,7 +466,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
>  	}
>  
>  	if (!vtpci_packed_queue(hw) && !rte_is_power_of_2(vq_size)) {
> -		PMD_INIT_LOG(ERR, "split virtqueue size is not powerof 2");
> +		PMD_INIT_LOG(ERR, "split virtqueue size is not power of 2");
>  		return -EINVAL;
>  	}
>  
> @@ -588,8 +588,8 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
>  		hw->cvq = cvq;
>  	}
>  
> -	/* For virtio_user case (that is when hw->dev is NULL), we use
> -	 * virtual address. And we need properly set _offset_, please see
> +	/* For virtio_user case (that is when hw->virtio_user_dev is not NULL),
> +	 * we use virtual address. And we need properly set _offset_, please see
>  	 * VIRTIO_MBUF_DATA_DMA_ADDR in virtqueue.h for more information.
>  	 */
>  	if (!hw->virtio_user_dev)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f9d0ea70d..35203940a 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -466,7 +466,7 @@  virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 	}
 
 	if (!vtpci_packed_queue(hw) && !rte_is_power_of_2(vq_size)) {
-		PMD_INIT_LOG(ERR, "split virtqueue size is not powerof 2");
+		PMD_INIT_LOG(ERR, "split virtqueue size is not power of 2");
 		return -EINVAL;
 	}
 
@@ -588,8 +588,8 @@  virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 		hw->cvq = cvq;
 	}
 
-	/* For virtio_user case (that is when hw->dev is NULL), we use
-	 * virtual address. And we need properly set _offset_, please see
+	/* For virtio_user case (that is when hw->virtio_user_dev is not NULL),
+	 * we use virtual address. And we need properly set _offset_, please see
 	 * VIRTIO_MBUF_DATA_DMA_ADDR in virtqueue.h for more information.
 	 */
 	if (!hw->virtio_user_dev)