From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp81.ord1c.emailsrvr.com (smtp81.ord1c.emailsrvr.com [108.166.43.81]) by dpdk.org (Postfix) with ESMTP id E7EDB8D9E for ; Wed, 28 Oct 2015 09:30:44 +0100 (CET) Received: from smtp3.relay.ord1c.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp3.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 67C4A180482; Wed, 28 Oct 2015 04:30:44 -0400 (EDT) Received: by smtp3.relay.ord1c.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id 5B717180466; Wed, 28 Oct 2015 04:30:43 -0400 (EDT) X-Sender-Id: padam.singh@inventum.net Received: from [172.16.1.231] ([UNAVAILABLE]. [103.25.205.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:25 (trex/5.4.2); Wed, 28 Oct 2015 08:30:44 GMT Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) From: Padam Jeet Singh In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC438D@SHSMSX101.ccr.corp.intel.com> Date: Wed, 28 Oct 2015 14:00:39 +0530 Content-Transfer-Encoding: quoted-printable Message-Id: 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> <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC438D@SHSMSX101.ccr.corp.intel.com> To: "Liu, Jijiang" X-Mailer: Apple Mail (2.2070.6) 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:30:45 -0000 > On 28-Oct-2015, at 1:46 pm, Liu, Jijiang = wrote: >=20 >=20 >=20 >> -----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: >>>=20 >>>=20 >>>> -----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 >>>>=20 >>>=20 >>> Did you set the txq_flags? >>> If the flag is not set, the default value is IXGBE_SIMPLE_FLAGS, and = the any >> TX offloads do not work. >>>=20 >>> See the following codes in ixgbe_rxtx.c file >>>=20 >>> /* 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; >>> } >>>=20 >>>=20 >>> --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. >=20 > I don't think the txq_flags is 0 if you just initialized the struct = rte_eth_txconf like that. It=E2=80=99s declared as a global static, so it indeed is 0. I also = added some debug around the init of the queue: for (i =3D 0; i < tx; ++i) { ret =3D rte_eth_tx_queue_setup(port, i, NB_TXD, rte_eth_dev_socket_id(port), &tx_conf); RTE_LOG(INFO, APP, "Port %u TXQ[%d] txflags =3D %d\n", = (unsigned)port, i, tx_conf.txq_flags); if (ret < 0) rte_exit(EXIT_FAILURE, "Could not setup up TX queue %d = for " "port%u (%d)", i, (unsigned)port, ret); } And got the following result: Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 0 TXQ[0] txflags =3D 0 Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 0 TXQ[1] txflags =3D 0 Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 1 TXQ[0] txflags =3D 0 Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 1 TXQ[1] txflags =3D 0 Oct 28 13:55:35 localhost fpnas[1322]: APP: Port 2 TXQ[0] txflags =3D 0 Oct 28 13:55:35 localhost fpnas[1322]: APP: Port 3 TXQ[0] txflags =3D 0 >=20 >> Thanks, >> Padam