summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim/ipsec.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2025-02-19 15:51:00 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2025-02-21 08:08:15 +0100
commitcc18f482e8b60a2bcf2d7d57b48740bd0837fc04 (patch)
tree6051bfc1df6eeb21bd4821d78678d7b99ad63d34 /drivers/net/netdevsim/ipsec.c
parent49431af6c4ef20b4d9fa474341cf3e71a375db11 (diff)
xfrm: provide common xdo_dev_offload_ok callback implementation
Almost all drivers except bond and nsim had same check if device can perform XFRM offload on that specific packet. The check was that packet doesn't have IPv4 options and IPv6 extensions. In NIC drivers, the IPv4 HELEN comparison was slightly different, but the intent was to check for the same conditions. So let's chose more strict variant as a common base. Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'drivers/net/netdevsim/ipsec.c')
-rw-r--r--drivers/net/netdevsim/ipsec.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/net/netdevsim/ipsec.c b/drivers/net/netdevsim/ipsec.c
index 88187dd4eb2d..d88bdb9a1717 100644
--- a/drivers/net/netdevsim/ipsec.c
+++ b/drivers/net/netdevsim/ipsec.c
@@ -217,20 +217,9 @@ static void nsim_ipsec_del_sa(struct xfrm_state *xs)
ipsec->count--;
}
-static bool nsim_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *xs)
-{
- struct netdevsim *ns = netdev_priv(xs->xso.real_dev);
- struct nsim_ipsec *ipsec = &ns->ipsec;
-
- ipsec->ok++;
-
- return true;
-}
-
static const struct xfrmdev_ops nsim_xfrmdev_ops = {
.xdo_dev_state_add = nsim_ipsec_add_sa,
.xdo_dev_state_delete = nsim_ipsec_del_sa,
- .xdo_dev_offload_ok = nsim_ipsec_offload_ok,
};
bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb)