[dpdk-dev] rte_eth_tx_queue_setup() failing (error -22) when setting up tx queues on a VMXNET3 port...

Montorsi, Francesco fmontorsi at empirix.com
Wed Nov 25 18:55:50 CET 2015


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> 
> 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

Thanks for this hint. I didn't know actually where to read... anyway enabling these additional debug messages I found the cause of the problem: the minimal 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 apparently the driver for VMXNET3 supports only a limited set of functions:

(gdb) p *dev->dev_ops
$3 = {dev_configure = 0x75cda5 <vmxnet3_dev_configure>, dev_start = 0x75d653 <vmxnet3_dev_start>, dev_stop = 0x75d799 <vmxnet3_dev_stop>, dev_set_link_up = 0, dev_set_link_down = 0,
  dev_close = 0x75d8ab <vmxnet3_dev_close>, promiscuous_enable = 0x75dd12 <vmxnet3_dev_promiscuous_enable>, promiscuous_disable = 0x75ddf6 <vmxnet3_dev_promiscuous_disable>,
  allmulticast_enable = 0x75df0c <vmxnet3_dev_allmulticast_enable>, allmulticast_disable = 0x75df40 <vmxnet3_dev_allmulticast_disable>, link_update = 0x75dbd9 <vmxnet3_dev_link_update>,
  stats_get = 0x75d8fe <vmxnet3_dev_stats_get>, stats_reset = 0, xstats_get = 0, xstats_reset = 0, queue_stats_mapping_set = 0, dev_infos_get = 0x75db7f <vmxnet3_dev_info_get>,
  mtu_set = 0, vlan_filter_set = 0x75df74 <vmxnet3_dev_vlan_filter_set>, vlan_tpid_set = 0, vlan_strip_queue_set = 0, vlan_offload_set = 0x75e455 <vmxnet3_dev_vlan_offload_set>,
  vlan_pvid_set = 0, rx_queue_start = 0, rx_queue_stop = 0, tx_queue_start = 0, tx_queue_stop = 0, rx_queue_setup = 0x75bfb8 <vmxnet3_dev_rx_queue_setup>,
  rx_queue_release = 0x74b069 <vmxnet3_dev_rx_queue_release>, rx_queue_count = 0, rx_descriptor_done = 0, rx_queue_intr_enable = 0, rx_queue_intr_disable = 0,
  tx_queue_setup = 0x75bbc6 <vmxnet3_dev_tx_queue_setup>, tx_queue_release = 0x74b03c <vmxnet3_dev_tx_queue_release>, dev_led_on = 0, dev_led_off = 0, flow_ctrl_get = 0,
  flow_ctrl_set = 0, priority_flow_ctrl_set = 0, mac_addr_remove = 0, mac_addr_add = 0, mac_addr_set = 0, uc_hash_table_set = 0, uc_all_hash_table_set = 0, mirror_rule_set = 0,
  mirror_rule_reset = 0, set_vf_rx_mode = 0, set_vf_rx = 0, set_vf_tx = 0, set_vf_vlan_filter = 0, udp_tunnel_add = 0, udp_tunnel_del = 0, set_queue_rate_limit = 0, set_vf_rate_limit = 0,
  fdir_add_signature_filter = 0, fdir_update_signature_filter = 0, fdir_remove_signature_filter = 0, fdir_infos_get = 0, fdir_add_perfect_filter = 0, fdir_update_perfect_filter = 0,
  fdir_remove_perfect_filter = 0, fdir_set_masks = 0, reta_update = 0, reta_query = 0, get_reg_length = 0, get_reg = 0, get_eeprom_length = 0, get_eeprom = 0, set_eeprom = 0,
  rss_hash_update = 0, rss_hash_conf_get = 0, filter_ctrl = 0, set_mc_addr_list = 0, timesync_enable = 0, timesync_disable = 0, timesync_read_rx_timestamp = 0,
  timesync_read_tx_timestamp = 0}


Since I was using the rte_eth_rx_queue_count() function in one place, and VMXNET3 does not support it, I'm getting a SEGFAULT.
So next question is:  is user's task to check for validity of pointers inside dev_ops before calling driver functions? Because rte_eth_rx_queue_count() and companion funcitons have no safety checks apparently (!!!)

Thanks!

Francesco




More information about the dev mailing list