From: Isaku Yamahata <yamah...@valinux.co.jp> Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> Signed-off-by: Simon Horman <ho...@verge.net.au>
--- v4 * Initial post * Manually rebased [Simon Horman] --- lib/meta-flow.c | 76 +++++++++++++++++++++++++++---------------------------- lib/meta-flow.h | 1 + 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index e4b51c0..a6de1b6 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -52,7 +52,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_HEXADECIMAL, MFP_NONE, - true, + true, false, NXM_NX_TUN_ID, "NXM_NX_TUN_ID", NXM_NX_TUN_ID, "NXM_NX_TUN_ID", }, { @@ -61,7 +61,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_HEXADECIMAL, MFP_NONE, - true, + true, false, OXM_OF_METADATA, "OXM_OF_METADATA", OXM_OF_METADATA, "OXM_OF_METADATA", }, { @@ -70,7 +70,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_OFP_PORT, MFP_NONE, - false, + false, false, NXM_OF_IN_PORT, "NXM_OF_IN_PORT", OXM_OF_IN_PORT, "OXM_OF_IN_PORT", }, @@ -82,7 +82,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, \ MFS_HEXADECIMAL, \ MFP_NONE, \ - true, \ + true, false, \ NXM_NX_REG(IDX), "NXM_NX_REG" #IDX, \ NXM_NX_REG(IDX), "NXM_NX_REG" #IDX, \ } @@ -124,7 +124,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_NONE, - true, + true, true, NXM_OF_ETH_SRC, "NXM_OF_ETH_SRC", OXM_OF_ETH_SRC, "OXM_OF_ETH_SRC", }, { @@ -133,7 +133,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_NONE, - true, + true, true, NXM_OF_ETH_DST, "NXM_OF_ETH_DST", OXM_OF_ETH_DST, "OXM_OF_ETH_DST", }, { @@ -142,7 +142,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_HEXADECIMAL, MFP_NONE, - false, + false, true, NXM_OF_ETH_TYPE, "NXM_OF_ETH_TYPE", OXM_OF_ETH_TYPE, "OXM_OF_ETH_TYPE", }, @@ -153,7 +153,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_HEXADECIMAL, MFP_NONE, - true, + true, false, NXM_OF_VLAN_TCI, "NXM_OF_VLAN_TCI", NXM_OF_VLAN_TCI, "NXM_OF_VLAN_TCI", }, { @@ -162,7 +162,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_NONE, - true, + true, true, 0, NULL, 0, NULL, }, { @@ -171,7 +171,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_DECIMAL, MFP_NONE, - true, + true, true, OXM_OF_VLAN_VID, "OXM_OF_VLAN_VID", OXM_OF_VLAN_VID, "OXM_OF_VLAN_VID", }, { @@ -180,7 +180,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_NONE, - true, + true, true, 0, NULL, 0, NULL, }, { @@ -189,7 +189,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_VLAN_VID, - true, + true, true, OXM_OF_VLAN_PCP, "OXM_OF_VLAN_PCP", OXM_OF_VLAN_PCP, "OXM_OF_VLAN_PCP", }, @@ -204,7 +204,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV4, MFP_IPV4, - true, + true, true, NXM_OF_IP_SRC, "NXM_OF_IP_SRC", OXM_OF_IPV4_SRC, "OXM_OF_IPV4_SRC", }, { @@ -213,7 +213,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV4, MFP_IPV4, - true, + true, true, NXM_OF_IP_DST, "NXM_OF_IP_DST", OXM_OF_IPV4_DST, "OXM_OF_IPV4_DST", }, @@ -224,7 +224,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV6, MFP_IPV6, - true, + true, true, NXM_NX_IPV6_SRC, "NXM_NX_IPV6_SRC", OXM_OF_IPV6_SRC, "OXM_OF_IPV6_SRC", }, { @@ -233,7 +233,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV6, MFP_IPV6, - true, + true, true, NXM_NX_IPV6_DST, "NXM_NX_IPV6_DST", OXM_OF_IPV6_DST, "OXM_OF_IPV6_DST", }, @@ -243,7 +243,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_HEXADECIMAL, MFP_IPV6, - false, + false, true, NXM_NX_IPV6_LABEL, "NXM_NX_IPV6_LABEL", OXM_OF_IPV6_FLABEL, "OXM_OF_IPV6_FLABEL", }, @@ -254,7 +254,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_IP_ANY, - false, + false, true, NXM_OF_IP_PROTO, "NXM_OF_IP_PROTO", OXM_OF_IP_PROTO, "OXM_OF_IP_PROTO", }, { @@ -263,7 +263,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_IP_ANY, - true, + true, true, NXM_OF_IP_TOS, "NXM_OF_IP_TOS", OXM_OF_IP_DSCP, "OXM_OF_IP_DSCP", }, { @@ -272,7 +272,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_IP_ANY, - true, + true, true, NXM_NX_IP_ECN, "NXM_NX_IP_ECN", OXM_OF_IP_ECN, "OXM_OF_IP_ECN", }, { @@ -281,7 +281,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_IP_ANY, - true, + true, false, NXM_NX_IP_TTL, "NXM_NX_IP_TTL", NXM_NX_IP_TTL, "NXM_NX_IP_TTL", }, { @@ -290,7 +290,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_FRAG, MFP_IP_ANY, - false, + false, false, NXM_NX_IP_FRAG, "NXM_NX_IP_FRAG", NXM_NX_IP_FRAG, "NXM_NX_IP_FRAG", }, @@ -301,7 +301,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_ARP, - false, + false, true, NXM_OF_ARP_OP, "NXM_OF_ARP_OP", OXM_OF_ARP_OP, "OXM_OF_ARP_OP", }, { @@ -310,7 +310,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV4, MFP_ARP, - false, + false, true, NXM_OF_ARP_SPA, "NXM_OF_ARP_SPA", OXM_OF_ARP_SPA, "OXM_OF_ARP_SPA", }, { @@ -319,7 +319,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV4, MFP_ARP, - false, + false, true, NXM_OF_ARP_TPA, "NXM_OF_ARP_TPA", OXM_OF_ARP_TPA, "OXM_OF_ARP_TPA", }, { @@ -328,7 +328,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_ARP, - false, + false, true, NXM_NX_ARP_SHA, "NXM_NX_ARP_SHA", OXM_OF_ARP_SHA, "OXM_OF_ARP_SHA", }, { @@ -337,7 +337,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_ARP, - false, + false, true, NXM_NX_ARP_THA, "NXM_NX_ARP_THA", OXM_OF_ARP_THA, "OXM_OF_ARP_THA", }, @@ -352,7 +352,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_DECIMAL, MFP_TCP, - true, + true, true, NXM_OF_TCP_SRC, "NXM_OF_TCP_SRC", OXM_OF_TCP_SRC, "OXM_OF_TCP_SRC", }, { @@ -361,7 +361,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_DECIMAL, MFP_TCP, - true, + true, true, NXM_OF_TCP_DST, "NXM_OF_TCP_DST", OXM_OF_TCP_DST, "OXM_OF_TCP_DST", }, @@ -372,7 +372,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_DECIMAL, MFP_UDP, - true, + true, true, NXM_OF_UDP_SRC, "NXM_OF_UDP_SRC", OXM_OF_UDP_SRC, "OXM_OF_UDP_SRC", }, { @@ -381,7 +381,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_DECIMAL, MFP_UDP, - true, + true, true, NXM_OF_UDP_DST, "NXM_OF_UDP_DST", OXM_OF_UDP_DST, "OXM_OF_UDP_DST", }, @@ -392,7 +392,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_ICMPV4, - false, + false, true, NXM_OF_ICMP_TYPE, "NXM_OF_ICMP_TYPE", OXM_OF_ICMPV4_TYPE, "OXM_OF_ICMPV4_TYPE", }, { @@ -401,7 +401,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_ICMPV4, - false, + false, true, NXM_OF_ICMP_CODE, "NXM_OF_ICMP_CODE", OXM_OF_ICMPV4_CODE, "OXM_OF_ICMPV4_CODE", }, @@ -412,7 +412,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_ICMPV6, - false, + false, true, NXM_NX_ICMPV6_TYPE, "NXM_NX_ICMPV6_TYPE", OXM_OF_ICMPV6_TYPE, "OXM_OF_ICMPV6_TYPE", }, { @@ -421,7 +421,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_NONE, MFS_DECIMAL, MFP_ICMPV6, - false, + false, true, NXM_NX_ICMPV6_CODE, "NXM_NX_ICMPV6_CODE", OXM_OF_ICMPV6_CODE, "OXM_OF_ICMPV6_CODE", }, @@ -436,7 +436,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_IPV6, MFP_ND, - false, + false, true, NXM_NX_ND_TARGET, "NXM_NX_ND_TARGET", OXM_OF_IPV6_ND_TARGET, "OXM_OF_IPV6_ND_TARGET", }, { @@ -445,7 +445,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_ND_SOLICIT, - false, + false, true, NXM_NX_ND_SLL, "NXM_NX_ND_SLL", OXM_OF_IPV6_ND_SLL, "OXM_OF_IPV6_ND_SLL", }, { @@ -454,7 +454,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = { MFM_FULLY, MFS_ETHERNET, MFP_ND_ADVERT, - false, + false, true, NXM_NX_ND_TLL, "NXM_NX_ND_TLL", OXM_OF_IPV6_ND_TLL, "OXM_OF_IPV6_ND_TLL", } diff --git a/lib/meta-flow.h b/lib/meta-flow.h index 11a9db9..c9f7f16 100644 --- a/lib/meta-flow.h +++ b/lib/meta-flow.h @@ -221,6 +221,7 @@ struct mf_field { enum mf_string string; enum mf_prereqs prereqs; bool writable; /* May be written by actions? */ + bool oxm_writable; /* writable by OXM set-field action */ /* NXM and OXM properties. * -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev