From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail1.empirix.com (bilemail1.empirix.com [208.67.76.245]) by dpdk.org (Postfix) with ESMTP id 3E4EB5A08 for ; Wed, 25 Nov 2015 11:32:53 +0100 (CET) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail1.empirix.com (10.17.8.30) with Microsoft SMTP Server (TLS) id 15.0.775.38; Wed, 25 Nov 2015 05:32:33 -0500 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.0775.031; Wed, 25 Nov 2015 05:32:33 -0500 From: "Montorsi, Francesco" To: "dev@dpdk.org" Thread-Topic: rte_eth_tx_queue_setup() failing (error -22) when setting up tx queues on a VMXNET3 port... Thread-Index: AdEnbJdKvHAYo+2qT3+B3OnGmqxA3w== Date: Wed, 25 Nov 2015 10:32:33 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.50.69] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [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 10:32:53 -0000 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 dri= ver and binded the 2nd VMXNET3 NIC to igb_uio driver: ---------------------------------------------------------------------------= ------------------------------------------- $ ./dpdk_nic_bind.py --status Network devices using DPDK-compatible driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:0b:00.0 'VMXNET3 Ethernet Controller' drv=3Digb_uio unused=3Dvmxnet3 Network devices using kernel driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 0000:03:00.0 'VMXNET3 Ethernet Controller' if=3Deth0 drv=3Dvmxnet3 unused= =3Digb_uio *Active* Other network devices =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ---------------------------------------------------------------------------= ------------------------------------------- However when I start my DPDK-application I get the following error during T= X queue initialization: ERR rte_eth_tx_queue_setup: err=3D-22, port=3D0: 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 =3D 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 =3D ETHER_MAX_LEN; port_conf.rxmode.hw_strip_crc =3D 1; /**< enable CRC stripping by hardwa= re */ port_conf.rxmode.jumbo_frame =3D 1; /**< Jumbo Frame Support enabled */ //port_conf.rxmode.enable_lro =3D 1; /**< Enable LRO */ // NOT SUPPOR= TED ON TESTED HW port_conf.rx_adv_conf.rss_conf.rss_hf =3D ETH_RSS_IP; port_conf.txmode.mq_mode =3D ETH_MQ_TX_NONE; m_num_queues =3D MIN(64, m_dev_info->max_rx_queues); m_num_queues =3D MIN(128, m_num_queues); ret =3D rte_eth_dev_configure(m_portid, m_num_queues, 1 /* number of tx qu= eues */, &port_conf); if (ret < 0) { HMLogError("HwEmulDPDKPort::init() rte_eth_dev_configure: err=3D%d, port= =3D%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 i= s needed! ---> ret =3D rte_eth_tx_queue_setup(m_portid, 0 /* queue ID */, 64 /* num d= escriptors */, rte_eth_dev_socket_id(m_portid), NULL); if (ret < 0) { // retry with just 1 descriptor ---> ret =3D rte_eth_tx_queue_setup(m_portid, 0 /* queue ID */, 1 /* num d= escriptors */, rte_eth_dev_socket_id(m_portid), NULL); if (ret < 0) { HMLogError("HwEmulDPDKPort::init() rte_eth_tx_queue_setup: err=3D%d, por= t=3D%u: %s", ret, m_portid, rte_strerror(ret)); return false; } } Basically since I want to only receive packets (no TX) I'm not really inter= ested in TX queues / num of TX descriptors... However I have troubles decry= pting this -22 error code... any hint? Thanks a lot, Francesco Montorsi