Currently, each call for add_rss_action will allocate
extra memory for rss_data, which will reflect bad results
on memory consumption for all flows, and will leads into
memory leak.
In this fix, it will check if it's allocated before
reallocating it.
Fixes:
bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
uint16_t queue;
- rss_data = rte_malloc("rss_data",
- sizeof(struct action_rss_data), 0);
+ if (rss_data == NULL)
+ rss_data = rte_malloc("rss_data",
+ sizeof(struct action_rss_data), 0);
if (rss_data == NULL)
rte_exit(EXIT_FAILURE, "No Memory available!");