From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96ABDA054F; Tue, 16 Mar 2021 11:18:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 705F6242806; Tue, 16 Mar 2021 11:18:46 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E17094069F for ; Tue, 16 Mar 2021 11:18:44 +0100 (CET) IronPort-SDR: mrSHJzzCaqpRI9i3fDyi/f3jPFoX0wlldHea9SsdZvk9/B+8EJZMXs/SI4fv+3SC2D3fSDiHYX 5RHXktG9HTBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="250599972" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="250599972" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 03:18:43 -0700 IronPort-SDR: s0zsJSkmm1BQLqUGcC/Zab3OXKZWuh5y/wfFaBIXqssez7v/jiyRaCmwzX8z4sM2swn5A7a0Rn u18dEvcRKckg== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="405502460" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.11.157]) ([10.252.11.157]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 03:18:42 -0700 To: Andrew Rybchenko , "Li, Xiaoyun" , Kalesh A P , "dev@dpdk.org" References: <20210316045518.20234-1-kalesh-anakkur.purayil@broadcom.com> <20210316065136.2907-1-kalesh-anakkur.purayil@broadcom.com> <86dc66e5-8658-d454-97fa-e8aaafabaddb@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: <84d30d48-26bb-80bd-037c-82ab1e8668f0@intel.com> Date: Tue, 16 Mar 2021 10:18:38 +0000 MIME-Version: 1.0 In-Reply-To: <86dc66e5-8658-d454-97fa-e8aaafabaddb@oktetlabs.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value 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" On 3/16/2021 7:27 AM, Andrew Rybchenko wrote: > On 3/16/21 9:34 AM, Li, Xiaoyun wrote: >>> -----Original Message----- >>> From: Kalesh A P >>> Sent: Tuesday, March 16, 2021 14:52 >>> To: dev@dpdk.org >>> Cc: Li, Xiaoyun ; Yigit, Ferruh >>> Subject: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value >>> >>> From: Kalesh AP >>> >>> This patch checks return value for rte_eth_dev_info_get() in show_macs(). >>> >>> Coverity issue: 353629 >>> Fixes: e1d44d0ad623 ("app/testpmd: show MAC addresses added to a port") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Kalesh AP >>> --- >>> app/test-pmd/config.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index >>> 576d5ac..4ce75a8 100644 >>> --- a/app/test-pmd/config.c >>> +++ b/app/test-pmd/config.c >>> @@ -4930,7 +4930,8 @@ show_macs(portid_t port_id) >>> >>> dev = &rte_eth_devices[port_id]; >>> >>> - rte_eth_dev_info_get(port_id, &dev_info); >>> + if (eth_dev_info_get_print_err(port_id, &dev_info)) >>> + return; >>> >>> for (i = 0; i < dev_info.max_mac_addrs; i++) { >>> addr = &dev->data->mac_addrs[i]; >>> -- >>> 2.10.1 >> >> Acked-by: Xiaoyun Li >> > > Acked-by: Andrew Rybchenko > Applied to dpdk-next-net/main, thanks.