mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
Increase number of registers to 16.
With eight 32-bit registers, we can only store two IPv6 addresses, which is pretty tight. Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
16
lib/flow.c
16
lib/flow.c
@@ -124,7 +124,7 @@ struct mf_ctx {
|
||||
* away. Some GCC versions gave warnings on ALWAYS_INLINE, so these are
|
||||
* defined as macros. */
|
||||
|
||||
#if (FLOW_WC_SEQ != 35)
|
||||
#if (FLOW_WC_SEQ != 36)
|
||||
#define MINIFLOW_ASSERT(X) ovs_assert(X)
|
||||
BUILD_MESSAGE("FLOW_WC_SEQ changed: miniflow_extract() will have runtime "
|
||||
"assertions enabled. Consider updating FLOW_WC_SEQ after "
|
||||
@@ -842,7 +842,7 @@ flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
|
||||
{
|
||||
int i;
|
||||
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
|
||||
match_init_catchall(flow_metadata);
|
||||
if (flow->tunnel.tun_id != htonll(0)) {
|
||||
@@ -1248,7 +1248,7 @@ void flow_wildcards_init_for_packet(struct flow_wildcards *wc,
|
||||
memset(&wc->masks, 0x0, sizeof wc->masks);
|
||||
|
||||
/* Update this function whenever struct flow changes. */
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
|
||||
if (flow_tnl_dst_is_set(&flow->tunnel)) {
|
||||
if (flow->tunnel.flags & FLOW_TNL_F_KEY) {
|
||||
@@ -1365,7 +1365,7 @@ void
|
||||
flow_wc_map(const struct flow *flow, struct flowmap *map)
|
||||
{
|
||||
/* Update this function whenever struct flow changes. */
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
|
||||
flowmap_init(map);
|
||||
|
||||
@@ -1449,7 +1449,7 @@ void
|
||||
flow_wildcards_clear_non_packet_fields(struct flow_wildcards *wc)
|
||||
{
|
||||
/* Update this function whenever struct flow changes. */
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
|
||||
memset(&wc->masks.metadata, 0, sizeof wc->masks.metadata);
|
||||
memset(&wc->masks.regs, 0, sizeof wc->masks.regs);
|
||||
@@ -1584,7 +1584,7 @@ flow_wildcards_set_xreg_mask(struct flow_wildcards *wc, int idx, uint64_t mask)
|
||||
uint32_t
|
||||
miniflow_hash_5tuple(const struct miniflow *flow, uint32_t basis)
|
||||
{
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
uint32_t hash = basis;
|
||||
|
||||
if (flow) {
|
||||
@@ -1631,7 +1631,7 @@ ASSERT_SEQUENTIAL(ipv6_src, ipv6_dst);
|
||||
uint32_t
|
||||
flow_hash_5tuple(const struct flow *flow, uint32_t basis)
|
||||
{
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 36);
|
||||
uint32_t hash = basis;
|
||||
|
||||
if (flow) {
|
||||
@@ -2098,7 +2098,7 @@ flow_push_mpls(struct flow *flow, int n, ovs_be16 mpls_eth_type,
|
||||
flow->mpls_lse[0] = set_mpls_lse_values(ttl, tc, 1, htonl(label));
|
||||
|
||||
/* Clear all L3 and L4 fields and dp_hash. */
|
||||
BUILD_ASSERT(FLOW_WC_SEQ == 35);
|
||||
BUILD_ASSERT(FLOW_WC_SEQ == 36);
|
||||
memset((char *) flow + FLOW_SEGMENT_2_ENDS_AT, 0,
|
||||
sizeof(struct flow) - FLOW_SEGMENT_2_ENDS_AT);
|
||||
flow->dp_hash = 0;
|
||||
|
Reference in New Issue
Block a user