[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150329.120720.1482940954016865143.davem@davemloft.net>
Date: Sun, 29 Mar 2015 12:07:20 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: bjorn@...k.no
Cc: netdev@...r.kernel.org, linux-usb@...r.kernel.org,
oliver@...kum.org, ben.hutchings@...ethink.co.uk
Subject: Re: [PATCH] usbnet: Fix tx_bytes statistic running backward in
cdc_ncm
From: Bjørn Mork <bjorn@...k.no>
Date: Wed, 25 Mar 2015 21:41:33 +0100
> From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
>
> 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@...ethink.co.uk>
> Signed-off-by: Bjørn Mork <bjorn@...k.no>
> ---
> 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists