qcacmn: Rearrange fields in dp_tx_desc to avoid padding

Current dp_tx_desc structure size is 136 bytes,
re-arranged the fields to fit in exactly 128 bytes to
align with number of descriptor per page and page offset
bit maps

Also add a compilation assert on tx desc size

Change-Id: Ifcb18a9da637cb71c0427b56ad4054d2206ddfbb
This commit is contained in:
Chaithanya Garrepalli
2020-06-29 13:12:09 +05:30
committed by nshrivas
orang tua e7e012dc4d
melakukan bd70ec6350
2 mengubah file dengan 16 tambahan dan 1 penghapusan

Melihat File

@@ -37,6 +37,21 @@
#define DP_TX_DESC_ID_OFFSET_MASK 0x00001F
#define DP_TX_DESC_ID_OFFSET_OS 0
/**
* Compilation assert on tx desc size
*
* if assert is hit please update POOL_MASK,
* PAGE_MASK according to updated size
*
* for current PAGE mask allowed size range of tx_desc
* is between 128 and 256
*/
QDF_COMPILE_TIME_ASSERT(dp_tx_desc_size,
((sizeof(struct dp_tx_desc_s)) <=
(PAGE_SIZE >> DP_TX_DESC_ID_PAGE_OS)) &&
((sizeof(struct dp_tx_desc_s)) >
(PAGE_SIZE >> (DP_TX_DESC_ID_PAGE_OS + 1))));
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
#define TX_DESC_LOCK_CREATE(lock)
#define TX_DESC_LOCK_DESTROY(lock)