Re: [RFC PATCH v1 07/10] net: qrtr: allow socket endpoint binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

@@ -1346,6 +1367,9 @@ static int qrtr_getsockopt(struct socket *sock, int level, int optname,
      case QRTR_REPORT_ENDPOINT:
          val = test_bit(QRTR_F_REPORT_ENDPOINT, &ipc->flags);
          break;
+    case QRTR_BIND_ENDPOINT:
+        val = ipc->bound_endpoint;
+        break;

In the case where an endpoint goes away and a client has bound their socket to an endpoint, would there be any notification to unbind the socket?


I didn't think it was needed. In my use case I would be relying on the relevant device to be removed, (e.g. a udev notification would be received for the devices associated with the PCIe modem). ECONNRESET might also happen, with the udev events following shortly after.

Is the expectation that the client would get notified through ECONNRESET on the next sendmsg() or receive the BYE/DEL_CLIENT/DEL_SERVER control message.

Yes.


On that cleanup, I guess the client would either re-bind the socket back to 0 or wait for the mhi sysfs to come back and get the new endpoint id?

In my case I would be closing the sockets entirely. But what you describe can also be done.

Regards,
-Denis




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux