in_softirq(): Pls Help

Rajasekhar Inguva (irajasek@in.ibm.com)
Mon, 28 Jan 2002 11:08:08 +0530


Hi All , I am unable to understand the below code snippet. Any explanation
would be of great help.

File: net/ipv4/route.c
Routine: rt_intern_hash()

...
...
int attempts = ! in_softirq();
...
...
..
if( attempts-- > 0 )
{
...
...
rt_garbage_collect();
...
...
}

The code inside the 'if' block runs only if the local_bh_count is zero. In
effect, the garbage collection is done only if local_bh_count is zero.

So, in a situation wherein neighbour tables are full and local_bh_count is
not zero, then we have to bear the dreaded "neighbour table overflow"
message.

Why is it done the way it is ?

Thanks a lot, in advance !

Cheers,

Raj

-
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/