* [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper
@ 2026-06-12 4:58 Raf Dickson
2026-06-12 9:03 ` Stefano Garzarella
2026-06-12 13:26 ` Luigi Leonardi
0 siblings, 2 replies; 4+ messages in thread
From: Raf Dickson @ 2026-06-12 4:58 UTC (permalink / raw)
To: netdev, virtualization
Cc: pabeni, sgarzare, stefanha, bryan-bt.tan, vishnu.dasa,
bcm-kernel-feedback-list, leonardi, horms, edumazet, kuba,
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/hyperv_transport.c | 2 +-
net/vmw_vsock/vmci_transport.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
index b3394946b2..e6adbc4701 100644
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -323,7 +323,7 @@ static void hvs_open_connection(struct vmbus_channel *chan)
goto out;
if (conn_from_host) {
- if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog)
+ if (sk_acceptq_is_full(sk))
goto out;
new = vsock_create_connected(sk);
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] 4+ messages in thread
* Re: [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-12 4:58 [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
@ 2026-06-12 9:03 ` Stefano Garzarella
2026-06-12 9:19 ` Raf Dickson
2026-06-12 13:26 ` Luigi Leonardi
1 sibling, 1 reply; 4+ messages in thread
From: Stefano Garzarella @ 2026-06-12 9:03 UTC (permalink / raw)
To: Raf Dickson
Cc: netdev, virtualization, pabeni, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list, leonardi, horms, edumazet,
kuba
On Fri, Jun 12, 2026 at 04:58:42AM +0000, Raf Dickson wrote:
nit: title should be updated since now this is not just vmci
(e.g. vsock: use sk_acceptq_is_full() helper in all transports)
Not sure if it can be fixed while applying by netdev maintainers.
Wait a bit and in case this is not queued, resend with the title fixed.
>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/hyperv_transport.c | 2 +-
> net/vmw_vsock/vmci_transport.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
That said, the patch LGTM:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
>diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c
>index b3394946b2..e6adbc4701 100644
>--- a/net/vmw_vsock/hyperv_transport.c
>+++ b/net/vmw_vsock/hyperv_transport.c
>@@ -323,7 +323,7 @@ static void hvs_open_connection(struct vmbus_channel *chan)
> goto out;
>
> if (conn_from_host) {
>- if (sk->sk_ack_backlog >= sk->sk_max_ack_backlog)
>+ if (sk_acceptq_is_full(sk))
> goto out;
>
> new = vsock_create_connected(sk);
>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] 4+ messages in thread
* Re: [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-12 9:03 ` Stefano Garzarella
@ 2026-06-12 9:19 ` Raf Dickson
0 siblings, 0 replies; 4+ messages in thread
From: Raf Dickson @ 2026-06-12 9:19 UTC (permalink / raw)
To: sgarzare
Cc: bcm-kernel-feedback-list, bryan-bt.tan, edumazet, horms, kuba,
leonardi, netdev, pabeni, stefanha, virtualization, vishnu.dasa
On Fri, Jun 12, 2026 at 09:03AM +0200, Stefano Garzarella wrote:
> nit: title should be updated since now this is not just vmci
> Wait a bit and in case this is not queued, resend with the title fixed.
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks! Will wait a few days and resend with the corrected title if
it hasn't been queued by then.
Raf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper
2026-06-12 4:58 [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
2026-06-12 9:03 ` Stefano Garzarella
@ 2026-06-12 13:26 ` Luigi Leonardi
1 sibling, 0 replies; 4+ messages in thread
From: Luigi Leonardi @ 2026-06-12 13:26 UTC (permalink / raw)
To: Raf Dickson
Cc: netdev, virtualization, pabeni, sgarzare, stefanha, bryan-bt.tan,
vishnu.dasa, bcm-kernel-feedback-list, horms, edumazet, kuba
On Fri, Jun 12, 2026 at 04:58:42AM +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>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-12 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 4:58 [PATCH net-next v2] vsock/vmci: use sk_acceptq_is_full() helper Raf Dickson
2026-06-12 9:03 ` Stefano Garzarella
2026-06-12 9:19 ` Raf Dickson
2026-06-12 13:26 ` Luigi Leonardi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox