Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2016 16:27:20 +0100
From:      =?iso-8859-1?Q?Jos=E9_G=2E?= Juanino <jjuanino@gmail.com>
To:        freebsd-virtualization@freebsd.org
Subject:   Re: bhyve: cannot send jumbo frames from linux or freebsd guest
Message-ID:  <20161208152708.upi3qjmsn7kzfd3l@abel.home.inet>
In-Reply-To: <414db7f0-ea86-2080-4179-eb77a18a67a5@freebsd.org>
References:  <CAAVO5%2BJnk1MepU7mBdQiWsRJf4FF0EuheaERGCHJJw3_pgG_dA@mail.gmail.com> <414db7f0-ea86-2080-4179-eb77a18a67a5@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
El martes 06 de diciembre a las 19:46:25 CET, Peter Grehan escribió:
> I suspect that the Windows virtio guest driver doesn't use rx-merge 
>but instead uses 'indirect descriptors', which is why it works.
>
> A short-term workaround for FreeBSD and Linux guests is to modify 
>bhyve to not advertise the rx-merge capability:
>
>usr.sbin/bhyve/pci_virtio_net.c
>#define VTNET_S_HOSTCAPS      \
>-  ( VIRTIO_NET_F_MAC | VIRTIO_NET_F_MRG_RXBUF | VIRTIO_NET_F_STATUS | \
>+  ( VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | \
>
>
> (Note that this doesn't work with Net/OpenBSD, where jumbo frames are 
>only supported via rx-merge.)
>
> I hope to have a fix for the rx-merge issue in the near future - it's 
>a more efficient way of handling jumbo frames than indirect 
>descriptors.

Hello, thanks for your response.

I have applied your patch and the test from FreeBSD guest runs 
successfully:

# uname -opr
FreeBSD 11.0-RELEASE-p1 amd64

# ping -c 4 -D -s 8972 192.168.253.1
PING 192.168.253.1 (192.168.253.1): 8972 data bytes
8980 bytes from 192.168.253.1: icmp_seq=0 ttl=64 time=0.224 ms
8980 bytes from 192.168.253.1: icmp_seq=1 ttl=64 time=0.197 ms
8980 bytes from 192.168.253.1: icmp_seq=2 ttl=64 time=0.245 ms
8980 bytes from 192.168.253.1: icmp_seq=3 ttl=64 time=0.226 ms

--- 192.168.253.1 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.197/0.223/0.245/0.017 ms


But the Linux (Centos 6) test does not work: after apply your patch, I 
can only send 1504 bytes in one frame:

# ping -c 1 -s 1476 -M do 192.168.253.1
PING 192.168.253.1 (192.168.253.1) 1476(1504) bytes of data.
1484 bytes from 192.168.253.1: icmp_seq=1 ttl=64 time=0.155 ms

--- 192.168.253.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.155/0.155/0.155/0.000 ms

# ping -c 1 -s 1477 -M do 192.168.253.1
PING 192.168.253.1 (192.168.253.1) 1477(1505) bytes of data.

--- 192.168.253.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 2089ms


Best regards


-- 
José G. Juanino



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161208152708.upi3qjmsn7kzfd3l>