[dpdk-dev] net/mlx5: fix TSO inline size calculation

Message ID 20171025233040.16911-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Yongseok Koh Oct. 25, 2017, 11:30 p.m. UTC
  When "net/mlx5: replace network to host macros" is rebased for v4, changes
of "net/mlx5: fix calculating TSO inline size" have been reverted.

Fixes: 6b30a6a8552a ("net/mlx5: replace network to host macros")
Cc: stable@dpdk.org
Cc: Shachar Beiser <shacharbe@mellanox.com>

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
  

Comments

Shahaf Shuler Oct. 26, 2017, 5:48 a.m. UTC | #1
Thursday, October 26, 2017 2:31 AM, Yongseok Koh:
> When "net/mlx5: replace network to host macros" is rebased for v4, changes
> of "net/mlx5: fix calculating TSO inline size" have been reverted.
> 
> Fixes: 6b30a6a8552a ("net/mlx5: replace network to host macros")
> Cc: stable@dpdk.org
> Cc: Shachar Beiser <shacharbe@mellanox.com>
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index af0a75546..7785ced44 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -558,14 +558,8 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf
> **pkts, uint16_t pkts_n)
>  					break;
>  				max_wqe -= n;
>  				if (tso) {
> -					uint32_t inl =
> -					rte_cpu_to_be_32(copy_b |
> -							 MLX5_INLINE_SEG);
> -
> -					pkt_inline_sz =
> -
> 	MLX5_WQE_DS(tso_header_sz) *
> -						MLX5_WQE_DWORD_SIZE;
> -
> +					inl = rte_cpu_to_be_32(copy_b |
> +
> MLX5_INLINE_SEG);
>  					rte_memcpy((void *)raw,
>  						   (void *)&inl, sizeof(inl));
>  					raw += sizeof(inl);

Acked-by: Shahaf Shuler <shahafs@mellanox.com>

> --
> 2.11.0
  
Nélio Laranjeiro Oct. 26, 2017, 8:27 a.m. UTC | #2
On Wed, Oct 25, 2017 at 04:30:40PM -0700, Yongseok Koh wrote:
> When "net/mlx5: replace network to host macros" is rebased for v4, changes
> of "net/mlx5: fix calculating TSO inline size" have been reverted.
> 
> Fixes: 6b30a6a8552a ("net/mlx5: replace network to host macros")
> Cc: stable@dpdk.org
> Cc: Shachar Beiser <shacharbe@mellanox.com>
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
  
Ferruh Yigit Oct. 26, 2017, 10:25 p.m. UTC | #3
On 10/26/2017 1:27 AM, Nélio Laranjeiro wrote:
> On Wed, Oct 25, 2017 at 04:30:40PM -0700, Yongseok Koh wrote:
>> When "net/mlx5: replace network to host macros" is rebased for v4, changes
>> of "net/mlx5: fix calculating TSO inline size" have been reverted.
>>
>> Fixes: 6b30a6a8552a ("net/mlx5: replace network to host macros")
>> Cc: stable@dpdk.org
>> Cc: Shachar Beiser <shacharbe@mellanox.com>
>>
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index af0a75546..7785ced44 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -558,14 +558,8 @@  mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 					break;
 				max_wqe -= n;
 				if (tso) {
-					uint32_t inl =
-					rte_cpu_to_be_32(copy_b |
-							 MLX5_INLINE_SEG);
-
-					pkt_inline_sz =
-						MLX5_WQE_DS(tso_header_sz) *
-						MLX5_WQE_DWORD_SIZE;
-
+					inl = rte_cpu_to_be_32(copy_b |
+							       MLX5_INLINE_SEG);
 					rte_memcpy((void *)raw,
 						   (void *)&inl, sizeof(inl));
 					raw += sizeof(inl);