]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbevf: compare total_rx_packets and budget in ixgbevf_clean_rx_irq
authorEmil Tantilov <emil.s.tantilov@intel.com>
Sat, 8 Nov 2014 01:39:51 +0000 (01:39 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 20 Nov 2014 22:39:10 +0000 (14:39 -0800)
commite738003c94c799a6b761e47b0015734849a948c2
tree3e8f7a5622e13bfdeb50d004dcf87a25eeda3902
parentfe392bb565e363dbf2e3b4fec4acea38820e48f2
ixgbevf: compare total_rx_packets and budget in ixgbevf_clean_rx_irq

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.

CC: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c