]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: report correct statistics when XDP is enabled
authorBjörn Töpel <bjorn.topel@intel.com>
Fri, 24 Aug 2018 11:21:59 +0000 (13:21 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 30 Aug 2018 20:53:04 +0000 (13:53 -0700)
commitc0a687a4ba6cb3e38c3a62a2f4abff2413537ab7
treebe795e163eda8b15d90b30ff90a88749c703fa35
parent16b7371b07b150f97a47526a1f36fc609a5d8b3a
i40e: report correct statistics when XDP is enabled

When XDP is enabled, the driver will report incorrect
statistics. Received frames will reported as transmitted frames.

This commits fixes the i40e implementation of ndo_get_stats64 (struct
net_device_ops), so that iproute2 will report correct statistics
(e.g. when running "ip -stats link show dev eth0") even when XDP is
enabled.

Reported-by: Jesper Dangaard Brouer <brouer@redhat.com>
Fixes: 92c75640aa43 ("i40e: add support for XDP_TX action")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c