From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5ED6D2BA4 for ; Tue, 13 Dec 2016 12:40:52 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 13 Dec 2016 03:40:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,341,1477983600"; d="scan'208";a="202036622" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga004.fm.intel.com with ESMTP; 13 Dec 2016 03:40:51 -0800 From: Bernard Iremonger To: thomas.monjalon@6wind.com, dev@dpdk.org Cc: Bernard Iremonger Date: Tue, 13 Dec 2016 11:40:37 +0000 Message-Id: <1481629241-19500-4-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1481550626-14539-1-git-send-email-bernard.iremonger@intel.com> References: <1481550626-14539-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v4 3/7] app/testpmd: cleanup parameter checking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 11:40:52 -0000 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 --- app/test-pmd/config.c | 19 ------------------- 1 file changed, 19 deletions(-) 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; -- 2.10.1