X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fpipeline%2Fpipeline_common_fe.c;h=a691d42240e87b04263fe5bb6e599995fa5bd581;hb=3cd654213b24e79b731ec975bca2c839aba5f54a;hp=1e16ad6f214ced4920b826133f57af4b9450867d;hpb=2d8d97b734d3a921be3f12454f04e557bdc4fa94;p=dpdk.git diff --git a/examples/ip_pipeline/pipeline/pipeline_common_fe.c b/examples/ip_pipeline/pipeline/pipeline_common_fe.c index 1e16ad6f21..a691d42240 100644 --- a/examples/ip_pipeline/pipeline/pipeline_common_fe.c +++ b/examples/ip_pipeline/pipeline/pipeline_common_fe.c @@ -337,7 +337,7 @@ app_link_config(struct app_params *app, return -1; } - netmask = (~0) << (32 - depth); + netmask = (~0U) << (32 - depth); host = ip & netmask; bcast = host | (~netmask); @@ -889,7 +889,7 @@ print_link_info(struct app_link_params *p) { struct rte_eth_stats stats; struct ether_addr *mac_addr; - uint32_t netmask = (~0) << (32 - p->depth); + uint32_t netmask = (~0U) << (32 - p->depth); uint32_t host = p->ip & netmask; uint32_t bcast = host | (~netmask); @@ -898,9 +898,15 @@ print_link_info(struct app_link_params *p) mac_addr = (struct ether_addr *) &p->mac_addr; - printf("%s: flags=<%s>\n", - p->name, - (p->state) ? "UP" : "DOWN"); + if (strlen(p->pci_bdf)) + printf("%s(%s): flags=<%s>\n", + p->name, + p->pci_bdf, + (p->state) ? "UP" : "DOWN"); + else + printf("%s: flags=<%s>\n", + p->name, + (p->state) ? "UP" : "DOWN"); if (p->ip) printf("\tinet %" PRIu32 ".%" PRIu32