[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140124052126.GB4361@voom.redhat.com>
Date: Fri, 24 Jan 2014 16:21:26 +1100
From: David Gibson <david@...son.dropbear.id.au>
To: David Miller <davem@...emloft.net>
Cc: manish.chopra@...gic.com, sony.chacko@...gic.com,
rajesh.borundia@...gic.com, netdev@...r.kernel.org,
snagarka@...hat.com, tcamuso@...hat.com, vdasgupt@...hat.com
Subject: Re: [PATCH 2/2] netxen: Add sanity checks for Rx buffers returning
from hardware
On Thu, Dec 19, 2013 at 03:05:27PM -0500, David Miller wrote:
> From: David Gibson <david@...son.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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists