From: Bjørn Mork <bjorn@xxxxxxx> Date: Wed, 25 Mar 2015 21:41:33 +0100 > From: Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx> > > 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: beeecd42c3b4 ("net: cdc_ncm/cdc_mbim: adding NCM protocol statistics") > Signed-off-by: Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx> > Signed-off-by: Bjørn Mork <bjorn@xxxxxxx> > --- > This should really go to stable-3.19 and 4.0, but since it depends on > 6588af614e7b ("usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers") > already in net-next, then I guess it is net-next for this patch as well. I cherry picked 6588af614e7b ("usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers") and put it into 'net', along with this fix. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html