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 A314EA054F; Tue, 16 Mar 2021 08:27:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8924C24282E; Tue, 16 Mar 2021 08:27:41 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 2E29340042 for ; Tue, 16 Mar 2021 08:27:40 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id C70C77F4A0; Tue, 16 Mar 2021 10:27:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru C70C77F4A0 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1615879659; bh=ldFSq6GVCXan+OFMzCpivz+xb6JAf+2P/VTBx2dcf10=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=dIy+v3AsY+cR1KnXje8H41fpKMjZu8hMWl5QRjanKZRd5BN6keDZCaI1UxsTnb/Kj HOxW7BctGYw+Mh/MK4CFcdMbNFkFiW3crrhIPJYZ0EpJfIWDTDK7QyUDz2/31S0RJ9 7+TMPVXeKaxugWVBDMjPikThiX1byVXHVPcl2z5s= To: "Li, Xiaoyun" , Kalesh A P , "dev@dpdk.org" Cc: "Yigit, Ferruh" References: <20210316045518.20234-1-kalesh-anakkur.purayil@broadcom.com> <20210316065136.2907-1-kalesh-anakkur.purayil@broadcom.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <86dc66e5-8658-d454-97fa-e8aaafabaddb@oktetlabs.ru> Date: Tue, 16 Mar 2021 10:27:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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/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