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 BB84BA0542 for ; Thu, 13 Feb 2020 15:57:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 84DA01C013; Thu, 13 Feb 2020 15:57:27 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id B56691C00F for ; Thu, 13 Feb 2020 15:57:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581605846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZozVZU6x50r2JFZ7dVG1CNRJqMZT2LryJ9ia2GueovM=; b=goo45IHSyqbK6YWmYPiYamXQzhxqZzJo+vp84ndjg50xR2xjrAoZ9p7gFr90E30rwkbiy4 TX0hSWywQoHyleps9tQzylPzyVfey87doGWRQM3OdTD4QFXG9zwI4WK8d3pyujFjXF6tN6 9U2l0E8bp1X+4AbJOAbpVXWU+SmlGNA= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-QdtWzYhMN3GO4gVVyWsuGQ-1; Thu, 13 Feb 2020 09:57:20 -0500 Received: by mail-ua1-f69.google.com with SMTP id n10so1443201ual.19 for ; Thu, 13 Feb 2020 06:57:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LG1su4DVUdXv4Nbhv0K97OJWMYFBIky/FbSL3zeGm4s=; b=kqhSEi4EsvAKridyY1bk4C/Swo6gRX7Atfeu1a7BRKJETsl/CbCX0ZsQUwDtIvshcU vTNU6pcrYJkT9SGO6jzwFPNGpIoWB43PchnQxJS6nRIW1swwlN7s9Vg8QFZikeC2H0Vz BErULIdWeLkG1nVDDujGJddwr41bsuiUPlNNtmPVFkZEUBTomsIb7leoffL/QhZ0ux8J G0+3tY9lJoUj4+grhyn2GnL5gUFxKF7UaGB8jHOVY46HuMS6sGq7Gzp1X4LvWnMdJNPK 83LY44Y/Q1WD3BPYGf0AnRzazc8tnkFbo+tm5oM05HDl9CPBJn0/BfnEAvojeqQ6MdjA OnTA== X-Gm-Message-State: APjAAAVwCAhcBBLsdffZRQeXNnQn6DV5nl+zN6+FyNFCvLsm0Bkh1A5E U35DGOBas7Fi7Il+VXZKtSo80q4ub8HyU1uJIheANRXkkMc/0E8+QuYUcghVZdWHr5yv2Q5oPmC 0I3MEn7qyXDGk1+FaQMjBbws= X-Received: by 2002:a67:905:: with SMTP id 5mr15670876vsj.105.1581605840180; Thu, 13 Feb 2020 06:57:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzm3cD5NYiNXGHaqIbaLUlgclmHQdncjo+nv7AKmadMYpsrCb5KvqyTh0hyLm6b74tpGLs02RERbjhRVdptlzU= X-Received: by 2002:a67:905:: with SMTP id 5mr15670859vsj.105.1581605839933; Thu, 13 Feb 2020 06:57:19 -0800 (PST) MIME-Version: 1.0 References: <20200210030757.11426-1-xiaoyun.li@intel.com> <20200210070458.20865-1-xiaoyun.li@intel.com> In-Reply-To: <20200210070458.20865-1-xiaoyun.li@intel.com> From: David Marchand Date: Thu, 13 Feb 2020 15:57:03 +0100 Message-ID: To: Xiaoyun Li Cc: Xiaolong Ye , "Kovacevic, Marko" , dev , dpdk stable X-MC-Unique: QdtWzYhMN3GO4gVVyWsuGQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] examples/tep_term: fix return value check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Mon, Feb 10, 2020 at 8:05 AM 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") rte_eth_dev_info_get() prototype changed in 19.11. Before this, it was a void. So this Fixes: line is wrong. > 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_termin= ation/vxlan_setup.c > index eca119a72..f8385b690 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 *mb= uf_pool) > > if (tso_segsz !=3D 0) { > struct rte_eth_dev_info dev_info; > - rte_eth_dev_info_get(port, &dev_info); > + retval =3D rte_eth_dev_info_get(port, &dev_info); > + if (retval !=3D 0) > + return retval; > if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) = =3D=3D 0) > RTE_LOG(WARNING, PORT, > "hardware TSO offload is not supported\n"= ); I had a look at this function, dev_info is populated for port earlier in the function, why do we need to check it again? https://git.dpdk.org/dpdk/tree/examples/tep_termination/vxlan_setup.c?h=3Dv= 20.02-rc2#n119 --=20 David Marchand