net/dpaa2: enable stashing for LS2088A devices
[dpdk.git] / examples / l3fwd-power / main.c
index e741434..ec40a17 100644 (file)
@@ -223,7 +223,7 @@ static struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 1, /**< IP checksum offload enabled */
                .hw_vlan_filter = 0, /**< VLAN filtering disabled */
                .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
        .rx_adv_conf = {
                .rss_conf = {
@@ -379,6 +379,7 @@ static void
 signal_exit_now(int sigtype)
 {
        unsigned lcore_id;
+       unsigned int portid, nb_ports;
        int ret;
 
        if (sigtype == SIGINT) {
@@ -393,6 +394,15 @@ signal_exit_now(int sigtype)
                                        "library de-initialization failed on "
                                                        "core%u\n", lcore_id);
                }
+
+               nb_ports = rte_eth_dev_count();
+               for (portid = 0; portid < nb_ports; portid++) {
+                       if ((enabled_port_mask & (1 << portid)) == 0)
+                               continue;
+
+                       rte_eth_dev_stop(portid);
+                       rte_eth_dev_close(portid);
+               }
        }
 
        rte_exit(EXIT_SUCCESS, "User forced exit\n");
@@ -1351,7 +1361,7 @@ parse_args(int argc, char **argv)
                argv[optind-1] = prgname;
 
        ret = optind-1;
-       optind = 0; /* reset getopt lib */
+       optind = 1; /* reset getopt lib */
        return ret;
 }