From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id F3A72B108 for ; Wed, 18 Jun 2014 16:50:37 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 18 Jun 2014 07:50:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,501,1400050800"; d="scan'208";a="447055385" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by azsmga001.ch.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 s5IEocw2009258 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 s5IEocK3025950 for ; Wed, 18 Jun 2014 15:50:38 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with id s5IEocto025946 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:30 +0100 Message-Id: <41fd1552bf50f3c6b50f1e91fe639bf2f910058e.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 03/10] ip_frag: renaming rte_ip_frag_pkt to ip_frag_pkt 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:39 -0000 Signed-off-by: Anatoly Burakov --- 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