qcacmn: Fix memory leaks in Rx monitor path

Fix the following 2 memory leaks in Rx monitor path:

1. When MPDU queue is empty and MON_BUF_ADDR_TLV is received,
   then free page fragment memory.

2. In case of small size packets, 1 MPDU can have more than
   2*QDF_NBUF_MAX_FRAGS fragments wherein each nbuf can have maximum of
   QDF_NBUF_MAX_FRAGS frags. In this case, add the frags to nbuf in the
   following way.

   parent_nbuf (QDF_NBUF_MAX_FRAGS frags attached)
	|
	| (fraglist)
	|
	----> tmp_nbuf1 (QDF_NBUF_MAX_FRAGS frags attached) ----> tmp_nbuf2
							    (next)

Change-Id: I54e8162bf0b9da8629a3c80d123421fbeaf8df11
CRs-Fixed: 3453676
This commit is contained in:
Harsh Kumar Bijlani
2023-04-21 20:23:34 +05:30
committed by Madan Koyyalamudi
parent 58b1c384df
commit 2be2bf6a69
3 changed files with 61 additions and 8 deletions

View File

@@ -845,10 +845,12 @@ struct dp_mon_ops {
* struct dp_mon_soc_stats - monitor stats
* @frag_alloc: Number of frags allocated
* @frag_free: Number of frags freed
* @empty_queue: Number of frags freed due to empty queue
*/
struct dp_mon_soc_stats {
uint32_t frag_alloc;
uint32_t frag_free;
uint32_t empty_queue;
};
struct dp_mon_soc {