struct rte_eth_link eth_link;
uint32_t lcore_id;
int ret, i;
+ char link_status_text[RTE_ETH_LINK_MAX_STR_LEN];
ret = ntb_fwd_config_setup();
if (ret < 0) {
return;
}
if (eth_link.link_status) {
- printf("Eth%u Link Up. Speed %u Mbps - %s\n",
- eth_port_id, eth_link.link_speed,
- (eth_link.link_duplex ==
- ETH_LINK_FULL_DUPLEX) ?
- ("full-duplex") : ("half-duplex"));
+ rte_eth_link_to_str(link_status_text,
+ sizeof(link_status_text),
+ ð_link);
+ printf("Eth%u %s\n", eth_port_id,
+ link_status_text);
break;
}
}
ntb_conf.num_queues = num_queues;
ntb_conf.queue_size = nb_desc;
ntb_rawdev_conf.dev_private = (rte_rawdev_obj_t)(&ntb_conf);
- ret = rte_rawdev_configure(dev_id, &ntb_rawdev_conf);
+ ret = rte_rawdev_configure(dev_id, &ntb_rawdev_conf, sizeof(ntb_conf));
if (ret)
rte_exit(EXIT_FAILURE, "Can't config ntb dev: err=%d, "
"port=%u\n", ret, dev_id);
ntb_q_conf.rx_mp = mbuf_pool;
for (i = 0; i < num_queues; i++) {
/* Setup rawdev queue */
- ret = rte_rawdev_queue_setup(dev_id, i, &ntb_q_conf);
+ ret = rte_rawdev_queue_setup(dev_id, i, &ntb_q_conf,
+ sizeof(ntb_q_conf));
if (ret < 0)
rte_exit(EXIT_FAILURE,
"Failed to setup ntb queue %u.\n", i);