[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4950c7fd-dfe5-ea02-ba23-5477a0ba8e5e@marvell.com>
Date: Thu, 12 Jan 2017 17:55:29 +0100
From: Lino Sanfilippo <lsanfil@...vell.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Simon Horman <horms@...ge.net.au>
CC: David Miller <davem@...emloft.net>,
Magnus Damm <magnus.damm@...il.com>, <netdev@...r.kernel.org>,
<linux-renesas-soc@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH/RFC v2 net-next] ravb: unmap descriptors when
freeing rings
Hi,
On 12.01.2017 17:37, Sergei Shtylyov wrote:
> External Email
>
> ----------------------------------------------------------------------
> On 01/12/2017 04:23 PM, Lino Sanfilippo wrote:
>
>>>>> +
>>>>> + for (; priv->cur_tx[q] - priv->dirty_tx[q] > 0; priv->dirty_tx[q]++) {
>>
>> BTW: How can this work correctly when cur_tx wraps and dirty_tx is greater?
>
> {cur|dirty}_tx never wrap.
>
Both values are 32 bit and AFAICS they are only incremented (and never reset or
decremented).
So what prevents them from wrapping every 2^32 processed tx descriptors? Am I missing
something?
Regards,
Lino
Powered by blists - more mailing lists