From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 3ACA74C8B for ; Wed, 3 Oct 2018 10:30:20 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 7153748006E; Wed, 3 Oct 2018 08:30:18 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 3 Oct 2018 09:30:12 +0100 To: Jerin Jacob , Wenzhuo Lu , Jingjing Wu , "Bernard Iremonger" CC: , References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> <20181002192451.19119-1-jerin.jacob@caviumnetworks.com> <20181002192451.19119-4-jerin.jacob@caviumnetworks.com> From: Andrew Rybchenko Message-ID: Date: Wed, 3 Oct 2018 11:29:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181002192451.19119-4-jerin.jacob@caviumnetworks.com> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24132.003 X-TM-AS-Result: No-8.814600-8.000000-10 X-TMASE-MatchedRID: QW5G6BKkLToOwH4pD14DsPHkpkyUphL9CmMKzGWuTw3RLEyE6G4DRPuM DbkMkHupM90yViNIbDUy75FeLc189ev0250SgRWKrvcVVSKYsc/L0ev0kxsIk58DXYZsNUAj+Us iM9UtVes5yBmN/M9qEJCIsQ4o4hE+uY1NuNzmU+fBtFDYGmaWKpkShYcLpGH9H06W6rwtvNXN2W jbpqXgofa8+G6VxpdYgWg8WzvAdS0FrDF4OCzISWY0Io4Kxb86ZmRTedY+D5d4jy7i2qNcvd0pR IFbsjfbb7mJ6HbhlhGRk6XtYogiau9c69BWUTGwVnRXm1iHN1ZR8RAUGq/SZ+v8w6zLrNiEI00L 9g4TpIBBnSKnu5qPlldSaSxaIUcosSbvVoSrBn2wbmZ+L7e6gHWM6b0B621sa5XqVTYhHgGpe92 rMqJP62rX9Vo1ZAxQu5U8D7+iY/LWQXRwqDHgFUAd4o3ib8zUDYUOIQn92iKML1EtmCD5BQ43mO 3K9ZFxppbxtcaCetQ79jdFfeZky0MMprcbiest X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--8.814600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24132.003 X-MDID: 1538555419-Tub2CWOK-r53 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 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: Wed, 03 Oct 2018 08:30:20 -0000 On 10/2/18 10:24 PM, Jerin Jacob wrote: > Collect and prints the statistics for PKT_RX_EL4_CKSUM_BAD > errors. > > Signed-off-by: Jerin Jacob Reviewed-by: Andrew Rybchenko except two nits below <...> > @@ -753,6 +755,9 @@ 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_EL4_CKSUM_BAD) > + rx_bad_outer_l4_csum += 1; > + Unnecessary extra empty line. <...> > @@ -1482,6 +1488,12 @@ stop_packet_forwarding(void) > fwd_streams[sm_id]->rx_bad_l4_csum); > ports[fwd_streams[sm_id]->rx_port].rx_bad_l4_csum = > rx_bad_l4_csum; > + rx_bad_outer_l4_csum = > + ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum; > + rx_bad_outer_l4_csum = (uint64_t) (rx_bad_outer_l4_csum + > + fwd_streams[sm_id]->rx_bad_outer_l4_csum); > + ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum = > + rx_bad_outer_l4_csum; I guess it is copied from about and modified, but I think that so long magic is not required and the following simple version should do the job: ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum += fwd_streams[sm_id]->rx_bad_outer_l4_csum; rx_bad_outer_l4_csum is uint64_t and usual arithmetic conversions should guarantee the correct result.