Date: Thu, 5 Nov 2015 12:53:25 -0500 From: Larry Baird <lab@gta.com> To: Alan Somers <asomers@freebsd.org> Cc: Roger Pau Monn?? <roger.pau@citrix.com>, "freebsd-xen@freebsd.org" <freebsd-xen@freebsd.org>, "ken@FreeBSD.org" <ken@FreeBSD.org> Subject: Re: Checksum forwarding issue on XEN Message-ID: <20151105175325.GA13746@gta.com> In-Reply-To: <563B8B72.5050800@spectralogic.com> References: <20151103201250.GA92469@gta.com> <563B72B2.6060308@citrix.com> <20151105160057.GA2268@gta.com> <563B8B72.5050800@spectralogic.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Alan, > Though it looks weird, I think it's actually correct. th->th_sum lies > within the packet that it inspected by in_cksum_skip. in_cksum_skip > skips the ethernet and IP headers, but not the TCP header. So it > consumes whatever value was previously set in th_sum. In any case, it > will be easy to check this code by running the builtin unit tests. Just > build the kernel with XNB_DEBUG defined, instantiate an xnb interface, > and do "sysctl dev.xnb.0.unit_test_results". I agress the code looks strange but is probably correct as far as it goes. The code assumes that there aren't any IP options. I am not sure if this is a valid assumption or not. The code also assumes packet is IPv4. > FWIW, there is a performance problem with Xen and checksums. Whenever > FreeBSD is used as a dom0, checksum offloading should be disabled on the > netfronts. I don't know if the same problem exists on other OSes, but > it might. See xnb(4) for more details about this problem. Ok I read the CAVEATS on xnb(4). Let me play with that for a bit. I have an ugly code patch, that works for me with out disabling checksum offloading. Before I share, let me do a few more tests. Larry -- ------------------------------------------------------------------------ Larry Baird Global Technology Associates, Inc. 1992-2012 | http://www.gta.com Celebrating Twenty Years of Software Innovation | Orlando, FL Email: lab@gta.com | TEL 407-380-0220
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151105175325.GA13746>