net/usrsock: increase the send/recv() length limit to UINT32_MAX

change request type to uint32_t to the impove the throughput

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-12-17 23:47:47 +08:00
committed by Xiang Xiao
parent 287348475c
commit 1e83c83bf3
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -159,9 +159,9 @@ static int do_recvfrom_request(FAR struct usrsock_conn_s *conn,
addrlen = UINT16_MAX;
}
if (buflen > UINT16_MAX)
if (buflen > UINT32_MAX)
{
buflen = UINT16_MAX;
buflen = UINT32_MAX;
}
/* Prepare request for daemon to read. */
+2 -2
View File
@@ -159,9 +159,9 @@ static int do_sendto_request(FAR struct usrsock_conn_s *conn,
req.buflen += msg->msg_iov[i].iov_len;
}
if (req.buflen > UINT16_MAX)
if (req.buflen > UINT32_MAX)
{
req.buflen = UINT16_MAX;
req.buflen = UINT32_MAX;
}
bufs[0].iov_base = (FAR void *)&req;