net/mlx5e: Support TC encapsulation offloads with upper devices
authorHadar Hen Zion <hadarh@mellanox.com>
Thu, 12 Jan 2017 09:07:40 +0000 (11:07 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 29 Jan 2017 21:01:39 +0000 (23:01 +0200)
commit3e621b19b0bb1f5bea34f1fbc5fb5629191eda2b
tree3027e4ccf30d3dec5c114678e862c280d2d7bb3b
parent5bae8c031053c69b4aa74b7f1ba15d4ec8426208
net/mlx5e: Support TC encapsulation offloads with upper devices

When tunneling is used, some virtualizations systems set the (mlx5e) uplink
device to be stacked under upper devices such as bridge or ovs internal
port, where the VTEP IP address used for the encapsulation is set on
that upper device.

In order to support such use-cases, we also deal with a setup where the
egress mirred device isn't representing a port on the HW e-switch to where
the ingress device belongs. We use eswitch service function which returns
the uplink and set it as the egress device of the tc encap rule.

Fixes: a54e20b4fcae ("net/mlx5e: Add basic TC tunnel set action for SRIOV offloads")
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c