]> www.infradead.org Git - users/willy/linux.git/commit
net: macsec: introduce mdo_insert_tx_tag
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Tue, 19 Dec 2023 14:53:30 +0000 (16:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2023 13:08:10 +0000 (13:08 +0000)
commita73d8779d61ad99b966c932a1715bd4d9006a9de
treec1d7ce6775063df5e5beb762b526f0ea4099776e
parent25a00d0cd691562f43a0a4b008214405e76d067f
net: macsec: introduce mdo_insert_tx_tag

Offloading MACsec in PHYs requires inserting the SecTAG and the ICV in
the ethernet frame. This operation will increase the frame size with up
to 32 bytes. If the frames are sent at line rate, the PHY will not have
enough room to insert the SecTAG and the ICV.

Some PHYs use a hardware buffer to store a number of ethernet frames and,
if it fills up, a pause frame is sent to the MAC to control the flow.
This HW implementation does not need any modification in the stack.

Other PHYs might offer to use a specific ethertype with some padding
bytes present in the ethernet frame. This ethertype and its associated
bytes will be replaced by the SecTAG and ICV.

mdo_insert_tx_tag allows the PHY drivers to add any specific tag in the
skb.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c
include/net/macsec.h