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]
Date:	Thu, 5 Aug 2010 11:11:51 -0500
From:	Usha Srinivasan <usha.srinivasan@...gic.com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: Receive processing stops when dev->poll returns 1

Thanks for your response. What you said is exactly what my driver is doing:


<= 2.6.23 
Calls netif_rx_complete if done < budget; decrements quota & *budget by done; returns 0 if done < budget and 1 otherwise.

When 1 is returned, I encounter the problem I described)

> 2.6.23
Calls napi-complete if done < budget; returns done.

When done==budget, I encounter the problem I described.

Any ideas?

-----Original Message-----
From: Stephen Hemminger [mailto:shemminger@...tta.com] 
Sent: Thursday, August 05, 2010 12:05 PM
To: Usha Srinivasan
Cc: netdev@...r.kernel.org
Subject: Re: Receive processing stops when dev->poll returns 1

On Thu, 5 Aug 2010 09:20:03 -0500
Usha Srinivasan <usha.srinivasan@...gic.com> wrote:

> Hello,
> I have run into an interesting and frustrating problem which I've not been able to resolve. I am hoping someone can help me.  
> 
> I have a network driver which sets its dev->weight to 100 (like ipoib) and when it processes 100 received packets, following the rules, it decrements dev->quota and *budget and returns 1 without calling netif_rx_complete.  When my driver does that, all processing of incoming packets for all interfaces comes to a halt.  
> 
> How do I know this?  Because, as soon as my driver returns 1 to dev->poll, I lose my putty session and eth0 stops working; eth0 counters show that it stops receiving packets, though it is able to transmit.  My own device stops receiving packets.  I have scoured the code for ipoib and other network devices and I see no difference in what my driver does.  I have tried to lower weight for ipoib & eth0 hoping to reproduce with those device it but no luck.

You maybe looking at old documentation on how NAPI works. 
In NAPI <= 2.6.23, the driver changed  dev->quota and budget
and returned 0 or 1.

For current kernels, the NAPI poll has changed.
Using your example,
  dev->weight = 100
  budget would be 100
 if your network driver process 100 packets, it should return 100
 and call napi_complete().

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