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: l...@gta.com | TEL 407-380-0220 _______________________________________________ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"