qcacmn: Add cdp api for dp tx desc availability
Add cdp api to check if tx desc pool available descriptor threshold has reached. Change-Id: Ie542d03dd865d32aa6e01da00328aa51728b4276 CRs-Fixed: 2369218
This commit is contained in:

committed by
nshrivas

parent
61f47a6fbd
commit
b75565e98f
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -107,4 +107,28 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc)
|
||||
|
||||
soc->ops->flowctl_ops->dump_flow_pool_info(dp_soc);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_tx_desc_thresh_reached() - Check if avail tx desc meet threshold
|
||||
* @soc - data path soc handle
|
||||
* @vdev - dp vdev handle
|
||||
*
|
||||
* Return: true if threshold is met, false if not
|
||||
*/
|
||||
static inline bool
|
||||
cdp_tx_desc_thresh_reached(struct cdp_soc_t *soc, struct cdp_vdev *vdev)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s invalid instance", __func__);
|
||||
QDF_BUG(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!soc->ops->flowctl_ops ||
|
||||
!soc->ops->flowctl_ops->tx_desc_thresh_reached)
|
||||
return false;
|
||||
|
||||
return soc->ops->flowctl_ops->tx_desc_thresh_reached(vdev);
|
||||
}
|
||||
#endif /* _CDP_TXRX_FC_V2_H_ */
|
||||
|
Reference in New Issue
Block a user