netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: David Miller <davem@davemloft.net>
Cc: manish.chopra@qlogic.com, sony.chacko@qlogic.com,
	rajesh.borundia@qlogic.com, netdev@vger.kernel.org,
	snagarka@redhat.com, tcamuso@redhat.com, vdasgupt@redhat.com
Subject: Re: [PATCH 2/2] netxen: Add sanity checks for Rx buffers returning from hardware
Date: Fri, 24 Jan 2014 16:21:26 +1100	[thread overview]
Message-ID: <20140124052126.GB4361@voom.redhat.com> (raw)
In-Reply-To: <20131219.150527.1753716895684393783.davem@davemloft.net>

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

On Thu, Dec 19, 2013 at 03:05:27PM -0500, David Miller wrote:
> From: David Gibson <david@gibson.dropbear.id.au>
> Date: Tue, 17 Dec 2013 16:22:33 +1100
> 
> > +static int netxen_check_rx_buf(int index, struct netxen_rx_buffer *rxbuf)
> > +{
> > +	int ret = 0;
> > +
> > +	if ((rxbuf->list.next != LIST_POISON1)
> > +	    || (rxbuf->list.prev != LIST_POISON2)) {
> > +		printk(KERN_ERR "netxen: Rx buffer is already on free list "
> > +		       "(next=%p, prev=%p)\n", rxbuf->list.next,
> > +		       rxbuf->list.prev);
> > +		ret = -1;
> > +	}
> 
> First, you should be using netdev_err() or similar.

Well, I was just matching the form used in the rest of the driver.

> Second, doing this unconditionally for every receive packet is
> not really reasonable.

Yeah, trouble is I don't know what the alternative is.  Whatever is
causing this problem, it's triggered very rarely - I'm only seeing a
pattern by looking across everything reported by Red Hat customers.
Just adding diagnostics for one customer is unlikely to be useful,
because the chances are they'll never hit the bug again.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-01-24  5:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17  5:22 [0/2] netxen: bug fix and diagnostics for possible (hardware?) bug David Gibson
2013-12-17  5:22 ` [PATCH 1/2] netxen: Correct off-by-one error in bounds check David Gibson
2013-12-17  6:37   ` Jitendra Kalsaria
2013-12-19 11:51   ` Manish Chopra
2013-12-20  4:11     ` David Gibson
2013-12-17  5:22 ` [PATCH 2/2] netxen: Add sanity checks for Rx buffers returning from hardware David Gibson
2013-12-19 20:05   ` David Miller
2014-01-24  5:21     ` David Gibson [this message]
2013-12-17 21:50 ` [0/2] netxen: bug fix and diagnostics for possible (hardware?) bug Manish Chopra
2013-12-18  6:22   ` David Gibson
2013-12-19  9:11     ` Manish Chopra
2014-01-24  6:44       ` David Gibson

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=20140124052126.GB4361@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --cc=davem@davemloft.net \
    --cc=manish.chopra@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=rajesh.borundia@qlogic.com \
    --cc=snagarka@redhat.com \
    --cc=sony.chacko@qlogic.com \
    --cc=tcamuso@redhat.com \
    --cc=vdasgupt@redhat.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;
as well as URLs for NNTP newsgroup(s).