@@ -93,6 +93,7 @@ struct pcpu_secy_stats {
* @secys: linked list of SecY's on the underlying device
* @gro_cells: pointer to the Generic Receive Offload cell
* @offload: status of offloading on the MACsec device
+ * @offload_md_dst: whether MACsec device offload supports sk_buff md_dst
*/
struct macsec_dev {
struct macsec_secy secy;
@@ -102,6 +103,7 @@ struct macsec_dev {
struct list_head secys;
struct gro_cells gro_cells;
enum macsec_offload offload;
+ bool offload_md_dst;
};
/**
@@ -3525,6 +3527,7 @@ static int macsec_dev_open(struct net_device *dev)
}
ctx.secy = &macsec->secy;
+ ctx.offload_md_dst = &macsec->offload_md_dst;
err = macsec_offload(ops->mdo_dev_open, &ctx);
if (err)
goto clear_allmulti;
@@ -255,6 +255,7 @@ struct macsec_context {
};
enum macsec_offload offload;
+ bool *offload_md_dst;
struct macsec_secy *secy;
struct macsec_rx_sc *rx_sc;
struct {
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> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com> --- drivers/net/macsec.c | 3 +++ include/net/macsec.h | 1 + 2 files changed, 4 insertions(+)