netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: kuba@kernel.org, davem@davemloft.net
Cc: netdev@vger.kernel.org, bjorn@mork.no, dcbw@redhat.com,
	carl.yin@quectel.com, mpearson@lenovo.com, cchen50@lenovo.com,
	jwjiang@lenovo.com, ivan.zhang@quectel.com,
	naveen.kumar@quectel.com, Loic Poulain <loic.poulain@linaro.org>
Subject: [PATCH net-next v3 4/5] net: mhi: Add rx_length_errors stat
Date: Thu,  4 Feb 2021 19:17:40 +0100	[thread overview]
Message-ID: <1612462661-23045-5-git-send-email-loic.poulain@linaro.org> (raw)
In-Reply-To: <1612462661-23045-1-git-send-email-loic.poulain@linaro.org>

This can be used by proto when packet len is incorrect.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/net/mhi/mhi.h | 1 +
 drivers/net/mhi/net.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h
index 5050e4a..82210e0 100644
--- a/drivers/net/mhi/mhi.h
+++ b/drivers/net/mhi/mhi.h
@@ -9,6 +9,7 @@ struct mhi_net_stats {
 	u64_stats_t rx_bytes;
 	u64_stats_t rx_errors;
 	u64_stats_t rx_dropped;
+	u64_stats_t rx_length_errors;
 	u64_stats_t tx_packets;
 	u64_stats_t tx_bytes;
 	u64_stats_t tx_errors;
diff --git a/drivers/net/mhi/net.c b/drivers/net/mhi/net.c
index 58b4b7c..44cbfb3 100644
--- a/drivers/net/mhi/net.c
+++ b/drivers/net/mhi/net.c
@@ -95,6 +95,7 @@ static void mhi_ndo_get_stats64(struct net_device *ndev,
 		stats->rx_bytes = u64_stats_read(&mhi_netdev->stats.rx_bytes);
 		stats->rx_errors = u64_stats_read(&mhi_netdev->stats.rx_errors);
 		stats->rx_dropped = u64_stats_read(&mhi_netdev->stats.rx_dropped);
+		stats->rx_length_errors = u64_stats_read(&mhi_netdev->stats.rx_length_errors);
 	} while (u64_stats_fetch_retry_irq(&mhi_netdev->stats.rx_syncp, start));
 
 	do {
-- 
2.7.4


  parent reply	other threads:[~2021-02-04 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 18:17 [PATCH net-next v3 0/5] Add MBIM over MHI support Loic Poulain
2021-02-04 18:17 ` [PATCH net-next v3 1/5] net: mhi: Add protocol support Loic Poulain
2021-02-04 18:17 ` [PATCH net-next v3 2/5] net: mhi: Add dedicated folder Loic Poulain
2021-02-04 18:17 ` [PATCH net-next v3 3/5] net: mhi: Create mhi.h Loic Poulain
2021-02-04 18:17 ` Loic Poulain [this message]
2021-02-04 18:17 ` [PATCH net-next v3 5/5] net: mhi: Add mbim proto Loic Poulain
2021-02-04 18:21 ` [PATCH net-next v3 0/5] Add MBIM over MHI support Loic Poulain
2021-02-04 20:37   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1612462661-23045-5-git-send-email-loic.poulain@linaro.org \
    --to=loic.poulain@linaro.org \
    --cc=bjorn@mork.no \
    --cc=carl.yin@quectel.com \
    --cc=cchen50@lenovo.com \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --cc=ivan.zhang@quectel.com \
    --cc=jwjiang@lenovo.com \
    --cc=kuba@kernel.org \
    --cc=mpearson@lenovo.com \
    --cc=naveen.kumar@quectel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).