]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: certain dropped packets aren't accounted for
authorAlex Elder <elder@linaro.org>
Thu, 12 May 2022 15:10:31 +0000 (10:10 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2022 11:01:42 +0000 (12:01 +0100)
commit94c0ad2052254b82be6d6327276a950419072b91
tree1baeda68e490d3041294b03b4464a765e8fb5bbd
parent6a796d3098e29145b85464aa263e3616cc71512d
net: ipa: certain dropped packets aren't accounted for

If an RX endpoint receives packets containing status headers, and a
packet in the buffer is not dropped, ipa_endpoint_skb_copy() is
responsible for wrapping the packet data in an SKB and forwarding it
to ipa_modem_skb_rx() for further processing.

If ipa_endpoint_skb_copy() gets a null pointer from build_skb(), it
just returns early.  But in the process it doesn't record that as a
dropped packet in the network device statistics.

Instead, call ipa_modem_skb_rx() whether or not the SKB pointer is
NULL; that function ensures the statistics are properly updated.

Fixes: e4f3afa03b23b ("net: ipa: skip SKB copy if no netdev")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c