This also makes ip_reassembly sample application statistics to obey the CONFIG_RTE_LIBRTE_IP_FRAG_FRAG_TBL_STATS config option
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com> --- config/common_bsdapp | 1 + config/common_linuxapp | 1 + examples/ip_reassembly/main.c | 4 ++-- lib/librte_ip_frag/rte_ip_frag.h | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/common_bsdapp b/config/common_bsdapp index 989e1da..d5db4ab 100644 --- a/config/common_bsdapp +++ b/config/common_bsdapp @@ -294,6 +294,7 @@ CONFIG_RTE_LIBRTE_NET=y CONFIG_RTE_LIBRTE_IP_FRAG=y CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n # # Compile librte_meter diff --git a/config/common_linuxapp b/config/common_linuxapp index 5b896c3..5ee10c3 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -337,6 +337,7 @@ CONFIG_RTE_LIBRTE_NET=y CONFIG_RTE_LIBRTE_IP_FRAG=y CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n # # Compile librte_meter diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 625d21f..7311b29 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -310,11 +310,11 @@ struct rte_lpm6_config lpm6_config = { static struct rte_lpm *socket_lpm[RTE_MAX_NUMA_NODES]; static struct rte_lpm6 *socket_lpm6[RTE_MAX_NUMA_NODES]; -#ifdef IPV6_FRAG_TBL_STAT +#ifdef RTE_LIBRTE_IP_FRAG_TBL_STAT #define TX_LCORE_STAT_UPDATE(s, f, v) ((s)->f += (v)) #else #define TX_LCORE_STAT_UPDATE(s, f, v) do {} while (0) -#endif /* IPV6_FRAG_TBL_STAT */ +#endif /* RTE_LIBRTE_IP_FRAG_TBL_STAT */ /* * If number of queued packets reached given threahold, then diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h index 582a52b..84952a1 100644 --- a/lib/librte_ip_frag/rte_ip_frag.h +++ b/lib/librte_ip_frag/rte_ip_frag.h @@ -97,7 +97,7 @@ struct rte_ip_frag_death_row { TAILQ_HEAD(ip_pkt_list, ip_frag_pkt); /**< @internal fragments tailq */ /** fragmentation table statistics */ -struct rte_ip_frag_tbl_stat { +struct ip_frag_tbl_stat { uint64_t find_num; /**< total # of find/insert attempts. */ uint64_t add_num; /**< # of add ops. */ uint64_t del_num; /**< # of del ops. */ @@ -117,7 +117,7 @@ struct rte_ip_frag_tbl { uint32_t nb_buckets; /**< num of associativity lines. */ struct ip_frag_pkt *last; /**< last used entry. */ struct ip_pkt_list lru; /**< LRU list for table entries. */ - struct rte_ip_frag_tbl_stat stat; /**< statistics counters. */ + struct ip_frag_tbl_stat stat; /**< statistics counters. */ struct ip_frag_pkt pkt[0]; /**< hash table. */ }; -- 1.8.1.4