app/testpmd: fix mapping of user priority to DCB TC

When number of DCB traffic class is 4, user priority should be
mapped to traffic class 0/1/2/3.

Fixes: cb60ede6e3 ("ethdev: rename DCB field in config structs")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
This commit is contained in:
Wei Dai 2017-10-23 15:25:16 +08:00 committed by Ferruh Yigit
parent 9be9050134
commit f59908fe49

View File

@ -2193,8 +2193,8 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
1 << (i % vmdq_rx_conf->nb_queue_pools);
}
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
vmdq_rx_conf->dcb_tc[i] = i;
vmdq_tx_conf->dcb_tc[i] = i;
vmdq_rx_conf->dcb_tc[i] = i % num_tcs;
vmdq_tx_conf->dcb_tc[i] = i % num_tcs;
}
/* set DCB mode of RX and TX of multiple queues */