Re: [EXT] Re: [PATCH/RFC v2 net-next] ravb: unmap descriptors when freeing rings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/12/2017 07:55 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).

   Yeah, sorry, O thought you mean the TX ring size wrapping.

So what prevents them from wrapping every 2^32 processed tx descriptors? Am I
missing
something?

   The math should still work all right IIUC.

Regards,
Lino

MBR, Sergei




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux