doc: fix references to old binding script
[dpdk.git] / examples / l2fwd-ivshmem / host / host.c
index d923711..da7b00d 100644 (file)
@@ -41,7 +41,6 @@
 #include <signal.h>
 
 #include <rte_eal.h>
-#include <rte_config.h>
 #include <rte_cycles.h>
 #include <rte_eal_memconfig.h>
 #include <rte_debug.h>
@@ -111,7 +110,8 @@ static void
 print_stats(void)
 {
        uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
-       uint64_t total_vm_packets_dropped, total_vm_packets_tx, total_vm_packets_rx;
+       uint64_t total_vm_packets_dropped = 0;
+       uint64_t total_vm_packets_tx, total_vm_packets_rx;
        unsigned portid;
 
        total_packets_dropped = 0;
@@ -372,7 +372,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
                                continue;
                        }
                        /* clear all_ports_up flag if any link down */
-                       if (link.link_status == 0) {
+                       if (link.link_status == ETH_LINK_DOWN) {
                                all_ports_up = 0;
                                break;
                        }
@@ -678,9 +678,6 @@ int main(int argc, char **argv)
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
-       if (nb_ports > RTE_MAX_ETHPORTS)
-               nb_ports = RTE_MAX_ETHPORTS;
-
        /*
         * reserve memzone to communicate with VMs - we cannot use rte_malloc here
         * because while it is technically possible, it is a very bad idea to share