Commit Graph

4 Commits

Author SHA1 Message Date
Tao Zhang
7993a368b8 net: qmsgq: Retry to send when ERESTARTSYS returned
ERESTARTSYS will be returned if a signal is queued for the
process while it is waiting, it means the related system call
was interrupted and needs to be restarted.

For the msgq data sending, this case(ERESTARTSYS) should be
handled by qmsgq transport layer due the packet will be
fragmented if its size is larger than the maximum transfer
size (MTU).

Change-Id: If9bdf0a73bce04cd9c963122011e8621ed675bf3
Signed-off-by: Tao Zhang <quic_taozhan@quicinc.com>
2023-06-26 11:20:33 -07:00
Tao Zhang
20d46f091c net: qmsgq: Check and drop the incomplete packet
Compare the received data size with the expected packet size,
and drop the packet if the received data amount is larger than
the actual size of the packet.

This check should be done whenever data being reveived.

Change-Id: I3f82ada8c928e141e8b82bc59ae9b65c91c4ab19
Signed-off-by: Tao Zhang <quic_taozhan@quicinc.com>
2023-06-20 15:51:01 +08:00
Richard Maina
e134ccb934 net: qmsgq: Include wakeup support
The client is unable to read the packet before the device suspends
using vsock in some cases. This commit adds a 500 ms wakeup event after
queueing a packet to a client's socket. This allows for enough time for
the client to read and process the packet.

Change-Id: I0ae155586613fd21e1c31c449121a8de99c8943f
Signed-off-by: Richard Maina <quic_rmaina@quicinc.com>
2023-04-10 16:15:51 -07:00
Chris Lew
5e0f2ee205 net: qmsgq: Add the qmsgq socket family
Add initial implementation of the qmsgq socket family that will replace
the gunyah vsock functionality. This socket family is a temporary
solution for communicating between guest vms using socket apis.

This socket family will reusing the vsock address structures to
minimize the changes in userspace from gunyah vsock to qmsgq.

This version supports dgram sockets, future improvements will be made
to support seqpacket sockets.

Change-Id: I4ecf0a97c15e3dd68687ef501158fbd4bc2a6a2f
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2023-03-02 17:41:25 -08:00