[dpdk-dev] testpmd could not start up with vmxnet3 port

Yong Wang yongwang at vmware.com
Thu Mar 24 04:38:35 CET 2016


On 3/23/16, 8:55 AM, "Thomas Monjalon" <thomas.monjalon at 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.


More information about the dev mailing list