DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 03/10] ip_frag: renaming rte_ip_frag_pkt to ip_frag_pkt
Date: Wed, 18 Jun 2014 15:50:30 +0100	[thread overview]
Message-ID: <41fd1552bf50f3c6b50f1e91fe639bf2f910058e.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>


Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_ip_frag/ip_frag_common.h      | 18 +++++++++---------
 lib/librte_ip_frag/ip_frag_internal.c    | 20 ++++++++++----------
 lib/librte_ip_frag/rte_ip_frag.h         | 12 ++++++------
 lib/librte_ip_frag/rte_ipv4_reassembly.c |  4 ++--
 lib/librte_ip_frag/rte_ipv6_reassembly.c |  4 ++--
 5 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
index 5ad0a0b..9df8074 100644
--- a/lib/librte_ip_frag/ip_frag_common.h
+++ b/lib/librte_ip_frag/ip_frag_common.h
@@ -63,21 +63,21 @@ if (!(exp))	{							\
 	"%08" PRIx64 "%08" PRIx64 "%08" PRIx64 "%08" PRIx64
 
 /* internal functions declarations */
-struct rte_mbuf * ip_frag_process(struct rte_ip_frag_pkt *fp,
+struct rte_mbuf * ip_frag_process(struct ip_frag_pkt *fp,
 		struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb,
 		uint16_t ofs, uint16_t len, uint16_t more_frags);
 
-struct rte_ip_frag_pkt * ip_frag_find(struct rte_ip_frag_tbl *tbl,
+struct ip_frag_pkt * ip_frag_find(struct rte_ip_frag_tbl *tbl,
 		struct rte_ip_frag_death_row *dr,
 		const struct ip_frag_key *key, uint64_t tms);
 
-struct rte_ip_frag_pkt * ip_frag_lookup(struct rte_ip_frag_tbl *tbl,
+struct ip_frag_pkt * ip_frag_lookup(struct rte_ip_frag_tbl *tbl,
 	const struct ip_frag_key *key, uint64_t tms,
-	struct rte_ip_frag_pkt **free, struct rte_ip_frag_pkt **stale);
+	struct ip_frag_pkt **free, struct ip_frag_pkt **stale);
 
 /* these functions need to be declared here as ip_frag_process relies on them */
-struct rte_mbuf * ipv4_frag_reassemble(const struct rte_ip_frag_pkt *fp);
-struct rte_mbuf * ipv6_frag_reassemble(const struct rte_ip_frag_pkt *fp);
+struct rte_mbuf * ipv4_frag_reassemble(const struct ip_frag_pkt *fp);
+struct rte_mbuf * ipv6_frag_reassemble(const struct ip_frag_pkt *fp);
 
 
 
@@ -122,7 +122,7 @@ ip_frag_key_cmp(const struct ip_frag_key * k1, const struct ip_frag_key * k2)
 
 /* put fragment on death row */
 static inline void
-ip_frag_free(struct rte_ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr)
+ip_frag_free(struct ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr)
 {
 	uint32_t i, k;
 
@@ -140,7 +140,7 @@ ip_frag_free(struct rte_ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr)
 
 /* if key is empty, mark key as in use */
 static inline void
-ip_frag_inuse(struct rte_ip_frag_tbl *tbl, const struct  rte_ip_frag_pkt *fp)
+ip_frag_inuse(struct rte_ip_frag_tbl *tbl, const struct  ip_frag_pkt *fp)
 {
 	if (ip_frag_key_is_empty(&fp->key)) {
 		TAILQ_REMOVE(&tbl->lru, fp, lru);
@@ -150,7 +150,7 @@ ip_frag_inuse(struct rte_ip_frag_tbl *tbl, const struct  rte_ip_frag_pkt *fp)
 
 /* reset the fragment */
 static inline void
-ip_frag_reset(struct rte_ip_frag_pkt *fp, uint64_t tms)
+ip_frag_reset(struct ip_frag_pkt *fp, uint64_t tms)
 {
 	static const struct ip_frag zero_frag = {
 		.ofs = 0,
diff --git a/lib/librte_ip_frag/ip_frag_internal.c b/lib/librte_ip_frag/ip_frag_internal.c
index cfcab1b..219221f 100644
--- a/lib/librte_ip_frag/ip_frag_internal.c
+++ b/lib/librte_ip_frag/ip_frag_internal.c
@@ -54,7 +54,7 @@
 /* local frag table helper functions */
 static inline void
 ip_frag_tbl_del(struct rte_ip_frag_tbl *tbl, struct rte_ip_frag_death_row *dr,
-	struct rte_ip_frag_pkt *fp)
+	struct ip_frag_pkt *fp)
 {
 	ip_frag_free(fp, dr);
 	ip_frag_key_invalidate(&fp->key);
@@ -64,7 +64,7 @@ ip_frag_tbl_del(struct rte_ip_frag_tbl *tbl, struct rte_ip_frag_death_row *dr,
 }
 
 static inline void
-ip_frag_tbl_add(struct rte_ip_frag_tbl *tbl,  struct rte_ip_frag_pkt *fp,
+ip_frag_tbl_add(struct rte_ip_frag_tbl *tbl,  struct ip_frag_pkt *fp,
 	const struct ip_frag_key *key, uint64_t tms)
 {
 	fp->key = key[0];
@@ -76,7 +76,7 @@ ip_frag_tbl_add(struct rte_ip_frag_tbl *tbl,  struct rte_ip_frag_pkt *fp,
 
 static inline void
 ip_frag_tbl_reuse(struct rte_ip_frag_tbl *tbl, struct rte_ip_frag_death_row *dr,
-	struct rte_ip_frag_pkt *fp, uint64_t tms)
+	struct ip_frag_pkt *fp, uint64_t tms)
 {
 	ip_frag_free(fp, dr);
 	ip_frag_reset(fp, tms);
@@ -137,7 +137,7 @@ ipv6_frag_hash(const struct ip_frag_key *key, uint32_t *v1, uint32_t *v2)
 }
 
 struct rte_mbuf *
-ip_frag_process(struct rte_ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr,
+ip_frag_process(struct ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr,
 	struct rte_mbuf *mb, uint16_t ofs, uint16_t len, uint16_t more_frags)
 {
 	uint32_t idx;
@@ -268,11 +268,11 @@ ip_frag_process(struct rte_ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr,
  * If such entry is not present, then allocate a new one.
  * If the entry is stale, then free and reuse it.
  */
-struct rte_ip_frag_pkt *
+struct ip_frag_pkt *
 ip_frag_find(struct rte_ip_frag_tbl *tbl, struct rte_ip_frag_death_row *dr,
 	const struct ip_frag_key *key, uint64_t tms)
 {
-	struct rte_ip_frag_pkt *pkt, *free, *stale, *lru;
+	struct ip_frag_pkt *pkt, *free, *stale, *lru;
 	uint64_t max_cycles;
 
 	/*
@@ -330,13 +330,13 @@ ip_frag_find(struct rte_ip_frag_tbl *tbl, struct rte_ip_frag_death_row *dr,
 	return (pkt);
 }
 
-struct rte_ip_frag_pkt *
+struct ip_frag_pkt *
 ip_frag_lookup(struct rte_ip_frag_tbl *tbl,
 	const struct ip_frag_key *key, uint64_t tms,
-	struct rte_ip_frag_pkt **free, struct rte_ip_frag_pkt **stale)
+	struct ip_frag_pkt **free, struct ip_frag_pkt **stale)
 {
-	struct rte_ip_frag_pkt *p1, *p2;
-	struct rte_ip_frag_pkt *empty, *old;
+	struct ip_frag_pkt *p1, *p2;
+	struct ip_frag_pkt *empty, *old;
 	uint64_t max_cycles;
 	uint32_t i, assoc, sig1, sig2;
 
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index f1e7036..582a52b 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -75,8 +75,8 @@ struct ip_frag_key {
  * @internal Fragmented packet to reassemble.
  * First two entries in the frags[] array are for the last and first fragments.
  */
-struct rte_ip_frag_pkt {
-	TAILQ_ENTRY(rte_ip_frag_pkt) lru;   /**< LRU list */
+struct ip_frag_pkt {
+	TAILQ_ENTRY(ip_frag_pkt) lru;   /**< LRU list */
 	struct ip_frag_key key;           /**< fragmentation key */
 	uint64_t             start;       /**< creation timestamp */
 	uint32_t             total_size;  /**< expected reassembled size */
@@ -94,7 +94,7 @@ struct rte_ip_frag_death_row {
 	/**< mbufs to be freed */
 };
 
-TAILQ_HEAD(rte_ip_pkt_list, rte_ip_frag_pkt); /**< @internal fragments tailq */
+TAILQ_HEAD(ip_pkt_list, ip_frag_pkt); /**< @internal fragments tailq */
 
 /** fragmentation table statistics */
 struct rte_ip_frag_tbl_stat {
@@ -115,10 +115,10 @@ struct rte_ip_frag_tbl {
 	uint32_t             bucket_entries;  /**< hash assocaitivity. */
 	uint32_t             nb_entries;      /**< total size of the table. */
 	uint32_t             nb_buckets;      /**< num of associativity lines. */
-	struct rte_ip_frag_pkt *last;         /**< last used entry. */
-	struct rte_ip_pkt_list lru;           /**< LRU list for table entries. */
+	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 rte_ip_frag_pkt pkt[0];        /**< hash table. */
+	struct ip_frag_pkt pkt[0];        /**< hash table. */
 };
 
 /** IPv6 fragment extension header */
diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index c14c677..a27b23a 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -42,7 +42,7 @@
  * Reassemble fragments into one packet.
  */
 struct rte_mbuf *
-ipv4_frag_reassemble(const struct rte_ip_frag_pkt *fp)
+ipv4_frag_reassemble(const struct ip_frag_pkt *fp)
 {
 	struct ipv4_hdr *ip_hdr;
 	struct rte_mbuf *m, *prev;
@@ -119,7 +119,7 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
 		struct ipv4_hdr *ip_hdr)
 {
-	struct rte_ip_frag_pkt *fp;
+	struct ip_frag_pkt *fp;
 	struct ip_frag_key key;
 	const uint64_t *psd;
 	uint16_t ip_len;
diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index 1d83c79..c622827 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -49,7 +49,7 @@
  * Reassemble fragments into one packet.
  */
 struct rte_mbuf *
-ipv6_frag_reassemble(const struct rte_ip_frag_pkt *fp)
+ipv6_frag_reassemble(const struct ip_frag_pkt *fp)
 {
 	struct ipv6_hdr *ip_hdr;
 	struct ipv6_extension_fragment *frag_hdr;
@@ -148,7 +148,7 @@ rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 		struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
 		struct ipv6_hdr *ip_hdr, struct ipv6_extension_fragment *frag_hdr)
 {
-	struct rte_ip_frag_pkt *fp;
+	struct ip_frag_pkt *fp;
 	struct ip_frag_key key;
 	uint16_t ip_len, ip_ofs;
 
-- 
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 ` Anatoly Burakov [this message]
2014-06-18 14:50 ` [dpdk-dev] [PATCH 04/10] ip_frag: fix stats macro, rename rte_ip_frag_tbl_stat structure Anatoly Burakov
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=41fd1552bf50f3c6b50f1e91fe639bf2f910058e.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).