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 04:18 PM, Simon Horman wrote:

...

  Here, it stop once an untransmitted buffer is encountered...

Yes, I see that now.

I wonder if we should:

a) paramatise ravb_tx_free() so it may either clear all transmitted buffers
  (current behaviour) or all buffers (new behaviour).
b) provide a different version of this loop in ravb_ring_free()

What are your thoughts?

   I'm voting for (b).

Ok, something like this?

@@ -215,6 +225,30 @@ static void ravb_ring_free(struct net_device *ndev, int q)
 	}

 	if (priv->tx_ring[q]) {
+		for (; priv->cur_tx[q] - priv->dirty_tx[q] > 0; priv->dirty_tx[q]++) {

You're still copying the loop logic from ravb_tx_free() while we (I think) need a simple loop over all the descriptor ring.

[...]

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