[dpdk-dev,1/4] net/mlx5: revert "fix Memory Region registration"

Message ID 20180115065420.44065-1-xuemingl@mellanox.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Xueming Li Jan. 15, 2018, 6:54 a.m. UTC
  This reverts commit 17fd4a504a4780455f79969803dc231521254ca8.

Fixes: 12ed59b702cc ("net/mlx5: fix Memory Region registration")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Nélio Laranjeiro Jan. 15, 2018, 3:26 p.m. UTC | #1
On Mon, Jan 15, 2018 at 02:54:17PM +0800, Xueming Li wrote:
> This reverts commit 17fd4a504a4780455f79969803dc231521254ca8.
> 
> Fixes: 12ed59b702cc ("net/mlx5: fix Memory Region registration")
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>

Is it possible to have a more explicit reason why this patch is
reverted?

> ---
>  drivers/net/mlx5/mlx5_rxtx.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
> index a239642ac..2eb2f0506 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.h
> +++ b/drivers/net/mlx5/mlx5_rxtx.h
> @@ -548,7 +548,7 @@ static __rte_always_inline uint32_t
>  mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
>  {
>  	uint16_t i = txq->mr_cache_idx;
> -	uintptr_t addr = rte_pktmbuf_mtod_offset(mb, uintptr_t, DATA_LEN(mb));
> +	uintptr_t addr = rte_pktmbuf_mtod(mb, uintptr_t);
>  	struct mlx5_mr *mr;
>  
>  	assert(i < RTE_DIM(txq->mp2mr));
> -- 
> 2.13.3
> 

Thanks,
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index a239642ac..2eb2f0506 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -548,7 +548,7 @@  static __rte_always_inline uint32_t
 mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
 {
 	uint16_t i = txq->mr_cache_idx;
-	uintptr_t addr = rte_pktmbuf_mtod_offset(mb, uintptr_t, DATA_LEN(mb));
+	uintptr_t addr = rte_pktmbuf_mtod(mb, uintptr_t);
 	struct mlx5_mr *mr;
 
 	assert(i < RTE_DIM(txq->mp2mr));