From owner-freebsd-current@FreeBSD.ORG Sat Jan 3 18:55:39 2015 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F01D7ABB; Sat, 3 Jan 2015 18:55:39 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id B5BD23864; Sat, 3 Jan 2015 18:55:39 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 4065C7300A; Sat, 3 Jan 2015 20:00:22 +0100 (CET) Date: Sat, 3 Jan 2015 20:00:22 +0100 From: Luigi Rizzo To: Bryan Venteicher , current@freebsd.org Subject: invalid checksum with vtnet and in_kernel BOOTP Message-ID: <20150103190022.GA95892@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2015 18:55:40 -0000 I am trying to run a diskless bhyve client diskless using in-kernel bootp support and vtnet connected to tap and bridge on the host side and I am having the problem in the subject which may be vtnet-related. Packets generated by the in-kernel DHCP arrive to the host tap interface with a corrupt checksum, which is consistent with vtnet0 having the TXCSUM capability enabled. Unfortunately, when the packet reaches the bridge0 on the host: > uname -a FreeBSD bsd9.casa 10.0-STABLE FreeBSD 10.0-STABLE #0 r269180: >ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 02:01:85:b1:55:00 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: re0 flags=143 ifmaxaddr 0 port 1 priority 128 path cost 200000 member: tap0 flags=143 ifmaxaddr 0 port 4 priority 128 path cost 55 The packet goes out with a broken checksum and the (external) dhcp server does not respond. When the guest is up, i can run dhclient on the same guest interface and packets exit with a correct checksum. Maybe dhclient generates correct packets ignoring the TXCSUM setting. In any case i applied a quick fix (disable TXCSUM in if_vtnet.c) and at least can get the dhcp request reach the router and get a response back. Also note that subsequent (tcp) traffic through the interface is reported on the host with a correct checksum, so i suspect that either the kernel-bootp code does not pass the correct checksum flags, or somehow it is sent to the device too early in the initialization process. any idea ? cheers luigi