X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ip_frag%2Frte_ip_frag_common.c;h=6176ff4e0a0c6392a40e5100921581f5a112958a;hb=ca8477c881e454d327e2ab8f8c02687ae95a2546;hp=acd1864eace112e8094f4614826aa1ffbd45e46c;hpb=416707812c03e799719b46993af4a6ddfe14ef6c;p=dpdk.git diff --git a/lib/librte_ip_frag/rte_ip_frag_common.c b/lib/librte_ip_frag/rte_ip_frag_common.c index acd1864eac..6176ff4e0a 100644 --- a/lib/librte_ip_frag/rte_ip_frag_common.c +++ b/lib/librte_ip_frag/rte_ip_frag_common.c @@ -32,14 +32,11 @@ */ #include -#include #include #include #include -#include -#include "rte_ip_frag.h" #include "ip_frag_common.h" #define IP_FRAG_HASH_FNUM 2 @@ -86,16 +83,16 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries, nb_entries > UINT32_MAX || nb_entries == 0 || nb_entries < max_entries) { RTE_LOG(ERR, USER1, "%s: invalid input parameter\n", __func__); - return (NULL); + return NULL; } sz = sizeof (*tbl) + nb_entries * sizeof (tbl->pkt[0]); - if ((tbl = rte_zmalloc_socket(__func__, sz, CACHE_LINE_SIZE, + if ((tbl = rte_zmalloc_socket(__func__, sz, RTE_CACHE_LINE_SIZE, socket_id)) == NULL) { RTE_LOG(ERR, USER1, "%s: allocation of %zu bytes at socket %d failed do\n", __func__, sz, socket_id); - return (NULL); + return NULL; } RTE_LOG(INFO, USER1, "%s: allocated of %zu bytes at socket %d\n", @@ -109,7 +106,7 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries, tbl->entry_mask = (tbl->nb_entries - 1) & ~(tbl->bucket_entries - 1); TAILQ_INIT(&(tbl->lru)); - return (tbl); + return tbl; } /* dump frag table statistics to file */