[Click] Alignment problem on ARM

Cliff Frey cliff at meraki.com
Fri Jan 22 00:16:19 EST 2010


I don't see a super clean solution to this problem.  In general, I would
expect that any ethernet header _would_ be (4 2) aligned, as this is the
most common configuration (so that the ip header is (4 0) aligned).

In your case, I'm not even convinced that WifiDecap will even pull a 100%
consistent number of bytes off of the packet, so it might be necessary to
actually put an Align() after it.  If an element doesn't adjust the
alignment of its packets by a consistent amount, then click-align can't
correctly handle it.

Also, wifi_header + llc is probably more than 8 bytes...

In any case, this probably isn't a hugely satisfying answer.  If you know
for sure about the alignment after the WifiDecap element, then you can add a
GeneratorAligner to click-align.cc that specifies what the alignment will
be.  If your are 100% sure that WifiDecap always just does a shift, then you
could use a ShifterAligner.

Cliff

On Thu, Jan 21, 2010 at 1:59 PM, Roberto Riggio <
roberto.riggio at create-net.org> wrote:

>  Actually wifidecal pulls 8 bytes (wifi header + llc) and pushes 14 bytes
> (ethernet header), shouldn't this require
> the 2 bytes offset Align(4 2)?
>
> R.
>
>
> On 01/21/2010 07:24 PM, Cliff Frey wrote:
>
> So the problem is that the aligninfo is incorrect for either FromDevice,
> AthdescDecap, or WifiDecap.
>
>  looking at tools/click-align/click-align.cc, you can see that FromDevice
> is assumed to push out packets with alignment 2 4, and neither AthdescDecap
> or WifiDecap are mentioned, which should mean that they are assumed to not
> affect the alignment (they only pull multiples of 4 bytes).
>
>  If AthdescDecap or WifiDecap actually do something different, you can fix
> the issue in click-align.cc by adding the offending class.  If FromDevice is
> actually pushing out packets of alignment 4 0, then that is a very weird
> driver that you are using, and I'm not sure what the best next step would
> be... perhaps adding a configuration parameter to FromDevice that
> click-align could look at... or fixing your ethernet driver to be
> standard...  I'm not sure.
>
>  You can more easily test which element is misbehaving by adding Align()
> elements to your config, enabling CLICK_ALIGN_COUNT in
> elements/standard/align.hh, and looking to see which Align elements are
> doing anything.
>
>  Cliff
>
> On Thu, Jan 21, 2010 at 3:46 AM, Roberto Riggio <
> roberto.riggio at create-net.org> wrote:
>
>> Hi,
>>
>> I have a problem with click on an Intel ixp4xx platform (arm).
>>
>> This is the script I'm using:
>>
>>
>> FromDevice(moni0)->AthdescDecap()->WifiDecap()->Classifier(12/06??)->Print()->Discard();
>>
>> If I run click-align on that script i get the following output:
>>
>> # 1 "<stdin>"
>> FromDevice at 1 :: FromDevice(moni0);
>> # 1 "<stdin>"
>> AthdescDecap at 2 :: AthdescDecap;
>> # 1 "<stdin>"
>> WifiDecap at 3 :: WifiDecap;
>> # 1 "<stdin>"
>> Classifier at 4 :: Classifier(12/06??);
>> # 1 "<stdin>"
>> Print at 5 :: Print;
>> # 1 "<stdin>"
>> Discard at 6 :: Discard;
>> # 0 "<click-align>"
>> AlignmentInfo at click_align@7 :: AlignmentInfo(Classifier at 4  4 2);
>> # 16 ""
>> FromDevice at 1 -> AthdescDecap at 2
>>     -> WifiDecap at 3
>>     -> Classifier at 4
>>     -> Print at 5
>>     -> Discard at 6;
>>
>> However the alignment info is wrong, it should be
>> AlignmentInfo(Classifier at 4  4 0). In fact
>> if I edit the click-align output manually the router works fine.
>>
>> R.
>>
>>
>> _______________________________________________
>> click mailing list
>> click at amsterdam.lcs.mit.edu
>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>
>
>
>


More information about the click mailing list