From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by dpdk.org (Postfix) with ESMTP id 70E1F156 for ; Thu, 7 Nov 2013 23:10:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1383862267; x=1415398267; h=from:to:cc:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=PoRd4dyfY5vJDrCc5tmagM7vqLX0S/5TOx90d0nzQss=; b=N4LcSKk8RfJO1X677sq/Agtq0mMeNG2zaVof29V0c+1t7dxmmc3jySio RN0WAemuXyomtmVU5925cgJLHLZx9YxC/hA1wZt0rv3+Q4T+U8LeIyRtW 4oY2IBwzzSEjUbJEVQIhWgPXFAfG+T3fdY9Tb6Me7M7ip7qlXJW1Zea7W g=; X-IronPort-AV: E=Sophos;i="4.93,654,1378857600"; d="scan'208";a="434067" Received: from smtp-in-9004.sea19.amazon.com ([10.186.102.8]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Nov 2013 21:51:08 +0000 Received: from ex10-hub-9004.ant.amazon.com (ex10-hub-9004.ant.amazon.com [10.185.137.182]) by smtp-in-9004.sea19.amazon.com (8.14.7/8.14.7) with ESMTP id rA7Lp7qf005758 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK); Thu, 7 Nov 2013 21:51:07 GMT Received: from EX10-MBX-36002.ant.amazon.com ([fe80::cd97:16ef:48e8:b9f5]) by ex10-hub-9004.ant.amazon.com ([::1]) with mapi id 14.02.0342.003; Thu, 7 Nov 2013 13:50:03 -0800 From: "Benson, Bryan" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] RX checksum offloading Thread-Index: Ac7bS6VHDEWA3z2uR/6QWCn3UF0daAAGLuCOAAHFf9wAHA4ygAAFhh+AAAQoQFI= Date: Thu, 7 Nov 2013 21:50:03 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.8.130913 x-originating-ip: [172.17.1.118] Content-Type: text/plain; charset="us-ascii" Content-ID: <6D985C6D8C3D8F48B308B7FFD1C602C0@ant.amazon.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: Bulk Subject: Re: [dpdk-dev] RX checksum offloading X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:10:12 -0000 All,=0A= I have prepared a patch for the issue. If it is not in the correct format,= please advise. I also changed the array to be uint32_t to be consistent w= ith the other functions that pull the status flags.=0A= =0A= =3D=3D PATCH BEGIN =3D=3D=0A= >>From 2ab73e88d92044c1d840f896d87e9a8cbcf29ce4 Mon Sep 17 00:00:00 2001=0A= From: Bryan Benson =0A= Date: Thu, 7 Nov 2013 21:38:57 +0000=0A= Subject: [PATCH] Do not unset the status bits in the scan_hw_ring function= =0A= when counting the number of done descriptors.=0A= =0A= ---=0A= inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 13 +++++++------=0A= 1 file changed, 7 insertions(+), 6 deletions(-)=0A= =0A= diff --git a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/inteldpdk/D= PDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c=0A= index 2be9979..c4abf9a 100755=0A= --- a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c=0A= +++ b/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c=0A= @@ -1037,7 +1037,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)=0A= struct igb_rx_entry *rxep;=0A= struct rte_mbuf *mb;=0A= uint16_t pkt_len;=0A= - int s[LOOK_AHEAD], nb_dd;=0A= + uint32_t s[LOOK_AHEAD];=0A= + int nb_dd;=0A= int i, j, nb_rx =3D 0;=0A= =0A= =0A= @@ -1060,12 +1061,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)=0A= for (j =3D LOOK_AHEAD-1; j >=3D 0; --j)=0A= s[j] =3D rxdp[j].wb.upper.status_error;=0A= =0A= - /* Clear everything but the status bits (LSB) */=0A= - for (j =3D 0; j < LOOK_AHEAD; ++j)=0A= - s[j] &=3D IXGBE_RXDADV_STAT_DD;=0A= + nb_dd =3D 0;=0A= + /* add to nd_dd when the status bit is set (LSB) */=0A= + for (j =3D 0; j < LOOK_AHEAD; ++j) {=0A= + nb_dd +=3D s[j] & IXGBE_RXDADV_STAT_DD;=0A= + }=0A= =0A= - /* Compute how many status bits were set */=0A= - nb_dd =3D s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];=0A= nb_rx +=3D nb_dd;=0A= =0A= /* Translate descriptor info to mbuf format */=0A= -- =0A= 1.7.9.5=0A= =0A= =3D=3D PATCH END =3D=3D=0A= =0A= A validation text email will follow.=0A= =0A= Thank you,=0A= Bryan Benson=0A= Amazon Web Services=0A= ________________________________________=0A= From: Thomas Monjalon [thomas.monjalon@6wind.com]=0A= Sent: Thursday, November 07, 2013 3:44 AM=0A= To: Benson, Bryan=0A= Cc: dev@dpdk.org; LiuFeng=0A= Subject: Re: [dpdk-dev] RX checksum offloading=0A= =0A= 07/11/2013 10:06, Thomas Monjalon :=0A= > 07/11/2013 04:44, Benson, Bryan :=0A= > > RX queues=3D1 - RX desc=3D1024 - RX free threshold=3D16=0A= > >=0A= > > ---------------------- Forward statistics for port 0=0A= > >=0A= > > RX-total: 543761 Bad-ipcsum: 543558 Bad-l4csum: 0=0A= > >=0A= > > ---------------------- Forward statistics for port 1=0A= > >=0A= > > RX-total: 542226 Bad-ipcsum: 0 Bad-l4csum: 542005=0A= > >=0A= > > RX queues=3D1 - RX desc=3D1024 - RX free threshold=3D32=0A= > >=0A= > > ---------------------- Forward statistics for port 0=0A= > >=0A= > > RX-total: 378894 Bad-ipcsum: 0 Bad-l4csum: 0=0A= > >=0A= > > ---------------------- Forward statistics for port 1=0A= > >=0A= > > RX-total: 381197 Bad-ipcsum: 0 Bad-l4csum: 0=0A= >=0A= > Excellent report, thank you !=0A= >=0A= > We need to fix it now :)=0A= =0A= LiuFeng had seen this issue with additonal comments:=0A= http://www.dpdk.org/ml/archives/dev/2013-September/000529.html=0A= =0A= --=0A= Thomas=0A= =0A= =0A=