Re: [PATCH net-next] usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx> writes:

> Currently the usbnet core does not update the tx_packets statistic for
> drivers with FLAG_MULTI_PACKET and there is no hook in the TX
> completion path where they could do this.
>
> cdc_ncm and dependent drivers are bumping tx_packets stat on the
> transmit path while asix and sr9800 aren't updating it at all.
>
> Add a packet count in struct skb_data so these drivers can fill it
> in, initialise it to 1 for other drivers, and add the packet count
> to the tx_packets statistic on completion.
>
> Signed-off-by: Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx>
> ---
> I have only tested the asix driver after this change; I think cdc_ncm
> and one of the non-multi-packet drivers should also be tested before
> it's applied.

Looks very good to me.  I did a quick test with an MBIM device (the
cdc_mbim driver uses the parts of cdc_ncm you modify here), and it
worked as expected.

Thanks for doing this.  My only complaint was a wishlist for a similar
byte fixup, but then I noticed that you already did that :-)

Tested-by: Bjørn Mork <bjorn@xxxxxxx>



Bjørn
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux