-----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().