DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix logically dead code
@ 2018-07-17 10:34 Kevin Laatz
  2018-07-17 11:16 ` Iremonger, Bernard
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Laatz @ 2018-07-17 10:34 UTC (permalink / raw)
  To: dev; +Cc: jasvinder.singh, bernard.iremonger, Kevin Laatz

Remove logically dead code, tm_port_rate cannot be greater than
UINT32_MAX.

Coverity issue: 302846
Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 app/test-pmd/softnicfwd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/test-pmd/softnicfwd.c b/app/test-pmd/softnicfwd.c
index 1f9eeaf..7ff6228 100644
--- a/app/test-pmd/softnicfwd.c
+++ b/app/test-pmd/softnicfwd.c
@@ -175,9 +175,6 @@ set_tm_hiearchy_nodes_shaper_rate(portid_t port_id,
 	rte_eth_link_get(port_id, &link_params);
 	tm_port_rate = (uint64_t)ETH_SPEED_NUM_10G * BYTES_IN_MBPS;
 
-	if (tm_port_rate > UINT32_MAX)
-		tm_port_rate = UINT32_MAX;
-
 	/* Set tm hierarchy shapers rate */
 	h->root_node_shaper_rate = tm_port_rate;
 	h->subport_node_shaper_rate =
-- 
2.9.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix logically dead code
  2018-07-17 10:34 [dpdk-dev] [PATCH] app/testpmd: fix logically dead code Kevin Laatz
@ 2018-07-17 11:16 ` Iremonger, Bernard
  2018-07-26 17:06   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Iremonger, Bernard @ 2018-07-17 11:16 UTC (permalink / raw)
  To: Laatz, Kevin, dev; +Cc: Singh, Jasvinder

> -----Original Message-----
> From: Laatz, Kevin
> Sent: Tuesday, July 17, 2018 11:34 AM
> To: dev@dpdk.org
> Cc: Singh, Jasvinder <jasvinder.singh@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; Laatz, Kevin <kevin.laatz@intel.com>
> Subject: [PATCH] app/testpmd: fix logically dead code
> 
> Remove logically dead code, tm_port_rate cannot be greater than
> UINT32_MAX.
> 
> Coverity issue: 302846
> Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> 
> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix logically dead code
  2018-07-17 11:16 ` Iremonger, Bernard
@ 2018-07-26 17:06   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-07-26 17:06 UTC (permalink / raw)
  To: Laatz, Kevin; +Cc: dev, Iremonger, Bernard, Singh, Jasvinder

> > Remove logically dead code, tm_port_rate cannot be greater than
> > UINT32_MAX.
> > 
> > Coverity issue: 302846
> > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
> > 
> > Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-26 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 10:34 [dpdk-dev] [PATCH] app/testpmd: fix logically dead code Kevin Laatz
2018-07-17 11:16 ` Iremonger, Bernard
2018-07-26 17:06   ` Thomas Monjalon

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).