Skip to contentSkip to conversation

small fixes

PATCH Applied Xiaolong Ye 2 participants 6 messages Mar 7, 2020 – Apr 10, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

cover small fixes

This series contains small fixes for virtio and vhost.

Xiaolong Ye (2):
net/virtio: fix for out of date comment
vhost: remove unused variable

 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 lib/librte_vhost/vhost.h           | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 net/virtio: fix for out of date comment

Fix the comment that's incorrect as the code evolves.

Fixes 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
---
 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_ethdev.c +3 -3
index f9d0ea70d..35203940a 100644
@@ -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)
Signature · 1 line
2.17.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [dpdk-dev] [PATCH v1 1/2] net/virtio: fix for out of date comment

Quoted 25 lines · Xiaolong Ye

Fix the comment that's incorrect as the code evolves.

Fixes 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
---
 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_ethdev.c +1 -1
index f9d0ea70d..35203940a 100644
@@ -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;
 	}
 

drivers/net/virtio/virtio_ethdev.c virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) · line 595

Quoted 10 lines
drivers/net/virtio/virtio_ethdev.c +2 -2
@@ -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)

Thanks,
Maxime

#3 lore raw

PATCH 2/2 vhost: remove unused variable

In reply to Xiaolong Ye

VHOST_FEATURES has been removed in previous refactor.

Fixes 0917f9d1f059 ("vhost: use new APIs to handle features")
---
 lib/librte_vhost/vhost.h | 1 -
 1 file changed, 1 deletion(-)
lib/librte_vhost/vhost.h +0 -1
index 2087d1400..507dbf214 100644
@@ -543,7 +543,6 @@ extern int vhost_data_log_level;
 #define PRINT_PACKET(device, addr, size, header) do {} while (0)
 #endif
 
-extern uint64_t VHOST_FEATURES;
 #define MAX_VHOST_DEVICE	1024
 extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
 
Signature · 1 line
2.17.1
Reviewed-by on v1 2/2
#4 lore raw

Re: [dpdk-dev] [PATCH v1 2/2] vhost: remove unused variable

Quoted 16 lines · Xiaolong Ye

VHOST_FEATURES has been removed in previous refactor.

Fixes 0917f9d1f059 ("vhost: use new APIs to handle features")
---
 lib/librte_vhost/vhost.h | 1 -
 1 file changed, 1 deletion(-)
lib/librte_vhost/vhost.h +0 -0
index 2087d1400..507dbf214 100644

lib/librte_vhost/vhost.h extern int vhost_data_log_level; · line 548

Quoted 7 lines
lib/librte_vhost/vhost.h +0 -1
@@ -543,7 +543,6 @@ extern int vhost_data_log_level;
 #define PRINT_PACKET(device, addr, size, header) do {} while (0)
 #endif
 
-extern uint64_t VHOST_FEATURES;
 #define MAX_VHOST_DEVICE	1024
 extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
 

Thanks,
Maxime

#5 lore raw
In reply to Xiaolong Ye
Quoted 10 lines · Xiaolong Ye

This series contains small fixes for virtio and vhost.

Xiaolong Ye (2):
net/virtio: fix for out of date comment
vhost: remove unused variable

 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 lib/librte_vhost/vhost.h           | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime