DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 04/10] ip_frag: fix stats macro, rename rte_ip_frag_tbl_stat structure
Date: Wed, 18 Jun 2014 15:50:31 +0100	[thread overview]
Message-ID: <304899d1c94f1910583f7dd6932598265e4551dc.1403102825.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1403102825.git.anatoly.burakov@intel.com>
In-Reply-To: <cover.1403102825.git.anatoly.burakov@intel.com>

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

  parent reply	other threads:[~2014-06-18 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 14:50 [dpdk-dev] [PATCH 00/10] rte_ip_frag: various fixes for lib and examples Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 01/10] ip_frag: rename RTE_IP_FRAG_ASSERT to IP_FRAG_ASSERT Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 02/10] ip_frag: fix debug macros Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 03/10] ip_frag: renaming rte_ip_frag_pkt to ip_frag_pkt Anatoly Burakov
2014-06-18 14:50 ` Anatoly Burakov [this message]
2014-06-18 14:50 ` [dpdk-dev] [PATCH 05/10] ip_frag: small fix, replace hardcode with a macro Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 06/10] ip_frag: replace memmove with custom copying Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 07/10] ip_frag: fix order of arguments to key compare function Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 08/10] ip_fragmentation: small fixes Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 09/10] ip_reassembly: " Anatoly Burakov
2014-06-18 14:50 ` [dpdk-dev] [PATCH 10/10] rte_ip_frag: API header file fix Anatoly Burakov
2014-06-26 21:10 ` [dpdk-dev] [PATCH 00/10] rte_ip_frag: various fixes for lib and examples Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=304899d1c94f1910583f7dd6932598265e4551dc.1403102825.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).