[dpdk-dev] net/mlx5: fix VLAN stripping indication

Message ID 1487589272-22516-1-git-send-email-shahafs@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

Shahaf Shuler Feb. 20, 2017, 11:14 a.m. UTC
  The indication on vlan stripping was taken from the wrong location in the
completion entry.

Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
CC: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit Feb. 20, 2017, 4:41 p.m. UTC | #1
On 2/20/2017 11:14 AM, Shahaf Shuler wrote:
> The indication on vlan stripping was taken from the wrong location in the
> completion entry.
> 
> Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
> CC: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@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 2703765..805aa5a 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1447,7 +1447,7 @@ 
 					pkt->ol_flags |=
 						rxq_cq_to_ol_flags(rxq, cqe);
 				}
-				if (cqe->hdr_type_etc &
+				if (ntohs(cqe->hdr_type_etc) &
 				    MLX5_CQE_VLAN_STRIPPED) {
 					pkt->ol_flags |= PKT_RX_VLAN_PKT |
 						PKT_RX_VLAN_STRIPPED;