DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup
@ 2019-07-24  0:52 Haiyue Wang
  2019-07-24  8:17 ` Ye Xiaolong
  0 siblings, 1 reply; 3+ messages in thread
From: Haiyue Wang @ 2019-07-24  0:52 UTC (permalink / raw)
  To: dev; +Cc: Haiyue Wang

The memzone's start virtual address pointer (addr) is of type void *,
no need to add type cast.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 3353f23..0282b53 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -664,7 +664,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
 	memset(rz->addr, 0, ring_size);
 
 	rxq->rx_ring_dma = rz->iova;
-	rxq->rx_ring = (union ice_rx_desc *)rz->addr;
+	rxq->rx_ring = rz->addr;
 
 #ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 	len = (uint16_t)(nb_desc + ICE_RX_MAX_BURST);
@@ -882,7 +882,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
 	txq->tx_deferred_start = tx_conf->tx_deferred_start;
 
 	txq->tx_ring_dma = tz->iova;
-	txq->tx_ring = (struct ice_tx_desc *)tz->addr;
+	txq->tx_ring = tz->addr;
 
 	/* Allocate software ring */
 	txq->sw_ring =
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup
  2019-07-24  0:52 [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup Haiyue Wang
@ 2019-07-24  8:17 ` Ye Xiaolong
  2019-07-24 13:02   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Ye Xiaolong @ 2019-07-24  8:17 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: dev

On 07/24, Haiyue Wang wrote:
>The memzone's start virtual address pointer (addr) is of type void *,
>no need to add type cast.
>
>Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
>---
> drivers/net/ice/ice_rxtx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
>index 3353f23..0282b53 100644
>--- a/drivers/net/ice/ice_rxtx.c
>+++ b/drivers/net/ice/ice_rxtx.c
>@@ -664,7 +664,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
> 	memset(rz->addr, 0, ring_size);
> 
> 	rxq->rx_ring_dma = rz->iova;
>-	rxq->rx_ring = (union ice_rx_desc *)rz->addr;
>+	rxq->rx_ring = rz->addr;
> 
> #ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
> 	len = (uint16_t)(nb_desc + ICE_RX_MAX_BURST);
>@@ -882,7 +882,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
> 	txq->tx_deferred_start = tx_conf->tx_deferred_start;
> 
> 	txq->tx_ring_dma = tz->iova;
>-	txq->tx_ring = (struct ice_tx_desc *)tz->addr;
>+	txq->tx_ring = tz->addr;
> 
> 	/* Allocate software ring */
> 	txq->sw_ring =
>-- 
>2.7.4
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup
  2019-07-24  8:17 ` Ye Xiaolong
@ 2019-07-24 13:02   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2019-07-24 13:02 UTC (permalink / raw)
  To: Ye, Xiaolong, Wang, Haiyue; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ye Xiaolong
> Sent: Wednesday, July 24, 2019 4:18 PM
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in
> rx/tx ring setup

Should be "Rx/Tx"
> 
> On 07/24, Haiyue Wang wrote:
> >The memzone's start virtual address pointer (addr) is of type void *,
> >no need to add type cast.
> >
> >Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> >---
> 
> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-24 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  0:52 [dpdk-dev] [PATCH v1] net/ice: remove unnecessary type cast in rx/tx ring setup Haiyue Wang
2019-07-24  8:17 ` Ye Xiaolong
2019-07-24 13:02   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).