From owner-freebsd-virtualization@freebsd.org Thu Dec 8 15:27:26 2016 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 520B3C6D1D3 for ; Thu, 8 Dec 2016 15:27:26 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7F68B03 for ; Thu, 8 Dec 2016 15:27:25 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by mail-wm0-x242.google.com with SMTP id a20so4240008wme.2 for ; Thu, 08 Dec 2016 07:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=IUXAdDZjNElQ5T8geKiFyLde8tMmcAaEXxtzfF6nh/w=; b=HkaOhYyDFi58Nmkvc5QB0WtJ0TIk/hHFvSa2DxmWHuMcDs46hHlKO+jmhIRp6tMRyk Vl/GTJXrnmlCkrQhquohRJmHX7pCqMXATbIfZfXv2m8WNvu2AnI2qhk4ZdKTEz/Sp8iv idPw6FTiAEbV8catc7QKb+kdI+ocBLUKrv4rnrGsU0UYtRDLYLuNpERPe8p79hyvTqDE R5qD9Z+uIhq7GPk98PPHJ2Y/lypesYDd1H9CsRfrq2gxyAGEjSRGZqFX1ovn2zac+97p tlNhDFCB7/1yopX0KYnbD9i1ONpxihLhM5alb+9VCxDBi+HdoRpz2jNHHAZHvJKLN9u4 AqRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IUXAdDZjNElQ5T8geKiFyLde8tMmcAaEXxtzfF6nh/w=; b=TsaDCHjLL611pWGHU6EfYe7x4tcyc7Wi86yq8pxvyBqd8Q2luFJ34bxaK8fbp20Zb2 fUj4F3/RucuSnjldaZqkGaeW7OrXEHDzFbD+i7kngYE6UDFP5N0RnOORGNyKUQrcbitU WrbJ8Mbm9x1I6eF5pTGzg1jwOuBBqVsBA5S4dm/25gLujUydFhSmCbOh7x1aM5YWVa9A aV+z3dr5XPtCaqhbBBReePrNZZCZxyhwnEOnP9zlj5ujFMxHoNFzaD8aCuSF62xubqA0 ANHjwgu+KCVkd1gajBMzIRm4rjWejJKCynOYyO1e02DQzktoY2AcvAegW9y1aaMJ3+7j 0IpQ== X-Gm-Message-State: AKaTC00tLKPUhQi9LdhSYD33Vz8dAFZmhOx4FkUh5TkJWHhOrHsWZ8lhcDc/D+i5VPGFJA== X-Received: by 10.28.236.83 with SMTP id k80mr2705963wmh.0.1481210843876; Thu, 08 Dec 2016 07:27:23 -0800 (PST) Received: from abel.home.inet (79.108.83.135.dyn.user.ono.com. [79.108.83.135]) by smtp.gmail.com with ESMTPSA id 6sm37555012wjt.5.2016.12.08.07.27.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Dec 2016 07:27:23 -0800 (PST) Date: Thu, 8 Dec 2016 16:27:20 +0100 From: =?iso-8859-1?Q?Jos=E9_G=2E?= Juanino To: freebsd-virtualization@freebsd.org Subject: Re: bhyve: cannot send jumbo frames from linux or freebsd guest Message-ID: <20161208152708.upi3qjmsn7kzfd3l@abel.home.inet> Mail-Followup-To: freebsd-virtualization@freebsd.org References: <414db7f0-ea86-2080-4179-eb77a18a67a5@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <414db7f0-ea86-2080-4179-eb77a18a67a5@freebsd.org> X-Operating-System: FreeBSD 11.0-RELEASE-p2 User-Agent: NeoMutt/20161126 (1.7.1) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 15:27:26 -0000 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