aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorWenyu Zhang <wenyuz@vmware.com>2014-11-06 09:51:24 -0500
committerPravin B Shelar <pshelar@nicira.com>2014-11-09 21:58:44 -0500
commit8f0aad6f35f7e8b3118b7b8a65e8e76b135cc4cb (patch)
tree5f3dd8374c3c1584cb2b516f4191e70b82472f68 /include/uapi/linux
parent9ba559d9ca3711940be3e7207dac13c4f0654d43 (diff)
openvswitch: Extend packet attribute for egress tunnel info
OVS vswitch has extended IPFIX exporter to export tunnel headers to improve network visibility. To export this information userspace needs to know egress tunnel for given packet. By extending packet attributes datapath can export egress tunnel info for given packet. So that userspace can ask for egress tunnel info in userspace action. This information is used to build IPFIX data for given flow. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Romain Lenglet <rlenglet@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/openvswitch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 26c36c4cf7e2..cf8185661e52 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -157,6 +157,11 @@ enum ovs_packet_cmd {
157 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an 157 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
158 * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content 158 * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
159 * specified there. 159 * specified there.
160 * @OVS_PACKET_ATTR_EGRESS_TUN_KEY: Present for an %OVS_PACKET_CMD_ACTION
161 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
162 * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the
163 * output port is actually a tunnel port. Contains the output tunnel key
164 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes.
160 * 165 *
161 * These attributes follow the &struct ovs_header within the Generic Netlink 166 * These attributes follow the &struct ovs_header within the Generic Netlink
162 * payload for %OVS_PACKET_* commands. 167 * payload for %OVS_PACKET_* commands.
@@ -167,6 +172,8 @@ enum ovs_packet_attr {
167 OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ 172 OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */
168 OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ 173 OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
169 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ 174 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */
175 OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_*
176 attributes. */
170 __OVS_PACKET_ATTR_MAX 177 __OVS_PACKET_ATTR_MAX
171}; 178};
172 179
@@ -315,6 +322,8 @@ enum ovs_tunnel_key_attr {
315 OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ 322 OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */
316 OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */ 323 OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */
317 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */ 324 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */
325 OVS_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */
326 OVS_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */
318 __OVS_TUNNEL_KEY_ATTR_MAX 327 __OVS_TUNNEL_KEY_ATTR_MAX
319}; 328};
320 329
@@ -480,11 +489,15 @@ enum ovs_sample_attr {
480 * message should be sent. Required. 489 * message should be sent. Required.
481 * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is 490 * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is
482 * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. 491 * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
492 * @OVS_USERSPACE_ATTR_EGRESS_TUN_PORT: If present, u32 output port to get
493 * tunnel info.
483 */ 494 */
484enum ovs_userspace_attr { 495enum ovs_userspace_attr {
485 OVS_USERSPACE_ATTR_UNSPEC, 496 OVS_USERSPACE_ATTR_UNSPEC,
486 OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ 497 OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */
487 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ 498 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */
499 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port
500 * to get tunnel info. */
488 __OVS_USERSPACE_ATTR_MAX 501 __OVS_USERSPACE_ATTR_MAX
489}; 502};
490 503