The memory for mark table is allocated during port start.
But the allocated memory is freed only during port close
or driver unload which in turn causes a memory leakage
on each port start/stop.
Fixed it by moving the memory free to port stop.
Fixes:
94eb699bc82e ("net/bnxt: support flow mark action")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
bnxt_int_handler(eth_dev);
bnxt_shutdown_nic(bp);
bnxt_hwrm_if_change(bp, 0);
- memset(bp->mark_table, 0, BNXT_MARK_TABLE_SZ);
+
+ rte_free(bp->mark_table);
+ bp->mark_table = NULL;
+
bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
bp->dev_stopped = 1;
bp->rx_cosq_cnt = 0;
bp->grp_info = NULL;
}
- rte_free(bp->mark_table);
- bp->mark_table = NULL;
-
bnxt_dev_uninit(eth_dev);
}