Skip to content

Commit

Permalink
Set priority group implicitly for IEEE mode
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anandhk-juniper committed Oct 3, 2016
1 parent 4f7bf48 commit 84e17d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/qosmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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:
Expand Down

0 comments on commit 84e17d0

Please sign in to comment.