qcacld-3.0: Add support to add memory tracking in tx path

Add support to add memory tracking in tx path in WLAN driver using
already present infrastructure for memory tracking.

Change-Id: I6a2c9890e0af1fd51c4e2dfcded68f0075a3a4ef
CRs-Fixed: 2025668
This commit is contained in:
Himanshu Agarwal 2017-02-20 19:14:17 +05:30 • committed by Sandeep Puligilla
commit 53298d1fd7
3 changed files with 20 additions and 11 deletions

View file

@ -234,13 +234,6 @@ ol_rx_fwd_check(struct ol_txrx_vdev_t *vdev,
copy = qdf_nbuf_copy(msdu);
if (copy) {
/* Since this is a private copy of skb
* and part of skb tracking table, so
* mark it to make sure that this skb
* is getting deleted from tracking
* table on receiving tx completion.
*/
QDF_NBUF_CB_TX_IS_PACKET_PRIV(copy) = 1;
ol_rx_fwd_to_tx(tx_vdev, copy);
tx_vdev->fwd_tx_packets++;
}

View file

@ -386,6 +386,12 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
}
#endif
/*
* Add SKB to internal tracking table before further processing
* in WLAN driver.
*/
qdf_net_buf_debug_acquire_skb(skb, __FILE__, __LINE__);
pAdapter->stats.tx_bytes += skb->len;
if (qdf_nbuf_is_tso(skb))
@ -415,12 +421,14 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
"%s: Failed to send packet to txrx for staid:%d",
__func__, STAId);
++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
goto drop_pkt;
goto drop_pkt_and_release_skb;
}
netif_trans_update(dev);
return NETDEV_TX_OK;
drop_pkt_and_release_skb:
qdf_net_buf_debug_release_skb(skb);
drop_pkt:
DPTRACE(qdf_dp_trace(skb, QDF_DP_TRACE_DROP_PACKET_RECORD,

View file

@ -545,6 +545,12 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop_pkt_accounting;
}
/*
* Add SKB to internal tracking table before further processing
* in WLAN driver.
*/
qdf_net_buf_debug_acquire_skb(skb, __FILE__, __LINE__);
/*
* user priority from IP header, which is already extracted and set from
* select_queue call back function
@ -664,7 +670,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_INFO_HIGH,
FL("Tx not allowed for sta_id: %d"), STAId);
++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
goto drop_pkt;
goto drop_pkt_and_release_skb;
}
/*
@ -675,7 +681,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
"%s: TX function not registered by the data path",
__func__);
++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
goto drop_pkt;
goto drop_pkt_and_release_skb;
}
if (pAdapter->tx_fn(pAdapter->txrx_vdev,
@ -684,12 +690,14 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
"%s: Failed to send packet to txrx for staid: %d",
__func__, STAId);
++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
goto drop_pkt;
goto drop_pkt_and_release_skb;
}
netif_trans_update(dev);
return NETDEV_TX_OK;
drop_pkt_and_release_skb:
qdf_net_buf_debug_release_skb(skb);
drop_pkt:
if (skb) {