@@ -67,9 +67,9 @@ PREREQS = {"none": "MFP_NONE", # If a name matches more than one prefix, the longest one is used.
OXM_CLASSES = {"NXM_OF_": (0, 0x0000),
"NXM_NX_": (0, 0x0001),
+ "NXOXM_NSH_": (0x005ad650, 0xffff),
"OXM_OF_": (0, 0x8000),
"OXM_OF_PKT_REG": (0, 0x8001),
- "OXM_NSH_": (0, 0x8004),
"ONFOXM_ET_": (0x4f4e4600, 0xffff),
# This is the experimenter OXM class for Nicira, which is the diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h
@@ -360,9 +360,6 @@ enum ovs_key_attr {
OVS_KEY_ATTR_CT_LABELS, /* 16-octet connection tracking labels */
OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4, /* struct ovs_key_ct_tuple_ipv4 */
OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */
-#ifndef __KERNEL__
- OVS_KEY_ATTR_NSH, /* struct ovs_key_nsh */
-#endif
#ifdef __KERNEL__
/* Only used within kernel data path. */ @@ -372,6 +369,7 @@ enum ovs_key_attr { #ifndef __KERNEL__
/* Only used within userspace data path. */
OVS_KEY_ATTR_PACKET_TYPE, /* be32 packet type */
+ OVS_KEY_ATTR_NSH, /* struct ovs_key_nsh */
#endif
__OVS_KEY_ATTR_MAX
@@ -1745,7 +1745,7 @@ enum OVS_PACKED_ENUM mf_field_id {
/* "nsh_flags".
*
- * flags field in NSH base header (8 bits).
+ * flags field in NSH base header.
*
* Type: u8.
* Maskable: bitwise.
@@ -1753,13 +1753,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_FLAGS(1) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_FLAGS(1) since OF1.3 and v2.8.
*/
MFF_NSH_FLAGS,
/* "nsh_mdtype".
*
- * mdtype field in NSH base header (8 bits).
+ * mdtype field in NSH base header.
*
* Type: u8.
* Maskable: no.
@@ -1767,13 +1767,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read-only.
* NXM: none.
- * OXM: OXM_NSH_MDTYPE(2) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_MDTYPE(2) since OF1.3 and v2.8.
*/
MFF_NSH_MDTYPE,
/* "nsh_np".
*
- * np (next protocol) field in NSH base header (8 bits)
+ * np (next protocol) field in NSH base header
*
* Type: u8.
* Maskable: no.
@@ -1781,28 +1781,27 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read-only.
* NXM: none.
- * OXM: OXM_NSH_NP(3) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_NP(3) since OF1.3 and v2.8.
*/
MFF_NSH_NP,
/* "nsh_spi" (aka "nsp").
*
- * spi (service path identifier) field in NSH base
- * header (24 bits).
+ * spi (service path identifier) field in NSH base header.
*
- * Type: be32.
+ * Type: be32 (low 24 bits).
* Maskable: no.
* Formatting: hexadecimal.
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_SPI(4) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_SPI(4) since OF1.3 and v2.8.
*/
MFF_NSH_SPI,
/* "nsh_si" (aka "nsi").
*
- * si (service index) field in NSH base header (8 bits).
+ * si (service index) field in NSH base header.
*
* Type: u8.
* Maskable: no.
@@ -1810,13 +1809,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_SI(5) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_SI(5) since OF1.3 and v2.8.
*/
MFF_NSH_SI,
/* "nsh_c1" (aka "nshc1").
*
- * c1 (Network Platform Context) field in NSH context header (32 bits)
+ * c1 (Network Platform Context) field in NSH context header.
*
* Type: be32.
* Maskable: bitwise.
@@ -1824,13 +1823,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_C1(6) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_C1(6) since OF1.3 and v2.8.
*/
MFF_NSH_C1,
/* "nsh_c2" (aka "nshc2").
*
- * c2 (Network Shared Context) field in NSH context header (32 bits)
+ * c2 (Network Shared Context) field in NSH context header.
*
* Type: be32.
* Maskable: bitwise.
@@ -1838,13 +1837,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_C2(7) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_C2(7) since OF1.3 and v2.8.
*/
MFF_NSH_C2,
/* "nsh_c3" (aka "nshc3").
*
- * c3 (Service Platform Context) field in NSH context header (32 bits)
+ * c3 (Service Platform Context) field in NSH context header.
*
* Type: be32.
* Maskable: bitwise.
@@ -1852,13 +1851,13 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_C3(8) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_C3(8) since OF1.3 and v2.8.
*/
MFF_NSH_C3,
/* "nsh_c4" (aka "nshc4").
*
- * c4 (Service Shared Context) field in NSH context header (32 bits)
+ * c4 (Service Shared Context) field in NSH context header.
*
* Type: be32.
* Maskable: bitwise.
@@ -1866,7 +1865,7 @@ enum OVS_PACKED_ENUM mf_field_id {
* Prerequisites: NSH.
* Access: read/write.
* NXM: none.
- * OXM: OXM_NSH_C4(9) since OF1.3 and v2.8.
+ * OXM: NXOXM_NSH_C4(9) since OF1.3 and v2.8.
*/
MFF_NSH_C4,
@@ -1253,34 +1253,15 @@ format_ct_label_masked(struct ds *s, const ovs_u128 *key, const ovs_u128 *mask) static void format_nsh_masked(struct ds *s, const struct flow *f, const struct flow *m) {
- if (m->nsh.flags) {
- format_uint8_masked(s, "nsh_flags", f->nsh.flags, m->nsh.flags);
- }
- if (m->nsh.mdtype) {
- format_uint8_masked(s, "nsh_mdtype", f->nsh.mdtype, m->nsh.mdtype);
- }
- if (m->nsh.np) {
- format_uint8_masked(s, "nsh_np", f->nsh.np, m->nsh.np);
- }
- if (m->nsh.spi) {
- format_be32_masked(s, "nsh_spi", f->nsh.spi, m->nsh.spi);
- }
- if (m->nsh.si) {
- format_uint8_masked(s, "nsh_si", f->nsh.si, m->nsh.si);
- }
-
- if (m->nsh.c1) {
- format_be32_masked_hex(s, "nsh_c1", f->nsh.c1, m->nsh.c1);
- }
- if (m->nsh.c2) {
- format_be32_masked_hex(s, "nsh_c2", f->nsh.c2, m->nsh.c2);
- }
- if (m->nsh.c3) {
- format_be32_masked_hex(s, "nsh_c3", f->nsh.c3, m->nsh.c3);
- }
- if (m->nsh.c4) {
- format_be32_masked_hex(s, "nsh_c4", f->nsh.c4, m->nsh.c4);
- }
+ format_uint8_masked(s, "nsh_flags", f->nsh.flags, m->nsh.flags);
+ format_uint8_masked(s, "nsh_mdtype", f->nsh.mdtype, m->nsh.mdtype);
+ format_uint8_masked(s, "nsh_np", f->nsh.np, m->nsh.np);
+ format_be32_masked(s, "nsh_spi", f->nsh.spi, m->nsh.spi);
+ format_uint8_masked(s, "nsh_si", f->nsh.si, m->nsh.si);
+ format_be32_masked_hex(s, "nsh_c1", f->nsh.c1, m->nsh.c1);
+ format_be32_masked_hex(s, "nsh_c2", f->nsh.c2, m->nsh.c2);
+ format_be32_masked_hex(s, "nsh_c3", f->nsh.c3, m->nsh.c3);
+ format_be32_masked_hex(s, "nsh_c4", f->nsh.c4, m->nsh.c4);
}
/* Appends a string representation of 'match' to 's'. If 'priority' is diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml index b634c517242b..83fe421f0c40 100644
@@ -689,11 +689,7 @@ tcp,tp_src=0x07c0/0xfff0
using the first 32 bits of the body as an <code>experimenter</code> field