DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Li, Xiaoyun" <xiaoyun.li@intel.com>,
	Kalesh A P <kalesh-anakkur.purayil@broadcom.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value
Date: Tue, 16 Mar 2021 10:27:39 +0300	[thread overview]
Message-ID: <86dc66e5-8658-d454-97fa-e8aaafabaddb@oktetlabs.ru> (raw)
In-Reply-To: <MWHPR11MB175714FC491979F8DBD76CAF996B9@MWHPR11MB1757.namprd11.prod.outlook.com>

On 3/16/21 9:34 AM, Li, Xiaoyun wrote:
>> -----Original Message-----
>> From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
>> Sent: Tuesday, March 16, 2021 14:52
>> To: dev@dpdk.org
>> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
>> Subject: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value
>>
>> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>>
>> 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 <kalesh-anakkur.purayil@broadcom.com>
>> ---
>>  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 <xiaoyun.li@intel.com>
> 

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>


  reply	other threads:[~2021-03-16  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  4:55 Kalesh A P
2021-03-16  5:43 ` Li, Xiaoyun
2021-03-16  6:31   ` Kalesh Anakkur Purayil
2021-03-16  6:51 ` Kalesh A P
2021-03-16  6:34   ` Li, Xiaoyun
2021-03-16  7:27     ` Andrew Rybchenko [this message]
2021-03-16 10:18       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86dc66e5-8658-d454-97fa-e8aaafabaddb@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=xiaoyun.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).