xfrm: Add an IPsec hardware offloading API
[linux-2.6-microblaze.git] / include / linux / netdevice.h
index 5bb03d1..b3eb83d 100644 (file)
@@ -824,6 +824,16 @@ struct netdev_xdp {
        };
 };
 
+#ifdef CONFIG_XFRM_OFFLOAD
+struct xfrmdev_ops {
+       int     (*xdo_dev_state_add) (struct xfrm_state *x);
+       void    (*xdo_dev_state_delete) (struct xfrm_state *x);
+       void    (*xdo_dev_state_free) (struct xfrm_state *x);
+       bool    (*xdo_dev_offload_ok) (struct sk_buff *skb,
+                                      struct xfrm_state *x);
+};
+#endif
+
 /*
  * This structure defines the management hooks for network devices.
  * The following hooks can be defined; unless noted otherwise, they are
@@ -1697,6 +1707,10 @@ struct net_device {
        const struct ndisc_ops *ndisc_ops;
 #endif
 
+#ifdef CONFIG_XFRM
+       const struct xfrmdev_ops *xfrmdev_ops;
+#endif
+
        const struct header_ops *header_ops;
 
        unsigned int            flags;