netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/3] Introduce MACsec skb_metadata_dst
@ 2022-08-18 13:24 Lior Nahmanson
  2022-08-18 13:24 ` [PATCH 1/3] net/macsec: Add MACsec skb_metadata_dst Tx Data path support Lior Nahmanson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lior Nahmanson @ 2022-08-18 13:24 UTC (permalink / raw)
  To: edumazet, kuba, pabeni; +Cc: davem, netdev, Lior Nahmanson

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="y", Size: 2326 bytes --]

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(-)

-- 
2.21.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-22 20:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18 13:24 [PATCH net-next 00/3] Introduce MACsec skb_metadata_dst Lior Nahmanson
2022-08-18 13:24 ` [PATCH 1/3] net/macsec: Add MACsec skb_metadata_dst Tx Data path support Lior Nahmanson
2022-08-19  4:08   ` Jakub Kicinski
2022-08-21 11:12     ` Raed Salem
2022-08-22 18:10       ` Jakub Kicinski
2022-08-22 20:29         ` Saeed Mahameed
2022-08-18 13:24 ` [PATCH 2/3] net/macsec: Add MACsec skb_metadata_dst Rx " Lior Nahmanson
2022-08-18 13:24 ` [PATCH 3/3] net/macsec: Move some code for sharing with various drivers that implements offload Lior Nahmanson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).