[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1C9F648C@AcuExch.aculab.com>
Date: Fri, 21 Nov 2014 11:07:49 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Jeff Kirsher' <jeffrey.t.kirsher@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: Emil Tantilov <emil.s.tantilov@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"jogreene@...hat.com" <jogreene@...hat.com>,
Alexander Duyck <alexander.h.duyck@...hat.com>
Subject: RE: [net-next v2 08/15] ixgbevf: compare total_rx_packets and
budget in ixgbevf_clean_rx_irq
From: Jeff Kirsher
> From: Emil Tantilov <emil.s.tantilov@...el.com>
>
> total_rx_packets is the number of packets we had cleaned, and budget is
> the total number of packets that we could clean per poll. Instead of
> altering both of these values we can save ourselves one write to memory by
> just comparing total_rx_packets to the budget and as long as we are less
> than budget we continue cleaning.
>
> Also change the do{}while logic to while{} in order to avoid processing
> packets when budget is 0.
Does it matter if one packet is processed when budget is zero?
The 'do {} while ();' version will generate better code.
David
--
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