mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Drokin <green@linuxhacker.ru>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: sgarzare@redhat.com, stefanha@redhat.com, jasowangio@gmail.com,
	 eperezma@redhat.com, xuanzhuo@linux.alibaba.com,
	bobbyeshleman@meta.com,  davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
		horms@kernel.org, netdev@vger.kernel.org,
	virtualization@lists.linux.dev, 	kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 3/3] vsock/virtio: queue at most one credit update per socket
Date: Fri, 06 Nov 2026 00:02:23 -0500	[thread overview]
Message-ID: <9615375a368c5d6c31cae9dbbfd51db037784193.camel@linuxhacker.ru> (raw)
In-Reply-To: <20261105191917-mutt-send-email-mst@kernel.org>

On Thu, 2026-11-05 at 19:19 -0500, Michael S. Tsirkin wrote:
> On Wed, Nov 04, 2026 at 07:01:41PM -0500, Oleg Drokin wrote:
> > 
> >  
> >  #define VIRTIO_VSOCK_SKB_CB(skb) ((struct virtio_vsock_skb_cb
> > *)((skb)->cb))
> > @@ -167,6 +168,9 @@ struct virtio_vsock_sock {
> >  	u32 buf_used;
> >  	struct sk_buff_head rx_queue;
> >  	u32 msg_count;
> > +	struct sk_buff *credit_update;
> > +
> > +	refcount_t refcnt;
> 
> why all this complexity? can you not just peek at the queue tail
> instead?

Thanks for the suggestion. The send queues are per device, not per
socket: vhost has one per guest, and the guest driver and loopback
have one each. A peer with two connections can alternate its credit
requests between them, so the tail is always the other connection's
update and nothing would ever be merged.

v2 reworks this third patch:
vsock_sock remembers its newest queued packet while that packet is a
credit update, together with the queue it is in.
The refcount, the skb destructor and the transmit hooks
are gone, and vhost and the guest driver are not touched.

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

Thread overview: 8+ 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-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-05  0:01 ` [PATCH net 3/3] vsock/virtio: queue at most one credit update per socket Oleg Drokin
2026-11-06  0:19   ` Michael S. Tsirkin
2026-11-06  5:02     ` Oleg Drokin [this message]
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=9615375a368c5d6c31cae9dbbfd51db037784193.camel@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=horms@kernel.org \
    --cc=jasowangio@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®