mem: add external API to retrieve page fd
[dpdk.git] / lib / librte_latencystats / rte_latencystats.c
index 46c69bf..1fdec68 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
+ * Copyright(c) 2018 Intel Corporation
  */
 
 #include <unistd.h>
@@ -265,6 +265,7 @@ rte_latencystats_uninit(void)
        uint16_t qid;
        int ret = 0;
        struct rxtx_cbs *cbs = NULL;
+       const struct rte_memzone *mz = NULL;
 
        /** De register Rx/Tx callbacks */
        RTE_ETH_FOREACH_DEV(pid) {
@@ -288,6 +289,11 @@ rte_latencystats_uninit(void)
                }
        }
 
+       /* free up the memzone */
+       mz = rte_memzone_lookup(MZ_RTE_LATENCY_STATS);
+       if (mz)
+               rte_memzone_free(mz);
+
        return 0;
 }