app/testpmd: remove logically dead code
authorKevin Laatz <kevin.laatz@intel.com>
Tue, 17 Jul 2018 10:34:05 +0000 (11:34 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 26 Jul 2018 16:58:33 +0000 (18:58 +0200)
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>
app/test-pmd/softnicfwd.c

index 1f9eeaf..7ff6228 100644 (file)
@@ -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 =