diff options
author | Andy Zhou <azhou@nicira.com> | 2014-09-15 22:37:25 -0400 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2014-09-16 02:28:14 -0400 |
commit | 971427f353f3c42c8dcef62e7124440df68eb809 (patch) | |
tree | 7eed9ed50fe70cfc82ce33e12a13147ad0de580c /net/openvswitch/datapath.h | |
parent | 32ae87ff795781b7ceffc44b7c694c1bb206a266 (diff) |
openvswitch: Add recirc and hash action.
Recirc action allows a packet to reenter openvswitch processing.
currently openvswitch lookup flow for packet received and execute
set of actions on that packet, with help of recirc action we can
process/modify the packet and recirculate it back in openvswitch
for another pass.
OVS hash action calculates 5-tupple hash and set hash in flow-key
hash. This can be used along with recirculation for distributing
packets among different ports for bond devices.
For example:
OVS bonding can use following actions:
Match on: bond flow; Action: hash, recirc(id)
Match on: recirc-id == id and hash lower bits == a;
Action: output port_bond_a
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r-- | net/openvswitch/datapath.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 25b0e888cb27..ac3f3df96961 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2007-2012 Nicira, Inc. | 2 | * Copyright (c) 2007-2014 Nicira, Inc. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of version 2 of the GNU General Public | 5 | * modify it under the terms of version 2 of the GNU General Public |
@@ -189,13 +189,18 @@ void ovs_dp_detach_port(struct vport *); | |||
189 | int ovs_dp_upcall(struct datapath *, struct sk_buff *, | 189 | int ovs_dp_upcall(struct datapath *, struct sk_buff *, |
190 | const struct dp_upcall_info *); | 190 | const struct dp_upcall_info *); |
191 | 191 | ||
192 | const char *ovs_dp_name(const struct datapath *dp); | ||
192 | struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq, | 193 | struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq, |
193 | u8 cmd); | 194 | u8 cmd); |
194 | 195 | ||
195 | int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, | 196 | int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, |
196 | struct sw_flow_key *); | 197 | struct sw_flow_key *); |
198 | |||
197 | void ovs_dp_notify_wq(struct work_struct *work); | 199 | void ovs_dp_notify_wq(struct work_struct *work); |
198 | 200 | ||
201 | int action_fifos_init(void); | ||
202 | void action_fifos_exit(void); | ||
203 | |||
199 | #define OVS_NLERR(fmt, ...) \ | 204 | #define OVS_NLERR(fmt, ...) \ |
200 | do { \ | 205 | do { \ |
201 | if (net_ratelimit()) \ | 206 | if (net_ratelimit()) \ |