Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D9DCC433E7 for ; Mon, 19 Oct 2020 06:05:06 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 0D1E222260 for ; Mon, 19 Oct 2020 06:05:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D1E222260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89F38AC73; Mon, 19 Oct 2020 08:05:01 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4C34BA93E; Mon, 19 Oct 2020 08:04:58 +0200 (CEST) IronPort-SDR: fAs3AxmMm2CsbvAoD4aSFahuoYr6IKGuoqN11iUXmMcsTuPeQIDTBwNIVkUT+dAXZW3c5Eo/XD tcgchlde+BIQ== X-IronPort-AV: E=McAfee;i="6000,8403,9778"; a="228608512" X-IronPort-AV: E=Sophos;i="5.77,393,1596524400"; d="scan'208";a="228608512" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2020 23:04:54 -0700 IronPort-SDR: IoeuSQn1DhJSG5JrWWPNVCy1rOeMjiZEZvnO9H7G1rzPWEPu/eQRMVcttMCydCkXALqqL1s8dJ pzE93dDGE8kA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,393,1596524400"; d="scan'208";a="522989526" Received: from dpdk-lrong-srv-04.sh.intel.com ([10.67.119.221]) by fmsmga005.fm.intel.com with ESMTP; 18 Oct 2020 23:04:52 -0700 From: Leyi Rong To: qi.z.zhang@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Leyi Rong , stable@dpdk.org Date: Mon, 19 Oct 2020 13:42:53 +0800 Message-Id: <20201019054253.105559-1-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201014082857.81080-1-leyi.rong@intel.com> References: <20201014082857.81080-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v2] net/iavf: fix unchecked Tx cleanup error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity complains of unchecked return value warning of iavf_xmit_cleanup, while this cleanup is opportunistic and will not cause problems if it fails. So instead of checking the return value of iavf_xmit_cleanup and return in case of cleanup failure, we directly cast it to void function to make the Coverity happy. Coverity issue: 363045 Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings") Cc: stable@dpdk.org Signed-off-by: Leyi Rong --- v2: - More detailed commit log. --- drivers/net/iavf/iavf_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 1b0efe043..591795f3b 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1890,7 +1890,7 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) /* Check if the descriptor ring needs to be cleaned. */ if (txq->nb_free < txq->free_thresh) - iavf_xmit_cleanup(txq); + (void)iavf_xmit_cleanup(txq); for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) { td_cmd = 0; -- 2.17.1