sFlow: Genericize/simplify kernel sFlow implementation
authorPravin Shelar <pshelar@nicira.com>
Wed, 28 Sep 2011 17:43:07 +0000 (10:43 -0700)
committerPravin Shelar <pshelar@nicira.com>
Wed, 28 Sep 2011 17:43:07 +0000 (10:43 -0700)
commit6ff686f2bc2afcfb0a9ad9793d834979dc9870d6
tree26fb29ffe2866278f51eddf8bed56f29e3a1f579
parent89ac6b1f19fa75c056420821b49035346c65024f
sFlow: Genericize/simplify kernel sFlow implementation

Following patch adds sampling action which takes probability and set
of actions as arguments. When probability is hit, actions are executed for
given packet.
USERSPACE action's userdata (u64) is used to store struct
user_action_cookie as cookie. CONTROLLER action is fixed accordingly.

Now we can remove sFlow code from kernel and implement sFlow generically
as SAMPLE action. sFlow is defined as SAMPLE Action with probability (sFlow
sampling rate) and USERSPACE action as argument. USERSPACE action's data
is used as cookie. sFlow uses this cookie to store output-port, number of
output ports and vlan-id. sample-pool is calculated by using vport
stats.

Signed-off-by: Pravin Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
16 files changed:
datapath/actions.c
datapath/datapath.c
datapath/datapath.h
datapath/vport.c
datapath/vport.h
include/openvswitch/datapath-protocol.h
lib/dpif-linux.c
lib/dpif-netdev.c
lib/dpif-provider.h
lib/dpif.c
lib/dpif.h
lib/odp-util.c
lib/odp-util.h
ofproto/ofproto-dpif-sflow.c
ofproto/ofproto-dpif-sflow.h
ofproto/ofproto-dpif.c