ip_frag: add config option to enable statistics

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Anatoly Burakov 2014-06-18 15:50:31 +01:00 committed by Thomas Monjalon
parent 4dc5d0ad3b
commit 240952a9e5
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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