diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2014-09-15 22:20:31 -0400 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2014-09-16 02:28:13 -0400 |
commit | 83c8df26a3b654871c0503fcf6eac61777e12ea1 (patch) | |
tree | a3746dd3c1a08342635b654cd56df432490fa25f /net/openvswitch/datapath.h | |
parent | 2ff3e4e4868675da1024175215991fa6d9856731 (diff) |
openvswitch: refactor ovs flow extract API.
OVS flow extract is called on packet receive or packet
execute code path. Following patch defines separate API
for extracting flow-key in packet execute code path.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r-- | net/openvswitch/datapath.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index b576483aab7c..2b982fae6a11 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h | |||
@@ -97,10 +97,13 @@ struct datapath { | |||
97 | * @flow: The flow associated with this packet. May be %NULL if no flow. | 97 | * @flow: The flow associated with this packet. May be %NULL if no flow. |
98 | * @tun_key: Key for the tunnel that encapsulated this packet. NULL if the | 98 | * @tun_key: Key for the tunnel that encapsulated this packet. NULL if the |
99 | * packet is not being tunneled. | 99 | * packet is not being tunneled. |
100 | * @input_vport: The original vport packet came in on. This value is cached | ||
101 | * when a packet is received by OVS. | ||
100 | */ | 102 | */ |
101 | struct ovs_skb_cb { | 103 | struct ovs_skb_cb { |
102 | struct sw_flow *flow; | 104 | struct sw_flow *flow; |
103 | struct ovs_key_ipv4_tunnel *tun_key; | 105 | struct ovs_key_ipv4_tunnel *tun_key; |
106 | struct vport *input_vport; | ||
104 | }; | 107 | }; |
105 | #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb) | 108 | #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb) |
106 | 109 | ||
@@ -181,7 +184,7 @@ static inline struct vport *ovs_vport_ovsl(const struct datapath *dp, int port_n | |||
181 | extern struct notifier_block ovs_dp_device_notifier; | 184 | extern struct notifier_block ovs_dp_device_notifier; |
182 | extern struct genl_family dp_vport_genl_family; | 185 | extern struct genl_family dp_vport_genl_family; |
183 | 186 | ||
184 | void ovs_dp_process_received_packet(struct vport *, struct sk_buff *); | 187 | void ovs_dp_process_received_packet(struct sk_buff *); |
185 | void ovs_dp_detach_port(struct vport *); | 188 | void ovs_dp_detach_port(struct vport *); |
186 | int ovs_dp_upcall(struct datapath *, struct sk_buff *, | 189 | int ovs_dp_upcall(struct datapath *, struct sk_buff *, |
187 | const struct dp_upcall_info *); | 190 | const struct dp_upcall_info *); |