> On Wed, Jul 25, 2001 at 12:57:37AM +0200, Jacob Avraham wrote:
> > I noticed that some ethernet drivers, like the tulip,
> > require that the receive buffers be 4 byte align
> > (I believe due to h/w constrains).
> > On the other hand, some upper layer code, like tc
> > (for non x86/68k), checks if the IP header is 4 byte align,
> > and if not, doesn't handle the packet.
> > So it looks like tc and tulip can not be used on other architectures.
> > Has this been discussed before and if yes what was the outcome?
> > In the short term, would that be OK to remove this restriction
> > from tc?
> If some network stack code checks the alignment and reject unaligned
> packets it is a bug. Could you tell exactly which code does that?
This is taken from net/sched/cls_u32.c:
static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct
struct tc_u_knode *knode;
struct tc_u_hnode *ht = (struct tc_u_hnode*)tp->root;
u8 *ptr = skb->nh.raw;
struct tc_u_knode *n;
int sdepth = 0;
int off2 = 0;
int sel = 0;
#if !defined(__i386__) && !defined(__mc68000__)
if ((unsigned long)ptr & 3)