[dpdk-dev] net/mlx5: fix SW parser offset

Message ID 20180523112709.10729-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers

Checks

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

Commit Message

Yongseok Koh May 23, 2018, 11:27 a.m. UTC
  Fixes: 8589e944d075 ("net/mlx5: fix setting offsets for SW parser")

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

Comments

Shahaf Shuler May 24, 2018, 5:34 a.m. UTC | #1
Wednesday, May 23, 2018 2:27 PM, Yongseok Koh:
> Cc: dev@dpdk.org; Yongseok Koh <yskoh@mellanox.com>
> Subject: [PATCH] net/mlx5: fix SW parser offset
> 
> Fixes: 8589e944d075 ("net/mlx5: fix setting offsets for SW parser")
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 

Applied to next-net-mlx, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index d65cd1be8..f53bb43c3 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -687,10 +687,9 @@  txq_mbuf_to_swp(struct mlx5_txq_data *txq, struct rte_mbuf *buf,
 	 */
 	off = buf->outer_l2_len + (vlan ? sizeof(struct vlan_hdr) : 0);
 	offsets[1] = off >> 1; /* Outer L3 offset. */
-	if (tunnel == PKT_TX_TUNNEL_UDP) {
-		off += buf->outer_l3_len;
+	off += buf->outer_l3_len;
+	if (tunnel == PKT_TX_TUNNEL_UDP)
 		offsets[0] = off >> 1; /* Outer L4 offset. */
-	}
 	if (inner_ip) {
 		off += buf->l2_len;
 		offsets[3] = off >> 1; /* Inner L3 offset. */