From d7892c814a8a9cf5681d34c6470bc9d841f4ad21 Mon Sep 17 00:00:00 2001 From: Yi-Hung Wei Date: Mon, 15 May 2017 10:04:57 -0700 Subject: 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 Signed-off-by: Ben Pfaff --- utilities/ovs-ofctl.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'utilities/ovs-ofctl.c') 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)); -- cgit v1.2.1