qcacmn: cdp: Convergence of cdp_flowctl_ops

Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged flowctl_ops
- flow_pool_map_handler
- flow_pool_unmap_handler
- dump_flow_pool_info
- tx_desc_thresh_reached

CRs-Fixed: 2539812
Change-Id: I084d3878df84778622340e87bddf90acd3e669d6
This commit is contained in:
Rakesh Pillai
2019-06-28 19:11:23 +05:30
committed by nshrivas
parent c4ffad74c3
commit dce01374cd
6 changed files with 67 additions and 47 deletions

View File

@@ -182,16 +182,16 @@ cdp_vdev_attach(ol_txrx_soc_handle soc, struct cdp_pdev *pdev,
#ifdef DP_FLOW_CTL
/**
* cdp_flow_pool_map() - Create flow pool for vdev
* @soc - data path soc handle
* @pdev
* @vdev_id - vdev_id corresponding to vdev start
* @soc: data path soc handle
* @pdev_id: id of dp pdev handle
* @vdev_id: vdev_id corresponding to vdev start
*
* Create per vdev flow pool.
*
* return none
*/
static inline QDF_STATUS cdp_flow_pool_map(ol_txrx_soc_handle soc,
struct cdp_pdev *pdev, uint8_t vdev_id)
uint8_t pdev_id, uint8_t vdev_id)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
@@ -204,21 +204,22 @@ static inline QDF_STATUS cdp_flow_pool_map(ol_txrx_soc_handle soc,
!soc->ops->flowctl_ops->flow_pool_map_handler)
return QDF_STATUS_E_INVAL;
return soc->ops->flowctl_ops->flow_pool_map_handler(soc, pdev, vdev_id);
return soc->ops->flowctl_ops->flow_pool_map_handler(soc, pdev_id,
vdev_id);
}
/**
* cdp_flow_pool_unmap() - Delete flow pool
* @soc - data path soc handle
* @pdev
* @vdev_id - vdev_id corresponding to vdev start
* @soc: data path soc handle
* @pdev_id: id of dp pdev handle
* @vdev_id: vdev_id corresponding to vdev start
*
* Delete flow pool
*
* return none
*/
static inline void cdp_flow_pool_unmap(ol_txrx_soc_handle soc,
struct cdp_pdev *pdev, uint8_t vdev_id)
uint8_t pdev_id, uint8_t vdev_id)
{
if (!soc || !soc->ops) {
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
@@ -231,7 +232,7 @@ static inline void cdp_flow_pool_unmap(ol_txrx_soc_handle soc,
!soc->ops->flowctl_ops->flow_pool_unmap_handler)
return;
return soc->ops->flowctl_ops->flow_pool_unmap_handler(soc, pdev,
return soc->ops->flowctl_ops->flow_pool_unmap_handler(soc, pdev_id,
vdev_id);
}
#endif