doc: fix nics features matrix for ixgbe
[dpdk.git] / examples / ip_pipeline / pipeline / pipeline_common_fe.c
index fcda0ce..a691d42 100644 (file)
@@ -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);
 
@@ -358,7 +358,7 @@ app_link_config(struct app_params *app,
                if (link->ip == ip) {
                        APP_LOG(app, HIGH,
                                "%s is already assigned this IP address",
-                               p->name);
+                               link->name);
                        return -1;
                }
        }
@@ -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
@@ -937,31 +943,12 @@ print_link_info(struct app_link_params *p)
                stats.ipackets,
                stats.ibytes);
 
-       printf("\tRX mcast %" PRIu64
-               "  fdirmatch %" PRIu64
-               "  fdirmiss %" PRIu64
-               "  lb-packets %" PRIu64
-               "  lb-bytes %" PRIu64
-               "  xon %" PRIu64
-               "  xoff %" PRIu64 "\n",
-               stats.imcasts,
-               stats.fdirmatch,
-               stats.fdirmiss,
-               stats.ilbpackets,
-               stats.ilbbytes,
-               stats.rx_pause_xon,
-               stats.rx_pause_xoff);
-
        printf("\tRX errors %" PRIu64
                "  missed %" PRIu64
-               "  badcrc %" PRIu64
-               "  badlen %" PRIu64
                "  no-mbuf %" PRIu64
                "\n",
                stats.ierrors,
                stats.imissed,
-               stats.ibadcrc,
-               stats.ibadlen,
                stats.rx_nombuf);
 
        printf("\tTX packets %" PRIu64
@@ -969,16 +956,6 @@ print_link_info(struct app_link_params *p)
                stats.opackets,
                stats.obytes);
 
-       printf("\tTX lb-packets %" PRIu64
-               "  lb-bytes %" PRIu64
-               "  xon %" PRIu64
-               "  xoff %" PRIu64
-               "\n",
-               stats.olbpackets,
-               stats.olbbytes,
-               stats.tx_pause_xon,
-               stats.tx_pause_xoff);
-
        printf("\tTX errors %" PRIu64
                "\n",
                stats.oerrors);
@@ -1321,7 +1298,7 @@ app_pipeline_common_cmd_push(struct app_params *app)
        /* Push pipeline commands into the application */
        memcpy(&app->cmds[app->n_cmds],
                pipeline_common_cmds,
-               n_cmds * sizeof(cmdline_parse_ctx_t *));
+               n_cmds * sizeof(cmdline_parse_ctx_t));
 
        for (i = 0; i < n_cmds; i++)
                app->cmds[app->n_cmds + i]->data = app;