From: Stephen Hemminger <shemminger@vyatta.com>
To: Usha Srinivasan <usha.srinivasan@qlogic.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Receive processing stops when dev->poll returns 1
Date: Thu, 5 Aug 2010 09:04:47 -0700 [thread overview]
Message-ID: <20100805090447.3f67d990@nehalam> (raw)
In-Reply-To: <7866DA1F8D2D4541B87FEE88E633ABAA2B72081FB6@MNEXMB1.qlogic.org>
On Thu, 5 Aug 2010 09:20:03 -0500
Usha Srinivasan <usha.srinivasan@qlogic.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().
next prev parent reply other threads:[~2010-08-05 16:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 14:20 Receive processing stops when dev->poll returns 1 Usha Srinivasan
2010-08-05 16:04 ` Stephen Hemminger [this message]
2010-08-05 16:11 ` Usha Srinivasan
2010-08-05 16:16 ` Stephen Hemminger
2010-08-05 16:22 ` Stephen Hemminger
2010-08-05 16:36 ` Usha Srinivasan
2010-08-05 17:37 ` Stephen Hemminger
2010-08-05 18:11 ` Usha Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100805090447.3f67d990@nehalam \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=usha.srinivasan@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox