net/mlx5: fix selection between encap and decap
authorOri Kam <orika@mellanox.com>
Thu, 21 Nov 2019 13:18:31 +0000 (13:18 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:05:15 +0000 (18:05 +0100)
commit9e0d81c1a13cac520a535f259e7d3c9132770e14
treeb900b37156f46f1593718be794a97fcd0a2b0846
parent781088dad55b840e04e699071d443f9ecfc208b3
net/mlx5: fix selection between encap and decap

The current raw_encap function selects if to decap or encap
based on the egress/ingress attribute. This concepts doesn't work
in case of FDB since all flows are considered ingress.

To solve this issue we moved to check the encap size.
if the encap size is larger then eth + ipv4 it means we are
trying to encap.

Fixes: 8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_flow_dv.c