examples/l3fwd-power: select default mode automatically
[dpdk.git] / examples / l3fwd / main.c
index dda430d..24ede42 100644 (file)
@@ -838,7 +838,7 @@ check_all_ports_link_status(uint32_t port_mask)
                                        "Port%d Link Up. Speed %u Mbps -%s\n",
                                                portid, link.link_speed,
                                (link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-                                       ("full-duplex") : ("half-duplex\n"));
+                                       ("full-duplex") : ("half-duplex"));
                                else
                                        printf("Port %d Link Down\n", portid);
                                continue;
@@ -1112,8 +1112,9 @@ l3fwd_service_enable(uint32_t service_id)
        /* Get the core which has least number of services running. */
        while (slcore_count--) {
                /* Reset default mapping */
-               rte_service_map_lcore_set(service_id,
-                               slcore_array[slcore_count], 0);
+               if (rte_service_map_lcore_set(service_id,
+                               slcore_array[slcore_count], 0) != 0)
+                       return -ENOENT;
                service_count = rte_service_lcore_count_services(
                                slcore_array[slcore_count]);
                if (service_count < min_service_count) {