OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76e463f
)
xfrm: don't require advance ESN callback for packet offload
author
Leon Romanovsky
<leonro@nvidia.com>
Thu, 30 Mar 2023 08:02:26 +0000
(11:02 +0300)
committer
Leon Romanovsky
<leon@kernel.org>
Thu, 6 Apr 2023 07:09:17 +0000
(10:09 +0300)
In packet offload mode, the hardware is responsible to manage
replay window and advance ESN. In that mode, there won't any
call to .xdo_dev_state_advance_esn callback.
So relax current check for existence of that callback.
Link:
https://lore.kernel.org/r/9f3dfc3fef2cfcd191f0c5eee7cf0aa74e7f7786.1680162300.git.leonro@nvidia.com
Reviewed-by: Raed Salem <raeds@nvidia.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
net/xfrm/xfrm_device.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_device.c
b/net/xfrm/xfrm_device.c
index
95f1436
..
bef28c6
100644
(file)
--- a/
net/xfrm/xfrm_device.c
+++ b/
net/xfrm/xfrm_device.c
@@
-287,7
+287,7
@@
int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
return (is_packet_offload) ? -EINVAL : 0;
}
- if (x->props.flags & XFRM_STATE_ESN &&
+ if (
!is_packet_offload &&
x->props.flags & XFRM_STATE_ESN &&
!dev->xfrmdev_ops->xdo_dev_state_advance_esn) {
NL_SET_ERR_MSG(extack, "Device doesn't support offload with ESN");
xso->dev = NULL;