qcacld-3.0: optimize data path memory allocation
When allocate HTT descriptor, instead of allocating
large single chunk of memory, allocate small sized multiple
chunk of memory. Then not need to allocate order 5 memory.
Will have less chance to have memory alloc fail problem.
HTT descriptor. Frag descriptor. OL descriptor. TSO descriptor
Change-Id: Ib9d4a3f10adbc0656e1418cf3a67429322bb7164
CRs-fixed: 845666
diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c
index 3395b91..1fa7872 100644
--- a/core/dp/txrx/ol_tx_desc.c
+++ b/core/dp/txrx/ol_tx_desc.c
@@ -127,7 +127,6 @@
pdev->tx_desc.freelist = pdev->tx_desc.freelist->next;
ol_tx_desc_sanity_checks(pdev, tx_desc);
ol_tx_desc_compute_delay(tx_desc);
-
}
cdf_spin_unlock_bh(&pdev->tx_mutex);
if (!tx_desc)
@@ -231,13 +230,6 @@
#endif
#endif
-/* TBD: make this inline in the .h file? */
-struct ol_tx_desc_t *ol_tx_desc_find(struct ol_txrx_pdev_t *pdev,
- uint16_t tx_desc_id)
-{
- return &pdev->tx_desc.array[tx_desc_id].tx_desc;
-}
-
#ifndef QCA_LL_TX_FLOW_CONTROL_V2
/**
* ol_tx_desc_free() - put descriptor to freelist
@@ -537,7 +529,7 @@
*/
#if defined(HELIUMPLUS_DEBUG)
cdf_print("%s %d: Frag Descriptor Reset [%d] to 0x%x\n",
- __func__, __LINE__, tx_desc->index,
+ __func__, __LINE__, tx_desc->id,
frag_desc_paddr_lo);
#endif /* HELIUMPLUS_DEBUG */
#endif /* HELIUMPLUS_PADDR64 */
@@ -591,8 +583,6 @@
pdev->tso_seg_pool.freelist = pdev->tso_seg_pool.freelist->next;
}
cdf_spin_unlock_bh(&pdev->tso_seg_pool.tso_mutex);
- if (!tso_seg)
- return NULL;
return tso_seg;
}