summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingjing Wu <jingjing.wu@intel.com>2015-12-15 23:42:30 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-15 18:06:58 +0100
commitd536ac17d8d34a6c130a3a6ba926a52476e10c3d (patch)
tree09385ee34e0e68ae1fce254107ca5f913abe3e68
parente34189abaff977cb20ca317ac179ab7ad49c380d (diff)
downloaddpdk-d536ac17d8d34a6c130a3a6ba926a52476e10c3d.zip
dpdk-d536ac17d8d34a6c130a3a6ba926a52476e10c3d.tar.gz
dpdk-d536ac17d8d34a6c130a3a6ba926a52476e10c3d.tar.xz
app/testpmd: fix dead code
Coverity issue (CID 119254): Control flow issues (DEADCODE). Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
-rw-r--r--app/test-pmd/config.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e2030b0..7088f6f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1251,10 +1251,7 @@ dcb_fwd_config_setup(void)
/* reinitialize forwarding streams */
init_fwd_streams();
sm_id = 0;
- if ((rxp & 0x1) == 0)
- txp = (portid_t) (rxp + 1);
- else
- txp = (portid_t) (rxp - 1);
+ txp = 1;
/* get the dcb info on the first RX and TX ports */
(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);