From: <sameehj@amazon.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Sameeh Jubran <sameehj@amazon.com>, <dwmw@amazon.com>,
<zorik@amazon.com>, <matua@amazon.com>, <saeedb@amazon.com>,
<msw@amazon.com>, <aliguori@amazon.com>, <nafea@amazon.com>,
<gtzalik@amazon.com>, <netanel@amazon.com>, <alisaidi@amazon.com>,
<benh@amazon.com>, <akiyano@amazon.com>,
Evgeny Shmeilin <evgeny@annapurnaLabs.com>
Subject: [PATCH V1 net-next 10/11] net: ena: add good checksum counter
Date: Wed, 29 May 2019 12:50:03 +0300 [thread overview]
Message-ID: <20190529095004.13341-11-sameehj@amazon.com> (raw)
In-Reply-To: <20190529095004.13341-1-sameehj@amazon.com>
From: Sameeh Jubran <sameehj@amazon.com>
Add a new statistics to ETHTOOL to specify if the device calculated
and validated the Rx csum.
Signed-off-by: Evgeny Shmeilin <evgeny@annapurnaLabs.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
---
drivers/net/ethernet/amazon/ena/ena_ethtool.c | 3 ++-
drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++
drivers/net/ethernet/amazon/ena/ena_netdev.h | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 65bc5a2b2..878546a48 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -88,13 +88,14 @@ static const struct ena_stats ena_stats_tx_strings[] = {
static const struct ena_stats ena_stats_rx_strings[] = {
ENA_STAT_RX_ENTRY(cnt),
ENA_STAT_RX_ENTRY(bytes),
+ ENA_STAT_RX_ENTRY(rx_copybreak_pkt),
+ ENA_STAT_RX_ENTRY(csum_good),
ENA_STAT_RX_ENTRY(refil_partial),
ENA_STAT_RX_ENTRY(bad_csum),
ENA_STAT_RX_ENTRY(page_alloc_fail),
ENA_STAT_RX_ENTRY(skb_alloc_fail),
ENA_STAT_RX_ENTRY(dma_mapping_err),
ENA_STAT_RX_ENTRY(bad_desc_num),
- ENA_STAT_RX_ENTRY(rx_copybreak_pkt),
ENA_STAT_RX_ENTRY(bad_req_id),
ENA_STAT_RX_ENTRY(empty_rx_ring),
ENA_STAT_RX_ENTRY(csum_unchecked),
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 399bd5453..cff297e19 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1001,6 +1001,9 @@ static inline void ena_rx_checksum(struct ena_ring *rx_ring,
if (likely(ena_rx_ctx->l4_csum_checked)) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ u64_stats_update_begin(&rx_ring->syncp);
+ rx_ring->rx_stats.csum_good++;
+ u64_stats_update_end(&rx_ring->syncp);
} else {
u64_stats_update_begin(&rx_ring->syncp);
rx_ring->rx_stats.csum_unchecked++;
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h
index 74c316081..ec111cfc5 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
@@ -208,13 +208,14 @@ struct ena_stats_tx {
struct ena_stats_rx {
u64 cnt;
u64 bytes;
+ u64 rx_copybreak_pkt;
+ u64 csum_good;
u64 refil_partial;
u64 bad_csum;
u64 page_alloc_fail;
u64 skb_alloc_fail;
u64 dma_mapping_err;
u64 bad_desc_num;
- u64 rx_copybreak_pkt;
u64 bad_req_id;
u64 empty_rx_ring;
u64 csum_unchecked;
--
2.17.1
next prev parent reply other threads:[~2019-05-29 9:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 9:49 [PATCH V1 net-next 00/11] Extending the ena driver to support new features and enhance performance sameehj
2019-05-29 9:49 ` [PATCH V1 net-next 01/11] net: ena: add handling of llq max tx burst size sameehj
2019-05-30 19:40 ` David Miller
2019-05-29 9:49 ` [PATCH V1 net-next 02/11] net: ena: ethtool: add extra properties retrieval via get_priv_flags sameehj
2019-05-29 22:09 ` Jakub Kicinski
2019-05-30 12:21 ` Kiyanovski, Arthur
2019-05-30 19:41 ` David Miller
2019-06-03 14:29 ` Jubran, Samih
2019-05-31 8:19 ` Michal Kubecek
2019-05-31 21:57 ` Machulsky, Zorik
2019-05-31 22:38 ` Michal Kubecek
2019-05-29 9:49 ` [PATCH V1 net-next 03/11] net: ena: replace free_tx/rx_ids union with single free_ids field in ena_ring sameehj
2019-05-29 9:49 ` [PATCH V1 net-next 04/11] net: ena: arrange ena_probe() function variables in reverse christmas tree sameehj
2019-05-29 9:49 ` [PATCH V1 net-next 05/11] net: ena: add newline at the end of pr_err prints sameehj
2019-05-29 9:49 ` [PATCH V1 net-next 06/11] net: ena: documentation: update ena.txt sameehj
2019-05-29 9:50 ` [PATCH V1 net-next 07/11] net: ena: allow automatic fallback to polling mode sameehj
2019-05-29 9:50 ` [PATCH V1 net-next 08/11] net: ena: add support for changing max_header_size in LLQ mode sameehj
2019-05-29 9:50 ` [PATCH V1 net-next 09/11] net: ena: optimise calculations for CQ doorbell sameehj
2019-05-29 9:50 ` sameehj [this message]
2019-05-29 9:50 ` [PATCH V1 net-next 11/11] net: ena: use dev_info_once instead of static variable sameehj
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=20190529095004.13341-11-sameehj@amazon.com \
--to=sameehj@amazon.com \
--cc=akiyano@amazon.com \
--cc=aliguori@amazon.com \
--cc=alisaidi@amazon.com \
--cc=benh@amazon.com \
--cc=davem@davemloft.net \
--cc=dwmw@amazon.com \
--cc=evgeny@annapurnaLabs.com \
--cc=gtzalik@amazon.com \
--cc=matua@amazon.com \
--cc=msw@amazon.com \
--cc=nafea@amazon.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=saeedb@amazon.com \
--cc=zorik@amazon.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.