[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100322.203053.37576243.davem@davemloft.net>
Date: Mon, 22 Mar 2010 20:30:53 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ben@...footnetworks.com
Cc: avorontsov@...mvista.com, netdev@...r.kernel.org,
Sandeep.Kumar@...escale.com
Subject: Re: Gianfar: RX Recycle skb->len error
From: "Ben Menchaca (ben@...footnetworks.com)" <ben@...footnetworks.com>
Date: Mon, 22 Mar 2010 14:10:48 -0700
> It's yucky, but skb_reserve(skb, -alignamount) works,
I have no problem with people using that.
> It seems in both these cases for gianfar, the amount of the
> alignment is not immediately available to the code the
> recognizes that the skb_reset_reserved() is required. A bit
> larger rework appears to be needed.
There's no need to make this so complicated. Just remember the
value and then refer to it later, when needed.
struct gianfar_skb_cb {
int alignamount;
};
#define GIANFAR_CB(skb) ((struct gianfar_skb_cb *)((skb)->cb))
...
GIANFAR_CB(skb)->alignamount = alignamount;
...
skb_reserve(skb, -GIANFAR_CB(skb)->alignamount);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists