net/mlx5: fix NVGRE matching
authorDekel Peled <dekelp@mellanox.com>
Mon, 22 Jul 2019 15:36:50 +0000 (18:36 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:36 +0000 (14:31 +0200)
commitea81c1b816f7ef7e072ee4d3155d4dcdd2aba32a
tree4608866a488b6b1405189271318f6f3987ac3522
parentee39fe82ea1867421d5e151167def4cf914e7e0a
net/mlx5: fix NVGRE matching

NVGRE has a GRE header with c_rsvd0_ver value 0x2000 and protocol
value 0x6558.
These should be matched when item_nvgre is provided.

This patch adds validation function of NVGRE item.
It also updates the translate function of NVGRE item, to add the
required values, if they were not specified.

Original work by Xiaoyu Min <jackmin@mellanox.com>

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_rxtx.h