mirror of
https://passt.top/passt
synced 2024-12-22 13:45:32 +00:00
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>
This commit is contained in:
parent
c2d86b7475
commit
ec0bdc10b1
4
udp.c
4
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;
|
||||
|
Loading…
Reference in New Issue
Block a user