macsec: report the offloading mode currently selected
This patch adds support to report the MACsec offloading mode currently
being enabled, which as of now can either be 'off' or 'phy'. This
information is reported through the `ip macsec show` command:
# ip macsec show
18: macsec0: protect on validate strict sc off sa off encrypt on send_sci on end_station off scb off replay off
cipher suite: GCM-AES-128, using ICV length 16
TXSC:
3e5035b67c860001 on SA 0
0: PN 1, state on, key
00000000000000000000000000000000
RXSC:
b4969112700f0001, state on
0: PN 1, state on, key
01000000000000000000000000000000
offload: phy
19: macsec1: protect on validate strict sc off sa off encrypt on send_sci on end_station off scb off replay off
cipher suite: GCM-AES-128, using ICV length 16
TXSC:
3e5035b67c880001 on SA 0
1: PN 1, state on, key
00000000000000000000000000000000
RXSC:
b4969112700f0001, state on
1: PN 1, state on, key
01000000000000000000000000000000
offload: off
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David Ahern <dsahern@gmail.com>