All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Oleg Drokin" <green@linuxhacker.ru>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net 2/3] vsock/virtio: bound the send credit by bytes not yet consumed by the transport
Date: Fri, 06 Nov 2026 00:02:17 +0000	[thread overview]
Message-ID: <sashiko-outbox-200420@kernel.org> (raw)
In-Reply-To: <20261105000141.3617241-3-green@linuxhacker.ru>

> The send credit is
> 
>     min(peer_buf_alloc, buf_alloc) - (tx_cnt - peer_fwd_cnt)
> 
> where peer_fwd_cnt is taken unchecked from every header the peer sends.
> A peer that never consumes what it is sent but keeps reporting
> fwd_cnt == tx_cnt gets unlimited credit: every send() is accepted and
> the skbs pile up in the transport's queue (on a host, vhost's
> send_pkt_queue, for a guest that posts no rx buffers). The skbs are
> GFP_KERNEL allocations charged to no memory cgroup. The peer learns
> tx_cnt easily when the host side relays a stream it also controls.
> 
> Commit 8ee784fdf006 ("vsock/virtio: cap TX credit to local buffer size")
> bounded peer_buf_alloc, but not peer_fwd_cnt.
> 
> [ ... ]
> (SIOCOUTQ 268304384, where the test stops); with this patch it stays at
> one window (SIOCOUTQ 262144).
> 
> Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko")
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105000141.3617241-1-green@linuxhacker.ru?part=2


  reply	other threads:[~2026-11-06  0:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  0:01 [PATCH net 0/3] vsock/virtio: bound what a peer can make the host queue Oleg Drokin
2026-11-05  0:01 ` [PATCH net 1/3] vhost/vsock: release the accounting of packets dropped on rx errors Oleg Drokin
2026-11-06  0:02   ` sashiko-bot
2026-11-05  0:01 ` [PATCH net 2/3] vsock/virtio: bound the send credit by bytes not yet consumed by the transport Oleg Drokin
2026-11-06  0:02   ` sashiko-bot [this message]
2026-11-05  0:01 ` [PATCH net 3/3] vsock/virtio: queue at most one credit update per socket Oleg Drokin
2026-11-06  0:02   ` sashiko-bot
2026-11-06  0:19   ` Michael S. Tsirkin
2026-11-06  5:02     ` Oleg Drokin
2026-11-05  0:03 ` [PATCH net 0/3] vsock/virtio: bound what a peer can make the host queue netdev-bot+sinfo
2026-11-05  0:19   ` Oleg Drokin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-200420@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=green@linuxhacker.ru \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.