qcacmn: Featurization of DP_TX_EXT_DESC_POOL_OPTIMIZE

This flag DP_TX_EXT_DESC_POOL_OPTIMIZE if enabled will reduce the number
of ext tx desc pool to 1.

1. Changes done to split the tx_desc and ext_tx_desc pool number
variables in alloc and free path. Based on this flag the reduced
ext_desc_pool count will be returned.

2. In Tx path, since the pool id is selected based on the CPU, changes done
to override the desc_pool_id of ext_desc_pool via new API
dp_tx_ext_desc_pool_override to 0 with which from whatever core the packets
comes from, pool 0 will be chosen for ext_desc.

Change-Id: Iae8bf9952a136ba2c55256d8f305b6d5fbde5d83
CRs-Fixed: 3552532
This commit is contained in:
Hariharan Ramanathan
2023-07-11 18:00:17 +05:30
committed by Rahul Choudhary
szülő 68e0b883b4
commit 5ec64fb74d
3 fájl változott, egészen pontosan 75 új sor hozzáadva és 19 régi sor törölve

Fájl megtekintése

@@ -429,6 +429,54 @@ dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc)
return NULL;
}
#endif
#ifdef DP_TX_EXT_DESC_POOL_OPTIMIZE
/**
* dp_tx_ext_desc_pool_override() - Override tx ext desc pool Id
* @desc_pool_id: Desc pool Id
*
* For low mem profiles the number of ext_tx_desc_pool is reduced to 1.
* Since in Tx path the desc_pool_id is filled based on CPU core,
* dp_tx_ext_desc_pool_override will return the desc_pool_id as 0 for lowmem
* profiles.
*
* Return: updated tx_ext_desc_pool Id
*/
static inline uint8_t dp_tx_ext_desc_pool_override(uint8_t desc_pool_id)
{
return 0;
}
/**
* dp_get_ext_tx_desc_pool_num() - get the number of ext_tx_desc pool
* @soc: core txrx main context
*
* For lowmem profiles the number of ext_tx_desc pool is reduced to 1 for
* memory optimizations.
* Based on this flag DP_TX_EXT_DESC_POOL_OPTIMIZE dp_get_ext_tx_desc_pool_num
* will return reduced desc_pool value 1 for low mem profile and for the other
* profiles it will return the same value as tx_desc pool.
*
* Return: number of ext_tx_desc pool
*/
static inline uint8_t dp_get_ext_tx_desc_pool_num(struct dp_soc *soc)
{
return 1;
}
#else
static inline uint8_t dp_tx_ext_desc_pool_override(uint8_t desc_pool_id)
{
return desc_pool_id;
}
static inline uint8_t dp_get_ext_tx_desc_pool_num(struct dp_soc *soc)
{
return wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
}
#endif
#ifndef QCA_HOST_MODE_WIFI_DISABLED
/**
* dp_tso_soc_attach() - TSO Attach handler