From owner-svn-src-head@freebsd.org Sun Jun 14 19:53:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B11834337A; Sun, 14 Jun 2020 19:53:38 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from wforward2-smtp.messagingengine.com (wforward2-smtp.messagingengine.com [64.147.123.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49lQBT4qj6z4p5T; Sun, 14 Jun 2020 19:53:37 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailforward.west.internal (Postfix) with ESMTP id D6EA740B; Sun, 14 Jun 2020 15:53:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 14 Jun 2020 15:53:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=5NmNTk FW+evNCwUrDBhM/Hulxc/TpqM/BYlPAsqJ1uY=; b=e2DvOjohMA9syyih2ZN0Z5 7E/TqInQ/9xMG4DydOzvwnywDr7Wkd/YlelnH13yjZnKv8O1BcURz8Rvmh33JR+X nJmo+mFSiXVLgZEZ/7RMCHX4VVk3Yeh37UpNZboccZzqD1JfMERQAMVRUpe8uOL7 XgTt8KsPA7DVDcB+oNmmTpSQuh+2w4BVTEjlcGEsmFNuwkqaR4iDnDTAq+NQNgVf 1djsZ3obAyETtsJmVnMpEAwQQll44+YmBDH/JZqWiVRlr5JRJ5OhWdml/wbAl69o VZFFjwj8DuhnynJPfNUWEvPffTEJS4e1MHvzU1FfUMGBETpUSWv62fSlPi0vuMUg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiiedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpefvohhmucflohhnvghsuceothhhjhesfhhrvggvsghsugdr ohhrgheqnecuggftrfgrthhtvghrnhepveevtefgieefueejudeiuefhgeeuheejudetve egkeeitdefleevgfekveejjeevnecuffhomhgrihhnpehfrhgvvggsshgurdhorhhgnecu kfhppedufeejrdehtddrudejrdduvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhjsehfrhgvvggsshgurdhorhhg X-ME-Proxy: Received: from tom-desk.erg.abdn.ac.uk (tom-desk.erg.abdn.ac.uk [137.50.17.12]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A084328005D; Sun, 14 Jun 2020 15:53:34 -0400 (EDT) Date: Sun, 14 Jun 2020 20:51:26 +0100 From: Tom Jones To: Jessica Clarke Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361944 - in head/sys/dev/virtio: . network Message-ID: <20200614195126.GB68578@tom-desk.erg.abdn.ac.uk> References: <202006082151.058LpabU003001@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006082151.058LpabU003001@repo.freebsd.org> X-Rspamd-Queue-Id: 49lQBT4qj6z4p5T X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2020 19:53:38 -0000 On Mon, Jun 08, 2020 at 09:51:36PM +0000, Jessica Clarke wrote: > Author: jrtc27 > Date: Mon Jun 8 21:51:36 2020 > New Revision: 361944 > URL: https://svnweb.freebsd.org/changeset/base/361944 > > Log: > virtio: Support non-legacy network device and queue > > The non-legacy interface always defines num_buffers in the header, > regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We > also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 > during negotiation, as it supports non-legacy transports just fine. This > fixes network packet transmission on TinyEMU. > > Reviewed by: br, brooks (mentor), jhb (mentor) > Approved by: br, brooks (mentor), jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D25132 > > Modified: > head/sys/dev/virtio/network/if_vtnet.c > head/sys/dev/virtio/network/if_vtnetvar.h > head/sys/dev/virtio/virtio.c > head/sys/dev/virtio/virtqueue.c > Hi Jessica, After updating my current bhyve vm today (on a 12.1 host), networking no longer works. Reverting this commit seems to resolve the issue. I think vtnet is not passing enough data up to the ip layer. If I capture on the tap interface for the vm I see arp requests and arp replies, however kern.msgbuf is full of: <5>arp: short packet received on vtnet0 and netstat does not see any replies to arp requests: root@freebsd-current:~ # netstat -s -p arp arp: 11 ARP requests sent 0 ARP requests failed to sent 0 ARP replies sent 0 ARP requests received 0 ARP replies received 0 ARP packets received 24 total packets dropped due to no ARP entry 2 ARP entrys timed out 0 Duplicate IPs seen If I set up an arp entry manually I can see ICMP echo requests and responses on the tap interface, but the vm does not see the responses. root@freebsd-current:~ # netstat -s -p ip ip: 7 total packets received 0 bad header checksums 0 with size smaller than minimum 7 with data size < data length 0 with ip length > max ip packet size 0 with header length < data size 0 with data length < header length The line 7 with data size < data length makes me think that vtnet is truncating packets. markj pointed me at this bug in irc which might also be related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 - Tom