Using Open vSwitch is it possible to new arbitrary actions besides the ones currently defined? The provided command line interfaces, such as ovs-ofctl
, allow constrained rules such as ovs-ofctl add-flow s1 priority=500, in_port=1, actions=output:2
, to connect two ports, etc. However, I couldn't find support for functionality beyond this, to create more complex actions. Specifically, the goal is to create a system for flow sampling and monitoring algorithms. Is there is a way to do this within Open vSwitch, or would other tools need to be used, such as BPF/XDP?
Asked
Active
Viewed 214 times
-1

gratio
- 83
- 9
-
What do you mean exactly by "generic"? Open vSwitch implements, for the most part, the pipeline as defined by OpenFlow. So it can do everything OpenFlow defines as an action plus a few things (I don't think `learn` is part of OpenFlow). – pchaigno Mar 13 '18 at 15:45
-
By _generic_ I mean further packet processing (besides forwarding), such as hashing and computing statistics over packet fields on the switch, provided there is a packet match. Though I know this can be done through XDP, I am unsure whether this functionality is supported through Open vSwitch. – gratio Mar 14 '18 at 04:18
-
@pchaigno I've reworded the question. Any specific advice on improving the post to be useful to future users? Thanks! – gratio Mar 15 '18 at 04:41
-
I'm not the one who voted you down if that's what you're worried about. This is not really a programming question so my guess would be that's why it was voted down. Other than that, a specific example could help, but it's okay the way it is. – pchaigno Mar 15 '18 at 20:36
1 Answers
1
The complete list of 60+ different Open vSwitch actions is in the documentation for the ovs-ofctl
command (right after actions=[action][,action...]
).
You can do lots of different things (from modifying packet fields to calling the conntrack module), but there is currently no way to define new arbitrary actions. Defining new arbitrary actions is the subject of several academic works (such as SoftFlow, to cite only one) and a few prototypes.

pchaigno
- 11,313
- 2
- 29
- 54