Re: [PATCH] net: qrtr: Do not do DEL_SERVER broadcast after DEL_CLIENT

From: Sricharan Ramabadhran
Date: Thu Mar 30 2023 - 05:50:41 EST




On 3/30/2023 11:54 AM, Manivannan Sadhasivam wrote:
On Wed, Mar 29, 2023 at 06:37:30PM +0530, Sricharan R wrote:
When the qrtr socket is released, qrtr_port_remove gets called, which
broadcasts a DEL_CLIENT. After this DEL_SERVER is also additionally
broadcasted, which becomes NOP, but triggers the below error msg.

"failed while handling packet from 2:-2", since remote node already
acted upon on receiving the DEL_CLIENT, once again when it receives
the DEL_SERVER, it returns -ENOENT.

Fixing it by not sending a 'DEL_SERVER' to remote when a 'DEL_CLIENT'
was sent for that port.


Can you share the qrtr trace when this happens to help me understand the flow?

Flow is like this.

IPQ SDX
--- ----
qrtr_release
qrtr_port_remove
qrtr_send_del_client
|
|
|
|
RX CTRL: cmd:0x6 addr[0x2:0x40d4]<-----------|
(qrtr_send_client broadcasts it to |
the remote, |
IPQ cleans up the port) |
|
ctrl_cmd_del_client
(send_del_client
also forwards the
DEL_CLIENT to
internal ns.c.
Which then again
sends DEL_server
to same port to
remote)
|
|
RX CTRL: cmd:0x5 SVC[0x1389:0x1] |
addr[0x2:0x40d4] <-------------------- ---|
(IPQ on receiving the DEL_SERVER on
same port throws the message
"failed while handling packet from 2:-2")


Regards,
Sricharan