Skip to content

Commit 475747a

Browse files
Binary-Eaterkuba-moo
authored andcommitted
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 <[email protected]> Cc: [email protected] Fixes: 860ead8 ("net/macsec: Add MACsec skb_metadata_dst Rx Data path support") Signed-off-by: Rahul Rameshbabu <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Reviewed-by: Cosmin Ratiu <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4dcd0e8 commit 475747a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/net/macsec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ struct macsec_context {
321321
* for the TX tag
322322
* @needed_tailroom: number of bytes reserved at the end of the sk_buff for the
323323
* TX tag
324+
* @rx_uses_md_dst: whether MACsec device offload supports sk_buff md_dst
324325
*/
325326
struct macsec_ops {
326327
/* Device wide */
@@ -352,6 +353,7 @@ struct macsec_ops {
352353
struct sk_buff *skb);
353354
unsigned int needed_headroom;
354355
unsigned int needed_tailroom;
356+
bool rx_uses_md_dst;
355357
};
356358

357359
void macsec_pn_wrapped(struct macsec_secy *secy, struct macsec_tx_sa *tx_sa);

0 commit comments

Comments
 (0)