]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: add counter for times Rx pages gets allocated, not recycled
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 4 Sep 2017 18:40:22 +0000 (20:40 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 17:02:38 +0000 (10:02 -0700)
commit694541cdbf80cf5321cca9cd414a2d42b31c77f2
treec369a79fed15c39a96f63927995d8b38ac2c0953
parentc0b849581f31c0e0b68b28e2de8532a1bbd7e7d8
ixgbe: add counter for times Rx pages gets allocated, not recycled

The ixgbe driver have page recycle scheme based around the RX-ring
queue, where a RX page is shared between two packets. Based on the
refcnt, the driver can determine if the RX-page is currently only used
by a single packet, if so it can then directly refill/recycle the
RX-slot by with the opposite "side" of the page.

While this is a clever trick, it is hard to determine when this
recycling is successful and when it fails.  Adding a counter, which is
available via ethtool --statistics as 'alloc_rx_page'.  Which counts
the number of times the recycle fails and the real page allocator is
invoked.  When interpreting the stats, do remember that every alloc
will serve two packets.

The counter is collected per rx_ring, but is summed and ethtool
exported as 'alloc_rx_page'.  It would be relevant to know what
rx_ring that cannot keep up, but that can be exported later if
someone experience a need for this.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c