Skip to contentSkip to conversation

mlx4_en: Convert the normal skb free path to dev_consume_skb_any()

PATCH Applied Rick Jones 3 participants 3 messages Sep 3, 2014 – Sep 4, 2014

Subsystems (4)
lore
Share & tools
lore

Rick Jones

author
#0 lore raw

PATCH 1/1 mlx4_en: Convert the normal skb free path to dev_consume_skb_any()

From: Rick Jones <[email protected]>

It would appear the mlx4_en driver was still making a call to dev_kfree_skb_any() where dev_consume_skb_any() would be more appropriate. This should make dropped packet profiling/tracking easier/better over a NIC driven by mlx4_en.

---

Compile tested only

drivers/net/ethernet/mellanox/mlx4/en_tx.c +1 -1
index dae3da6..bc8f51c 100644
@@ -319,7 +319,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
 			}
 		}
 	}
-	dev_kfree_skb_any(skb);
+	dev_consume_skb_any(skb);
 	return tx_info->nr_txbb;
 }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · Rick Jones

From: Rick Jones <[email protected]>

It would appear the mlx4_en driver was still making a call to dev_kfree_skb_any() where dev_consume_skb_any() would be more appropriate. This should make dropped packet profiling/tracking easier/better over a NIC driven by mlx4_en.

---

Compile tested only

drivers/net/ethernet/mellanox/mlx4/en_tx.c +0 -0
index dae3da6..bc8f51c 100644

drivers/net/ethernet/mellanox/mlx4/en_tx.c static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv, · line 325

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/en_tx.c +1 -1
@@ -319,7 +319,7 @@ static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv,
 			}
 		}
 	}
-	dev_kfree_skb_any(skb);
+	dev_consume_skb_any(skb);
 	return tx_info->nr_txbb;
 }
 

I use a similar patch here, I confirm this works.

maintainer Applied
#2 lore raw
In reply to Rick Jones

From: [email protected] (Rick Jones)
Date: Wed, 3 Sep 2014 09:18:00 -0700 (PDT)

Quoted 8 lines

From: Rick Jones <[email protected]>

It would appear the mlx4_en driver was still making a call to dev_kfree_skb_any() where dev_consume_skb_any() would be more appropriate. This should make dropped packet profiling/tracking easier/better over a NIC driven by mlx4_en.

Applied, thank you.