Article View: linux.kernel.netdev
Article #6532[PATCH net v2] net: qrtr: announce local services again once our HELLO is sent
From: Joonhoe Kim
Date: Thu, 22 Oct 2026 16:31
Date: Thu, 22 Oct 2026 16:31
104 lines
14822 bytes
14822 bytes
Since commit 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint
register"), qrtr_node_enqueue() drops every packet but HELLO with
-EAGAIN until our HELLO has gone out to the node. When the remote's
HELLO arrives first, the NEW_SERVER replies from the name service are
dropped, and so are the broadcasts for services registered before our
HELLO goes out. Nothing announces these services again, so the remote
never learns about them.
On Kaanapali the modem sends its HELLO before it accepts ours. With
rmtfs started first, the modem never learns about rmtfs and its
watchdog resets the SoC about 40 s later.
Remember that the remote has sent a HELLO. Once our HELLO has been
sent to such a node, pass a HELLO from it to the local name service
again, so that it announces the services it has at that point.
The flag is not cleared when qrtr_endpoint_hello() restarts the
handshake on resume, so a HELLO that the remote sent before then is
not lost. The cost is that the remote gets the same NEW_SERVER
announcements twice when its HELLO arrives before ours goes out but
the name service handles it after, and on every resume.
Fixes: 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint register")
Cc: stable@vger.kernel.org
Signed-off-by: Joonhoe Kim <26rote@gmail.com>
---
Changes in v2:
- Replay the remote's HELLO to the name service from the core once our
HELLO is out, instead of retrying in announce_servers(). Replaying
the announcements once hello_sent is set was suggested in the Sashiko
review of v1. This is also not the delayed work in the name service
that I mentioned to Mani: that would still miss the broadcasts
dropped before our HELLO. Nothing sleeps in the name service worker
and there is no time limit.
- v1: https://lore.kernel.org/all/20261016124600.31-1-26rote@gmail.com/
Tested on a Lenovo Legion Tab Y700 Gen 5 (out-of-tree board support)
with rmtfs started before the modem: the modem's HELLO is still handled
before ours is out ("failed to announce new service"), the replayed
HELLO follows right after, rmtfs gets the modem_fs1/2 opens, and the
modem stays up.
net/qrtr/af_qrtr.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c
index e7b364742..508a2dd2d 100644
--- a/net/qrtr/af_qrtr.c
+++ b/net/qrtr/af_qrtr.c
@@ -122,6 +122,7 @@ static DEFINE_XARRAY_ALLOC(qrtr_ports);
* @qrtr_tx_flow: xarray of qrtr_tx_flow, keyed by node << 32 | port
* @qrtr_tx_lock: lock for qrtr_tx_flow inserts
* @hello_sent: hello packet send successful
+ * @hello_rcvd: remote has sent a hello packet
* @rx_queue: receive queue
* @item: list item for broadcast list
* @say_hello: delayed work for sending hello packet
@@ -136,6 +137,7 @@ struct qrtr_node {
struct mutex qrtr_tx_lock; /* for qrtr_tx_flow */
bool hello_sent;
+ bool hello_rcvd;
struct sk_buff_head rx_queue;
struct list_head item;
@@ -541,6 +543,11 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
qrtr_node_assign(node, le32_to_cpu(pkt->server.node));
}
+ if (cb->type == QRTR_TYPE_HELLO) {
+ /* Pairs with smp_load_acquire() in qrtr_hello_work() */
+ smp_store_release(&node->hello_rcvd, true);
+ }
+
if (cb->type == QRTR_TYPE_RESUME_TX) {
qrtr_tx_resume(node, skb);
} else {
@@ -619,7 +626,20 @@ static void qrtr_hello_work(struct work_struct *work)
pkt->cmd = cpu_to_le32(QRTR_TYPE_HELLO);
from.sq_node = qrtr_local_nid;
to.sq_node = node->nid;
- qrtr_node_enqueue(node, skb, QRTR_TYPE_HELLO, &from, &to);
+ if (qrtr_node_enqueue(node, skb, QRTR_TYPE_HELLO, &from, &to))
+ goto out;
+
+ /* Pairs with smp_store_release() in qrtr_endpoint_post() */
+ if (!smp_load_acquire(&node->hello_rcvd))
+ goto out;
+
+ skb = qrtr_alloc_ctrl_packet(&pkt, GFP_KERNEL);
+ if (skb) {
+ pkt->cmd = cpu_to_le32(QRTR_TYPE_HELLO);
+ to.sq_node = READ_ONCE(node->nid);
+ qrtr_local_enqueue(NULL, skb, QRTR_TYPE_HELLO, &to, &from);
+ }
+out:
qrtr_port_put(ctrl);
}
base-commit: abeacca61eea4f6803df4a595b656ea45c2d3249
--
2.43.0
Technical Details
Message-ID:
<20261022163116.1042-1-26rote@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350692-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350692-linux-kernel-netdev=dewy.ru
From: 26rote@gmail.com (Joonhoe Kim)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2] net: qrtr: announce local services again once our HELLO is sent
Date: Fri, 23 Oct 2026 01:31:16 +0900
Organization: Usenet Network
Message-ID: <20261022163116.1042-1-26rote@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="256626"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WcS70xuv+VD5zrswx9D5WwidZGY= sha256:9/z5flqT3fzrMmdtYcWaTX12DiKpQf3blhCKXreU4Js=
sha1:eqxPNdR2iWz11VsobDlQwqEVICs= sha256:UaOyHyeA/yqhUEcWpZV1IH2kHLnqfCj0jWrhDT++Bcs=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 47CEE1112FD; Thu, 22 Oct 2026 19:32:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id BxliPANESvzU;
Thu, 22 Oct 2026 19:32:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350692-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 835FB1112F9; Thu, 22 Oct 2026 19:32:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 915D72C969; Thu, 22 Oct 2026 16:31:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792686683;
b=w48ncdSz1pb0n15eieNOvhdkvViEPv75VUaZXvqvO1U7Wg++DcEdQ8OlEcJ9OAxs5eTo
OwYOynfGcu+/V5WS30KtjceBKTsY3Mfcl1AJPqKlpZx8qX4JCh0HwX4xiG7dtCW0uCHti
mtY1bVLykg+6hZi7aEmpeKIJRvqEdm6LhDom7/7vvPip+KmsOAxR7oKeYlHhJvXGqpKqc
lt2fvRMaWNMC3xK4N+lIMqcdDa5dZW/rpq0kY6rujWtbA10VLUtWpNa7lQfkd9XW9mMPf
00AT9WArG7ODghN67nUIUKgvCLED6aY+quLqxmNHDsWTbdUCjEHJ48Kfq29Yw5PEDIA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792686683;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=aleyTKbyUPwkKdibUq3IwvSz2dQSx+D+0Ibacr1mokc=;
b=1gFQLKwZq2uaBUmkhnsc9r/SLj8Y7rB0KBEYoHK8U9G6Im6nfooaz4tSSmoSDBO987Ey
o6HGeB2E8rokHev/JZVXSVPYhDt6s9uFHoDTImfIIqSbBPmtHa3IZMzk1QznkLk9IUgm2
DNMeWHWFTwvbBApILVPd58EfIyMJM/ANzHW/CThPaMU55M5vL5InfW7gEZyG6wJD55KDY
7RbYzyXLP2ivWORhaRaCtXlUhbuYqeDkTZfe6tKByhRCFFMRfpwGpF4lihAui5Z5s68bv
0yFlq+Kh53+EPS7Q+ZZlc1m0j7P0JSrcUCUjJp7qb669ndi15WkQgNWl8/CFo4252Ww==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=qxpOClJj;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B68EE606A31E;
Thu, 22 Oct 2026 16:31:23 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=qxpOClJj
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.175
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792686682;
b=Bsn4o28YqWSLs0x30bJRouwq7SVF7homT2u68cyvhKuUQwZSW3FjDlp3xz0bUvNSilgp
Mf/YU+jb27E1yGlH3oRm4Hylve0hhGsnv19XRsGj39ujeTPqx2dFXBpFAdON14thDv+qs
QKHlxue2Y/RJud7rhAWjuctyXj4vbbBfe2NwhFv7Bi1QprxooKewRj7JqYYb5sG+/cYJw
1uqOne8n1dfacsqawmWV+BYfg1K/jwuRiq6yTdFb1g25n2O9S9OAZHfO86w1vBnnJ8/y4
HacBZpZs22nWZ9Q+trgwiz7y3prZWXI1uRpUAY7kFalYrC9L04u6kcvBcuWhcW0CPJw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792686682;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version:
Content-Transfer-Encoding;
bh=aleyTKbyUPwkKdibUq3IwvSz2dQSx+D+0Ibacr1mokc=;
b=D1OFk15PLHxDbK8YZvk1rX2GL9/7rIyQF6d2ohHB0H7SkVGJ8hMBfxlY4/LrWqEb6fHd
YaboUMh9rW3+tr5IomScmdcgo28laojIyNJdsqsJf+JYkOfjTgOKudltngmVGHHarWThX
UCucsea2GyeguFgCHBQ57S0QfsWFbjQnS/AaHxyycjphXVWgZjSdemsRM0O52XTcxcLoY
XT/hXxs0suLc1l31OFrFIlfKDNRM8R+/f/Wu+2Avoio/96dJtU1LXLczo77O5Z0FlJaNC
/wBWSJr+25rp/CxryhKZ3rXCR1gqcuP5scduGdWe+aLmhE0QsPXgynD2l+a9ObEfI8g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=qxpOClJj;
arc=none smtp.remote-ip=74.125.82.175
X-Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83A00606A31D
for <netdev@vger.kernel.org>; Thu, 22 Oct 2026 16:31:22 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 83A00606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f175.google.com with SMTP id 5a478bee46e88-3514b90bb89so5174243eec.1
for <netdev@vger.kernel.org>; Thu, 22 Oct 2026 09:31:22 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792686682; x=1793291482; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=aleyTKbyUPwkKdibUq3IwvSz2dQSx+D+0Ibacr1mokc=;
b=qxpOClJjtfeOQfM044rAVrZ8LpRzlycX9HpUGrUusQc3d6Jrn+XIsSWVsOGux2SBaH
b8LZaKGD3dnhMoeCA3rch0Q91EpYMlq8uUtE7pCBcZ2pp1gllF4irMGlmR8Xh9ZuSY3y
71BdHuYB4qT/a8JcMytVm80z2vSTcEXxnxerXiE6MV+MmR+Gc385HsLfmC/6n+iKE3mg
y0jIq2I6DH6QjXvrzbprSEVsFQJ6Jz5EYl3LZ6FjnGb3cUjCxiP2DrsYtF/mi9+MeAQm
L0M2NuH+dQox3obSqNWDZ6pcckmCC1QAXqVis53tmJ1NzVNUC+shLbSu0QX7d0xk19VU
jTjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792686682; x=1793291482;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=aleyTKbyUPwkKdibUq3IwvSz2dQSx+D+0Ibacr1mokc=;
b=tnPhBZx0LqTz1OyiPvD07jGy4GbtQ3XB6kU5hLfrV4dsAfPpg/oUoBepAv5gpZLjzX
TKjKrNe+1dY+VUxApP9lMj6RptXIzOJVtaTQaeomtnjLufHVzkDu1/h/uwjMVYpadmuV
yTuU6tSui5aqziJVPrWApf4XV8OU8+oQW5uPMr7c1Y9tyywpoHKvwEdsVSyJPBzVX82w
6tTiF003r2hPU/NtBKRd1hGo4lKE9bgRFfNgvoG227YL/OBcmRnqB6yF8NL+8Jq9zvwc
TFwgyyiveq83BRv47DBbpdA1GvCwf5Npj8TpUr8m1MlgdbLCfIPQ8csB/CaI9nns/I1h
5jVg==
X-Forwarded-Encrypted: i=1; AKwUvBx3bwGLHSrJZxg+EdFPBu1q3+g7CuVJQrNbIerzoWyCgxj4MMsjPdL7YqgLwQ0KgD2wfanYVBo=@vger.kernel.org
X-Gm-Message-State: AFq9FYJhU4bGP5HfId3BFn+6+CPAsMvpE6iRx+VpinbH9tGH6IUuJsPk
nFySjq3c/oyyrPQ3Z/N0L70BZV7lUzD/+ya+/fH2rorXLm6iFXtw/zI8
X-Gm-Gg: AYBFou2+0uQ2pfktUdIrxvdqtXduZauok6SvemzupS4CNjYfbexAZ9K987BojOCxhBD
+0vjLU3B4ZgMK7buWZlxjsbqZg2+VHkq+MS5C2WwqSNU0Z6xRhuPtdxG/WgIBQ24VL1gjxIHTof
6oXQOuZMfiyECcZKJwGavUMZRWdzBBGp0Jzr/qk/bCE4aOFpotSYFOI/ZaMEFykUrUycxQFar+G
ssoDLZafJ5HjaykAQ+ZijaCZW57FBzNC0bqKdNSPD++s03tFGz+xJnmve2PupkJypnuk1461bO8
Okt/0cLqdU+m9nq4ciP2UoU3p2CuhdQdNSYyBdEr8+O/UQXEFEd5ioEiZGpOBUfJK3cBaTRVupA
1Ay3hH8wHdINYhhdeF7hnrAlIi3J59rR+1ItK1vtUWMyQg6RFj3fbgbUyxXwGmiFjoV8PREjMlK
zQ3EMN/8Ku36xeyJRGu3baxzuKm01ewQjDJ1dPfbDMNMrmQup5OCbDPKSUitBswO6lmoOeFu/Iv
d9eEdk5DjKbuDeW/HqsYDT1XzArgGcnu/qRMaxSuIyU/H5NodXl5BDO2PIG1x14AE4/cR8=
X-Received: by 2002:a05:701b:260d:b0:14a:8df8:56c5 with SMTP id a92af1059eb24-190a599a5admr5852299c88.26.1792686680599;
Thu, 22 Oct 2026 09:31:20 -0700 (PDT)
X-Received: from DESKTOP-NM9EKIA ([125.134.240.130])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1903d87ab1bsm17079981c88.21.2026.10.22.09.31.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 22 Oct 2026 09:31:20 -0700 (PDT)
X-Cc: horms@kernel.org,
christopher.lew@oss.qualcomm.com,
deepak.singh@oss.qualcomm.com,
pranav.phansalkar@oss.qualcomm.com,
andersson@kernel.org,
linux-arm-msm@vger.kernel.org,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
regressions@lists.linux.dev,
stable@vger.kernel.org
X-Mailer: git-send-email 2.55.0.windows.5
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list