|
|
Subscribe / Log in / New account

Add MACsec support for TJA11XX C45 PHYs

From:  "Radu Pirea (NXP OSS)" <radu-nicolae.pirea-AT-oss.nxp.com>
To:  andrew-AT-lunn.ch, hkallweit1-AT-gmail.com, linux-AT-armlinux.org.uk, davem-AT-davemloft.net, edumazet-AT-google.com, kuba-AT-kernel.org, pabeni-AT-redhat.com, richardcochran-AT-gmail.com, sd-AT-queasysnail.net, sebastian.tobuschat-AT-nxp.com
Subject:  [RFC net-next v4 0/7] Add MACsec support for TJA11XX C45 PHYs
Date:  Wed, 13 Sep 2023 16:31:58 +0300
Message-ID:  <20230913133205.3749628-1-radu-nicolae.pirea@oss.nxp.com>
Cc:  netdev-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, "Radu Pirea (NXP OSS)" <radu-nicolae.pirea-AT-oss.nxp.com>
Archive-link:  Article

This is the MACsec support for TJA11XX PHYs. The MACsec block encrypts
the ethernet frames on the fly and has no buffering. This operation will
grow the frames by 32 bytes. If the frames are sent back to back, the
MACsec block will not have enough room to insert the SecTAG and the ICV
and the frames will be dropped.

To mitigate this, the PHY can parse a specific ethertype with some
padding bytes and replace them with the SecTAG and ICV. These padding
bytes might be dummy or might contain information about TX SC that must
be used to encrypt the frame.

Radu P.

Radu Pirea (NXP OSS) (7):
  net: macsec: move sci_to_cpu to macsec header
  net: macsec: documentation for macsec_context and macsec_ops
  net: macsec: indicate next pn update when offloading
  net: macsec: introduce mdo_insert_tx_tag
  net: phy: nxp-c45-tja11xx: add MACsec support
  net: phy: nxp-c45-tja11xx: add MACsec statistics
  net: phy: nxp-c45-tja11xx: implement mdo_insert_tx_tag

 MAINTAINERS                              |    2 +-
 drivers/net/macsec.c                     |   94 +-
 drivers/net/netdevsim/macsec.c           |    5 -
 drivers/net/phy/Kconfig                  |    2 +-
 drivers/net/phy/Makefile                 |    6 +-
 drivers/net/phy/nxp-c45-tja11xx-macsec.c | 1723 ++++++++++++++++++++++
 drivers/net/phy/nxp-c45-tja11xx.c        |   75 +-
 drivers/net/phy/nxp-c45-tja11xx.h        |   62 +
 include/net/macsec.h                     |   55 +
 9 files changed, 1986 insertions(+), 38 deletions(-)
 create mode 100644 drivers/net/phy/nxp-c45-tja11xx-macsec.c
 create mode 100644 drivers/net/phy/nxp-c45-tja11xx.h

-- 
2.34.1



Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds