lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1347435199.13103.690.camel@edumazet-glaptop>
Date:	Wed, 12 Sep 2012 09:33:19 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Shawn Bohrer <sbohrer@...advisors.com>
Cc:	netdev@...r.kernel.org, sanagi.koki@...fujitsu.com,
	davem@...emloft.net
Subject: Re: [PATCH] net_tx_action: Call trace_consume_skb() instead of
 trace_kfree_skb()

On Tue, 2012-09-11 at 18:28 -0500, Shawn Bohrer wrote:
> Call trace_consume_skb() instead of trace_kfree_skb() as skbs are
> removed from the completion_queue during transmit.  This avoids false
> positives from dropwatch/drop_monitor making them more useful.
> 
> Signed-off-by: Shawn Bohrer <sbohrer@...advisors.com>
> ---
> 
> In my case I seem to hit this tracepoint for every packet I transmit so
> these appear to be false positives to me.  Perhaps there are cases where
> you could hit this and it is a real packet drop?
> 
>  net/core/dev.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 8398836..00774ce 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3015,7 +3015,7 @@ static void net_tx_action(struct softirq_action *h)
>  			clist = clist->next;
>  
>  			WARN_ON(atomic_read(&skb->users));
> -			trace_kfree_skb(skb, net_tx_action);
> +			trace_consume_skb(skb);
>  			__kfree_skb(skb);
>  		}
>  	}
> -- 
> 1.7.7.6
> 
> 


Problem here is : we dont know if caller of dev_kfree_skb_irq(skb)
wanted to drop or consume skb.

(We dont have a dev_consume_skb_irq(skb) function)

For example, drivers/infiniband/ulp/ipoib/ipoib_main.c function
path_free() does :

while ((skb = __skb_dequeue(&path->queue)))
	dev_kfree_skb_irq(skb);

Are these packets dropped or consumed, I dont really know...

Note : NAPI drivers dont use dev_kfree_skb_irq(skb).

What is the NIC driver you are using, I thought it was mellanox (wich is
NAPI) ?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ