From patchwork Mon May 10 01:32:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenzhuo Lu X-Patchwork-Id: 93079 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7EA28A0548; Mon, 10 May 2021 03:33:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E79DF40140; Mon, 10 May 2021 03:33:01 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 586614003E for ; Mon, 10 May 2021 03:32:59 +0200 (CEST) IronPort-SDR: 2nr8uaRVP4vEkjzSbVOOulqXyeiNPeKBI8N+J4a1it4p8epyLWNiaGh7iOHE/y3fTdfYGXNA3m 65zK6LBdFBKw== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="186535509" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="186535509" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2021 18:32:58 -0700 IronPort-SDR: vIGKo7tdFu6lMk91gKNsK8+aZkAn8xejuwDmkgu033LQ0EJ+1edJKQ6TJ7tus3Z/KOK8XWnoMm wFVhpQhOErlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="467875076" Received: from dpdk-wenzhuo-haswell.sh.intel.com ([10.67.111.137]) by fmsmga002.fm.intel.com with ESMTP; 09 May 2021 18:32:57 -0700 From: Wenzhuo Lu To: dev@dpdk.org Cc: Wenzhuo Lu Date: Mon, 10 May 2021 09:32:51 +0800 Message-Id: <1620610371-114084-1-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dpdk-dev] [PATCH] net/iavf: fix coverity issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The coverity issue, "CID 370606: Control flow issues (DEADCODE) Execution cannot reach the expression "use_avx2" inside this statement: "if (!use_sse && !use_avx2 &..."." After commit bb3ef9aaa478, the check is useless. Fixes: bb3ef9aaa478 ("net/iavf: fix Rx function selection") Signed-off-by: Wenzhuo Lu Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 87f7eeb..74b5ab5 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2393,7 +2393,6 @@ struct iavf_rx_queue *rxq; int i; int check_ret; - bool use_sse = false; bool use_avx2 = false; bool use_avx512 = false; bool use_flex = false; @@ -2401,7 +2400,6 @@ check_ret = iavf_rx_vec_dev_check(dev); if (check_ret >= 0 && rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) { - use_sse = true; if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 || rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) && rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256) @@ -2414,9 +2412,6 @@ use_avx512 = true; #endif - if (!use_sse && !use_avx2 && !use_avx512) - goto normal; - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) use_flex = true; @@ -2520,7 +2515,6 @@ return; } -normal: #endif if (dev->data->scattered_rx) { PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).",