qcacmn: Remove alignment of 4 bytes

Remove alignment of 4 bytes when allocating memory for Copy
engines. Copy engine buffer size is 2048 which is already
aligned to 4 bytes. This 4 byte alignment addition results in
64 bytes extra memory allocation for each skb since SKB_DATA_ALIGN
rounds it off to nearest 64.

Change-Id: Ib680547d2bcfe57b6eadda5301677d68e4a931a4
CRs-Fixed: 3533492
This commit is contained in:
Nandha Kishore Easwaran
2023-06-16 17:56:37 +05:30
committed by Rahul Choudhary
parent eadb65cdde
commit 8a745cc343
3 changed files with 4 additions and 2 deletions

View File

@@ -520,7 +520,8 @@ void war_ce_src_ring_write_idx_set(struct hif_softc *scn,
* @priority: TBD
* @src_nentries: #entries in source ring - Must be a power of 2
* @src_sz_max: Max source send size for this CE. This is also the minimum
* size of a destination buffer
* size of a destination buffer. This should be a factor of 4
* for alignment during nbuf alloc.
* @dest_nentries: #entries in destination ring - Must be a power of 2
* @reserved: Future Use
*/

View File

@@ -170,6 +170,7 @@ struct CE_state {
/*Record the state of the copy compl interrupt */
int disable_copy_compl_intr;
/* src_sz_max should be a factor of 4 for alignment during nbuf alloc */
unsigned int src_sz_max;
struct CE_ring_state *src_ring;
struct CE_ring_state *dest_ring;

View File

@@ -3532,7 +3532,7 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
hif_record_ce_desc_event(scn, ce_id,
HIF_RX_DESC_PRE_NBUF_ALLOC, NULL, NULL,
0, 0);
nbuf = qdf_nbuf_alloc(scn->qdf_dev, buf_sz, 0, 4, false);
nbuf = qdf_nbuf_alloc(scn->qdf_dev, buf_sz, 0, 0, false);
if (!nbuf) {
hif_post_recv_buffers_failure(pipe_info, nbuf,
&pipe_info->nbuf_alloc_err_count,