mbox series

[net-next,0/5] net: switch further drivers to core functionality for handling per-cpu byte/packet counters

Message ID 5fbe3a1f-6625-eadc-b1c9-f76f78debb94@gmail.com
Headers show
Series net: switch further drivers to core functionality for handling per-cpu byte/packet counters | expand

Message

Heiner Kallweit Nov. 10, 2020, 7:46 p.m. UTC
Switch further drivers to core functionality for handling per-cpu
byte/packet counters.
All changes are compile-tested only.

Heiner Kallweit (5):
  IB/hfi1: switch to core handling of rx/tx byte/packet counters
  qmi_wwan: switch to core handling of rx/tx byte/packet counters
  qtnfmac: switch to core handling of rx/tx byte/packet counters
  usbnet: switch to core handling of rx/tx byte/packet counters
  net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64
    alias

 drivers/infiniband/hw/hfi1/driver.c           |  4 +-
 drivers/infiniband/hw/hfi1/ipoib.h            | 27 -------
 drivers/infiniband/hw/hfi1/ipoib_main.c       | 15 +---
 drivers/infiniband/hw/hfi1/ipoib_tx.c         |  2 +-
 drivers/net/usb/aqc111.c                      |  2 +-
 drivers/net/usb/asix_devices.c                |  6 +-
 drivers/net/usb/ax88172a.c                    |  2 +-
 drivers/net/usb/ax88179_178a.c                |  2 +-
 drivers/net/usb/cdc_mbim.c                    |  2 +-
 drivers/net/usb/cdc_ncm.c                     |  2 +-
 drivers/net/usb/dm9601.c                      |  2 +-
 drivers/net/usb/int51x1.c                     |  2 +-
 drivers/net/usb/mcs7830.c                     |  2 +-
 drivers/net/usb/qmi_wwan.c                    | 41 +++-------
 drivers/net/usb/rndis_host.c                  |  2 +-
 drivers/net/usb/sierra_net.c                  |  2 +-
 drivers/net/usb/smsc75xx.c                    |  2 +-
 drivers/net/usb/smsc95xx.c                    |  2 +-
 drivers/net/usb/sr9700.c                      |  2 +-
 drivers/net/usb/sr9800.c                      |  2 +-
 drivers/net/usb/usbnet.c                      | 23 ++----
 drivers/net/wireless/quantenna/qtnfmac/core.c | 78 ++++---------------
 drivers/net/wireless/quantenna/qtnfmac/core.h |  4 -
 .../quantenna/qtnfmac/pcie/pearl_pcie.c       |  4 +-
 .../quantenna/qtnfmac/pcie/topaz_pcie.c       |  4 +-
 drivers/net/wireless/rndis_wlan.c             |  2 +-
 include/linux/usb/usbnet.h                    |  4 -
 27 files changed, 59 insertions(+), 183 deletions(-)

Comments

Kalle Valo Nov. 11, 2020, 5:12 p.m. UTC | #1
Heiner Kallweit <hkallweit1@gmail.com> writes:

> Use netdev->tstats instead of a member of qtnf_vif for storing a pointer

> to the per-cpu counters. This allows us to use core functionality for

> statistics handling.

> The driver sets netdev->needs_free_netdev, therefore freeing the per-cpu

> counters at the right point in time is a little bit tricky. Best option

> seems to be to use the ndo_init/ndo_uninit callbacks.

>

> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

> ---

>  drivers/net/wireless/quantenna/qtnfmac/core.c | 78 ++++---------------

>  drivers/net/wireless/quantenna/qtnfmac/core.h |  4 -

>  .../quantenna/qtnfmac/pcie/pearl_pcie.c       |  4 +-

>  .../quantenna/qtnfmac/pcie/topaz_pcie.c       |  4 +-

>  4 files changed, 20 insertions(+), 70 deletions(-)


Jakub, feel free to take this to net-next:

Acked-by: Kalle Valo <kvalo@codeaurora.org>


But I can also take this to wireless-drivers-next, whichever you prefer.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches