DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jingjing Wu <jingjing.wu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] app/testpmd: fix dead code
Date: Tue, 15 Dec 2015 23:42:30 +0800	[thread overview]
Message-ID: <1450194150-22234-1-git-send-email-jingjing.wu@intel.com> (raw)

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>
---
 app/test-pmd/config.c | 5 +----
 1 file changed, 1 insertion(+), 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);
-- 
2.4.0

             reply	other threads:[~2015-12-15 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 15:42 Jingjing Wu [this message]
2015-12-15 15:50 ` Mcnamara, John
2015-12-15 17:08   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450194150-22234-1-git-send-email-jingjing.wu@intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).