datapath: Add loop detection for RT kernels.
authorJesse Gross <jesse@nicira.com>
Mon, 18 Oct 2010 22:30:20 +0000 (15:30 -0700)
committerJesse Gross <jesse@nicira.com>
Mon, 25 Oct 2010 20:40:51 +0000 (13:40 -0700)
commit7eaa9830512604ea9f18e8efb306b9bd75a8248b
tree5de3746b091d242ee94af527edfd870df2867a9e
parent22fcc4d5a5f2459b3edaa034dd69686399b41913
datapath: Add loop detection for RT kernels.

Our normal loop detection requires disabling preemption while
packet processing takes place.  On RT kernels this isn't acceptable
and interacts badly with spinlocks, so we can't use it.  This
takes advantage of some extra space that is added to struct
task_struct on RT kernels (and the knowledge that we will always
have a valid task_struct) to store the loop counter for a given
thread.  Since we can't make these assumptions on non-RT kernels,
we continue to use the previous method of loop detection there.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/Modules.mk
datapath/datapath.c
datapath/loop_counter.c [new file with mode: 0644]
datapath/loop_counter.h [new file with mode: 0644]