X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fflow.h;h=ee460e386589e4fc44ac333992aa3f466a052402;hb=5397a37788602c329b98de45a1dfdf899c7ea3b9;hp=fd3246b6a4d453b52427d7aa0b348a1318477d49;hpb=8e39921d51591d3eb59a6789104e53e170dd99cc;p=openvswitch diff --git a/lib/flow.h b/lib/flow.h index fd3246b6..ee460e38 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -32,12 +32,12 @@ 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 { + ovs_be64 tun_id; /* Encapsulating tunnel ID. */ uint32_t regs[FLOW_N_REGS]; /* Registers. */ - ovs_be32 tun_id; /* Encapsulating tunnel ID. */ ovs_be32 nw_src; /* IP source address. */ ovs_be32 nw_dst; /* IP destination address. */ uint16_t in_port; /* Input switch port. */ @@ -53,13 +53,13 @@ struct flow { /* 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 (36 + FLOW_N_REGS * 4) +#define FLOW_SIG_SIZE (40 + FLOW_N_REGS * 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); -int flow_extract(struct ofpbuf *, ovs_be32 tun_id, uint16_t in_port, +int flow_extract(struct ofpbuf *, uint64_t tun_id, uint16_t in_port, struct flow *); void flow_extract_stats(const struct flow *flow, struct ofpbuf *packet, struct odp_flow_stats *stats); @@ -124,6 +124,7 @@ struct flow_wildcards { ovs_be32 nw_src_mask; /* 1-bit in each significant nw_src bit. */ ovs_be32 nw_dst_mask; /* 1-bit in each significant nw_dst bit. */ ovs_be16 vlan_tci_mask; /* 1-bit in each significant vlan_tci bit. */ + uint16_t zero; /* Padding field set to zero. */ }; void flow_wildcards_init_catchall(struct flow_wildcards *);