aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-19 02:49:36 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-27 01:28:02 +0200
commitec0bdc10b1efbd46fbb7f7a3281d4e942bed0685 (patch)
tree48dfe0a6e54c12fc642e871a24595894e22084db
parentc2d86b7475d498b76ec67ec9d42288a42104c5f4 (diff)
downloadpasst-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar.gz
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar.bz2
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar.lz
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar.xz
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.tar.zst
passt-ec0bdc10b1efbd46fbb7f7a3281d4e942bed0685.zip
udp: Switch to new socket message after 32KiB instead of 64KiB
For some reason, this measurably improves performance with qemu and virtio-net. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udp.c b/udp.c
index 74267a9..e640f16 100644
--- a/udp.c
+++ b/udp.c
@@ -727,7 +727,7 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
udp6_l2_iov_tap[i].iov_len = iov_len;
/* With bigger messages, qemu closes the connection. */
- if (iov_in_msg && msglen + iov_len > USHRT_MAX) {
+ if (iov_in_msg && msglen + iov_len > SHRT_MAX) {
cur_mh->msg_iovlen = iov_in_msg;
cur_mh = &udp6_l2_mh_tap[++msg_i].msg_hdr;
@@ -797,7 +797,7 @@ void udp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
udp4_l2_iov_tap[i].iov_len = iov_len;
/* With bigger messages, qemu closes the connection. */
- if (iov_in_msg && msglen + iov_len > USHRT_MAX) {
+ if (iov_in_msg && msglen + iov_len > SHRT_MAX) {
cur_mh->msg_iovlen = iov_in_msg;
cur_mh = &udp4_l2_mh_tap[++msg_i].msg_hdr;