net/memif: relax load of ring head for S2M zc ring
[dpdk.git] / examples / ntb / ntb_fwd.c
index 11e2244..139da54 100644 (file)
@@ -729,6 +729,7 @@ start_pkt_fwd(void)
        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) {
@@ -747,11 +748,11 @@ start_pkt_fwd(void)
                                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),
+                                       &eth_link);
+                               printf("Eth%u %s\n", eth_port_id,
+                                      link_status_text);
                                break;
                        }
                }
@@ -1401,7 +1402,7 @@ main(int argc, char **argv)
        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);
@@ -1411,7 +1412,8 @@ main(int argc, char **argv)
        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);