Hi David
On 1/5/2016 4:34 AM, David Miller wrote:
From: Giuseppe Cavallaro
Date: Mon, 4 Jan 2016 14:06:49 +0100
@@ -2056,7 +2068,10 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb,
struct net_device *dev)
priv->hw->desc->set_tx_owner(first);
wmb();
- priv->cur_tx
From: Giuseppe Cavallaro
Date: Mon, 4 Jan 2016 14:06:49 +0100
> @@ -2056,7 +2068,10 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb,
> struct net_device *dev)
> priv->hw->desc->set_tx_owner(first);
> wmb();
>
> - priv->cur_tx++;
> + if (++entry >= txsize)
> +
The indexes into the ring buffer are always incremented, and
the entry is accessed via doing a modulo to find the "real" index.
I have changed this for 3 reasons:
* It is inefficient, modulo is an expensive operation.
* It is also broken when the counter wraps.
* It makes my head hurt trying to c
The indexes into the ring buffer are always incremented, and
the entry is accessed via doing a modulo to find the "real" index.
I have changed this for 3 reasons:
* It is inefficient, modulo is an expensive operation.
* It is also broken when the counter wraps.
* It makes my head hurt trying to c