diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2017-05-15 10:04:57 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-05-31 14:54:10 -0700 |
commit | d7892c814a8a9cf5681d34c6470bc9d841f4ad21 (patch) | |
tree | 3f0a70672a3781b56f3b6f8ae7e41178d4721c94 /utilities/ovs-ofctl.c | |
parent | 577bfa9f687936d53970d0ff41928c3a727720e8 (diff) | |
download | openvswitch-d7892c814a8a9cf5681d34c6470bc9d841f4ad21.tar.gz |
ofproto: Add pipeline fields support for OF 1.5 packet-out
This patch decodes pipeline fields from a packet-out message, and populates
the pipeline fields into datapath. Error OFPERR_OFPBRC_PIPELINE_FIELDS_ONLY
is returned if the match field of a packet-out messages contains any
non pipeline fields. Currently, the supported pipeline fields
are as following.
* metadata fields:
- in_port, in_port_oxm
* tunnel fields:
- tun_id, tun_src, tun_dst, tun_ipv6_src, tun_ipv6_dst
- tun_gbp_id, tun_gpb_flags, tun_flags
- tun_metadata0 - tun_metadata63
* register fields:
- metadata
- reg0 - reg-15, xreg0 - xreg7, xxreg0 - xxreg3
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities/ovs-ofctl.c')
-rw-r--r-- | utilities/ovs-ofctl.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 17ee64649..22ac8d126 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -3744,17 +3744,18 @@ ofctl_parse_nxm__(bool oxm, enum ofp_version version) /* Convert nx_match to match. */ if (strict) { if (oxm) { - error = oxm_pull_match(&nx_match, NULL, NULL, &match); + error = oxm_pull_match(&nx_match, false, NULL, NULL, &match); } else { - error = nx_pull_match(&nx_match, match_len, &match, - &cookie, &cookie_mask, NULL, NULL); + error = nx_pull_match(&nx_match, match_len, &match, &cookie, + &cookie_mask, false, NULL, NULL); } } else { if (oxm) { - error = oxm_pull_match_loose(&nx_match, NULL, &match); + error = oxm_pull_match_loose(&nx_match, false, NULL, &match); } else { error = nx_pull_match_loose(&nx_match, match_len, &match, - &cookie, &cookie_mask, NULL); + &cookie, &cookie_mask, false, + NULL); } } @@ -4164,8 +4165,8 @@ ofctl_check_vlan(struct ovs_cmdl_context *ctx) ofpbuf_init(&nxm, 0); nxm_match_len = nx_put_match(&nxm, &match, htonll(0), htonll(0)); nxm_s = nx_match_to_string(nxm.data, nxm_match_len); - error = nx_pull_match(&nxm, nxm_match_len, &nxm_match, NULL, NULL, NULL, - NULL); + error = nx_pull_match(&nxm, nxm_match_len, &nxm_match, NULL, NULL, false, + NULL, NULL); printf("NXM: %s -> ", nxm_s); if (error) { printf("%s\n", ofperr_to_string(error)); @@ -4181,7 +4182,7 @@ ofctl_check_vlan(struct ovs_cmdl_context *ctx) ofpbuf_init(&nxm, 0); nxm_match_len = oxm_put_match(&nxm, &match, OFP12_VERSION); nxm_s = oxm_match_to_string(&nxm, nxm_match_len); - error = oxm_pull_match(&nxm, NULL, NULL, &nxm_match); + error = oxm_pull_match(&nxm, false, NULL, NULL, &nxm_match); printf("OXM: %s -> ", nxm_s); if (error) { printf("%s\n", ofperr_to_string(error)); |