net/mlx5: fix E-Switch flow without port item
authorOri Kam <orika@mellanox.com>
Thu, 25 Apr 2019 12:20:55 +0000 (12:20 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 3 May 2019 16:45:23 +0000 (18:45 +0200)
commitce777b147bf899360c146e66ad9fea0b19334077
tree05b27f19554c864f80209f12655a824e027ef821
parentf2310dddf41c19c9c1d77dbd857d4fab1fb368b7
net/mlx5: fix E-Switch flow without port item

When creating a flow rule without the port_id pattern item, always the
PF was selected.

This commit fixes this issue, if no port_id pattern item is available
then we use the port that the flow was created on as source port.

Fixes: 822fb3195348 ("net/mlx5: add port id item to Direct Verbs")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5_flow_dv.c