[v1,1/2] net/virtio: fix for out of date comment
Checks
Commit Message
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
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
@@ -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)