DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	"arybchenko@solarflare.com" <arybchenko@solarflare.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>,
	"Jacob,  Jerin" <Jerin.JacobKollanukkaran@cavium.com>
Subject: [dpdk-dev] [PATCH v5 4/4] app/testpmd: collect bad outer L4 checksum for csum engine
Date: Tue, 9 Oct 2018 14:18:18 +0000	[thread overview]
Message-ID: <20181009141741.5162-4-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <20181009141741.5162-1-jerin.jacob@caviumnetworks.com>

Collect and prints the statistics for PKT_RX_EL4_CKSUM_BAD
errors.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/csumonly.c |  5 +++++
 app/test-pmd/testpmd.c  | 18 +++++++++++++-----
 app/test-pmd/testpmd.h  |  4 ++++
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index ea5b112d6..dce4b9be7 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -701,6 +701,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 	uint32_t retry;
 	uint32_t rx_bad_ip_csum;
 	uint32_t rx_bad_l4_csum;
+	uint32_t rx_bad_outer_l4_csum;
 	struct testpmd_offload_info info;
 	uint16_t nb_segments = 0;
 	int ret;
@@ -726,6 +727,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 	fs->rx_packets += nb_rx;
 	rx_bad_ip_csum = 0;
 	rx_bad_l4_csum = 0;
+	rx_bad_outer_l4_csum = 0;
 	gro_enable = gro_ports[fs->rx_port].enable;
 
 	txp = &ports[fs->tx_port];
@@ -753,6 +755,8 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 			rx_bad_ip_csum += 1;
 		if ((rx_ol_flags & PKT_RX_L4_CKSUM_MASK) == PKT_RX_L4_CKSUM_BAD)
 			rx_bad_l4_csum += 1;
+		if (rx_ol_flags & PKT_RX_OUTER_L4_CKSUM_BAD)
+			rx_bad_outer_l4_csum += 1;
 
 		/* step 1: dissect packet, parsing optional vlan, ip4/ip6, vxlan
 		 * and inner headers */
@@ -991,6 +995,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 	fs->tx_packets += nb_tx;
 	fs->rx_bad_ip_csum += rx_bad_ip_csum;
 	fs->rx_bad_l4_csum += rx_bad_l4_csum;
+	fs->rx_bad_outer_l4_csum += rx_bad_outer_l4_csum;
 
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
 	fs->tx_burst_stats.pkt_burst_spread[nb_tx]++;
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 001f0e552..2a641fcfe 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1040,8 +1040,9 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 		       (uint64_t) (stats->ipackets + stats->imissed));
 
 		if (cur_fwd_eng == &csum_fwd_engine)
-			printf("  Bad-ipcsum: %-14"PRIu64" Bad-l4csum: %-14"PRIu64" \n",
-			       port->rx_bad_ip_csum, port->rx_bad_l4_csum);
+			printf("  Bad-ipcsum: %-14"PRIu64" Bad-l4csum: %-14"PRIu64"Bad-outer-l4csum: %-14"PRIu64"\n",
+			       port->rx_bad_ip_csum, port->rx_bad_l4_csum,
+			       port->rx_bad_outer_l4_csum);
 		if ((stats->ierrors + stats->rx_nombuf) > 0) {
 			printf("  RX-error: %-"PRIu64"\n",  stats->ierrors);
 			printf("  RX-nombufs: %-14"PRIu64"\n", stats->rx_nombuf);
@@ -1059,8 +1060,9 @@ fwd_port_stats_display(portid_t port_id, struct rte_eth_stats *stats)
 		       (uint64_t) (stats->ipackets + stats->imissed));
 
 		if (cur_fwd_eng == &csum_fwd_engine)
-			printf("  Bad-ipcsum:%14"PRIu64"    Bad-l4csum:%14"PRIu64"\n",
-			       port->rx_bad_ip_csum, port->rx_bad_l4_csum);
+			printf("  Bad-ipcsum:%14"PRIu64"    Bad-l4csum:%14"PRIu64"    Bad-outer-l4csum: %-14"PRIu64"\n",
+			       port->rx_bad_ip_csum, port->rx_bad_l4_csum,
+			       port->rx_bad_outer_l4_csum);
 		if ((stats->ierrors + stats->rx_nombuf) > 0) {
 			printf("  RX-error:%"PRIu64"\n", stats->ierrors);
 			printf("  RX-nombufs:             %14"PRIu64"\n",
@@ -1124,7 +1126,9 @@ fwd_stream_stats_display(streamid_t stream_id)
 	/* if checksum mode */
 	if (cur_fwd_eng == &csum_fwd_engine) {
 	       printf("  RX- bad IP checksum: %-14u  Rx- bad L4 checksum: "
-			"%-14u\n", fs->rx_bad_ip_csum, fs->rx_bad_l4_csum);
+			"%-14u Rx- bad outer L4 checksum: %-14u\n",
+			fs->rx_bad_ip_csum, fs->rx_bad_l4_csum,
+			fs->rx_bad_outer_l4_csum);
 	}
 
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
@@ -1378,6 +1382,7 @@ start_packet_forwarding(int with_tx_first)
 		fwd_streams[sm_id]->fwd_dropped = 0;
 		fwd_streams[sm_id]->rx_bad_ip_csum = 0;
 		fwd_streams[sm_id]->rx_bad_l4_csum = 0;
+		fwd_streams[sm_id]->rx_bad_outer_l4_csum = 0;
 
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
 		memset(&fwd_streams[sm_id]->rx_burst_stats, 0,
@@ -1483,6 +1488,9 @@ stop_packet_forwarding(void)
 		ports[fwd_streams[sm_id]->rx_port].rx_bad_l4_csum =
 							rx_bad_l4_csum;
 
+		ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum +=
+				fwd_streams[sm_id]->rx_bad_outer_l4_csum;
+
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
 		fwd_cycles = (uint64_t) (fwd_cycles +
 					 fwd_streams[sm_id]->core_cycles);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a1f661472..106aeefc2 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -112,6 +112,8 @@ struct fwd_stream {
 	unsigned int fwd_dropped; /**< received packets not forwarded */
 	unsigned int rx_bad_ip_csum ; /**< received packets has bad ip checksum */
 	unsigned int rx_bad_l4_csum ; /**< received packets has bad l4 checksum */
+	unsigned int rx_bad_outer_l4_csum;
+	/**< received packets has bad outer l4 checksum */
 	unsigned int gro_times;	/**< GRO operation times */
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
 	uint64_t     core_cycles; /**< used for RX and TX processing */
@@ -165,6 +167,8 @@ struct rte_port {
 	void                    *fwd_ctx;   /**< Forwarding mode context */
 	uint64_t                rx_bad_ip_csum; /**< rx pkts with bad ip checksum  */
 	uint64_t                rx_bad_l4_csum; /**< rx pkts with bad l4 checksum */
+	uint64_t                rx_bad_outer_l4_csum;
+	/**< rx pkts with bad outer l4 checksum */
 	uint8_t                 tx_queue_stats_mapping_enabled;
 	uint8_t                 rx_queue_stats_mapping_enabled;
 	volatile uint16_t        port_status;    /**< port started or not */
-- 
2.19.1

  parent reply	other threads:[~2018-10-09 14:18 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 13:47 [dpdk-dev] [PATCH 1/4] ethdev: add SCTP Rx checksum offload support Jerin Jacob
2018-09-13 13:47 ` [dpdk-dev] [PATCH 2/4] mbuf: fix Tx offload mask Jerin Jacob
2018-10-01 13:45   ` Ferruh Yigit
2018-10-01 15:53     ` Jerin Jacob
2018-10-01 16:13       ` Ferruh Yigit
2018-09-13 13:47 ` [dpdk-dev] [PATCH 3/4] ethdev: add Rx offload outer L4 checksum definitions Jerin Jacob
2018-09-13 17:24   ` Shahaf Shuler
2018-09-14  3:05     ` Jerin Jacob
2018-09-16  5:53       ` Shahaf Shuler
2018-09-16  9:32         ` Jerin Jacob
2018-09-13 13:47 ` [dpdk-dev] [PATCH 4/4] ethdev: add Tx " Jerin Jacob
2018-10-01 13:45   ` Ferruh Yigit
2018-10-02  9:52     ` Jerin Jacob
2018-10-01 13:45 ` [dpdk-dev] [PATCH 1/4] ethdev: add SCTP Rx checksum offload support Ferruh Yigit
2018-10-01 13:46 ` Ferruh Yigit
2018-10-01 15:59   ` Jerin Jacob
2018-10-01 16:11     ` Ferruh Yigit
2018-10-02  8:53       ` Jerin Jacob
2018-10-02  9:13     ` Ferruh Yigit
2018-10-02 10:51 ` [dpdk-dev] [PATCH v2 1/2] " Jerin Jacob
2018-10-02 10:51   ` [dpdk-dev] [PATCH v2 2/2] mbuf: fix Tx offload mask Jerin Jacob
2018-10-04  2:31     ` Hu, Jiayu
2018-10-04 16:05       ` Ferruh Yigit
2018-10-03 18:52   ` [dpdk-dev] [PATCH v2 1/2] ethdev: add SCTP Rx checksum offload support Ferruh Yigit
2018-10-02 19:24 ` [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP checksum definition Jerin Jacob
2018-10-02 19:24   ` [dpdk-dev] [PATCH v2 2/4] ethdev: add Tx " Jerin Jacob
2018-10-03  7:41     ` Andrew Rybchenko
2018-10-03  7:58       ` Jerin Jacob
2018-10-03  8:02         ` Ferruh Yigit
2018-10-03  8:36           ` Thomas Monjalon
2018-10-03 10:52     ` Iremonger, Bernard
2018-10-02 19:24   ` [dpdk-dev] [PATCH v2 3/4] app/testpmd: add outer UDP HW checksum support Jerin Jacob
2018-10-03 13:23     ` Iremonger, Bernard
2018-10-02 19:24   ` [dpdk-dev] [PATCH v2 4/4] app/testpmd: collect bad outer L4 checksum for csum engine Jerin Jacob
2018-10-03  8:29     ` Andrew Rybchenko
2018-10-03  7:34   ` [dpdk-dev] [PATCH v2 1/4] ethdev: add Rx offload outer UDP checksum definition Andrew Rybchenko
2018-10-03  7:57     ` Jerin Jacob
2018-10-03  8:35       ` Thomas Monjalon
2018-10-03  8:36         ` Andrew Rybchenko
2018-10-03 17:12       ` Jerin Jacob
2018-10-03 18:00         ` Andrew Rybchenko
2018-10-03 18:14           ` Jerin Jacob
2018-10-03 19:47             ` Andrew Rybchenko
2018-10-03 20:08               ` Thomas Monjalon
2018-10-04  5:59               ` Jerin Jacob
2018-10-05 19:48                 ` Ferruh Yigit
2018-10-05 20:04                 ` Ferruh Yigit
2018-10-05 22:44                   ` Thomas Monjalon
2018-10-06  8:15                     ` Jerin Jacob
2018-10-06 12:18                       ` Ananyev, Konstantin
2018-10-08  8:12                         ` Ferruh Yigit
2018-10-08  8:24                           ` Jerin Jacob
2018-10-08  9:04                             ` Thomas Monjalon
2018-10-08  9:37                               ` Jerin Jacob
2018-10-08 10:53                                 ` Ferruh Yigit
2018-10-08 11:55                                   ` Jerin Jacob
2018-10-08 12:13                                     ` Ferruh Yigit
2018-10-08 12:25                                       ` Jerin Jacob
2018-10-08 13:03                                         ` Thomas Monjalon
2018-10-08 13:08                                           ` Jerin Jacob
2018-10-03  8:53   ` Ananyev, Konstantin
2018-10-03  8:59     ` Jerin Jacob
2018-10-03  9:17       ` Ananyev, Konstantin
2018-10-03  9:22         ` Jerin Jacob
2018-10-03 10:16           ` Ananyev, Konstantin
2018-10-03 11:15             ` Jerin Jacob
2018-10-03 10:51   ` Iremonger, Bernard
2018-10-03 11:19     ` Jerin Jacob
2018-10-03 13:00       ` Iremonger, Bernard
2018-10-03 18:16 ` [dpdk-dev] [PATCH v3 " Jerin Jacob
2018-10-03 18:16   ` [dpdk-dev] [PATCH v3 2/4] ethdev: add Tx " Jerin Jacob
2018-10-03 18:16   ` [dpdk-dev] [PATCH v3 3/4] app/testpmd: add outer UDP HW checksum support Jerin Jacob
2018-10-03 18:16   ` [dpdk-dev] [PATCH v3 4/4] app/testpmd: collect bad outer L4 checksum for csum engine Jerin Jacob
2018-10-04 13:45     ` Iremonger, Bernard
2018-10-04 14:16       ` Jerin Jacob
2018-10-04 15:06         ` Iremonger, Bernard
2018-10-08 16:09   ` [dpdk-dev] [PATCH v4 1/4] ethdev: add Rx offload outer UDP checksum definition Jerin Jacob
2018-10-08 16:09     ` [dpdk-dev] [PATCH v4 2/4] ethdev: add Tx " Jerin Jacob
2018-10-09 10:06       ` Andrew Rybchenko
2018-10-08 16:09     ` [dpdk-dev] [PATCH v4 3/4] app/testpmd: add outer UDP HW checksum support Jerin Jacob
2018-10-08 16:09     ` [dpdk-dev] [PATCH v4 4/4] app/testpmd: collect bad outer L4 checksum for csum engine Jerin Jacob
2018-10-09 10:06     ` [dpdk-dev] [PATCH v4 1/4] ethdev: add Rx offload outer UDP checksum definition Andrew Rybchenko
2018-10-09 14:18     ` [dpdk-dev] [PATCH v5 " Jerin Jacob
2018-10-09 14:18       ` [dpdk-dev] [PATCH v5 2/4] ethdev: add Tx " Jerin Jacob
2018-10-09 14:18       ` [dpdk-dev] [PATCH v5 3/4] app/testpmd: add outer UDP HW checksum support Jerin Jacob
2018-10-09 14:18       ` Jerin Jacob [this message]
2018-10-09 16:46       ` [dpdk-dev] [PATCH v5 1/4] ethdev: add Rx offload outer UDP checksum definition Ferruh Yigit

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=20181009141741.5162-4-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=Jerin.JacobKollanukkaran@cavium.com \
    --cc=arybchenko@solarflare.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.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 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).