OSDN Git Service

RDMA/mlx5: Handles RoCE MACsec steering rules addition and deletion
authorPatrisious Haddad <phaddad@nvidia.com>
Thu, 13 Apr 2023 09:04:59 +0000 (12:04 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 20 Aug 2023 09:35:24 +0000 (12:35 +0300)
commit58dbd6428a6819e55a3c52ec60126b5d00804a38
tree83d919e1dbe48299cd2ac9fd892810020998b390
parentac7ea1c78f0edb910af1c17a3fb01345944bcb39
RDMA/mlx5: Handles RoCE MACsec steering rules addition and deletion

Add RoCE MACsec rules when a gid is added for the MACsec netdevice and
handle their cleanup when the gid is removed or the MACsec SA is deleted.
Also support alias IP for the MACsec device, as long as we don't have
more ips than what the gid table can hold.
In addition handle the case where a gid is added but there are still no
SAs added for the MACsec device, so the rules are added later on when
the SAs are added.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/infiniband/hw/mlx5/macsec.c
drivers/infiniband/hw/mlx5/macsec.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
include/linux/mlx5/driver.h