Thread (3 messages) 3 messages, 3 authors, 2011-09-12

RE: [RFC/PATCH] net: add deferred flow cache flush function to be used in xfrm

flat view

From: Bucur Madalin-Cristian-B32716 <hidden>
Date: 2011-09-12 14:37:47

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
Behalf Of Eric Dumazet
Sent: Monday, September 12, 2011 4:58 PM

Le lundi 12 septembre 2011 à 15:17 +0300, Madalin Bucur a écrit :
quoted
The xfrm garbage collector calls flow_cache_flush() that might sleep.
The xfrm garbage collector can be called from softirq context, such as from
net_rx_action() through ip_forward(). Added flow_cache_flush_deferred()
function that uses the kernel-global work queue to leave the actual
cache flush processing outside the softirq context.
Problem is sometime we dont want to defer and are in process context.

xfrm_dev_event(  event == NETDEV_DOWN) is probably a place we dont want
to defer the garbage collection.
Indeed, currently __xfrm_garbage_collect() is called through the garbage_collect
callback but also when an event NETDEV_DOWN is received. Maybe we should have
different functions for the two cases, one calling flow_cache_flush_deferred()
and the other flow_cache_flush().
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help