Re: [PATCH net] net: wwan: qcom_bam_dmux: account network packets

From: Dmitry Sinyavin

Date: Mon Aug 31 2026 - 10:17:16 EST


Thanks for the review!

31.08.2026 11:23, Stephan Gerhold wrote:
This is a bit odd, why did you split the two if (netdev) statements?
The skb stays alive until it is freed here, so you should be able to
obtain the length even after bam_dmux_tx_done().

Agreed, will join them in v2.

Would it be better to increment the stats after the packet was already
passed to the network subsystem in this call?

I'm not sure if we need to check the return code of netif_receive_skb()
and increment rx_dropped if it fails. This seems to be handled
differently in various drivers. Maybe someone else knows?

My understanding is that rx_packets counts good packets received by the host even if they are dropped in the stack downstream. I also checked that mac80211 follows the same pattern: first dev_sw_netstats_rx_add(), then netif_receive_skb(), ignoring the result (the documentation for the latter also states that the result is "usually ignored"). If there are no strong objections, I'd leave that as is.

Best regards,
Dmitry