All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lior Nahmanson <liorna@nvidia.com>
To: <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	Lior Nahmanson <liorna@nvidia.com>
Subject: [PATCH net-next v3 00/3] Introduce MACsec offload SKB extension
Date: Mon, 13 Jun 2022 14:19:39 +0300	[thread overview]
Message-ID: <20220613111942.12726-1-liorna@nvidia.com> (raw)

This patchset introduces MACsec SKB extension 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 are
sharing the same MAC address of their parent interface by default.
Therefore, HW can't distinguish if a packet was sent from MACsec
interface and need to be offloaded or not.
Also, it can't distinguish from which MACsec interface it was sent in
case there are multiple MACsec interface with the same MAC address.

Used SKB extension, so SW can mark if a packet is needed to be offloaded
and use the SCI, which is unique value for each MACsec interface,
to notify the HW from which MACsec interface the packet is sent.

For Rx:
Like in the Tx changes, packet that don't have SecTAG
header aren't necessary been offloaded by the HW.
Therefore, the MACsec driver needs to distinguish if the packet
was offloaded or not and handle accordingly.
Moreover, if there are more than one MACsec device with the same MAC
address as in the packet's destination MAC, the packet will forward only
to this device and only to the desired one.

Used SKB extension and marking it by the HW if the packet was offloaded
and to which MACsec offload device it belongs according to the packet's
SCI.

1) patch 0001-0002, Add support to SKB extension in MACsec code:
net/macsec: Add MACsec skb extension Tx Data path support
net/macsec: Add MACsec skb extension 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/Kconfig    |  1 +
 drivers/net/macsec.c   | 45 ++++++++++++++++--------------------------
 include/linux/skbuff.h |  3 +++
 include/net/macsec.h   | 27 +++++++++++++++++++++++++
 net/core/gro.c         | 16 +++++++++++++++
 net/core/skbuff.c      |  7 +++++++
 6 files changed, 71 insertions(+), 28 deletions(-)

-- 
2.25.4


             reply	other threads:[~2022-06-13 13:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 11:19 Lior Nahmanson [this message]
2022-06-13 11:19 ` [PATCH net-next v3 1/3] net/macsec: Add MACsec skb extension Tx Data path support Lior Nahmanson
2022-06-13 11:19 ` [PATCH net-next v3 2/3] net/macsec: Add MACsec skb extension Rx " Lior Nahmanson
2022-06-14 13:55   ` Paolo Abeni
2022-06-14 16:14     ` Jakub Kicinski
2022-06-21 12:39       ` Lior Nahmanson
2022-06-21 19:26         ` Jakub Kicinski
2022-07-12  6:50           ` Lior Nahmanson
2022-07-13  0:01             ` Jakub Kicinski
2022-07-13  6:21               ` Lior Nahmanson
2022-07-13 18:34                 ` Jakub Kicinski
2022-07-13 19:31                   ` Saeed Mahameed
2022-06-13 11:19 ` [PATCH net-next v3 3/3] net/macsec: Move some code for sharing with various drivers that implements offload Lior Nahmanson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220613111942.12726-1-liorna@nvidia.com \
    --to=liorna@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.