]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add indirect tc offload of ovs internal port
authorAriel Levkovich <lariel@nvidia.com>
Thu, 29 Apr 2021 07:03:29 +0000 (10:03 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 29 Oct 2021 20:53:30 +0000 (13:53 -0700)
commitdc7f6661d5d5c7e7a13ab63803c4d662ee609ea6
tree4d9908d0058d05eb25514f04d73bb0ab4dfa0472
parent8f1af3feba7c026ddfffba095024fceecceef233
net/mlx5e: Add indirect tc offload of ovs internal port

Register callbacks for tc blocks of ovs internal port devices.

This allows an indirect offloading rules that apply on
such devices as the filter device.

In case a rule is added to a tc block of an internal port,
the mlx5 driver will implicitly add a matching on the internal
port's unique vport metadata value to the rule's matching list.
Therefore, only packets that previously hit a rule that redirects
to an internal port and got the vport metadata overwritten to the
internal port's unique metadata, can match on such indirect rule.

Offloading of both ingress and egress tc blocks of internal ports
is supported as opposed to other devices where only ingress block
offloading is supported.

Signed-off-by: Ariel Levkovich <lariel@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c