netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dlink: count dropped packets on skb allocation failure
@ 2025-09-10  5:48 Yeounsu Moon
  2025-09-11 17:02 ` Simon Horman
  2025-09-12  0:08 ` Jakub Kicinski
  0 siblings, 2 replies; 6+ messages in thread
From: Yeounsu Moon @ 2025-09-10  5:48 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Yeounsu Moon, netdev, linux-kernel

Track dropped packet statistics when skb allocation fails
in the receive path.

Tested-on: D-Link DGE-550T Rev-A3
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
---
 drivers/net/ethernet/dlink/dl2k.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index 6bbf6e5584e5..47d9eef2e725 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -1009,6 +1009,7 @@ receive_packet (struct net_device *dev)
 			skb = netdev_alloc_skb_ip_align(dev, np->rx_buf_sz);
 			if (skb == NULL) {
 				np->rx_ring[entry].fraginfo = 0;
+				dev->stats.rx_dropped++;
 				printk (KERN_INFO
 					"%s: receive_packet: "
 					"Unable to re-allocate Rx skbuff.#%d\n",
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-12 14:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10  5:48 [PATCH net-next] net: dlink: count dropped packets on skb allocation failure Yeounsu Moon
2025-09-11 17:02 ` Simon Horman
2025-09-12  9:27   ` Yeounsu Moon
2025-09-12  0:08 ` Jakub Kicinski
2025-09-12 10:03   ` Yeounsu Moon
2025-09-12 14:35     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).