summaryrefslogtreecommitdiff
path: root/include/openflow
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-02-19 15:31:37 -0800
committerBen Pfaff <blp@ovn.org>2016-02-19 16:15:44 -0800
commit6409e0083debb6cd1ad71e7d6bdd7fc1d7b83dd1 (patch)
treeb13b77686b3fb7ea07281b7dcae7412ebd465913 /include/openflow
parent95022b47358676771e7b8050542fd4b2edfe18b9 (diff)
downloadopenvswitch-6409e0083debb6cd1ad71e7d6bdd7fc1d7b83dd1.tar.gz
Implement new packet-in format NXT_PACKET_IN2.
Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'include/openflow')
-rw-r--r--include/openflow/nicira-ext.h43
1 files changed, 39 insertions, 4 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h
index a209e6abe..4ddf05bff 100644
--- a/include/openflow/nicira-ext.h
+++ b/include/openflow/nicira-ext.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -154,11 +154,25 @@ struct nx_flow_mod_table_id {
OFP_ASSERT(sizeof(struct nx_flow_mod_table_id) == 8);
enum nx_packet_in_format {
- NXPIF_OPENFLOW10 = 0, /* Standard OpenFlow 1.0 compatible. */
- NXPIF_NXM = 1 /* Nicira Extended. */
+ NXPIF_STANDARD = 0, /* OFPT_PACKET_IN for this OpenFlow version. */
+ NXPIF_NXT_PACKET_IN = 1, /* NXT_PACKET_IN (since OVS v1.1). */
+ NXPIF_NXT_PACKET_IN2 = 2, /* NXT_PACKET_IN2 (since OVS v2.6). */
};
-/* NXT_SET_PACKET_IN_FORMAT request. */
+/* NXT_SET_PACKET_IN_FORMAT request.
+ *
+ * For any given OpenFlow version, Open vSwitch supports multiple formats for
+ * "packet-in" messages. The default is always the standard format for the
+ * OpenFlow version in question, but NXT_SET_PACKET_IN_FORMAT can be used to
+ * set an alternative format.
+ *
+ * From OVS v1.1 to OVS v2.5, this request was only honored for OpenFlow 1.0.
+ * Requests to set format NXPIF_NXT_PACKET_IN were accepted for OF1.1+ but they
+ * had no effect. (Requests to set formats other than NXPIF_STANDARD or
+ * NXPIF_NXT_PACKET_IN were rejected with OFPBRC_EPERM.)
+ *
+ * From OVS v2.6 onward, this request is honored for all OpenFlow versions.
+ */
struct nx_set_packet_in_format {
ovs_be32 format; /* One of NXPIF_*. */
};
@@ -221,6 +235,27 @@ struct nx_packet_in {
};
OFP_ASSERT(sizeof(struct nx_packet_in) == 24);
+/* NXT_PACKET_IN2.
+ *
+ * NXT_PACKET_IN2 is conceptually similar to OFPT_PACKET_IN but it is expressed
+ * as an extensible set of properties instead of using a fixed structure.
+ *
+ * Added in Open vSwitch 2.6. */
+enum nx_packet_in2_prop_type {
+ /* Packet. */
+ NXPINT_PACKET, /* Raw packet data. */
+ NXPINT_FULL_LEN, /* ovs_be32: Full packet len, if truncated. */
+ NXPINT_BUFFER_ID, /* ovs_be32: Buffer ID, if buffered. */
+
+ /* Information about the flow that triggered the packet-in. */
+ NXPINT_TABLE_ID, /* uint8_t: Table ID. */
+ NXPINT_COOKIE, /* ovs_be64: Flow cookie. */
+
+ /* Other. */
+ NXPINT_REASON, /* uint8_t, one of OFPR_*. */
+ NXPINT_METADATA, /* NXM or OXM for metadata fields. */
+};
+
/* Configures the "role" of the sending controller. The default role is:
*
* - Other (NX_ROLE_OTHER), which allows the controller access to all