From: Jingjing Wu Date: Tue, 15 Dec 2015 15:42:30 +0000 (+0800) Subject: app/testpmd: fix dead code X-Git-Tag: spdx-start~7706 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d536ac17d8d34a6c130a3a6ba926a52476e10c3d;p=dpdk.git 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 Acked-by: John McNamara --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index e2030b07a4..7088f6f3c8 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);