* [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
@ 2026-06-11 2:38 Raf Dickson
2026-06-11 7:58 ` Luigi Leonardi
2026-06-11 8:37 ` Stefano Garzarella
0 siblings, 2 replies; 6+ messages in thread
From: Raf Dickson @ 2026-06-11 2:38 UTC (permalink / raw)
To: netdev, virtualization
Cc: pabeni, sgarzare, stefanha, bryan-bt.tan, vishnu.dasa,
bcm-kernel-feedback-list, Raf Dickson
Replace the open-coded backlog check with sk_acceptq_is_full().
The helper uses > instead of >=, which is the correct comparison
per commit 64a146513f8f ("[NET]: Revert incorrect accept queue
backlog changes."), and adds READ_ONCE() for proper memory ordering.
Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Raf Dickson <rafdog35@gmail.com>
---
net/vmw_vsock/vmci_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 91516488a7..56503bee31 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1010,7 +1010,7 @@ static int vmci_transport_recv_listen(struct sock *sk,
* reset. Otherwise we create and initialize a child socket and reply
* with a connection negotiation.
*/
- if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) {
+ if (sk_acceptq_is_full(sk)) {
vmci_transport_reply_reset(pkt);
return -ECONNREFUSED;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-11 2:38 [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
@ 2026-06-11 7:58 ` Luigi Leonardi
2026-06-11 8:27 ` Raf Dickson
2026-06-11 20:26 ` Jakub Kicinski
2026-06-11 8:37 ` Stefano Garzarella
1 sibling, 2 replies; 6+ messages in thread
From: Luigi Leonardi @ 2026-06-11 7:58 UTC (permalink / raw)
To: Raf Dickson
Cc: netdev, virtualization, pabeni, sgarzare, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list
On Thu, Jun 11, 2026 at 02:38:30AM +0000, Raf Dickson wrote:
>Replace the open-coded backlog check with sk_acceptq_is_full().
>The helper uses > instead of >=, which is the correct comparison
>per commit 64a146513f8f ("[NET]: Revert incorrect accept queue
>backlog changes."), and adds READ_ONCE() for proper memory ordering.
>
>Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
>
this blank line should be dropped
>Signed-off-by: Raf Dickson <rafdog35@gmail.com>
>---
> net/vmw_vsock/vmci_transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
>index 91516488a7..56503bee31 100644
>--- a/net/vmw_vsock/vmci_transport.c
>+++ b/net/vmw_vsock/vmci_transport.c
>@@ -1010,7 +1010,7 @@ static int vmci_transport_recv_listen(struct sock *sk,
> * reset. Otherwise we create and initialize a child socket and reply
> * with a connection negotiation.
> */
>- if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) {
>+ if (sk_acceptq_is_full(sk)) {
> vmci_transport_reply_reset(pkt);
> return -ECONNREFUSED;
> }
>--
>2.54.0
>
Thanks for the patch!
note: according to patchwork [1] you forgot to CC some maintainers,
please be more careful next time :)
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
[1] https://patchwork.kernel.org/project/netdevbpf/patch/20260611023830.106259-1-rafdog35@gmail.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-11 7:58 ` Luigi Leonardi
@ 2026-06-11 8:27 ` Raf Dickson
2026-06-11 20:26 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Raf Dickson @ 2026-06-11 8:27 UTC (permalink / raw)
To: leonardi
Cc: netdev, virtualization, pabeni, sgarzare, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list
On Thu, Jun 11, 2026 at 07:58AM, Luigi Leonardi wrote:
> this blank line should be dropped
>
> note: according to patchwork [1] you forgot to CC some maintainers,
> please be more careful next time :)
>
> Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Thanks for the review! Fixed the blank line and will add the missing
maintainers (horms, edumazet, kuba) in v2. Will send after the 24h
window. Also tried get_maintainer.pl but it kept refusing to recognize
the sparse checkout as a kernel tree -- lesson learned to check
patchwork next time.
Raf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-11 2:38 [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
2026-06-11 7:58 ` Luigi Leonardi
@ 2026-06-11 8:37 ` Stefano Garzarella
2026-06-11 8:56 ` Raf Dickson
1 sibling, 1 reply; 6+ messages in thread
From: Stefano Garzarella @ 2026-06-11 8:37 UTC (permalink / raw)
To: Raf Dickson
Cc: netdev, virtualization, pabeni, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list
On Thu, Jun 11, 2026 at 02:38:30AM +0000, Raf Dickson wrote:
>Replace the open-coded backlog check with sk_acceptq_is_full().
>The helper uses > instead of >=, which is the correct comparison
>per commit 64a146513f8f ("[NET]: Revert incorrect accept queue
>backlog changes."), and adds READ_ONCE() for proper memory ordering.
>
>Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
>
>Signed-off-by: Raf Dickson <rafdog35@gmail.com>
>---
> net/vmw_vsock/vmci_transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks for this, what about fixing also hyperv_transport ?
Stefano
>
>diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
>index 91516488a7..56503bee31 100644
>--- a/net/vmw_vsock/vmci_transport.c
>+++ b/net/vmw_vsock/vmci_transport.c
>@@ -1010,7 +1010,7 @@ static int vmci_transport_recv_listen(struct sock *sk,
> * reset. Otherwise we create and initialize a child socket and reply
> * with a connection negotiation.
> */
>- if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog) {
>+ if (sk_acceptq_is_full(sk)) {
> vmci_transport_reply_reset(pkt);
> return -ECONNREFUSED;
> }
>--
>2.54.0
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-11 8:37 ` Stefano Garzarella
@ 2026-06-11 8:56 ` Raf Dickson
0 siblings, 0 replies; 6+ messages in thread
From: Raf Dickson @ 2026-06-11 8:56 UTC (permalink / raw)
To: sgarzare
Cc: netdev, virtualization, pabeni, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list
On Thu, Jun 11, 2026 at 10:37:30AM +0200, Stefano Garzarella wrote:
> Thanks for this, what about fixing also hyperv_transport ?
nice spotting, hyperv_transport.c:326 has the same open-coded check.
Will include it in v2 of this patch.
Raf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-11 7:58 ` Luigi Leonardi
2026-06-11 8:27 ` Raf Dickson
@ 2026-06-11 20:26 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2026-06-11 20:26 UTC (permalink / raw)
To: Luigi Leonardi
Cc: Raf Dickson, netdev, virtualization, pabeni, sgarzare, stefanha,
bryan-bt.tan, vishnu.dasa, bcm-kernel-feedback-list
On Thu, 11 Jun 2026 09:58:22 +0200 Luigi Leonardi wrote:
> note: according to patchwork [1] you forgot to CC some maintainers,
> please be more careful next time :)
Please focus your reviews on the code not patchwork checks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-11 20:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 2:38 [PATCH net-next] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
2026-06-11 7:58 ` Luigi Leonardi
2026-06-11 8:27 ` Raf Dickson
2026-06-11 20:26 ` Jakub Kicinski
2026-06-11 8:37 ` Stefano Garzarella
2026-06-11 8:56 ` Raf Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox