Skip to content

Introduce MACsec skb_metadata_dst

Lior Nahmanson netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net/macsec: Add MACsec skb_metadata_dst Tx Data path supportdrivers/net/macsec.c include/net/dst_metadata.h include/net/macsec.h+28 -04 replies
2/3net/macsec: Add MACsec skb_metadata_dst Rx Data path supportdrivers/net/macsec.c+6 -00 replies
3/3net/macsec: Move some code for sharing with various drivers that implements offloaddrivers/net/macsec.c include/net/macsec.h+27 -270 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRaed SalemSaeed MahameedJiri PirkoBen Ben-Ishay
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/3] Introduce MACsec skb_metadata_dst

This patchset introduces MACsec skb_metadata_dst to lay the ground for MACsec HW offload.

MACsec is an IEEE standard (IEEE 802.1AE) for MAC security. It defines a way to establish a protocol independent connection between two hosts with data confidentiality, authenticity and/or integrity, using GCM-AES. MACsec operates on the Ethernet layer and as such is a layer 2 protocol, which means it’s designed to secure traffic within a layer 2 network, including DHCP or ARP requests.

Linux has a software implementation of the MACsec standard and HW offloading support.
The offloading is re-using the logic, netlink API and data structures of the existing MACsec software implementation.

For Tx:
In the current MACsec offload implementation, MACsec interfaces shares the same MAC address by default.
Therefore, HW can't distinguish from which MACsec interface the traffic originated from.

MACsec stack will use skb_metadata_dst to store the SCI value, which is unique per MACsec interface, skb_metadat_dst will be used later by the offloading device driver to associate the SKB with the corresponding offloaded interface (SCI) to facilitate HW MACsec offload.

For Rx:
Like in the Tx changes, if there are more than one MACsec device with the same MAC address as in the packet's destination MAC, the packet will be forward only to one of the devices and not neccessarly to the desired one.

Offloading device driver sets the MACsec skb_metadata_dst sci field with the appropriaate Rx SCI for each SKB so the MACsec rx handler will know to which port to divert those skbs, instead of wrongly solely relaying on dst MAC address comparison.

1) patch 0001-0002, Add support to skb_metadata_dst in MACsec code:
net/macsec: Add MACsec skb_metadata_dst Tx Data path support net/macsec: Add MACsec skb_metadata_dst Rx Data path support

2) patch 0003, Move some MACsec driver code for sharing with various drivers that implements offload:
net/macsec: Move some code for sharing with various drivers that implements offload

Follow-up patchset for Nvidia MACsec HW offload will be submitted later on.

 drivers/net/macsec.c       | 54 +++++++++++++++++++-------------------
 include/net/dst_metadata.h | 10 +++++++
 include/net/macsec.h       | 24 +++++++++++++++++
 3 files changed, 61 insertions(+), 27 deletions(-)
Signature · 1 line
2.21.3