]> 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)
commit572c7224d4421b6286d1dab5273b9f550ad184e4
tree3e8f7a5622e13bfdeb50d004dcf87a25eeda3902
parentd2d52c840a8b1d8024b7a3a95f841d8a77e6bc5e
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