android_kernel_sony_sdm845/drivers/vhost
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Willem de Bruijn 8d87a38d0d BACKPORT: sock: enable MSG_ZEROCOPY
Prepare the datapath for refcounted ubuf_info. Clone ubuf_info with
skb_zerocopy_clone() wherever needed due to skb split, merge, resize
or clone.

Split skb_orphan_frags into two variants. The split, merge, .. paths
support reference counted zerocopy buffers, so do not do a deep copy.
Add skb_orphan_frags_rx for paths that may loop packets to receive
sockets. That is not allowed, as it may cause unbounded latency.
Deep copy all zerocopy copy buffers, ref-counted or not, in this path.

The exact locations to modify were chosen by exhaustively searching
through all code that might modify skb_frag references and/or the
the SKBTX_DEV_ZEROCOPY tx_flags bit.

The changes err on the safe side, in two ways.

(1) legacy ubuf_info paths virtio and tap are not modified. They keep
    a 1:1 ubuf_info to sk_buff relationship. Calls to skb_orphan_frags
    still call skb_copy_ubufs and thus copy frags in this case.

(2) not all copies deep in the stack are addressed yet. skb_shift,
    skb_split and skb_try_coalesce can be refined to avoid copying.
    These are not in the hot path and this patch is hairy enough as
    is, so that is left for future refinement.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:55:03 +07:00
..
Kconfig
Kconfig.vringh
Makefile
net.c BACKPORT: sock: enable MSG_ZEROCOPY 2026-05-15 17:55:03 +07:00
scsi.c vhost: scsi: add weight support 2019-08-25 10:51:42 +02:00
test.c vhost/test: fix build for vhost test 2019-09-16 08:19:33 +02:00
test.h
vhost.c vhost: Fix the calculation in vhost_overflow() 2021-08-26 08:37:27 -04:00
vhost.h vhost: introduce vhost_exceeds_weight() 2019-08-25 10:51:41 +02:00
vringh.c vringh: Fix loop descriptors check in the indirect cases 2022-06-14 16:52:41 +02:00
vsock.c vhost/vsock: don't check owner in vhost_vsock_stop() while releasing 2022-03-02 11:32:00 +01:00