diff options
author | Ben Pfaff <blp@nicira.com> | 2014-09-12 14:42:47 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-09-29 15:07:43 -0700 |
commit | 447b65822d4dad7d0645b9525aeba63bc1373c1d (patch) | |
tree | 5628fa80110cafd742f8417357367f9935a9bca6 /lib/nx-match.c | |
parent | 21119b3e65ed26f2a65000b5d2488289024945bb (diff) | |
download | openvswitch-447b65822d4dad7d0645b9525aeba63bc1373c1d.tar.gz |
nx-match: Encode dp_hash and recirc_id in OXM also.
dp_hash and recirc_id are specific to OVS, but that doesn't mean that we
shouldn't encode them into flow matches when OXM is used in OpenFlow 1.2
and later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Diffstat (limited to 'lib/nx-match.c')
-rw-r--r-- | lib/nx-match.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c index b8964501f..65376019f 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -621,17 +621,13 @@ nx_put_raw(struct ofpbuf *b, enum ofp_version oxm, const struct match *match, /* Metadata. */ if (match->wc.masks.dp_hash) { - if (!oxm) { - nxm_put_32m(b, mf_oxm_header(MFF_DP_HASH, oxm), - htonl(flow->dp_hash), htonl(match->wc.masks.dp_hash)); - } + nxm_put_32m(b, mf_oxm_header(MFF_DP_HASH, oxm), + htonl(flow->dp_hash), htonl(match->wc.masks.dp_hash)); } if (match->wc.masks.recirc_id) { - if (!oxm) { - nxm_put_32(b, mf_oxm_header(MFF_RECIRC_ID, oxm), - htonl(flow->recirc_id)); - } + nxm_put_32(b, mf_oxm_header(MFF_RECIRC_ID, oxm), + htonl(flow->recirc_id)); } if (match->wc.masks.in_port.ofp_port) { |