Skip to contentSkip to conversation

app/testpmd: fix logically dead code

PATCH Applied Kevin Laatz 3 participants 3 messages Jul 17, 2018 – Jul 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 app/test-pmd/softnicfwd.c | 3 ---
 1 file changed, 3 deletions(-)
app/test-pmd/softnicfwd.c +0 -3
index 1f9eeaf..7ff6228 100644
@@ -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 =
Signature · 1 line
2.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Laatz, Kevin
Sent: Tuesday, July 17, 2018 11:34 AM
To: [email protected]
Cc: Singh, Jasvinder <[email protected]>; Iremonger, Bernard <[email protected]>; Laatz, Kevin <[email protected]>
Subject: [PATCH] app/testpmd: fix logically dead code

Quoted 7 lines

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

Coverity issue: 302846

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