Signed-off-by: Andy Zhou <[email protected]>
---
lib/flow.c | 2 +-
lib/flow.h | 12 +++++++++---
lib/match.c | 4 +++-
lib/nx-match.c | 2 +-
lib/ofp-util.c | 2 +-
ofproto/ofproto-dpif-xlate.c | 2 +-
6 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/lib/flow.c b/lib/flow.c
index b1b9f98..0167ec4 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -535,7 +535,7 @@ flow_unwildcard_tp_ports(const struct flow *flow, struct
flow_wildcards *wc)
void
flow_get_metadata(const struct flow *flow, struct flow_metadata *fmd)
{
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
fmd->tun_id = flow->tunnel.tun_id;
fmd->tun_src = flow->tunnel.ip_src;
diff --git a/lib/flow.h b/lib/flow.h
index 9e8549d..a1f892a 100644
--- a/lib/flow.h
+++ b/lib/flow.h
@@ -36,7 +36,7 @@ struct ofpbuf;
/* This sequence number should be incremented whenever anything involving flows
* or the wildcarding of flows changes. This will cause build assertion
* failures in places which likely need to be updated. */
-#define FLOW_WC_SEQ 23
+#define FLOW_WC_SEQ 24
#define FLOW_N_REGS 8
BUILD_ASSERT_DECL(FLOW_N_REGS <= NXM_NX_MAX_REGS);
@@ -93,6 +93,11 @@ union flow_in_port {
* be looked at. This enables better wildcarding for datapath flows.
*/
struct flow {
+ /* Recirculation */
+ uint32_t dp_hash; /* Datapth computed hash value. The exact
+ computation is opaque to the user space.*/
+ uint32_t recirc_id; /* Must be exact match. */
+
/* L1 */
struct flow_tnl tunnel; /* Encapsulating tunnel parameters. */
ovs_be64 metadata; /* OpenFlow Metadata. */
@@ -123,6 +128,7 @@ struct flow {
uint8_t arp_tha[6]; /* ARP/ND target hardware address. */
ovs_be16 tcp_flags; /* TCP flags. With L3 to avoid matching L4. */
ovs_be16 pad; /* Padding. */
+
/* L4 */
ovs_be16 tp_src; /* TCP/UDP/SCTP source port. */
ovs_be16 tp_dst; /* TCP/UDP/SCTP destination port.
@@ -134,8 +140,8 @@ BUILD_ASSERT_DECL(sizeof(struct flow) % 4 == 0);
/* Remember to update FLOW_WC_SEQ when changing 'struct flow'. */
BUILD_ASSERT_DECL(offsetof(struct flow, tp_dst) + 2
- == sizeof(struct flow_tnl) + 156
- && FLOW_WC_SEQ == 23);
+ == sizeof(struct flow_tnl) + 164
+ && FLOW_WC_SEQ == 24);
/* Incremental points at which flow classification may be performed in
* segments.
diff --git a/lib/match.c b/lib/match.c
index cc18a6a..35c893e 100644
--- a/lib/match.c
+++ b/lib/match.c
@@ -856,12 +856,14 @@ match_format(const struct match *match, struct ds *s,
unsigned int priority)
int i;
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
if (priority != OFP_DEFAULT_PRIORITY) {
ds_put_format(s, "priority=%u,", priority);
}
+ format_uint32_masked(s, "dp_hash", f->dp_hash, wc->masks.dp_hash);
+ format_uint32_masked(s, "recirc_id", f->pkt_mark, wc->masks.recirc_id);
format_uint32_masked(s, "pkt_mark", f->pkt_mark, wc->masks.pkt_mark);
if (wc->masks.skb_priority) {
diff --git a/lib/nx-match.c b/lib/nx-match.c
index 983fd7d..18cb799 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -572,7 +572,7 @@ nx_put_raw(struct ofpbuf *b, bool oxm, const struct match
*match,
int match_len;
int i;
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
/* Metadata. */
if (match->wc.masks.in_port.ofp_port) {
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index c7cc701..bc4b63c 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -84,7 +84,7 @@ ofputil_netmask_to_wcbits(ovs_be32 netmask)
void
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
{
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
/* Initialize most of wc. */
flow_wildcards_init_catchall(wc);
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index c5e6600..5b74dbb 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -1694,7 +1694,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t
ofp_port,
/* If 'struct flow' gets additional metadata, we'll need to zero it out
* before traversing a patch port. */
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
if (!xport) {
xlate_report(ctx, "Nonexistent output port");
--
1.7.9.5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev