From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B64C5A0531; Mon, 10 Feb 2020 04:37:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04D911BEA9; Mon, 10 Feb 2020 04:37:54 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0157A1BDF8; Mon, 10 Feb 2020 04:37:52 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Feb 2020 19:37:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,423,1574150400"; d="scan'208";a="431469261" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2020 19:37:50 -0800 Date: Mon, 10 Feb 2020 11:36:37 +0800 From: Ye Xiaolong To: Xiaoyun Li Cc: marko.kovacevic@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20200210033637.GA79789@intel.com> References: <20200210030757.11426-1-xiaoyun.li@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200210030757.11426-1-xiaoyun.li@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] examples/tep_term: fix return value check 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" On 02/10, Xiaoyun Li wrote: >Added return value check for 'rte_eth_dev_info_get()'. > >Coverity issue: 349922 >Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration") >Cc: stable@dpdk.org > >Signed-off-by: Xiaoyun Li >--- > examples/tep_termination/vxlan_setup.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c >index eca119a72..bd469f5f4 100644 >--- a/examples/tep_termination/vxlan_setup.c >+++ b/examples/tep_termination/vxlan_setup.c >@@ -195,7 +195,9 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) > > if (tso_segsz != 0) { > struct rte_eth_dev_info dev_info; >- rte_eth_dev_info_get(port, &dev_info); >+ retval = rte_eth_dev_info_get(port, &dev_info); >+ if (retval != 0) >+ return -retval; why return -retval not retval? Thanks, Xiaolong > if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) == 0) > RTE_LOG(WARNING, PORT, > "hardware TSO offload is not supported\n"); >-- >2.17.1 >