]> git.baikalelectronics.ru Git - kernel.git/commit
skbuff: Push status and refcounts into sock_zerocopy_callback
authorJonathan Lemon <jonathan.lemon@gmail.com>
Wed, 6 Jan 2021 22:18:31 +0000 (14:18 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Jan 2021 00:06:37 +0000 (16:06 -0800)
commit5f4c944f02c3dbedb235af2c24a94070f5b78896
treea167f12c49f067eeb0ddd7f0a8836b2d36b8fc56
parent5fc9f7467a8516d766d38e584772496a84c9add4
skbuff: Push status and refcounts into sock_zerocopy_callback

Before this change, the caller of sock_zerocopy_callback would
need to save the zerocopy status, decrement and check the refcount,
and then call the callback function - the callback was only invoked
when the refcount reached zero.

Now, the caller just passes the status into the callback function,
which saves the status and handles its own refcounts.

This makes the behavior of the sock_zerocopy_callback identical
to the tpacket and vhost callbacks.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/skbuff.h
net/core/skbuff.c