From: Paolo Abeni <pabeni@redhat.com>
To: Konstantin Shkolnyy <kshk@linux.ibm.com>, sgarzare@redhat.com
Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, mjrosato@linux.ibm.com
Subject: Re: [PATCH net v2] vsock/test: Fix occasional failure in SIOCOUTQ tests
Date: Tue, 13 May 2025 10:46:35 +0200 [thread overview]
Message-ID: <2d2a92d2-1844-49de-a869-4caf2677b099@redhat.com> (raw)
In-Reply-To: <20250507151456.2577061-1-kshk@linux.ibm.com>
On 5/7/25 5:14 PM, Konstantin Shkolnyy wrote:
> These tests:
> "SOCK_STREAM ioctl(SIOCOUTQ) 0 unsent bytes"
> "SOCK_SEQPACKET ioctl(SIOCOUTQ) 0 unsent bytes"
> output: "Unexpected 'SIOCOUTQ' value, expected 0, got 64 (CLIENT)".
>
> They test that the SIOCOUTQ ioctl reports 0 unsent bytes after the data
> have been received by the other side. However, sometimes there is a delay
> in updating this "unsent bytes" counter, and the test fails even though
> the counter properly goes to 0 several milliseconds later.
>
> The delay occurs in the kernel because the used buffer notification
> callback virtio_vsock_tx_done(), called upon receipt of the data by the
> other side, doesn't update the counter itself. It delegates that to
> a kernel thread (via vsock->tx_work). Sometimes that thread is delayed
> more than the test expects.
>
> Change the test to poll SIOCOUTQ until it returns 0 or a timeout occurs.
>
> Signed-off-by: Konstantin Shkolnyy <kshk@linux.ibm.com>
Could you please provide a suitable fixes tag?
No need to repost, just reply here.
Thanks!
Paolo
next prev parent reply other threads:[~2025-05-13 8:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 15:14 Konstantin Shkolnyy
2025-05-07 15:41 ` Stefano Garzarella
2025-05-07 16:01 ` Konstantin Shkolnyy
2025-05-07 16:18 ` Stefano Garzarella
2025-05-13 8:46 ` Paolo Abeni [this message]
2025-05-13 13:44 ` Stefano Garzarella
2025-05-13 22:10 ` patchwork-bot+netdevbpf
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=2d2a92d2-1844-49de-a869-4caf2677b099@redhat.com \
--to=pabeni@redhat.com \
--cc=kshk@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--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 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®