[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1413968323.5994.6.camel@decadent.org.uk>
Date: Wed, 22 Oct 2014 09:58:43 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Edward Cree <ecree@...arflare.com>
Cc: Robert Stonehouse <rstonehouse@...arflare.com>,
Daniel Borkmann <dborkman@...hat.com>, davem@...emloft.net,
nikolay@...hat.com, netdev@...r.kernel.org,
Shradha Shah <sshah@...arflare.com>,
Jon Cooper <jcooper@...arflare.com>,
linux-net-drivers <linux-net-drivers@...arflare.com>
Subject: Re: [PATCH net-next] sfc: add support for skb->xmit_more
On Fri, 2014-10-17 at 15:32 +0100, Edward Cree wrote:
[...]
> @@ -351,7 +343,7 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
> unsigned short dma_flags;
> int i = 0;
>
> - EFX_BUG_ON_PARANOID(tx_queue->write_count != tx_queue->insert_count);
> + EFX_BUG_ON_PARANOID(tx_queue->write_count > tx_queue->insert_count);
[...]
Doesn't this break after 2^32 descriptors? It seems like you would need
a similar comparison to time_after(); possibly:
EFX_BUG_ON_PARANOID((int)(tx_queue->write_count - tx_queue->insert_count) > 0);
Ben.
--
Ben Hutchings
For every action, there is an equal and opposite criticism. - Harrison
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists