diff mbox

[dpdk-dev,v4,3/7] app/testpmd: cleanup parameter checking

Message ID 1481629241-19500-4-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Iremonger, Bernard Dec. 13, 2016, 11:40 a.m. UTC
Parameter checking is done in the rte_pmd_ixgbe_* functions.
Remove parameter checking from before calls to the rte_pmd_ixgbe_*
functions.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/config.c | 19 -------------------
 1 file changed, 19 deletions(-)
diff mbox

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 73b0ffa..fc0424a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2333,8 +2333,6 @@  set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
 {
 	int diag;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
 	if (is_rx)
 		diag = rte_pmd_ixgbe_set_vf_rx(port_id, vf, on);
 	else
@@ -2356,11 +2354,6 @@  set_vf_rx_vlan(portid_t port_id, uint16_t vlan_id, uint64_t vf_mask, uint8_t on)
 {
 	int diag;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (vlan_id_is_invalid(vlan_id))
-		return;
-
 	diag = rte_pmd_ixgbe_set_vf_vlan_filter(port_id, vlan_id, vf_mask, on);
 
 	if (diag == 0)
@@ -2397,19 +2390,7 @@  int
 set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
 {
 	int diag;
-	struct rte_eth_link link;
-
-	if (q_msk == 0)
-		return 0;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return 1;
-	rte_eth_link_get_nowait(port_id, &link);
-	if (rate > link.link_speed) {
-		printf("Invalid rate value:%u bigger than link speed: %u\n",
-			rate, link.link_speed);
-		return 1;
-	}
 	diag = rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate, q_msk);
 	if (diag == 0)
 		return diag;