]> git.proxmox.com Git - mirror_ovs.git/commit - datapath/datapath.c
datapath: Implement recirc action without recursion
authorAndy Zhou <azhou@nicira.com>
Mon, 11 Aug 2014 07:14:05 +0000 (00:14 -0700)
committerAndy Zhou <azhou@nicira.com>
Sat, 6 Sep 2014 00:34:40 +0000 (17:34 -0700)
commit2c8c4fb7ff82f20cf742bea0625003a8eb428241
tree18081b2991239d8318d9ee3071a008d66a77edf9
parent60759b2b9d0cb39d9eddfb46bebab55a9850de9d
datapath: Implement recirc action without recursion

Since kernel stack is limited in size, it is not wise to using
recursive function with large stack frames.

This patch provides an alternative implementation of recirc action
without using recursion.

A per CPU fixed sized, 'deferred action FIFO', is used to store either
recirc or sample actions encountered during execution of an action
list. Not executing recirc or sample action in place, but rather execute
them laster as 'deferred actions' avoids recursion.

Deferred actions are only executed after all other actions has been
executed, including the ones triggered by loopback from the kernel
network stack.

The size of the private FIFO, currently set to 20, limits the number
of total 'deferred actions' any one packet can accumulate.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/actions.c
datapath/datapath.c
datapath/datapath.h