[v1] net/virtio: simplify variable name

Message ID 20200624084510.35277-1-joyce.kong@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v1] net/virtio: simplify variable name |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Joyce Kong June 24, 2020, 8:45 a.m. UTC
  Virtio_hw *hw has been pointed to vq->hw, it is better to use
hw instead of vq->hw in later code.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Honnappa Nagarahalli June 24, 2020, 7:45 p.m. UTC | #1
<snip>

> 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.
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> ---
>  drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c
> b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> index 363e2b330..8e6fa1fd7 100644
> --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
> +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> @@ -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
  
Chenbo Xia June 28, 2020, 4:57 a.m. UTC | #2
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Joyce Kong
> Sent: Wednesday, June 24, 2020 4:45 PM
> To: jerinj@marvell.com; maxime.coquelin@redhat.com; Wang, Zhihong
> <zhihong.wang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>;
> ruifeng.wang@arm.com; honnappa.nagarahalli@arm.com; phil.yang@arm.com
> Cc: dev@dpdk.org; nd@arm.com
> 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-
> >hw in later code.
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c
> b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> index 363e2b330..8e6fa1fd7 100644
> --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
> +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> @@ -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: Chenbo Xia <chenbo.xia@intel.com>
  
Maxime Coquelin June 30, 2020, 7:27 a.m. UTC | #3
On 6/24/20 10:45 AM, Joyce Kong wrote:
> Virtio_hw *hw has been pointed to vq->hw, it is better to use
> hw instead of vq->hw in later code.
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> index 363e2b330..8e6fa1fd7 100644
> --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
> +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
> @@ -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
>  	};
> 

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

Thanks,
Maxime
  
Maxime Coquelin June 30, 2020, 7:41 a.m. UTC | #4
On 6/30/20 9:27 AM, Maxime Coquelin wrote:
> 
> 
> On 6/24/20 10:45 AM, Joyce Kong wrote:
>> Virtio_hw *hw has been pointed to vq->hw, it is better to use
>> hw instead of vq->hw in later code.
>>
>> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
>> ---
>>  drivers/net/virtio/virtio_rxtx_simple_neon.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
>> index 363e2b330..8e6fa1fd7 100644
>> --- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
>> +++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
>> @@ -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
>>  	};
>>
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Thanks,
> Maxime
> 

Applied to dpdk-next-virtio/master

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index 363e2b330..8e6fa1fd7 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -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
 	};