Browse Source

qcacld-3.0: Add a flag in skb->cb for packet tracking

When a packet is generated internally, host adds a debug
node entry to the table and deletes the entry once received
tx completion for that packet by calling qdf_nbuf_free.
But when a packet is coming from network stack, host doesn’t
add any debug entry to the table and on receiving tx completion,
it calls qdf_nbuf_tx_free which will simply free the skb.

In case of P2P GO mode where packets are forwarded internally,
host creates a private copy of skb and add debug node entry in
the table. But when receiving a tx completion for the same packet
host calls qdf_nbuf_tx_free which will free the skb but will not
remove this node entry from the table. Currently, this api is common
for all data tx completion packets.

Add an extra flag in control block to differentiate whether skb is
generated by driver or come from network stack. If flag is true,
that means generated internally and need to remove the entry from
debug node table.

CRs-Fixed: 2021277
Change-Id: I07c12b5bf134a3e56d13005dbe03778781cdf176
Poddar, Siddarth 8 years ago
parent
commit
d6b2fd232e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/dp/txrx/ol_rx_fwd.c

+ 7 - 0
core/dp/txrx/ol_rx_fwd.c

@@ -237,6 +237,13 @@ 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++;
 				}