bhyve: cannot send jumbo frames from linux or freebsd guest

José G. Juanino jjuanino at gmail.com
Thu Dec 8 15:27:26 UTC 2016


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


More information about the freebsd-virtualization mailing list