This patch adds support for free function.
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
return TEST_SUCCESS;
}
-/* To test free the resources from bitrate_reg test */
+/* To test free the resources from bitrate_create test */
static int
test_stats_bitrate_free(void)
{
int ret = 0;
+ rte_stats_bitrate_free(bitrate_data);
+
ret = rte_metrics_deinit();
TEST_ASSERT(ret >= 0, "Test Failed: rte_metrics_deinit failed");
RTE_CACHE_LINE_SIZE);
}
+void
+rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data)
+{
+ rte_free(bitrate_data);
+}
+
int
rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
{
*/
struct rte_stats_bitrates *rte_stats_bitrate_create(void);
+/**
+ * Free bitrate statistics structure
+ *
+ * @param bitrate_data
+ * Pointer allocated by rte_stats_bitrate_create()
+ */
+__rte_experimental
+void rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data);
/**
* Register bitrate statistics with the metric library.
*
* @param bitrate_data
- * Pointer allocated by rte_stats_create()
+ * Pointer allocated by rte_stats_bitrate_create()
*
* @return
* Zero on success
local: *;
};
+
+EXPERIMENTAL {
+ global:
+
+ rte_stats_bitrate_free;
+};