diff options
author | Yuanhan Liu <yliu@fridaylinux.org> | 2017-09-07 09:55:09 +0800 |
---|---|---|
committer | Yuanhan Liu <yliu@fridaylinux.org> | 2017-09-07 09:55:20 +0800 |
commit | 7de0a46f1aa1b6e4a46f0ea6cc4c32819d8c703e (patch) | |
tree | b63103db062c5e55a5fad45ce26b25eaa2597b9e | |
parent | 181038e178cf2170214f74ef33a17dcb326305d4 (diff) | |
download | dpdk-stable-7de0a46f1aa1b6e4a46f0ea6cc4c32819d8c703e.zip dpdk-stable-7de0a46f1aa1b6e4a46f0ea6cc4c32819d8c703e.tar.gz dpdk-stable-7de0a46f1aa1b6e4a46f0ea6cc4c32819d8c703e.tar.xz |
Revert "ip_frag: free mbufs on reassembly table destroy"
This reverts commit 4aa29d2e55301e887a15c2a79f68507b7f65db84.
Because this commit brings a new API, which is not allowed in stable
releases.
Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
-rw-r--r-- | lib/librte_ip_frag/ip_frag_common.h | 20 | ||||
-rw-r--r-- | lib/librte_ip_frag/rte_ip_frag.h | 7 | ||||
-rw-r--r-- | lib/librte_ip_frag/rte_ip_frag_common.c | 13 | ||||
-rw-r--r-- | lib/librte_ip_frag/rte_ipfrag_version.map | 7 |
4 files changed, 5 insertions, 42 deletions
diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h index 9f56196..835e4f9 100644 --- a/lib/librte_ip_frag/ip_frag_common.h +++ b/lib/librte_ip_frag/ip_frag_common.h @@ -130,26 +130,6 @@ ip_frag_free(struct ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr) dr->cnt = k; } -/* delete fragment's mbufs immediately instead of using death row */ -static inline void -ip_frag_free_immediate(struct ip_frag_pkt *fp) -{ - uint32_t i; - - for (i = 0; i < fp->last_idx; i++) { - if (fp->frags[i].mb != NULL) { - IP_FRAG_LOG(DEBUG, "%s:%d\n" - "mbuf: %p, tms: %" PRIu64", key: <%" PRIx64 ", %#x>\n", - __func__, __LINE__, fp->frags[i].mb, fp->start, - fp->key.src_dst[0], fp->key.id); - rte_pktmbuf_free(fp->frags[i].mb); - fp->frags[i].mb = NULL; - } - } - - fp->last_idx = 0; -} - /* if key is empty, mark key as in use */ static inline void ip_frag_inuse(struct rte_ip_frag_tbl *tbl, const struct ip_frag_pkt *fp) diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h index ff16f4c..6708906 100644 --- a/lib/librte_ip_frag/rte_ip_frag.h +++ b/lib/librte_ip_frag/rte_ip_frag.h @@ -180,8 +180,11 @@ struct rte_ip_frag_tbl * rte_ip_frag_table_create(uint32_t bucket_num, * @param tbl * Fragmentation table to free. */ -void -rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl); +static inline void +rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl) +{ + rte_free(tbl); +} /** * This function implements the fragmentation of IPv6 packets. diff --git a/lib/librte_ip_frag/rte_ip_frag_common.c b/lib/librte_ip_frag/rte_ip_frag_common.c index 8460f8e..6176ff4 100644 --- a/lib/librte_ip_frag/rte_ip_frag_common.c +++ b/lib/librte_ip_frag/rte_ip_frag_common.c @@ -109,19 +109,6 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries, return tbl; } -/* delete fragmentation table */ -void -rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl) -{ - struct ip_frag_pkt *fp; - - TAILQ_FOREACH(fp, &tbl->lru, lru) { - ip_frag_free_immediate(fp); - } - - rte_free(tbl); -} - /* dump frag table statistics to file */ void rte_ip_frag_table_statistics_dump(FILE *f, const struct rte_ip_frag_tbl *tbl) diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map index d1acf07..354fa08 100644 --- a/lib/librte_ip_frag/rte_ipfrag_version.map +++ b/lib/librte_ip_frag/rte_ipfrag_version.map @@ -11,10 +11,3 @@ DPDK_2.0 { local: *; }; - -DPDK_17.08 { - global: - - rte_ip_frag_table_destroy; - -} DPDK_2.0; |