examples: remove unnecessary dev info queries
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Mon, 11 Dec 2017 07:31:29 +0000 (16:31 +0900)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 15 Jan 2018 11:15:09 +0000 (12:15 +0100)
Removed rte_eth_dev_info_get() calls and declaration of
struct rte_eth_dev_info where info is not used anymore.

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples/l2fwd-jobstats/main.c
examples/l2fwd-keepalive/main.c
examples/l2fwd/main.c
examples/link_status_interrupt/main.c
examples/multi_process/l2fwd_fork/main.c

index d404f55..69a88d9 100644 (file)
@@ -740,7 +740,6 @@ int
 main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
-       struct rte_eth_dev_info dev_info;
        unsigned lcore_id, rx_lcore_id;
        unsigned nb_ports_in_mask = 0;
        int ret;
@@ -798,8 +797,6 @@ main(int argc, char **argv)
                        last_port = portid;
 
                nb_ports_in_mask++;
-
-               rte_eth_dev_info_get(portid, &dev_info);
        }
        if (nb_ports_in_mask % 2) {
                printf("Notice: odd number of ports in portmask.\n");
index 1afab54..5c349cb 100644 (file)
@@ -527,7 +527,6 @@ int
 main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
-       struct rte_eth_dev_info dev_info;
        int ret;
        uint16_t nb_ports;
        uint16_t nb_ports_available;
@@ -589,8 +588,6 @@ main(int argc, char **argv)
                        last_port = portid;
 
                nb_ports_in_mask++;
-
-               rte_eth_dev_info_get(portid, &dev_info);
        }
        if (nb_ports_in_mask % 2) {
                printf("Notice: odd number of ports in portmask.\n");
index c5e88ff..21c7d11 100644 (file)
@@ -520,7 +520,6 @@ int
 main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
-       struct rte_eth_dev_info dev_info;
        int ret;
        uint16_t nb_ports;
        uint16_t nb_ports_available;
@@ -581,8 +580,6 @@ main(int argc, char **argv)
                        last_port = portid;
 
                nb_ports_in_mask++;
-
-               rte_eth_dev_info_get(portid, &dev_info);
        }
        if (nb_ports_in_mask % 2) {
                printf("Notice: odd number of ports in portmask.\n");
index 87b90b3..19b5a99 100644 (file)
@@ -520,7 +520,6 @@ int
 main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
-       struct rte_eth_dev_info dev_info;
        int ret;
        uint16_t nb_ports;
        uint16_t portid, portid_last = 0;
@@ -567,8 +566,6 @@ main(int argc, char **argv)
                        portid_last = portid;
 
                nb_ports_in_mask++;
-
-               rte_eth_dev_info_get(portid, &dev_info);
        }
        if (nb_ports_in_mask < 2 || nb_ports_in_mask % 2)
                rte_exit(EXIT_FAILURE, "Current enabled port number is %u, "
index 44eea87..d17eb5b 100644 (file)
@@ -898,7 +898,6 @@ int
 main(int argc, char **argv)
 {
        struct lcore_queue_conf *qconf;
-       struct rte_eth_dev_info dev_info;
        int ret;
        uint16_t nb_ports;
        uint16_t nb_ports_available;
@@ -986,8 +985,6 @@ main(int argc, char **argv)
                        last_port = portid;
 
                nb_ports_in_mask++;
-
-               rte_eth_dev_info_get(portid, &dev_info);
        }
        if (nb_ports_in_mask % 2) {
                printf("Notice: odd number of ports in portmask.\n");