[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130116212622.GA32073@electric-eye.fr.zoreil.com>
Date: Wed, 16 Jan 2013 22:26:22 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: David Miller <davem@...emloft.net>
Cc: timo.teras@....fi, netdev@...r.kernel.org
Subject: Re: [PATCH] r8169: remove unneeded dirty_rx index
David Miller <davem@...emloft.net> :
[...]
> > @@ -6035,10 +6034,8 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
> > unsigned int count;
> >
> > cur_rx = tp->cur_rx;
> > - rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;
> > - rx_left = min(rx_left, budget);
> >
> > - for (; rx_left > 0; rx_left--, cur_rx++) {
> > + for (rx_left = min(budget, NUM_RX_DESC); rx_left > 0; rx_left--, cur_rx++) {
>
> Is this really equivalent? I think cur_rx still needs to be
> incorporated into whatever you use as the initial rx_left.
The rx ring can't contain hole so the code above must be read with
"tp->cur_rx == tp->dirty_rx" in mind.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists