X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd%2Fmain.c;h=f8d14b843a7f354b272638f242dd84c138d7499c;hb=c81e3f21d1ea05e5123278b15d9d5e1257b6ba99;hp=6b9f09a4d954a95349a4387aef59234d04104cfd;hpb=22e5c73bd181ddae758189295146154542b63360;p=dpdk.git diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 6b9f09a4d9..f8d14b843a 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -281,7 +281,7 @@ l2fwd_main_loop(void) } static int -l2fwd_launch_one_lcore(__attribute__((unused)) void *dummy) +l2fwd_launch_one_lcore(__rte_unused void *dummy) { l2fwd_main_loop(); return 0; @@ -478,7 +478,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; @@ -665,7 +665,12 @@ main(int argc, char **argv) "Cannot adjust number of descriptors: err=%d, port=%u\n", ret, portid); - rte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]); + ret = rte_eth_macaddr_get(portid, + &l2fwd_ports_eth_addr[portid]); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "Cannot get MAC address: err=%d, port=%u\n", + ret, portid); /* init one RX queue */ fflush(stdout); @@ -708,6 +713,11 @@ main(int argc, char **argv) "Cannot set error callback for tx buffer on port %u\n", portid); + ret = rte_eth_dev_set_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, + 0); + if (ret < 0) + printf("Port %u, Failed to disable Ptype parsing\n", + portid); /* Start device */ ret = rte_eth_dev_start(portid); if (ret < 0)