On 3/16/21 9:34 AM, Li, Xiaoyun wrote: >> -----Original Message----- >> From: Kalesh A P <[email protected]> >> Sent: Tuesday, March 16, 2021 14:52 >> To: [email protected] >> Cc: Li, Xiaoyun <[email protected]>; Yigit, Ferruh >> <[email protected]> >> Subject: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value >> >> From: Kalesh AP <[email protected]> >> >> 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: [email protected] >> >> Signed-off-by: Kalesh AP <[email protected]> >> --- >> 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 <[email protected]> >
Acked-by: Andrew Rybchenko <[email protected]>

