On 3/30/2023 6:09 PM, 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.
How about:
"On the remote side, when QRTR socket is removed, af_qrtr will call
qrtr_port_remove() which broadcasts the DEL_CLIENT packet to all neighbours
including local NS. NS upon receiving the DEL_CLIENT packet, will remove
the lookups associated with the node:port and broadcasts the DEL_SERVER
packet.
But on the host side, due to the arrival of the DEL_CLIENT packet, the NS
would've already deleted the server belonging to that port. So when the
remote's NS again broadcasts the DEL_SERVER for that port, it throws below
error message on the host:
"failed while handling packet from 2:-2"
So fix this error by not broadcasting the DEL_SERVER packet when the
DEL_CLIENT packet gets processed."
Sure, sounds good. Will change this up and send V2.
Signed-off-by: Ram Kumar D <quic_ramd@xxxxxxxxxxx>
Signed-off-by: Sricharan R <quic_srichara@xxxxxxxxxxx>
---
Note: Functionally tested on 5.4 kernel and compile tested on 6.3 TOT
<...>
- /* Remove the server belonging to this port */
+ /* Remove the server belonging to this port
+ * Given that DEL_CLIENT is already broadcasted
+ * by port_remove, no need to send DEL_SERVER for
+ * the same port to remote
+ */
/*
* Remove the server belonging to this port but don't broadcast
* DEL_SERVER. Neighbours would've already removed the server belonging
* to this port due to the DEL_CLIENT broadcast from qrtr_port_remove().
*/
Sure, would reword it like above in V2. Thanks.
Regards,
Sricharan