qcacmn: fast TX API and registration
This is a new FAST TX API which avoids various checks. This API will be called when SFE tags a pkt as fast_forwarded and vap's fast_tx flag is set. avoid additional re-checks in the wifi TX function CRs-Fixed: 3218650 Change-Id: Iba17ede59652a1ff2af553f57de21dc58946298e
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f6060a9296
commit
1b1b3adbea
@@ -1097,4 +1097,148 @@ void dp_pkt_get_timestamp(uint64_t *time)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WLAN_SYSFS_MEM_STATS
|
||||
/**
|
||||
* dp_update_tx_desc_stats - Update the increase or decrease in
|
||||
* outstanding tx desc count
|
||||
* values on pdev and soc
|
||||
* @vdev: DP pdev handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
dp_update_tx_desc_stats(struct dp_pdev *pdev)
|
||||
{
|
||||
int32_t tx_descs_cnt =
|
||||
qdf_atomic_read(&pdev->num_tx_outstanding);
|
||||
if (pdev->tx_descs_max < tx_descs_cnt)
|
||||
pdev->tx_descs_max = tx_descs_cnt;
|
||||
qdf_mem_tx_desc_cnt_update(pdev->num_tx_outstanding,
|
||||
pdev->tx_descs_max);
|
||||
}
|
||||
|
||||
#else /* CONFIG_WLAN_SYSFS_MEM_STATS */
|
||||
|
||||
static inline void
|
||||
dp_update_tx_desc_stats(struct dp_pdev *pdev)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_WLAN_SYSFS_MEM_STATS */
|
||||
|
||||
#ifdef QCA_TX_LIMIT_CHECK
|
||||
/**
|
||||
* dp_tx_limit_check - Check if allocated tx descriptors reached
|
||||
* soc max limit and pdev max limit
|
||||
* @vdev: DP vdev handle
|
||||
*
|
||||
* Return: true if allocated tx descriptors reached max configured value, else
|
||||
* false
|
||||
*/
|
||||
static inline bool
|
||||
dp_tx_limit_check(struct dp_vdev *vdev)
|
||||
{
|
||||
struct dp_pdev *pdev = vdev->pdev;
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
|
||||
if (qdf_atomic_read(&soc->num_tx_outstanding) >=
|
||||
soc->num_tx_allowed) {
|
||||
dp_tx_info("queued packets are more than max tx, drop the frame");
|
||||
DP_STATS_INC(vdev, tx_i.dropped.desc_na.num, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (qdf_atomic_read(&pdev->num_tx_outstanding) >=
|
||||
pdev->num_tx_allowed) {
|
||||
dp_tx_info("queued packets are more than max tx, drop the frame");
|
||||
DP_STATS_INC(vdev, tx_i.dropped.desc_na.num, 1);
|
||||
DP_STATS_INC(vdev, tx_i.dropped.desc_na_exc_outstand.num, 1);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_tx_exception_limit_check - Check if allocated tx exception descriptors
|
||||
* reached soc max limit
|
||||
* @vdev: DP vdev handle
|
||||
*
|
||||
* Return: true if allocated tx descriptors reached max configured value, else
|
||||
* false
|
||||
*/
|
||||
static inline bool
|
||||
dp_tx_exception_limit_check(struct dp_vdev *vdev)
|
||||
{
|
||||
struct dp_pdev *pdev = vdev->pdev;
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
|
||||
if (qdf_atomic_read(&soc->num_tx_exception) >=
|
||||
soc->num_msdu_exception_desc) {
|
||||
dp_info("exc packets are more than max drop the exc pkt");
|
||||
DP_STATS_INC(vdev, tx_i.dropped.exc_desc_na.num, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_tx_outstanding_inc - Increment outstanding tx desc values on pdev and soc
|
||||
* @vdev: DP pdev handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
dp_tx_outstanding_inc(struct dp_pdev *pdev)
|
||||
{
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
|
||||
qdf_atomic_inc(&pdev->num_tx_outstanding);
|
||||
qdf_atomic_inc(&soc->num_tx_outstanding);
|
||||
dp_update_tx_desc_stats(pdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_tx_outstanding__dec - Decrement outstanding tx desc values on pdev and soc
|
||||
* @vdev: DP pdev handle
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
dp_tx_outstanding_dec(struct dp_pdev *pdev)
|
||||
{
|
||||
struct dp_soc *soc = pdev->soc;
|
||||
|
||||
qdf_atomic_dec(&pdev->num_tx_outstanding);
|
||||
qdf_atomic_dec(&soc->num_tx_outstanding);
|
||||
dp_update_tx_desc_stats(pdev);
|
||||
}
|
||||
|
||||
#else //QCA_TX_LIMIT_CHECK
|
||||
static inline bool
|
||||
dp_tx_limit_check(struct dp_vdev *vdev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
dp_tx_exception_limit_check(struct dp_vdev *vdev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_tx_outstanding_inc(struct dp_pdev *pdev)
|
||||
{
|
||||
qdf_atomic_inc(&pdev->num_tx_outstanding);
|
||||
dp_update_tx_desc_stats(pdev);
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_tx_outstanding_dec(struct dp_pdev *pdev)
|
||||
{
|
||||
qdf_atomic_dec(&pdev->num_tx_outstanding);
|
||||
dp_update_tx_desc_stats(pdev);
|
||||
}
|
||||
#endif //QCA_TX_LIMIT_CHECK
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user