]> git.droids-corp.org - dpdk.git/blobdiff - app/test-pmd/cmdline.c
fix ethdev ports enumeration
[dpdk.git] / app / test-pmd / cmdline.c
index 512e3b55ef668ae90552a0b3060daef940c2435b..3e9006cc1f8ddbee7bed2ac5d077475ce62f195e 100644 (file)
@@ -1999,7 +1999,7 @@ cmd_config_rss_parsed(void *parsed_result,
        struct cmd_config_rss *res = parsed_result;
        struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
        int diag;
-       uint8_t i;
+       uint16_t i;
 
        if (!strcmp(res->value, "all"))
                rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP |
@@ -2033,7 +2033,7 @@ cmd_config_rss_parsed(void *parsed_result,
                return;
        }
        rss_conf.rss_key = NULL;
-       for (i = 0; i < rte_eth_dev_count(); i++) {
+       RTE_ETH_FOREACH_DEV(i) {
                diag = rte_eth_dev_rss_hash_update(i, &rss_conf);
                if (diag < 0)
                        printf("Configuration of RSS hash at ethernet port %d "