[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131219.150527.1753716895684393783.davem@davemloft.net>
Date: Thu, 19 Dec 2013 15:05:27 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: david@...son.dropbear.id.au
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
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.
Second, doing this unconditionally for every receive packet is
not really reasonable.
--
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