mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
xfrm: don't require advance ESN callback for packet offload
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>
This commit is contained in:
parent
76e463f650
commit
3e1c957f9a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user