Netdev List
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Eric Dumazet" <edumazet@google.com>,
	"Arseniy Krasnov" <avkrasnov@salutedevices.com>,
	"Bobby Eshleman" <bobbyeshleman@meta.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	"Arseniy Krasnov" <AVKrasnov@sberdevices.ru>,
	"Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	kvm@vger.kernel.org, virtualization@lists.linux.dev
Subject: Re: [PATCH net] vsock/virtio: fix potential unbounded skb queue
Date: Thu, 7 May 2026 18:05:06 +0200	[thread overview]
Message-ID: <afyy9CeniTBF3o2I@sgarzare-redhat> (raw)
In-Reply-To: <20260507073340.0604667d@kernel.org>

On Thu, May 07, 2026 at 07:33:40AM -0700, Jakub Kicinski wrote:
>On Thu, 7 May 2026 14:59:13 +0200 Stefano Garzarella wrote:
>> >well if you want to support pathological cases such as 1 byte messages
>> >that would mean like 100x reduction no?
>>
>> Yep, but since this patch is already merged, IMHO that is better than
>> losing data in those pathological cases.
>
>We can revert if you think that the risk of regression is high..
>Please LMK soon, we can do it before patch reaches Linus.
>

Some tests in tools/testing/vsock/vsock_test.c are failing with this 
patch applied.

Test 18 are failing sometime in this way (I guess because we are 
dropping packets):

18 - SOCK_STREAM MSG_ZEROCOPY...hash mismatch

Test 22 is failing 100% in this way:

22 - SOCK_STREAM virtio credit update + SO_RCVLOWAT...send failed: 
Resource temporarily unavailable


With my followup patch adding also advertisement to the other peer 
(still draft locally, waiting for Michael proposal) I saw 22 failing, 
because tests expects that can use the entire buf_alloc, but now we are 
reducing it.  So IMO we should do like in `__sock_set_rcvbuf()` and 
double the buffer size, or at least digest an overhead equal to the 
buffer size set by the user via SO_VM_SOCKETS_BUFFER_SIZE (yeah, 
AF_VSOCK has it owns sockopt since the beginning :-().

With that approach tests are passing, but I'd like to stress a bit more 
that patch. I'll send it tomorrow as fixup of this patch, or if you 
prefer to revert, I'll send as standalone.

Thanks,
Stefano


  reply	other threads:[~2026-05-07 16:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 12:26 [PATCH net] vsock/virtio: fix potential unbounded skb queue Eric Dumazet
2026-05-05  2:20 ` patchwork-bot+netdevbpf
2026-05-05 13:51 ` Stefano Garzarella
2026-05-05 14:14   ` Eric Dumazet
2026-05-05 16:11     ` Stefano Garzarella
2026-05-05 16:37       ` Bobby Eshleman
2026-05-06  9:50         ` Arseniy Krasnov
2026-05-06 14:00           ` Stefano Garzarella
2026-05-06 15:37       ` Michael S. Tsirkin
2026-05-07  9:09         ` Stefano Garzarella
2026-05-07 11:45           ` Michael S. Tsirkin
2026-05-07 12:59             ` Stefano Garzarella
2026-05-07 14:33               ` Jakub Kicinski
2026-05-07 16:05                 ` Stefano Garzarella [this message]
2026-05-07 16:32                   ` Eric Dumazet
2026-05-07 17:18                     ` Jakub Kicinski
2026-05-08  9:26                       ` Stefano Garzarella
2026-05-07 14:52               ` Michael S. Tsirkin
2026-05-07 22:48               ` Michael S. Tsirkin
2026-05-08  9:41                 ` Stefano Garzarella
2026-05-08  9:43                   ` Michael S. Tsirkin
2026-05-08  9:58                   ` Michael S. Tsirkin
2026-05-08 10:11                     ` Stefano Garzarella
2026-05-06 15:15     ` Michael S. Tsirkin
2026-05-06 15:38       ` Eric Dumazet
2026-05-06 15:49         ` Michael S. Tsirkin

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=afyy9CeniTBF3o2I@sgarzare-redhat \
    --to=sgarzare@redhat.com \
    --cc=AVKrasnov@sberdevices.ru \
    --cc=avkrasnov@salutedevices.com \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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