summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2022-05-05 12:06:41 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2022-05-06 08:31:04 +0200
commit482db2f1dd211f73ad9d71e33ae15c1df6379982 (patch)
tree7ab97dc9156b3306958d15bf34a5cd90b17b440f /include/net/xfrm.h
parentxfrm: rename xfrm_state_offload struct to allow reuse (diff)
downloadlinux-482db2f1dd211f73ad9d71e33ae15c1df6379982.tar.xz
linux-482db2f1dd211f73ad9d71e33ae15c1df6379982.zip
xfrm: store and rely on direction to construct offload flags
XFRM state doesn't need anything from flags except to understand direction, so store it separately. For future patches, such change will allow us to reuse xfrm_dev_offload for policy offload too, which has three possible directions instead of two. Reviewed-by: Raed Salem <raeds@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index bb20278d689c..45422f7be0c5 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -126,12 +126,18 @@ struct xfrm_state_walk {
struct xfrm_address_filter *filter;
};
+enum {
+ XFRM_DEV_OFFLOAD_IN = 1,
+ XFRM_DEV_OFFLOAD_OUT,
+};
+
struct xfrm_dev_offload {
struct net_device *dev;
netdevice_tracker dev_tracker;
struct net_device *real_dev;
unsigned long offload_handle;
u8 flags;
+ u8 dir : 2;
};
struct xfrm_mode {