1 From stable+bounces-41779-greg=kroah.com@vger.kernel.org Tue Apr 30 02:45:02 2024
2 From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
3 Date: Mon, 29 Apr 2024 17:44:21 -0700
4 Subject: macsec: Enable devices to advertise whether they update sk_buff md_dst during offloads
5 To: stable@vger.kernel.org
6 Cc: gregkh@linuxfoundation.org, bpoirier@nvidia.com, cratiu@nvidia.com, kuba@kernel.org, sd@queasysnail.net, Rahul Rameshbabu <rrameshbabu@nvidia.com>
7 Message-ID: <20240430004439.299386-1-rrameshbabu@nvidia.com>
9 From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
11 commit 475747a19316b08e856c666a20503e73d7ed67ed upstream.
13 Omit rx_use_md_dst comment in upstream commit since macsec_ops is not
16 Cannot know whether a Rx skb missing md_dst is intended for MACsec or not
17 without knowing whether the device is able to update this field during an
18 offload. Assume that an offload to a MACsec device cannot support updating
19 md_dst by default. Capable devices can advertise that they do indicate that
20 an skb is related to a MACsec offloaded packet using the md_dst.
22 Cc: Sabrina Dubroca <sd@queasysnail.net>
23 Cc: stable@vger.kernel.org
24 Fixes: 860ead89b851 ("net/macsec: Add MACsec skb_metadata_dst Rx Data path support")
25 Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
26 Reviewed-by: Benjamin Poirier <bpoirier@nvidia.com>
27 Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
28 Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
29 Link: https://lore.kernel.org/r/20240423181319.115860-2-rrameshbabu@nvidia.com
30 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
31 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 include/net/macsec.h | 1 +
34 1 file changed, 1 insertion(+)
36 --- a/include/net/macsec.h
37 +++ b/include/net/macsec.h
38 @@ -302,6 +302,7 @@ struct macsec_ops {
39 int (*mdo_get_tx_sa_stats)(struct macsec_context *ctx);
40 int (*mdo_get_rx_sc_stats)(struct macsec_context *ctx);
41 int (*mdo_get_rx_sa_stats)(struct macsec_context *ctx);
42 + bool rx_uses_md_dst;
45 void macsec_pn_wrapped(struct macsec_secy *secy, struct macsec_tx_sa *tx_sa);