[Click] Alignment problem on ARM

Eddie Kohler kohler at cs.ucla.edu
Wed Feb 24 19:48:15 EST 2010


Hi Roberto,

Thought about this a bit.  I think the right answer is to give FromDevice
an argument that declares what packet alignment it produces.  You would
use this argument to say, for example,

FromDevice(moni0, ALIGNMENT 4 0)  -> ...

This will tell click-align that your FromDevice generates 4 0 alignment,
which will fix the behavior in Classifier et al. later on.

There are problems also with AthdescDecap and WifiDecap doing unpredictable
things to packet alignment based on what the packets say, but I still
think "4 0" at the FromDevice will be enough for you in practice..

Eddie


Cliff Frey wrote:
>> Could this issue be related to the fact that the interface that i'm using
>> is a wireless interface running in monitor mode (madwifi driver)?
>>
> 
> Yes, this could definitely be related to the issue.  As I said, I believe
> that click assumes that all FromDevice elements will always push packets
> with 4 2 alignment.  It is quite possible that this monitor mode device does
> not satisfy this assumption.
> 
> I've realized that my simple router works fine with both Align 4 0  and
>> 4 4. So there is a two bytes offeset that must be compensated.
>>
> 
> Align 4 4 is the same as Align 4 0... both cases mean that
> ((uintptr_t)packet->data() % 4) == 0
> 
> Cliff
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list