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>
This commit is contained in:
Leon Romanovsky
2025-02-19 15:51:00 +02:00
committed by Steffen Klassert
parent 49431af6c4
commit cc18f482e8
12 changed files with 22 additions and 145 deletions

View File

@@ -54,7 +54,6 @@ struct nsim_ipsec {
struct dentry *pfile;
u32 count;
u32 tx;
u32 ok;
};
#define NSIM_MACSEC_MAX_SECY_COUNT 3