From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 85C268D9E for ; Wed, 28 Oct 2015 09:16:26 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 28 Oct 2015 01:16:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,209,1444719600"; d="scan'208";a="836878730" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 28 Oct 2015 01:16:25 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 28 Oct 2015 01:16:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 28 Oct 2015 01:16:24 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.47]) with mapi id 14.03.0248.002; Wed, 28 Oct 2015 16:16:23 +0800 From: "Liu, Jijiang" To: Padam Jeet Singh Thread-Topic: [dpdk-dev] Wrong TCP Checkum computed by hardware Thread-Index: AQHREU0LSfHUMsZ/+UOjEIIP9/z6j55/8z2AgAAGJACAAJCC0P//fhQAgACGoRA= Date: Wed, 28 Oct 2015 08:16:23 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC438D@SHSMSX101.ccr.corp.intel.com> References: <9E9D668A-17B5-4047-85B3-13519F898467@inventum.net> <20151028065757.GA4251@mhcomputing.net> <546F571B-8603-4D0E-95B3-6CE5BAD3EE02@inventum.net> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC432E@SHSMSX101.ccr.corp.intel.com> <38A0599F-BB59-49B6-B4E0-D16E0B95A745@inventum.net> In-Reply-To: <38A0599F-BB59-49B6-B4E0-D16E0B95A745@inventum.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Wrong TCP Checkum computed by hardware X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 08:16:27 -0000 > -----Original Message----- > From: Padam Jeet Singh [mailto:padam.singh@inventum.net] > Sent: Wednesday, October 28, 2015 4:12 PM > To: Liu, Jijiang > Cc: dev@dpdk.org; Matthew Hall > Subject: Re: [dpdk-dev] Wrong TCP Checkum computed by hardware >=20 >=20 > > On 28-Oct-2015, at 1:31 pm, Liu, Jijiang wrote: > > > > > >> -----Original Message----- > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Padam Jeet Singh > >> Sent: Wednesday, October 28, 2015 3:20 PM > >> To: Matthew Hall > >> Cc: dev@dpdk.org > >> Subject: Re: [dpdk-dev] Wrong TCP Checkum computed by hardware > >> > > > > Did you set the txq_flags? > > If the flag is not set, the default value is IXGBE_SIMPLE_FLAGS, and th= e any > TX offloads do not work. > > > > See the following codes in ixgbe_rxtx.c file > > > > /* Use a simple Tx queue (no offloads, no multi segs) if possible */ > > if (((txq->txq_flags & IXGBE_SIMPLE_FLAGS) =3D=3D IXGBE_SIMPLE_FLAGS) > > && (txq->tx_rs_thresh >=3D > RTE_PMD_IXGBE_TX_MAX_BURST)) { > > PMD_INIT_LOG(INFO, "Using simple tx code path"); > > ... > > dev->tx_pkt_burst =3D ixgbe_xmit_pkts_simple; > > } else { > > ... > > dev->tx_pkt_burst =3D ixgbe_xmit_pkts; > > } > > > > > > --Jijiang Liu >=20 > I initialise the queue with the following structure: >=20 > static const struct rte_eth_txconf tx_conf =3D { > .tx_thresh =3D { > .pthresh =3D 32, /* Ring prefetch threshold */ > .hthresh =3D 0, /* Ring host threshold */ > .wthresh =3D 0, /* Ring writeback threshold */ > }, > .tx_free_thresh =3D 0, /* Use PMD default values */ > .tx_rs_thresh =3D 0, /* Use PMD default values */ > }; >=20 > This would set the txq_flags to zero - so the tx_pkt_burst function would > always point to ixgbe_xmit_pkts. Also, as observed only TCP checksum is > computed wrong when there is VLAN TX Offload + IP Offload + TCP offload > bits set. VLAN TX Offload + IP Offload + TCP CKSUM in software generates > correct packet on the wire. I don't think the txq_flags is 0 if you just initialized the struct rte_eth= _txconf like that. > Thanks, > Padam