-
- Downloads
usbnet: Fix tx_bytes statistic running backward in cdc_ncm
cdc_ncm disagrees with usbnet about how much framing overhead should be counted in the tx_bytes statistics, and tries 'fix' this by decrementing tx_bytes on the transmit path. But statistics must never be decremented except due to roll-over; this will thoroughly confuse user-space. Also, tx_bytes is only incremented by usbnet in the completion path. Fix this by requiring drivers that set FLAG_MULTI_FRAME to set a tx_bytes delta along with the tx_packets count. Fixes: beeecd42 ("net: cdc_ncm/cdc_mbim: adding NCM protocol statistics") Signed-off-by:Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by:
Bjørn Mork <bjorn@mork.no>
Showing
- drivers/net/usb/asix_common.c 1 addition, 1 deletiondrivers/net/usb/asix_common.c
- drivers/net/usb/cdc_ncm.c 3 additions, 4 deletionsdrivers/net/usb/cdc_ncm.c
- drivers/net/usb/sr9800.c 1 addition, 1 deletiondrivers/net/usb/sr9800.c
- drivers/net/usb/usbnet.c 13 additions, 3 deletionsdrivers/net/usb/usbnet.c
- include/linux/usb/usbnet.h 4 additions, 2 deletionsinclude/linux/usb/usbnet.h
Loading
Please register or sign in to comment