linux/net/xfrm
Jianbo Liu b05d42eefa xfrm: hold device only for the asynchronous decryption
The dev_hold() on skb->dev during packet reception was originally
added to prevent the device from being released prematurely during
asynchronous decryption operations.

As current hardware can offload decryption, this asynchronous path is
not always utilized. This often results in a pattern of dev_hold()
immediately followed by dev_put() for each packet, creating
unnecessary reference counting overhead detrimental to performance.

This patch optimizes this by skipping the dev_hold() and subsequent
dev_put() when asynchronous decryption is not being performed.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2025-06-20 10:39:19 +02:00
..
espintcp.c espintcp: fix skb leaks 2025-04-14 11:58:50 +02:00
Kconfig xfrm: config: add CONFIG_XFRM_IPTFS 2024-12-05 10:00:53 +01:00
Makefile xfrm: iptfs: add new iptfs xfrm mode impl 2024-12-05 10:01:35 +01:00
trace_iptfs.h xfrm: iptfs: add tracepoint functionality 2024-12-05 10:02:36 +01:00
xfrm_algo.c xfrm: ipcomp: Use crypto_acomp interface 2025-03-21 17:36:49 +08:00
xfrm_compat.c xfrm: netlink: add config (netlink) options 2024-12-05 10:01:15 +01:00
xfrm_device.c xfrm: prevent configuration of interface index when offload is used 2025-05-15 09:56:20 +02:00
xfrm_hash.c
xfrm_hash.h
xfrm_inout.h
xfrm_input.c xfrm: hold device only for the asynchronous decryption 2025-06-20 10:39:19 +02:00
xfrm_interface_bpf.c bpf: treewide: Annotate BPF kfuncs in BTF 2024-01-31 20:40:56 -08:00
xfrm_interface_core.c xfrm: Convert xfrmi_exit_batch_rtnl() to ->exit_rtnl(). 2025-04-14 17:08:43 -07:00
xfrm_ipcomp.c xfrm: ipcomp: fix truesize computation on receive 2025-04-30 08:08:16 +02:00
xfrm_iptfs.c xfrm: Switch to use hrtimer_setup() 2025-02-18 10:35:47 +01:00
xfrm_nat_keepalive.c xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46] 2025-05-15 15:23:31 +02:00
xfrm_output.c ipsec-next-2025-03-24 2025-03-25 08:50:10 -07:00
xfrm_policy.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
xfrm_proc.c xfrm: add generic iptfs defines and functionality 2024-12-05 10:01:28 +01:00
xfrm_replay.c ipsec-2025-01-27 2025-01-27 15:15:12 -08:00
xfrm_state_bpf.c bpf: treewide: Annotate BPF kfuncs in BTF 2024-01-31 20:40:56 -08:00
xfrm_state.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
xfrm_sysctl.c net: Remove ctl_table sentinel elements from several networking subsystems 2024-05-03 13:29:42 +01:00
xfrm_user.c xfrm: validate assignment of maximal possible SEQ number 2025-05-15 09:56:19 +02:00