false alarm (Re: invalid checksum with vtnet and in_kernel BOOTP)

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Mon, 5 Jan 2015 19:35:29 +0100
for the records, this was not a problem with vtnet but a
bug in some bhyve modifications of ours.

Thanks to Bryan who pointed out the potential location of the problem.

cheers
luigi

On Sat, Jan 03, 2015 at 08:00:22PM +0100, Luigi Rizzo wrote:
> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> 	    ifmaxaddr 0 port 1 priority 128 path cost 200000
>     member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> 	    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
Received on Mon Jan 05 2015 - 17:30:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:54 UTC