macsec: add functions to get macsec real netdevice and check offload
authorPatrisious Haddad <phaddad@nvidia.com>
Mon, 2 May 2022 11:40:56 +0000 (14:40 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 20 Aug 2023 09:35:23 +0000 (12:35 +0300)
commitf132fdd9dc81e045bcf95005d418a31fbe9d942f
tree9f5baf69c637f2ea0733e76db45aea21197e0676
parent5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
macsec: add functions to get macsec real netdevice and check offload

Given a macsec net_device add two functions to return the real net_device
for that device, and check if that macsec device is offloaded or not.

This is needed for auxiliary drivers that implement MACsec offload, but
have flows which are triggered over the macsec net_device, this allows
the drivers in such cases to verify if the device is offloaded or not,
and to access the real device of that macsec device, which would
belong to the driver, and would be needed for the offload procedure.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/macsec.c
include/net/macsec.h