Open Nesyan opened 5 years ago
For counters you can use ODP atomics instead of locks.
E.g.
odp_atomic_u64_t pkt_count;
uint64_t cur_pkt_count;
odp_atomic_init_u64(&pkt_count, 0);
odp_atomic_inc_u64(&pkt_count);
cur_pkt_count = odp_atomic_load_u64(&pkt_count);
Hi, I want to define a variable for counting received packets in ofp_tcp_syncache.c file. how can I do that? Do I need to use a lock? how?
thanks in advance