Date: Fri, 12 Oct 2012 08:45:16 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Olivier Cochard-Labb? <olivier@cochard.me> Cc: net@FreeBSD.org Subject: Re: [CFT/Review] net byte order for AF_INET Message-ID: <20121012044516.GJ89655@glebius.int.ru> In-Reply-To: <CA%2Bq%2BTcrC5DCg00UfR8TT9qc38mc6LEEs6Mf=E42VkwQ1fbLMiQ@mail.gmail.com> References: <20121009154128.GU34622@FreeBSD.org> <20121010195842.GH34622@FreeBSD.org> <20121010222651.GR40452@mdounin.ru> <20121010233404.GI34622@glebius.int.ru> <CA%2Bq%2BTcrC5DCg00UfR8TT9qc38mc6LEEs6Mf=E42VkwQ1fbLMiQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Olivier,
thanks for help!
On Fri, Oct 12, 2012 at 02:20:55AM +0200, Olivier Cochard-Labb? wrote:
O> I've done some tests with this net byte ordered(NBO) patch:
O> - I've compiled 2 i386 images of BSD Router Project (current branch
O> rev241418): One with the patch, and the other without the patch [1]
O> - I've run my "full-features testing lab" under VirtualBox [2] using
O> theses images.
O>
O> Here are the differences:
O> - I can't SSH to and between the NBO-patched-FreeBSD;
O> - Lot's of messages "in_cksum_skip: out of data by 28560/23460" on the
O> non-patched FreeBSD (R2 and R3 on the diagram in [2])
O> - PPTP tunnel (net/mpd5) didn't works on the NBO-patched-FreeBSD;
Not working SSH suprises me :( PPTP not, since not tested yet.
Can you please apply attached patch to sys/i386/i386/in_cksum.c? It will
print backtrace once the invariant failed.
--
Totus tuus, Glebius.
[-- Attachment #2 --]
Index: in_cksum.c
===================================================================
--- in_cksum.c (revision 241405)
+++ in_cksum.c (working copy)
@@ -36,6 +36,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
+#include <sys/kdb.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -257,6 +258,7 @@
* reorder operations, this will generally take place in parallel with
* other calculations.
*/
+static int once = 1;
u_short
in_cksum_skip(m, len, skip)
struct mbuf *m;
@@ -477,8 +479,13 @@
su.c[0] = *(char *)w;
}
- if (len)
+ if (len) {
+ if (once) {
+ kdb_backtrace();
+ once = 0;
+ }
printf("%s: out of data by %d\n", __func__, len);
+ }
if (mlen == -1) {
/* The last mbuf has odd # of bytes. Follow the
standard (the odd byte is shifted left by 8 bits) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121012044516.GJ89655>
