Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jan 2011 18:22:46 -0800
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Monthadar Al Jaberi <monthadar@gmail.com>, freebsd-net@freebsd.org, "Jayachandran C." <c.jayachandran@gmail.com>, freebsd-mips@freebsd.org
Subject:   Re: capturing packet from wlan0 with netgraph?
Message-ID:  <20110118022246.GE1210@michelle.cdnetworks.com>
In-Reply-To: <AANLkTikHwmMV5gHXZ%2BLFCfk7d4E1cNaDVN64GOhYB-aD@mail.gmail.com>
References:  <AANLkTi=s45woPE21exHgArAyAaO2sW%2BeR=%2BumB6zZcr5@mail.gmail.com> <AANLkTikC1nYudfM91rPxFfgCj83m8YbdagedeydyBaue@mail.gmail.com> <AANLkTikgdf4Uy20NF6vQ=-NWGYS4LDdmypKng=2Bg2ME@mail.gmail.com> <AANLkTi=Wu=sgH76vHx-4CmaUgm_H9FMA9Nuvbgk4Gkzz@mail.gmail.com> <AANLkTik4HtAX7MtT4dVbHku-bfVLun_C%2BnRsbL13SrHu@mail.gmail.com> <AANLkTi=GPxqSkEt4jkFh%2Bnr2%2BbmN7oTB7cJ3cWqtEw5R@mail.gmail.com> <AANLkTin%2BJFF-5TtvyzERLc2A2oWinhrhnq32LCskXa=Q@mail.gmail.com> <AANLkTikHwmMV5gHXZ%2BLFCfk7d4E1cNaDVN64GOhYB-aD@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 18, 2011 at 09:55:01AM +0800, Adrian Chadd wrote:
> On 18 January 2011 02:03, Monthadar Al Jaberi <monthadar@gmail.com> wrote:
> > filed a PR http://www.freebsd.org/cgi/query-pr.cgi?pr=154091
> 
> Thanks.
> 
> Network-stack and MIPS guys - what's the best way to handle this kind
> of stuff? This isn't the first time I've come across weird alignment
> stuff in the network stack that just doesn't seem to get much
> attention. Is it perhaps worth adding some debugging macros that
> account/log unaligned-ness? So people playing at home on i386/amd64
> can play along?
> 

I guess one of device driver/part of network stack is not aligning
IP header on strict-alignment architecture. But I'm pretty sure all
wired drivers always align IP header on 32bit boundary no matter
how it costs on strict alignment architectures. But it does not
align it on non-strict alignment architectures since that costs too
much without reasonable benefit.
I think you can add m_copyup() at the beginning ip_input to proceed
processing and print back traces to track down which one generated
unaligned IP header.

> 
> 
> Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110118022246.GE1210>