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 5B7069422 for ; Wed, 25 Nov 2015 18:56:18 +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 12:55:50 -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 12:55:50 -0500 From: "Montorsi, Francesco" To: Stephen Hemminger Thread-Topic: [dpdk-dev] rte_eth_tx_queue_setup() failing (error -22) when setting up tx queues on a VMXNET3 port... Thread-Index: AdEnbJdKvHAYo+2qT3+B3OnGmqxA3wAWLtoAAAbaXEA= Date: Wed, 25 Nov 2015 17:55:50 +0000 Message-ID: <23c134dd50bf4f9ead41dc6b3467984f@bilemail1.empirix.com> References: <20151125080742.5451df3c@xeon-e3> In-Reply-To: <20151125080742.5451df3c@xeon-e3> 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 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 17:56:18 -0000 Hi Stephen, > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] >=20 > If you read the source, you will see that it there are log messages enabl= ed if > you configure with LIBRTE_ETHDEV_DEBUG enabled and rebuild DPDK. And > there are log messages for VMXNETE3 controlled by > LIBRTE_VMXNET3_DEBUG_INIT Thanks for this hint. I didn't know actually where to read... anyway enabli= ng these additional debug messages I found the cause of the problem: the mi= nimal TX queue ring size for VMXNET3 is 512; I was passing 64. Fixed this problem, I'm now on the next one.... I discovered that apparentl= y the driver for VMXNET3 supports only a limited set of functions: (gdb) p *dev->dev_ops $3 =3D {dev_configure =3D 0x75cda5 , dev_start =3D 0= x75d653 , dev_stop =3D 0x75d799 , dev_= set_link_up =3D 0, dev_set_link_down =3D 0, dev_close =3D 0x75d8ab , promiscuous_enable =3D 0x75dd= 12 , promiscuous_disable =3D 0x75ddf6 , allmulticast_enable =3D 0x75df0c , allmu= lticast_disable =3D 0x75df40 , link_updat= e =3D 0x75dbd9 , stats_get =3D 0x75d8fe , stats_reset =3D 0, xstats= _get =3D 0, xstats_reset =3D 0, queue_stats_mapping_set =3D 0, dev_infos_ge= t =3D 0x75db7f , mtu_set =3D 0, vlan_filter_set =3D 0x75df74 = , vlan_tpid_set =3D 0, vlan_strip_queue_set =3D 0, vlan_offload_set =3D 0x7= 5e455 , vlan_pvid_set =3D 0, rx_queue_start =3D 0, rx_queue_stop =3D 0, tx_queue_= start =3D 0, tx_queue_stop =3D 0, rx_queue_setup =3D 0x75bfb8 , rx_queue_release =3D 0x74b069 , rx_queue_co= unt =3D 0, rx_descriptor_done =3D 0, rx_queue_intr_enable =3D 0, rx_queue_i= ntr_disable =3D 0, tx_queue_setup =3D 0x75bbc6 , tx_queue_releas= e =3D 0x74b03c , dev_led_on =3D 0, dev_led_of= f =3D 0, flow_ctrl_get =3D 0, flow_ctrl_set =3D 0, priority_flow_ctrl_set =3D 0, mac_addr_remove =3D 0,= mac_addr_add =3D 0, mac_addr_set =3D 0, uc_hash_table_set =3D 0, uc_all_ha= sh_table_set =3D 0, mirror_rule_set =3D 0, mirror_rule_reset =3D 0, set_vf_rx_mode =3D 0, set_vf_rx =3D 0, set_vf_tx= =3D 0, set_vf_vlan_filter =3D 0, udp_tunnel_add =3D 0, udp_tunnel_del =3D = 0, set_queue_rate_limit =3D 0, set_vf_rate_limit =3D 0, fdir_add_signature_filter =3D 0, fdir_update_signature_filter =3D 0, fdir= _remove_signature_filter =3D 0, fdir_infos_get =3D 0, fdir_add_perfect_filt= er =3D 0, fdir_update_perfect_filter =3D 0, fdir_remove_perfect_filter =3D 0, fdir_set_masks =3D 0, reta_update =3D 0= , reta_query =3D 0, get_reg_length =3D 0, get_reg =3D 0, get_eeprom_length = =3D 0, get_eeprom =3D 0, set_eeprom =3D 0, rss_hash_update =3D 0, rss_hash_conf_get =3D 0, filter_ctrl =3D 0, set_mc= _addr_list =3D 0, timesync_enable =3D 0, timesync_disable =3D 0, timesync_r= ead_rx_timestamp =3D 0, timesync_read_tx_timestamp =3D 0} Since I was using the rte_eth_rx_queue_count() function in one place, and V= MXNET3 does not support it, I'm getting a SEGFAULT. So next question is: is user's task to check for validity of pointers insi= de dev_ops before calling driver functions? Because rte_eth_rx_queue_count(= ) and companion funcitons have no safety checks apparently (!!!) Thanks! Francesco