From: "Montorsi, Francesco" <fmontorsi@empirix.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] rte_eth_tx_queue_setup() failing (error -22) when setting up tx queues on a VMXNET3 port...
Date: Wed, 25 Nov 2015 10:32:33 +0000 [thread overview]
Message-ID: <c47dff4f71df4614970fc2a23945d807@bilemail1.empirix.com> (raw)
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
=====================
<none>
----------------------------------------------------------------------------------------------------------------------
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?
Thanks a lot,
Francesco Montorsi
next reply other threads:[~2015-11-25 10:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 10:32 Montorsi, Francesco [this message]
2015-11-25 16:07 ` Stephen Hemminger
2015-11-25 17:55 ` Montorsi, Francesco
2015-11-25 17:59 ` Thomas Monjalon
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=c47dff4f71df4614970fc2a23945d807@bilemail1.empirix.com \
--to=fmontorsi@empirix.com \
--cc=dev@dpdk.org \
/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).