netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.30] Network Drop Monitor: Make use of consume_skb() in af_can.c
@ 2009-04-16 19:58 Oliver Hartkopp
  2009-04-17  8:38 ` David Miller
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Hartkopp @ 2009-04-16 19:58 UTC (permalink / raw)
  To: David Miller, Neil Horman; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

Since commit ead2ceb0ec9f85cff19c43b5cdb2f8a054484431 so called end-of-line
points for skb's should use consume_skb() to free the socket buffer.

In opposite to consume_skb() the function kfree_skb() is intended to be used
for unexpected skb drops e.g. in error conditions that now can trigger the
network drop monitor if enabled.

This patch moves the skb end-of-line point in af_can.c to use consume_skb().

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>

---



[-- Attachment #2: can_consume_skb.patch --]
[-- Type: text/x-patch, Size: 438 bytes --]

diff --git a/net/can/af_can.c b/net/can/af_can.c
index 547bafc..10f0528 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -674,8 +674,8 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
 
 	rcu_read_unlock();
 
-	/* free the skbuff allocated by the netdevice driver */
-	kfree_skb(skb);
+	/* consume the skbuff allocated by the netdevice driver */
+	consume_skb(skb);
 
 	if (matches > 0) {
 		can_stats.matches++;

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

end of thread, other threads:[~2009-04-20  9:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 19:58 [PATCH 2.6.30] Network Drop Monitor: Make use of consume_skb() in af_can.c Oliver Hartkopp
2009-04-17  8:38 ` David Miller
2009-04-17  8:56   ` [PATCH] loopback: packet drops accounting Eric Dumazet
2009-04-17  8:59     ` David Miller
2009-04-17  9:27       ` Eric Dumazet
2009-04-17 10:06         ` [PATCH] loopback: better handling of packet drops Eric Dumazet
2009-04-17 10:33           ` Eric Dumazet
2009-04-17 10:51             ` David Miller
2009-04-17 12:22               ` Eric Dumazet
2009-04-17 14:58             ` Stephen Hemminger
2009-04-17 15:05               ` Eric Dumazet
2009-04-18  8:03         ` [PATCH] loopback: packet drops accounting Eric Dumazet
2009-04-20  9:26           ` David Miller

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).