summaryrefslogtreecommitdiff
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2022-05-05 13:06:41 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2022-05-06 09:31:04 +0300
commit482db2f1dd211f73ad9d71e33ae15c1df6379982 (patch)
tree7ab97dc9156b3306958d15bf34a5cd90b17b440f /include/net/xfrm.h
parent87e0a94e60ea2e29be9dec6bc146fbc9861a4055 (diff)
downloadlinux-482db2f1dd211f73ad9d71e33ae15c1df6379982.tar.xz
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 {