From e468fe85d5a83fe1c5985100ec330708a318ba9f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Dec 2010 16:00:02 -0800 Subject: [PATCH] flow: Increase number of registers to 4. Requested-by: Teemu Koponen --- lib/flow.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/flow.h b/lib/flow.h index 03ad32c5..ee460e38 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -32,7 +32,7 @@ struct flow_wildcards; struct ofp_match; struct ofpbuf; -#define FLOW_N_REGS 3 +#define FLOW_N_REGS 4 BUILD_ASSERT_DECL(FLOW_N_REGS <= NXM_NX_MAX_REGS); struct flow { @@ -49,13 +49,12 @@ struct flow { uint8_t dl_dst[6]; /* Ethernet destination address. */ uint8_t nw_proto; /* IP protocol or low 8 bits of ARP opcode. */ uint8_t nw_tos; /* IP ToS (DSCP field, 6 bits). */ - uint32_t reserved; /* Reserved for 64-bit packing. */ }; /* Assert that there are FLOW_SIG_SIZE bytes of significant data in "struct * flow", followed by FLOW_PAD_SIZE bytes of padding. */ #define FLOW_SIG_SIZE (40 + FLOW_N_REGS * 4) -#define FLOW_PAD_SIZE 4 +#define FLOW_PAD_SIZE 0 BUILD_ASSERT_DECL(offsetof(struct flow, nw_tos) == FLOW_SIG_SIZE - 1); BUILD_ASSERT_DECL(sizeof(((struct flow *)0)->nw_tos) == 1); BUILD_ASSERT_DECL(sizeof(struct flow) == FLOW_SIG_SIZE + FLOW_PAD_SIZE); -- 2.30.2