From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0061.outbound.protection.outlook.com [104.47.41.61]) by dpdk.org (Postfix) with ESMTP id EEBA01B589 for ; Tue, 9 Oct 2018 16:18:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZDV6FP1yXYrY3hT8k5OssaeHXoRniyfjKLJeLCHeHWw=; b=d947WJ6+ENALNMrGvItirCdiN9Swl2vqHz1/lPFJdGOcgHvOXpvZHer8T4+qr3NU6Oad2eGZEUwuYZ56E1Q34H78OdavJNNu4YlaIsTXtRpl9jQfYckFvXRkPJRaxybRLHWzasPJCLY7mQKzH7rlbKK+EGWHFuhC6cxUcM7YY2Y= Received: from BYAPR07MB4997.namprd07.prod.outlook.com (52.135.238.214) by BYAPR07MB4182.namprd07.prod.outlook.com (52.135.222.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.28; Tue, 9 Oct 2018 14:18:19 +0000 Received: from BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::c5c:4d86:b353:175a]) by BYAPR07MB4997.namprd07.prod.outlook.com ([fe80::c5c:4d86:b353:175a%4]) with mapi id 15.20.1207.024; Tue, 9 Oct 2018 14:18:19 +0000 From: Jerin Jacob To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "olivier.matz@6wind.com" , "Jacob, Jerin" Thread-Topic: [dpdk-dev] [PATCH v5 4/4] app/testpmd: collect bad outer L4 checksum for csum engine Thread-Index: AQHUX9rtpMFhfgW13UuFfN5J46nyJg== Date: Tue, 9 Oct 2018 14:18:18 +0000 Message-ID: <20181009141741.5162-4-jerin.jacob@caviumnetworks.com> References: <20181008160953.32510-1-jerin.jacob@caviumnetworks.com> <20181009141741.5162-1-jerin.jacob@caviumnetworks.com> In-Reply-To: <20181009141741.5162-1-jerin.jacob@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [111.93.218.67] x-clientproxiedby: DM5PR21CA0032.namprd21.prod.outlook.com (2603:10b6:3:ed::18) To BYAPR07MB4997.namprd07.prod.outlook.com (2603:10b6:a03:5b::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4182; 6:xkNGEyWMnXHBEfXbHuzbvs2aDVEjSOwmQVIqLbWfUBfTrCJRowHRM2nfEYoEvWSkcRaCMomviU86JehLKupm9sBtQpeXt5QaQ3iLAlK1V8xi+0RS3AwGDoBhXeaDu9UdtAl8nvsVe6PbFZGGk429Ncrpep9KzKxjCEaIBiQ/CNDiATi2BvZmnsn8lCczfJx38cD331XLGIHbeR6+5MCTD0F2bhhJ3zCkPdEiHIBPI57g46tJ6W5Fgd0Y4kzXiWfRm3VhsfpoahNVtTaas4kXhyqquX6zgr1tdyPc9z7Ilrx7O8qiiJm+BLN+JDRRts37P69/LzqetVbWxqIMoZ/9plB4cFjg/ley2a75RWtKa+yhwxZ1rj6DOa8Ri1viosr+QszG1MIWmHjZ5Fzv4/vIe8e4xkoXC1wFUIMbdrAQTsP9PNQkY24IYaq7hsTKwRYyrjVIOAhpQN+Df5nctRXJ8Q==; 5:y3O+aVlWOg52S1tZLaKzY8lAsCjW8hn5GYckCc0UTOYdqyyEqdBFNInxZw+A8ngTKkq7xkojsJdpzd/0YAnpGGMK4dfxNdAXj2f+2ERZ0FfsGyOsZ7KeMaLD+u5etC5ntlfbTV60bsDufWFIMdHUPPoF/LauFf1bbGOd04Tt9Gs=; 7:lp9J6xvGAFYonAzVd350o62iUOxEC0aG1akoj4K+jeEUlMKNh2xKi/6+6kn+7NvhPHbe21fHu2/m/PkPUkPEbac+4d6rfAUrvi4AZGHJe1U57CwK3DXCHm3NX7LI/V4Qn3X2D8sPTu6yn5Ld/kmoEDl4XModad+WhxLAxrSQd3Sv7TJ7crPlzF3H3t76ChyBa2HsdnawMFE1o3ZETFa8rMoxEdne3ig/EeGvnrexN3VjkFgNo0Ii8PhLaPWC/8EB x-ms-office365-filtering-correlation-id: 7ea70dcd-4a87-4b47-0e53-08d62df20f60 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4182; x-ms-traffictypediagnostic: BYAPR07MB4182: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(93006095)(3002001)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991055); SRVR:BYAPR07MB4182; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4182; x-forefront-prvs: 08200063E9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(39850400004)(376002)(346002)(189003)(199004)(106356001)(186003)(6116002)(575784001)(14454004)(6506007)(66066001)(2906002)(52116002)(446003)(26005)(1857600001)(476003)(72206003)(2616005)(99286004)(3846002)(486006)(1076002)(102836004)(386003)(76176011)(478600001)(11346002)(42882007)(5250100002)(81166006)(110136005)(2900100001)(53936002)(81156014)(6486002)(97736004)(8936002)(54906003)(256004)(107886003)(316002)(25786009)(36756003)(68736007)(6512007)(105586002)(305945005)(6436002)(5660300001)(4326008)(7736002)(8676002)(71200400001)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4182; H:BYAPR07MB4997.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 0TOCcvH5SSBXSVJV4S42cMwqynaf/36tRbRbKwIkZAnFA1606xGYR0AmJ3WaetYTxi4Vx4V/HVtacymBOkhXatJmwFXwnxImag6y2sb6YoN3FyP44idlDYt87JH2jOSaypipsQOzWHDucKfSuWCyqPaZVfTmCAe2om54DlaCGOYQ7H7rPCo0qwtjtpQgf7dHJxTRJCIsgb4w5YxxW7sczZ6SjOme0j01eGsqCbXdELYSu4FVjqTgTOPepbMQo5Z39r/lFZmiPtLAIB6ziiKWuWv8/JQfuaWxylCXyCNNkDUi4xOLZyihbeuAAdK7sTrMGfxKQ85dUIcQ1jVOFXxw0b2WZM23+p4t9o83IUksx4E= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ea70dcd-4a87-4b47-0e53-08d62df20f60 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2018 14:18:18.8886 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4182 Subject: [dpdk-dev] [PATCH v5 4/4] app/testpmd: collect bad outer L4 checksum for csum engine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 14:18:22 -0000 Collect and prints the statistics for PKT_RX_EL4_CKSUM_BAD errors. Signed-off-by: Jerin Jacob Reviewed-by: Andrew Rybchenko Acked-by: Bernard Iremonger --- 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 =3D 0; int ret; @@ -726,6 +727,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) fs->rx_packets +=3D nb_rx; rx_bad_ip_csum =3D 0; rx_bad_l4_csum =3D 0; + rx_bad_outer_l4_csum =3D 0; gro_enable =3D gro_ports[fs->rx_port].enable; =20 txp =3D &ports[fs->tx_port]; @@ -753,6 +755,8 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) rx_bad_ip_csum +=3D 1; if ((rx_ol_flags & PKT_RX_L4_CKSUM_MASK) =3D=3D PKT_RX_L4_CKSUM_BAD) rx_bad_l4_csum +=3D 1; + if (rx_ol_flags & PKT_RX_OUTER_L4_CKSUM_BAD) + rx_bad_outer_l4_csum +=3D 1; =20 /* 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 +=3D nb_tx; fs->rx_bad_ip_csum +=3D rx_bad_ip_csum; fs->rx_bad_l4_csum +=3D rx_bad_l4_csum; + fs->rx_bad_outer_l4_csum +=3D rx_bad_outer_l4_csum; =20 #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_e= th_stats *stats) (uint64_t) (stats->ipackets + stats->imissed)); =20 if (cur_fwd_eng =3D=3D &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-l4= csum: %-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_e= th_stats *stats) (uint64_t) (stats->ipackets + stats->imissed)); =20 if (cur_fwd_eng =3D=3D &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 =3D=3D &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); } =20 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS @@ -1378,6 +1382,7 @@ start_packet_forwarding(int with_tx_first) fwd_streams[sm_id]->fwd_dropped =3D 0; fwd_streams[sm_id]->rx_bad_ip_csum =3D 0; fwd_streams[sm_id]->rx_bad_l4_csum =3D 0; + fwd_streams[sm_id]->rx_bad_outer_l4_csum =3D 0; =20 #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 =3D rx_bad_l4_csum; =20 + ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum +=3D + fwd_streams[sm_id]->rx_bad_outer_l4_csum; + #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES fwd_cycles =3D (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 */ --=20 2.19.1