From 84e17d050c9860eefd6ce6bc6d8bc135cb622c27 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Mon, 3 Oct 2016 11:44:21 +0530 Subject: [PATCH] Set priority group implicitly for IEEE mode In IEEE mode, priority group setting are ignored by the driver. Hence, qosmap does not take PG mappings in IEEE mode. Before dumping the configuration to the driver, qosmap displays the configuration. Since PG values are not taken, they are dumped as zeroes. Fix this behavior by setting priority groups implicitly. Change-Id: I3276ddf5160253a76a9da70e099ade42ec67986c Closes-Bug: #1629200 --- utils/qosmap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/qosmap.c b/utils/qosmap.c index 9fb37fa5f..dad8347a4 100644 --- a/utils/qosmap.c +++ b/utils/qosmap.c @@ -641,6 +641,8 @@ validate_options(void) static void parse_long_opts(int opt_index, char *opt_arg) { + unsigned int i; + errno = 0; switch (opt_index) { @@ -649,6 +651,13 @@ parse_long_opts(int opt_index, char *opt_arg) if (dcbx_mode < 0) { Usage(); } + + if (dcbx_mode == DCB_CAP_DCBX_VER_IEEE) { + for (i = 0; i < NUM_TC; i++) { + priority_map.tc_to_group[i] = i; + } + } + break; case DOTONEP_OPT_INDEX: