[NET]: Kill skb->list
Remove the "list" member of struct sk_buff, as it is entirely redundant. All SKB list removal callers know which list the SKB is on, so storing this in sk_buff does nothing other than taking up some space. Two tricky bits were SCTP, which I took care of, and two ATM drivers which Francois Romieu <romieu@fr.zoreil.com> fixed up. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:

committed by
David S. Miller

parent
6869c4d8e0
commit
8728b834b2
@@ -156,52 +156,6 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
SHAPERCB(skb)->shapelen= shaper_clocks(shaper,skb);
|
||||
|
||||
#ifdef SHAPER_COMPLEX /* and broken.. */
|
||||
|
||||
while(ptr && ptr!=(struct sk_buff *)&shaper->sendq)
|
||||
{
|
||||
if(ptr->pri<skb->pri
|
||||
&& jiffies - SHAPERCB(ptr)->shapeclock < SHAPER_MAXSLIP)
|
||||
{
|
||||
struct sk_buff *tmp=ptr->prev;
|
||||
|
||||
/*
|
||||
* It goes before us therefore we slip the length
|
||||
* of the new frame.
|
||||
*/
|
||||
|
||||
SHAPERCB(ptr)->shapeclock+=SHAPERCB(skb)->shapelen;
|
||||
SHAPERCB(ptr)->shapelatency+=SHAPERCB(skb)->shapelen;
|
||||
|
||||
/*
|
||||
* The packet may have slipped so far back it
|
||||
* fell off.
|
||||
*/
|
||||
if(SHAPERCB(ptr)->shapelatency > SHAPER_LATENCY)
|
||||
{
|
||||
skb_unlink(ptr);
|
||||
dev_kfree_skb(ptr);
|
||||
}
|
||||
ptr=tmp;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
if(ptr==NULL || ptr==(struct sk_buff *)&shaper->sendq)
|
||||
skb_queue_head(&shaper->sendq,skb);
|
||||
else
|
||||
{
|
||||
struct sk_buff *tmp;
|
||||
/*
|
||||
* Set the packet clock out time according to the
|
||||
* frames ahead. Im sure a bit of thought could drop
|
||||
* this loop.
|
||||
*/
|
||||
for(tmp=skb_peek(&shaper->sendq); tmp!=NULL && tmp!=ptr; tmp=tmp->next)
|
||||
SHAPERCB(skb)->shapeclock+=tmp->shapelen;
|
||||
skb_append(ptr,skb);
|
||||
}
|
||||
#else
|
||||
{
|
||||
struct sk_buff *tmp;
|
||||
/*
|
||||
@@ -220,7 +174,7 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
} else
|
||||
skb_queue_tail(&shaper->sendq, skb);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(sh_debug)
|
||||
printk("Frame queued.\n");
|
||||
if(skb_queue_len(&shaper->sendq)>SHAPER_QLEN)
|
||||
@@ -302,7 +256,7 @@ static void shaper_kick(struct shaper *shaper)
|
||||
* Pull the frame and get interrupts back on.
|
||||
*/
|
||||
|
||||
skb_unlink(skb);
|
||||
skb_unlink(skb, &shaper->sendq);
|
||||
if (shaper->recovery <
|
||||
SHAPERCB(skb)->shapeclock + SHAPERCB(skb)->shapelen)
|
||||
shaper->recovery = SHAPERCB(skb)->shapeclock + SHAPERCB(skb)->shapelen;
|
||||
|
Reference in New Issue
Block a user