Re: [PATCH v2] net: qrtr: Send HELLO message on endpoint register
Manivannan Sadhasivam <[email protected]>
| Newsgroups | org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <6smj6xbr4gumprpplrrw46lhe6wj63wbmcfe3nadcyp6om5cbb@tk6xtwtfz55r> |
On Fri, Aug 07, 2026 at 07:23:04PM +0530, Pranav Mahesh Phansalkar wrote: > From: Chris Lew <[email protected]> > > HELLO is currently handled entirely by the name server (NS): it is > sent once as a broadcast when the NS initializes, and again as a > reply whenever the NS receives an inbound HELLO from a remote. > > In a slave model, neither endpoint initiates a HELLO on its own; What is a 'slave model'? Explain please. > each side only replies to one it receives. Since both sides are waiting > on the other to speak first, no HELLO is ever sent, stalling further > communication. > What about the 'say_hello()' called during qrtr_ns_init()? > To fix this: > - Transfer HELLO handshake ownership to the core layer. > - Schedule a work item on endpoint registration to send a HELLO once > the name server is bound, retrying on failure. > - Enforce HELLO-first ordering by dropping non-HELLO packets until > the HELLO is confirmed sent, using bool hello_sent guarded by > ep_lock to make the gate check atomic with xmit(). > - Skip nodes with nid == QRTR_EP_NID_AUTO in bcast_enqueue(). > - Remove say_hello() from the name server's ctrl_cmd_hello() handler; > the core layer is now the sole sender of the outbound HELLO. > From the internal QMUX documentation, I can see that a node acting as a slave should only send HELLO packet only as a response to a HELLO packet, which contradicts with that this patch is doing. Since the driver cannot differentiate between master/slave mode, it currently broadcasts HELLO during initialization and sends HELLO as a response to the HELLO packet received. - Mani -- மணிவண்ணன் சதாசிவம்