Skip to content

net: atlantic: MACSec support for AQC devices

Igor Russkikh netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 patches 1 replyIn review
  2. v117 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* clean up the generated code (removed useless bit operations);
* use WARN_ONCE to avoid log spam;
* use put_unaligned_be64;
* removed trailing \0 and length limit for format strings;

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17net: introduce the MACSEC netdev featureinclude/linux/netdev_features.h net/ethtool/common.c+4 -00 replies
2/17net: add a reference to MACsec ops in net_deviceinclude/linux/netdevice.h+9 -00 replies
3/17net: macsec: allow to reference a netdev from a MACsec contextinclude/net/macsec.h+4 -10 replies
4/17net: macsec: add support for offloading to the MACdrivers/net/macsec.c include/uapi/linux/if_link.h tools/include/uapi/linux/if_link.h+13 -20 replies
5/17net: macsec: init secy pointer in macsec_contextdrivers/net/macsec.c+15 -10 replies
6/17net: macsec: allow multiple macsec devices with offloaddrivers/net/macsec.c+1 -240 replies
7/17net: macsec: support multicast/broadcast when offloadingdrivers/net/macsec.c+38 -130 replies
8/17net: macsec: add support for getting offloaded statsdrivers/net/macsec.c include/net/macsec.h+237 -1080 replies
9/17net: macsec: report real_dev features when HW offloading is enableddrivers/net/macsec.c+22 -40 replies
10/17net: atlantic: MACSec offload skeletondrivers/net/ethernet/aquantia/Kconfig drivers/net/ethernet/aquantia/atlantic/Makefile drivers/net/ethernet/aquantia/atlantic/aq_hw.h +7 more+373 -80 replies
11/17net: atlantic: MACSec egress offload HW bindingsdrivers/net/ethernet/aquantia/atlantic/Makefile drivers/net/ethernet/aquantia/atlantic/macsec/MSS_Egress_registers.h drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c +2 more+1451 -10 replies
12/17net: atlantic: MACSec egress offload implementationdrivers/net/ethernet/aquantia/atlantic/aq_macsec.c drivers/net/ethernet/aquantia/atlantic/aq_macsec.h+656 -80 replies
13/17net: atlantic: MACSec ingress offload HW bindingsdrivers/net/ethernet/aquantia/atlantic/macsec/MSS_Ingress_registers.h drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.h +1 more+1605 -00 replies
14/17net: atlantic: MACSec ingress offload implementationdrivers/net/ethernet/aquantia/atlantic/aq_macsec.c drivers/net/ethernet/aquantia/atlantic/aq_macsec.h+420 -60 replies
15/17net: atlantic: MACSec offload statistics HW bindingsdrivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.h drivers/net/ethernet/aquantia/atlantic/macsec/macsec_struct.h+806 -00 replies
16/17net: atlantic: MACSec offload statistics implementationdrivers/net/ethernet/aquantia/atlantic/aq_ethtool.c drivers/net/ethernet/aquantia/atlantic/aq_macsec.c drivers/net/ethernet/aquantia/atlantic/aq_macsec.h +2 more+766 -190 replies
17/17net: atlantic: add XPN handlingdrivers/net/ethernet/aquantia/atlantic/aq_macsec.c+7 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 net-next 00/17] net: atlantic: MACSec support for AQC devices

This patchset introduces MACSec HW offloading support in Marvell(Aquantia) AQC atlantic driver.

This implementation is a joint effort of Marvell developers on top of the work started by Antoine Tenart.

v2:
* clean up the generated code (removed useless bit operations);
* use WARN_ONCE to avoid log spam;
* use put_unaligned_be64;
* removed trailing \0 and length limit for format strings;

v1: https://patchwork.ozlabs.org/cover/1259998/

RFC v2: https://patchwork.ozlabs.org/cover/1252204/

RFC v1: https://patchwork.ozlabs.org/cover/1238082/

Several patches introduce backward-incompatible changes and are subject for discussion/drop:

1) patch 0007:
multicast/broadcast when offloading is needed to handle ARP requests, because they have broadcast destination address;
With this patch we also match and encrypt/decrypt packets between macsec hw and realdev based on device's mac address.
This can potentially be used to support multiple macsec offloaded interfaces on top of one realdev.
However in some environments this could lead to problems, e.g. the 'bridge over macsec' configuration will expect the packets with unknown src MAC should come through macsec.
The patch is questionable, we've used it because our current hw setup and requirements both assume that the decryption is done based on mac address match only.
This could be changed by encrypting/decripting all the traffic (except control).

2) patch 0009:
real_dev features are now propagated to macsec device (when HW offloading is enabled), otherwise feature set might lead to HW reconfiguration during MACSec configuration.
Also, HW offloaded macsec should be able to keep LRO LSO features, since they are transparent for macsec engine (at least in our hardware).

Antoine Tenart (4):
net: introduce the MACSEC netdev feature
net: add a reference to MACsec ops in net_device
net: macsec: allow to reference a netdev from a MACsec context
net: macsec: add support for offloading to the MAC

Dmitry Bogdanov (8):
net: macsec: init secy pointer in macsec_context
net: macsec: allow multiple macsec devices with offload
net: macsec: add support for getting offloaded stats
net: atlantic: MACSec offload skeleton
net: atlantic: MACSec egress offload HW bindings
net: atlantic: MACSec egress offload implementation
net: atlantic: MACSec offload statistics HW bindings
net: atlantic: MACSec offload statistics implementation

Mark Starovoytov (5):
net: macsec: support multicast/broadcast when offloading
net: macsec: report real_dev features when HW offloading is enabled
net: atlantic: MACSec ingress offload HW bindings
net: atlantic: MACSec ingress offload implementation
net: atlantic: add XPN handling

 drivers/net/ethernet/aquantia/Kconfig         |    1 +
 .../net/ethernet/aquantia/atlantic/Makefile   |    7 +-
 .../ethernet/aquantia/atlantic/aq_ethtool.c   |  160 +-
 .../net/ethernet/aquantia/atlantic/aq_hw.h    |    6 +
 .../ethernet/aquantia/atlantic/aq_macsec.c    | 1777 ++++++++++++
 .../ethernet/aquantia/atlantic/aq_macsec.h    |  133 +
 .../net/ethernet/aquantia/atlantic/aq_nic.c   |   21 +-
 .../net/ethernet/aquantia/atlantic/aq_nic.h   |    6 +-
 .../ethernet/aquantia/atlantic/aq_pci_func.c  |    5 +
 .../aquantia/atlantic/hw_atl/hw_atl_utils.h   |   51 +-
 .../atlantic/hw_atl/hw_atl_utils_fw2x.c       |   69 +
 .../atlantic/macsec/MSS_Egress_registers.h    |   73 +
 .../atlantic/macsec/MSS_Ingress_registers.h   |   77 +
 .../aquantia/atlantic/macsec/macsec_api.c     | 2473 +++++++++++++++++
 .../aquantia/atlantic/macsec/macsec_api.h     |  323 +++
 .../aquantia/atlantic/macsec/macsec_struct.h  |  914 ++++++
 drivers/net/macsec.c                          |  452 ++-
 include/linux/netdev_features.h               |    3 +
 include/linux/netdevice.h                     |    9 +
 include/net/macsec.h                          |   29 +-
 include/uapi/linux/if_link.h                  |    1 +
 net/ethtool/common.c                          |    1 +
 tools/include/uapi/linux/if_link.h            |    1 +
 23 files changed, 6411 insertions(+), 181 deletions(-)
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/aq_macsec.c
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/aq_macsec.h
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/macsec/MSS_Egress_registers.h
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/macsec/MSS_Ingress_registers.h
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.h
 create mode 100644 drivers/net/ethernet/aquantia/atlantic/macsec/macsec_struct.h
Signature · 1 line
2.17.1