From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A1A32B109 for ; Wed, 18 Jun 2014 16:50:24 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 18 Jun 2014 07:45:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,501,1400050800"; d="scan'208";a="530478160" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 18 Jun 2014 07:50:39 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s5IEocIL009259 for ; Wed, 18 Jun 2014 15:50:38 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id s5IEoc47025957 for ; Wed, 18 Jun 2014 15:50:38 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with id s5IEocFm025953 for dev@dpdk.org; Wed, 18 Jun 2014 15:50:38 +0100 From: Anatoly Burakov To: dev@dpdk.org Date: Wed, 18 Jun 2014 15:50:31 +0100 Message-Id: <304899d1c94f1910583f7dd6932598265e4551dc.1403102825.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 04/10] ip_frag: fix stats macro, rename rte_ip_frag_tbl_stat structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2014 14:50:25 -0000 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 --- 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