mirror of
https://passt.top/passt
synced 2024-12-22 05:35:23 +00:00
udp_vu: update segment size
In udp_vu_sock_recv(), collect a segment with a size defined to IP_MAX_MTU + ETH_HLEN + sizeof(struct virtio_net_hdr_mrg_rxbuf) The original version double counted the IP header: IP_MAX_MTU includes the IP header, and so did hdrlen. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
190829705e
commit
8996d183c5
3
udp_vu.c
3
udp_vu.c
@ -104,7 +104,8 @@ static int udp_vu_sock_recv(const struct ctx *c, int s, uint32_t events,
|
|||||||
vu_init_elem(elem, iov_vu, VIRTQUEUE_MAX_SIZE);
|
vu_init_elem(elem, iov_vu, VIRTQUEUE_MAX_SIZE);
|
||||||
|
|
||||||
iov_cnt = vu_collect(vdev, vq, elem, VIRTQUEUE_MAX_SIZE,
|
iov_cnt = vu_collect(vdev, vq, elem, VIRTQUEUE_MAX_SIZE,
|
||||||
IP_MAX_MTU - sizeof(struct udphdr) + hdrlen,
|
IP_MAX_MTU + ETH_HLEN +
|
||||||
|
sizeof(struct virtio_net_hdr_mrg_rxbuf),
|
||||||
NULL);
|
NULL);
|
||||||
if (iov_cnt == 0)
|
if (iov_cnt == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user