summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJianbo Liu <jianbol@nvidia.com>2025-06-19 12:48:51 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2025-06-20 10:39:19 +0200
commitb05d42eefac737ce3cd80114d3579111023941b8 (patch)
treea9aa71f463b7fc1ebbd22a4b9cae3b99d58ae2ca /net/unix/af_unix.c
parent4f4040ea5d3e4bebebbef9379f88085c8b99221c (diff)
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>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions