DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yong Wang <yongwang@vmware.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Xu, Qian Q" <qian.q.xu@intel.com>,
	"Ding,  HengX" <hengx.ding@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] testpmd could not start up with vmxnet3 port
Date: Thu, 24 Mar 2016 03:38:35 +0000	[thread overview]
Message-ID: <6510912D-233D-4453-A72F-1544B023BE12@vmware.com> (raw)
In-Reply-To: <2884173.JGZgsZNF00@xps13>

On 3/23/16, 8:55 AM, "Thomas Monjalon" <thomas.monjalon@6wind.com> wrote:



>2016-03-23 05:57, Yong Wang:
>> From: Ding, HengX
>> > Testpmd will fail to start up with vmxnet3 port.
>[...]
>> Currently vmxnet3’s default_txconf.txq_flags is set to the following, which is used by testpmd
>> as there is no explicit txconf passed when initializing tx queue:
>> 
>>         dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS |
>>                                                 ETH_TXQ_FLAGS_NOOFFLOADS;
>
>In vmxnet3_dev_tx_queue_setup:
>    if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOXSUMS) !=
>        ETH_TXQ_FLAGS_NOXSUMSCTP) {
>        PMD_INIT_LOG(ERR, "SCTP checksum offload not supported");
>        return -EINVAL;
>    }
>It means we cannot disable TCP or UDP checksum offload.
>ETH_TXQ_FLAGS_NOXSUMS = NOXSUMSCTP + NOXSUMUDP + NOXSUMTCP
>
>I think it should be:
>    if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP) !=
>        ETH_TXQ_FLAGS_NOXSUMSCTP) {

I understand this. As I pointed out, such checks are not consistently
enforced as far as I can tell.  Other than Intel drivers, no other
drivers claim DEV_TX_OFFLOAD_SCTP_CKSUM but only vmxnet3 really
checks this. Also, what’s not clear to me is that why do we need
this negative check if we have rx_offload_capa and tx_offload_capa?


Anyway, I’ll send out a patch to fix this.

>
>> With the referred patch that introduced l4 cksum offload, we should update the default txq
>> flags check accordingly.  Heng, can you post the error logs to confirm this is indeed the cause
>> of the error you reported?
>
>The default conf is ETH_TXQ_FLAGS_NOOFFLOADS (= NOVLANOFFL + NOXSUMS).
>Yes you can update the default conf, *and* fix the check above.
>
>> Related to this, I saw that the check for NOMULTISEGS has been removed and the check for
>> NOVLANOFF was never implemented.  Should we just remove the offload flags check as well
>> as I don’t see much value of this check.  Basically we know that the device does not support
>> certain offload and we have to set those flags to let the device initialize. But doing this does
>> nothing to prevent users to request these non-supported offload.  I also saw another thread
>> discussing better device capability APIs and hopefully this will not be needed then
>
>These checks are important to throw an error if an offload is requested
>but not supported.

      reply	other threads:[~2016-03-24  3:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  3:27 Ding, HengX
2016-03-23  3:31 ` Xu, Qian Q
2016-03-23  5:52   ` Yong Wang
2016-03-23 17:27     ` Vincent Li
2016-03-23  5:57   ` Yong Wang
2016-03-23  6:28     ` Ding, HengX
2016-03-23 15:55     ` Thomas Monjalon
2016-03-24  3:38       ` Yong Wang [this message]

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=6510912D-233D-4453-A72F-1544B023BE12@vmware.com \
    --to=yongwang@vmware.com \
    --cc=dev@dpdk.org \
    --cc=hengx.ding@intel.com \
    --cc=qian.q.xu@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas.monjalon@6wind.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).