From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/5] bnx2: Print warning when unable to allocate the full SKB/page ring.
Date: Thu, 3 Dec 2009 11:46:33 -0800 [thread overview]
Message-ID: <1259869595-6450-3-git-send-email-mchan@broadcom.com> (raw)
In-Reply-To: <1259869595-6450-1-git-send-email-mchan@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
drivers/net/bnx2.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 665253a..dba3840 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5158,8 +5158,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
ring_prod = prod = rxr->rx_pg_prod;
for (i = 0; i < bp->rx_pg_ring_size; i++) {
- if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0)
+ if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) {
+ printk(KERN_WARNING PFX "%s: init'ed rx page ring %d "
+ "with %d/%d pages only\n",
+ bp->dev->name, ring_num, i, bp->rx_pg_ring_size);
break;
+ }
prod = NEXT_RX_BD(prod);
ring_prod = RX_PG_RING_IDX(prod);
}
@@ -5167,8 +5171,12 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
ring_prod = prod = rxr->rx_prod;
for (i = 0; i < bp->rx_ring_size; i++) {
- if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0)
+ if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) {
+ printk(KERN_WARNING PFX "%s: init'ed rx ring %d with "
+ "%d/%d skbs only\n",
+ bp->dev->name, ring_num, i, bp->rx_ring_size);
break;
+ }
prod = NEXT_RX_BD(prod);
ring_prod = RX_RING_IDX(prod);
}
--
1.6.4.GIT
next prev parent reply other threads:[~2009-12-03 19:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 19:46 [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() Michael Chan
2009-12-03 19:46 ` [PATCH 2/5] bnx2: Dump some state during tx timeout Michael Chan
2009-12-03 21:07 ` David Miller
2009-12-03 19:46 ` Michael Chan [this message]
2009-12-03 21:08 ` [PATCH 3/5] bnx2: Print warning when unable to allocate the full SKB/page ring David Miller
2009-12-03 21:49 ` Michael Chan
2009-12-03 22:05 ` David Miller
2009-12-03 19:46 ` [PATCH 4/5] bnx2: Read firmware version from VPD Michael Chan
2009-12-03 20:17 ` Ben Hutchings
2009-12-03 21:43 ` Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 19:46 ` [PATCH 5/5] bnx2: Update version to 2.0.3 Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 21:07 ` [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() David Miller
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=1259869595-6450-3-git-send-email-mchan@broadcom.com \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).