Commit Graph

10 Commits

Author SHA1 Message Date
Manikanta Pubbisetty
e2b9779df7 qcacmn: Add WBUFF statistics
Currently, there are no statistics whatsoever present in WBUFF module.
To start with, add some basic statistics to the WBUFF module.

Change-Id: I63c06cfb8b1430b2e86539f88025e6d74a00012b
CRs-Fixed: 3548509
2023-07-20 19:19:23 -07:00
Manikanta Pubbisetty
621c2d72b8 qcacmn: Use qdf_nbuf_page_frag_alloc() for WBUFF SKBs
Since SKBs allocated from the WBUFF module are reusable SKBs, allocate
them using qdf_nbuf_page_frag_alloc() to have memory savings and also
to avoid memory fragmentation issues.

Change-Id: Icecf4f6de0842a8c767217281984c4ef25e9b9be
CRs-Fixed: 3559261
2023-07-18 09:51:25 -07:00
Manikanta Pubbisetty
cbe8170798 qcacmn: Add HIF CE RX support to WBUFF
Currently, WBUFF is being used only for WMI TX buffers.
Add HIF CE RX buffers support to WBUFF in an effort to re-use
the copy engine RX buffers instead of freeing/allocating buffers
for every CE RX transaction. This fixes the problem of CE RX
memory fragmentation.

Change-Id: Id9c043a5c5d0882a7994fa03cd8c335555d46b8d
CRs-Fixed: 3534539
2023-07-18 09:51:03 -07:00
Manikanta Pubbisetty
9b27c6e104 qcacmn: Cleanup WBUFF code to support additional modules
Currently, WBUFF logic is being used only for WMI TX buffers and the
logic is closely tied to the WMI TX buffers alone. It is cumbersome
to extend the support of WBUFF for additional modules in the current
state.

Cleanup the WBUFF code and make it generic to add future module
additions.

Change-Id: Ib20ddd487b4e88c3225da1883ad9ade722c2a606
CRs-Fixed: 3520811
2023-07-18 09:50:53 -07:00
Manikanta Pubbisetty
3ea9fb0844 qcacmn: Rename mslot/pslot with module_id/pool_id
Currently in WBUFF code, mslot/pslot is used to refer module_id/pool_id
and there are references of them being used interchangeably.

Rename mslot/pslot to module_id/pool_id to improve the readability of
the code. This is the pre-requisite to support mutilple modules in WBUFF
which will be added with a future patch.

Change-Id: Ia5a113535cff950cd3f464b6133370f026d4fc87
CRs-Fixed: 3516982
2023-07-14 15:42:09 -07:00
Jeff Johnson
d93db0f70e qcacmn: Fix wbuff documentation
The kernel-doc script identified some documentation errors in the
wbuff folder, so fix them.

Change-Id: Ie3ab3bafda78a1b7207391b0accd4286e6ae5de3
CRs-Fixed: 3389343
2023-01-29 16:01:35 -08:00
Dundi Raviteja
7be08f1577 qcacmn: Avoid possible out of array access
In function wbuff_buff_put(), there is a possibility to
access array out of boundaries for module slot and pool slot.

Add condition to check for array boundaries.

Change-Id: Iaf5a0ef6b2e712804717abf27d0c0d06862a04f5
CRs-Fixed: 3086342
2021-12-08 13:50:27 -08:00
Arif Hussain
61847a9ba6 qcacmn: Use function name instead of file name in debug logs
Replace all instance of file name to function name in debug logs.

Change-Id: Iff731675772859f02c975005b2656eaa41c6f360
CRs-Fixed: 2377894
2019-01-17 22:20:46 -08:00
Rakshith Suresh Patkar
5c881ec3ec qcacmn: Update debug info in wbuff_buff_get()
The debug node for all the nbufs allocated by wbuff
for a module contains the file and line info
pertaining to wbuff_module_register().

To enhance debugging, Use qdf_net_buf_debug_update_node()
to update debug info when nbuf is requested through
wbuff_buff_get().

Change-Id: Ie8b148ef6313bd3b265cfa3f141e8d0de8b75597
CRs-Fixed: 2328257
2018-10-16 21:21:15 -07:00
Rakshith Suresh Patkar
9cee4926f9 qcacmn: Add support for WBUFF module
Introduce a new module WBUFF, which maintains a
pre-allocated pool of skbs for each registered
module and allocates skbs when requeted from
these pre-allocated pools.

The module exposes the following APIs:
 1) wbuff_module_init
 2) wbuff_module_deinit
 3) wbuff_module_register
 4) wbuff_module_deregister
 5) wbuff_buff_get
 6) wbuff_buff_put

Change-Id: Icab723ce29a9a364c822756dee78a0dae1006180
CRs-Fixed: 2313443
2018-09-14 23:15:00 -07:00