X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=app%2Ftest-pmd%2Fcmdline.c;h=0268b18f958e4fa5f18a83a3fb1ea551c4a8298e;hb=49ca9e5a256b7db55af71923ce827c1fa480b473;hp=29ee41da5fc3751442b64acb66352d1e21202770;hpb=a767951e597964e6c02529097edd2b43b5aace4d;p=dpdk.git diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 29ee41da5f..0268b18f95 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -3270,6 +3270,7 @@ cmd_config_dcb_parsed(void *parsed_result, __rte_unused void *data) { struct cmd_config_dcb *res = parsed_result; + struct rte_eth_dcb_info dcb_info; portid_t port_id = res->port_id; struct rte_port *port; uint8_t pfc_en; @@ -3292,6 +3293,14 @@ cmd_config_dcb_parsed(void *parsed_result, printf("nb_cores shouldn't be less than number of TCs.\n"); return; } + + /* Check whether the port supports the report of DCB info. */ + ret = rte_eth_dev_get_dcb_info(port_id, &dcb_info); + if (ret == -ENOTSUP) { + printf("rte_eth_dev_get_dcb_info not supported.\n"); + return; + } + if (!strncmp(res->pfc_en, "on", 2)) pfc_en = 1; else @@ -3306,13 +3315,13 @@ cmd_config_dcb_parsed(void *parsed_result, ret = init_port_dcb_config(port_id, DCB_ENABLED, (enum rte_eth_nb_tcs)res->num_tcs, pfc_en); - - if (ret != 0) { printf("Cannot initialize network ports.\n"); return; } + fwd_config_setup(); + cmd_reconfig_device_queue(port_id, 1, 1); }