Commit 475747a1 authored by Rahul Rameshbabu's avatar Rahul Rameshbabu Committed by Jakub Kicinski

macsec: Enable devices to advertise whether they update sk_buff md_dst during offloads

Cannot know whether a Rx skb missing md_dst is intended for MACsec or not
without knowing whether the device is able to update this field during an
offload. Assume that an offload to a MACsec device cannot support updating
md_dst by default. Capable devices can advertise that they do indicate that
an skb is related to a MACsec offloaded packet using the md_dst.

Cc: Sabrina Dubroca <sd@queasysnail.net>
Cc: stable@vger.kernel.org
Fixes: 860ead89 ("net/macsec: Add MACsec skb_metadata_dst Rx Data path support")
Signed-off-by: default avatarRahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: default avatarBenjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: default avatarCosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/20240423181319.115860-2-rrameshbabu@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4dcd0e83
...@@ -321,6 +321,7 @@ struct macsec_context { ...@@ -321,6 +321,7 @@ struct macsec_context {
* for the TX tag * for the TX tag
* @needed_tailroom: number of bytes reserved at the end of the sk_buff for the * @needed_tailroom: number of bytes reserved at the end of the sk_buff for the
* TX tag * TX tag
* @rx_uses_md_dst: whether MACsec device offload supports sk_buff md_dst
*/ */
struct macsec_ops { struct macsec_ops {
/* Device wide */ /* Device wide */
...@@ -352,6 +353,7 @@ struct macsec_ops { ...@@ -352,6 +353,7 @@ struct macsec_ops {
struct sk_buff *skb); struct sk_buff *skb);
unsigned int needed_headroom; unsigned int needed_headroom;
unsigned int needed_tailroom; unsigned int needed_tailroom;
bool rx_uses_md_dst;
}; };
void macsec_pn_wrapped(struct macsec_secy *secy, struct macsec_tx_sa *tx_sa); void macsec_pn_wrapped(struct macsec_secy *secy, struct macsec_tx_sa *tx_sa);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment