From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 553DD8E7E for ; Wed, 25 Nov 2015 17:07:34 +0100 (CET) Received: by pacdm15 with SMTP id dm15so61357468pac.3 for ; Wed, 25 Nov 2015 08:07:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Wg/31c3UfXKkCMR/4oHOsaIQ71XSUTlktSPiKgpOFnc=; b=O5OxLjehob3wjzo4Bc79nlpenYtc7gZUYSHtbrn1gh8102F9ZaDnUTcwl/7xeC1K7r xIlv/mA6EFlJdhDEdCY8v7p6wOQByRxCvZ6MJVtO4/Z6N5xe0RluNWqL/ue+NxqOLZ6E HyNAr6GBhkzhEHHNCh48QtNz/XdX4+BMGqayuH4JlOF96VQ1qA3+t+GFpvqZC2uhulI7 MvXa4bJRXtATsAOoQ+YJCOmchTd4HdnX2Fee99P6y+TchdCk06/P0SsZlDUskzQfLu5P aILzA93StK3aXQxNb1r04AM4mMOmlKRxI/1DrrbmuSY2iGy1c6fPGja58SIlmgCvtO5T DzeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Wg/31c3UfXKkCMR/4oHOsaIQ71XSUTlktSPiKgpOFnc=; b=NgVSHiRQ0ekP1N6tqlgheTAwEfvs/dSushQ798gxfTzmOpuBBK48tZ2U8yB/GIw+NA dK+MFkWoUpxJz2rGzW75gWqvNImxTXdRIg92X5iLbrzFwehbXIabQsii8dMNQalpL5t0 5Dej9UE3sck+VxEODRxSAkANSLhNKh3BCx5qIBbA/BYpkS1Xsf/Ckzi9uOzUGUuAv6VT r1BCDBaDo8YU39zjFrmxMMGbD3sz4RavQSqX4PzBGJStaQ42vKHbQF8M0/wvyIKq3D6u 6tyjW7I2gISDRKxulJvzRsQK6DRhw2ZBSMlZLjUaETwrAT5kgQq6JA9Jvt44jhjf5Glr g06Q== X-Gm-Message-State: ALoCoQkPo1uY6kAObrYobodvOfwNWJUjQl1DhXLZKzWn8Mtk8ur5T8ZA0o48CZKaD77lcyoXOL1y X-Received: by 10.98.8.211 with SMTP id 80mr33131474pfi.136.1448467653459; Wed, 25 Nov 2015 08:07:33 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id 73sm21739669pfh.14.2015.11.25.08.07.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2015 08:07:32 -0800 (PST) Date: Wed, 25 Nov 2015 08:07:42 -0800 From: Stephen Hemminger To: "Montorsi, Francesco" Message-ID: <20151125080742.5451df3c@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] rte_eth_tx_queue_setup() failing (error -22) when setting up tx queues on a VMXNET3 port... 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, 25 Nov 2015 16:07:34 -0000 On Wed, 25 Nov 2015 10:32:33 +0000 "Montorsi, Francesco" wrote: > Hi all, > I have a server running VMWare ESXi 5.5.0 and VMWare vCenter 5.5.0. On such server I created a VM with two VMXNET3 NIC cards (one for management, the other one should be used with DPDK to enable fast-RX of packets coming from other VMs / bare-metal NICs). > > Inside the VM I have successfully created 2MB hugepages, loaded igb_uio driver and binded the 2nd VMXNET3 NIC to igb_uio driver: > > ---------------------------------------------------------------------------------------------------------------------- > $ ./dpdk_nic_bind.py --status > > Network devices using DPDK-compatible driver > ============================================ > 0000:0b:00.0 'VMXNET3 Ethernet Controller' drv=igb_uio unused=vmxnet3 > > Network devices using kernel driver > =================================== > 0000:03:00.0 'VMXNET3 Ethernet Controller' if=eth0 drv=vmxnet3 unused=igb_uio *Active* > > Other network devices > ===================== > > ---------------------------------------------------------------------------------------------------------------------- > > However when I start my DPDK-application I get the following error during TX queue initialization: > > ERR rte_eth_tx_queue_setup: err=-22, port=0: Unknown error -22 > > This is the code that I'm using: > > ... > rte_eth_dev_info_get(m_portid, m_dev_info); > > > // proceed with configuration > > struct rte_eth_conf port_conf; > memset(&port_conf, 0, sizeof(port_conf)); > > port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; > /** The multi-queue packet distribution mode to be used, e.g. RSS.; this is important to use multiple RX queues per port ID */ > port_conf.rxmode.max_rx_pkt_len = ETHER_MAX_LEN; > port_conf.rxmode.hw_strip_crc = 1; /**< enable CRC stripping by hardware */ > port_conf.rxmode.jumbo_frame = 1; /**< Jumbo Frame Support enabled */ > //port_conf.rxmode.enable_lro = 1; /**< Enable LRO */ // NOT SUPPORTED ON TESTED HW > port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP; > port_conf.txmode.mq_mode = ETH_MQ_TX_NONE; > > m_num_queues = MIN(64, m_dev_info->max_rx_queues); > m_num_queues = MIN(128, m_num_queues); > ret = rte_eth_dev_configure(m_portid, m_num_queues, 1 /* number of tx queues */, &port_conf); > if (ret < 0) > { > HMLogError("HwEmulDPDKPort::init() rte_eth_dev_configure: err=%d, port=%u: %s", ret, m_portid, rte_strerror(ret)); > return false; > } > > // init one TX queue: even if we never ever TX packets, at least 1 queue is needed! > ---> ret = rte_eth_tx_queue_setup(m_portid, 0 /* queue ID */, 64 /* num descriptors */, rte_eth_dev_socket_id(m_portid), NULL); > if (ret < 0) > { > // retry with just 1 descriptor > > ---> ret = rte_eth_tx_queue_setup(m_portid, 0 /* queue ID */, 1 /* num descriptors */, rte_eth_dev_socket_id(m_portid), NULL); > if (ret < 0) > { > HMLogError("HwEmulDPDKPort::init() rte_eth_tx_queue_setup: err=%d, port=%u: %s", ret, m_portid, rte_strerror(ret)); > return false; > } > } > > > Basically since I want to only receive packets (no TX) I'm not really interested in TX queues / num of TX descriptors... However I have troubles decrypting this -22 error code... any hint? First advice, DPDK is open source, therefore you have the source use it. Error codes match Linux/Unix errno's. You can use strerror(-ret) to find the value or look in errno.h. Hint -22 == EINVAL If you read the source, you will see that it there are log messages enabled if you configure with LIBRTE_ETHDEV_DEBUG enabled and rebuild DPDK. And there are log messages for VMXNETE3 controlled by LIBRTE_VMXNET3_DEBUG_INIT