nat_6t_flow_to_ed_kv (&kv, &s->i2o, thread_idx, s - tsm->sessions);
nat_6t_l3_l4_csum_calc (&s->i2o);
}
+
+ ASSERT (thread_idx == s->thread_index);
return clib_bihash_add_del_16_8 (&sm->flow_hash, &kv, is_add);
}
nat_6t_flow_to_ed_kv (&kv, &s->o2i, thread_idx, s - tsm->sessions);
nat_6t_l3_l4_csum_calc (&s->o2i);
}
+ ASSERT (thread_idx == s->thread_index);
return clib_bihash_add_del_16_8 (&sm->flow_hash, &kv, is_add);
}
s->ha_last_refreshed = now;
vlib_set_simple_counter (&sm->total_sessions, thread_index, 0,
pool_elts (tsm->sessions));
+#if CLIB_ASSERT_ENABLE
+ s->thread_index = thread_index;
+#endif
return s;
}
}
static_always_inline int
-nat_6t_flow_match (nat_6t_flow_t *f, vlib_buffer_t *b, ip4_address_t saddr,
- u16 sport, ip4_address_t daddr, u16 dport, u8 protocol,
- u32 fib_index)
-{
- return f->match.daddr.as_u32 == daddr.as_u32 &&
- f->match.dport == vnet_buffer (b)->ip.reass.l4_dst_port &&
- f->match.proto == protocol && f->match.fib_index == fib_index &&
- f->match.saddr.as_u32 == saddr.as_u32 &&
- f->match.sport == vnet_buffer (b)->ip.reass.l4_src_port;
+nat_6t_t_eq (nat_6t_t *t1, nat_6t_t *t2)
+{
+ return t1->as_u64[0] == t2->as_u64[0] && t1->as_u64[1] == t2->as_u64[1];
}
static inline uword