Skip to contentSkip to conversation

net/virtio: simplify variable name

PATCH Applied Joyce Kong 4 participants 5 messages Jun 24, 2020 – Jun 30, 2020 Network drivers

lore
Share & tools
lore

Joyce Kong

author
#0 lore raw

PATCH 1/1 net/virtio: simplify variable name

Virtio_hw *hw has been pointed to vq->hw, it is better to use hw instead of vq->hw in later code.

---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx_simple_neon.c +2 -2
index 363e2b330..8e6fa1fd7 100644
@@ -71,8 +71,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	 */
 	uint16x8_t len_adjust = {
 		0, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size,
+		(uint16_t)hw->vtnet_hdr_size, 0,
+		(uint16_t)hw->vtnet_hdr_size,
 		0,
 		0, 0
 	};
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw

<snip>

Quoted 6 lines

Subject: [PATCH v1] net/virtio: simplify variable name

Virtio_hw *hw has been pointed to vq->hw, it is better to use hw instead of vq->hw in later code.

Quoted 23 lines
---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx_simple_neon.c +2 -2
index 363e2b330..8e6fa1fd7 100644
@@ -71,8 +71,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf
 **rx_pkts,
 	 */
 	uint16x8_t len_adjust = {
 		0, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size,
+		(uint16_t)hw->vtnet_hdr_size, 0,
+		(uint16_t)hw->vtnet_hdr_size,
 		0,
 		0, 0

};
--
2.27.0

Reviewed-by on v1 1/1
#2 lore raw
In reply to Joyce Kong
Quoted 34 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Joyce Kong
Sent: Wednesday, June 24, 2020 4:45 PM
To: [email protected]; [email protected]; Wang, Zhihong <[email protected]>; Ye, Xiaolong <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH v1] net/virtio: simplify variable name

Virtio_hw *hw has been pointed to vq->hw, it is better to use hw instead of vq-

Quoted 1 line

hw in later code.

---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx_simple_neon.c +2 -2
index 363e2b330..8e6fa1fd7 100644
@@ -71,8 +71,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf
 **rx_pkts,
 	 */
 	uint16x8_t len_adjust = {
 		0, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size,
+		(uint16_t)hw->vtnet_hdr_size, 0,
+		(uint16_t)hw->vtnet_hdr_size,
 		0,
 		0, 0
Quoted 3 lines

};
--
2.27.0

Reviewed-by on v1 1/1
#3 lore raw
In reply to Joyce Kong
Quoted 14 lines · Joyce Kong

Virtio_hw *hw has been pointed to vq->hw, it is better to use hw instead of vq->hw in later code.

---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx_simple_neon.c +0 -0
index 363e2b330..8e6fa1fd7 100644

drivers/net/virtio/virtio_rxtx_simple_neon.c virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, · line 78

Quoted 10 lines
drivers/net/virtio/virtio_rxtx_simple_neon.c +2 -2
@@ -71,8 +71,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	 */
 	uint16x8_t len_adjust = {
 		0, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size,
+		(uint16_t)hw->vtnet_hdr_size, 0,
+		(uint16_t)hw->vtnet_hdr_size,
 		0,
 		0, 0
 	};

Thanks,
Maxime

#4 lore raw
Quoted 30 lines · Maxime Coquelin
Quoted 14 lines · Joyce Kong

Virtio_hw *hw has been pointed to vq->hw, it is better to use hw instead of vq->hw in later code.

---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx_simple_neon.c +0 -0
index 363e2b330..8e6fa1fd7 100644

drivers/net/virtio/virtio_rxtx_simple_neon.c virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, · line 78

Quoted 10 lines
drivers/net/virtio/virtio_rxtx_simple_neon.c +2 -2
@@ -71,8 +71,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	 */
 	uint16x8_t len_adjust = {
 		0, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size, 0,
-		(uint16_t)vq->hw->vtnet_hdr_size,
+		(uint16_t)hw->vtnet_hdr_size, 0,
+		(uint16_t)hw->vtnet_hdr_size,
 		0,
 		0, 0
 	};
Quoted 3 lines

Thanks,
Maxime

Applied to dpdk-next-virtio/master

Thanks,
Maxime