From: Padam Jeet Singh <padam.singh@inventum.net>
To: "Liu, Jijiang" <jijiang.liu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Wrong TCP Checkum computed by hardware
Date: Wed, 28 Oct 2015 14:00:39 +0530 [thread overview]
Message-ID: <C38DEBB8-131B-4B0F-8E17-92B3C74C5E05@inventum.net> (raw)
In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC22BC438D@SHSMSX101.ccr.corp.intel.com>
> On 28-Oct-2015, at 1:46 pm, Liu, Jijiang <jijiang.liu@intel.com> wrote:
>
>
>
>> -----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
>>
>>
>>> On 28-Oct-2015, at 1:31 pm, Liu, Jijiang <jijiang.liu@intel.com> 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 the 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) == IXGBE_SIMPLE_FLAGS)
>>> && (txq->tx_rs_thresh >=
>> RTE_PMD_IXGBE_TX_MAX_BURST)) {
>>> PMD_INIT_LOG(INFO, "Using simple tx code path");
>>> ...
>>> dev->tx_pkt_burst = ixgbe_xmit_pkts_simple;
>>> } else {
>>> ...
>>> dev->tx_pkt_burst = ixgbe_xmit_pkts;
>>> }
>>>
>>>
>>> --Jijiang Liu
>>
>> I initialise the queue with the following structure:
>>
>> static const struct rte_eth_txconf tx_conf = {
>> .tx_thresh = {
>> .pthresh = 32, /* Ring prefetch threshold */
>> .hthresh = 0, /* Ring host threshold */
>> .wthresh = 0, /* Ring writeback threshold */
>> },
>> .tx_free_thresh = 0, /* Use PMD default values */
>> .tx_rs_thresh = 0, /* Use PMD default values */
>> };
>>
>> 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.
It’s declared as a global static, so it indeed is 0. I also added some debug around the init of the queue:
for (i = 0; i < tx; ++i) {
ret = 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 = %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 = 0
Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 0 TXQ[1] txflags = 0
Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 1 TXQ[0] txflags = 0
Oct 28 13:55:34 localhost fpnas[1322]: APP: Port 1 TXQ[1] txflags = 0
Oct 28 13:55:35 localhost fpnas[1322]: APP: Port 2 TXQ[0] txflags = 0
Oct 28 13:55:35 localhost fpnas[1322]: APP: Port 3 TXQ[0] txflags = 0
>
>> Thanks,
>> Padam
next prev parent reply other threads:[~2015-10-28 8:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 6:50 Padam Jeet Singh
2015-10-28 6:57 ` Matthew Hall
2015-10-28 7:19 ` Padam Jeet Singh
2015-10-28 8:01 ` Liu, Jijiang
2015-10-28 8:12 ` Padam Jeet Singh
2015-10-28 8:16 ` Liu, Jijiang
2015-10-28 8:30 ` Padam Jeet Singh [this message]
2015-10-28 8:34 ` Liu, Jijiang
2015-10-28 11:02 ` Padam Jeet Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C38DEBB8-131B-4B0F-8E17-92B3C74C5E05@inventum.net \
--to=padam.singh@inventum.net \
--cc=dev@dpdk.org \
--cc=jijiang.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).