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 25D20A0542; Thu, 13 Feb 2020 15:57:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF4E91C022; Thu, 13 Feb 2020 15:57:28 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 2D1641C00F for ; Thu, 13 Feb 2020 15:57:27 +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-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-422-9_rLk9BENeCAhZMJ1_JLcA-1; Thu, 13 Feb 2020 09:57:20 -0500 Received: by mail-ua1-f72.google.com with SMTP id k24so1438949uag.18 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=sMfw/ouN2aEoggDXA+BdkHRS67xjGpJYJcTU+R2a33ZPVZ5TxBWcAzFu6VwG0OLm9Z K2RD3+KoVvWWy5E95Zy56o5pHpaaXuOrPmysiWj1B31/i7QGrSe7aua4JvjYn2K86oXe su8QRlzUAuK/o2u5DtwkhkpNvjR2pHfBUElnxB8D6TUGgk2LLbMI7UicoWh7K8BKl2Fh b+A83jxNFSE0OLLUKVPq2HFFp1fb5jrCN+VlfpwKfEXeneU0SRPSgy2oXW9tI8qJdKKV 5ZTlvP5Jwk5yixg9jr2kc7LQYB2WEGVG5TapKt07T6XLfPqXXVfQr80S8tELddCS9Jz2 Jt/g== X-Gm-Message-State: APjAAAVSYvjGiuj60gS9UGKB++V68L00J4mfuGthhFRwwv7Pj6DdW8Gf W9GRDevt76otMddThT9QeEDZDY7TtHWSr3kLHAorztgbW+nu/kv4HpIBqopXjAEtbi8XA78xohA vSzfSstFib7JxRStRXQ0= X-Received: by 2002:a67:905:: with SMTP id 5mr15670875vsj.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: 9_rLk9BENeCAhZMJ1_JLcA-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-dev] [PATCH v2] 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 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