lkml.org 
[lkml]   [2003]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Problem with dev_kfree_skb_any() in 2.6.0
David S. Miller wrote:
> On Sun, 28 Dec 2003 10:17:34 +1100
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
>
>>We should probably fix dev_kfree_skb_any() ? Still ugly imho though...
>>
>>- if (in_irq())
>>+ if (in_irq() || irqs_disabled())
>>
>
>
> That's not the right fix, the sungem PM code path TX queue
> packet freeing should be instead done outside of IRQ spinlocks.


Not really... pretty much _all_ TX queue packet freeing occurs inside
an irq handler and inside the driver spinlock. Further, we don't want
to reinvent some sort of "queue skb for freeing" code in every driver.

Look at what a driver really wants from the net stack:

if (you can free the skb now)
free skb
otherwise
queue it to be freed later

The driver _shouldn't_ care about the conditions under which an skb can
be freed. That's entirely the net stack's domain (and should be)...
heck, the net stack should even be free to change said conditions,
without breaking or confusing drivers.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.043 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site