* [dpdk-stable] [PATCH] examples/ioat: fix unchecked return value
@ 2020-02-04 16:03 Ciara Power
2020-02-05 10:58 ` [dpdk-stable] [dpdk-dev] " David Marchand
0 siblings, 1 reply; 2+ messages in thread
From: Ciara Power @ 2020-02-04 16:03 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Ciara Power, pawelx.modrak, stable
The function call to get the device info can return negative values on
failure, which was previously unchecked. This return value is now
checked and the function exits on failure.
Coverity issue: 350361
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Cc: pawelx.modrak@intel.com
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
examples/ioat/ioatfwd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index e9117718f..029f2f0ab 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -824,7 +824,10 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
/* Init port */
printf("Initializing port %u... ", portid);
fflush(stdout);
- rte_eth_dev_info_get(portid, &dev_info);
+ ret = rte_eth_dev_info_get(portid, &dev_info);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE, "Error during getting device info:"
+ " err=%d, port=%u\n", ret, portid);
local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
dev_info.flow_type_rss_offloads;
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/ioat: fix unchecked return value
2020-02-04 16:03 [dpdk-stable] [PATCH] examples/ioat: fix unchecked return value Ciara Power
@ 2020-02-05 10:58 ` David Marchand
0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2020-02-05 10:58 UTC (permalink / raw)
To: Ciara Power; +Cc: Bruce Richardson, dev, Pawel Modrak, dpdk stable
On Tue, Feb 4, 2020 at 5:13 PM Ciara Power <ciara.power@intel.com> wrote:
>
> The function call to get the device info can return negative values on
> failure, which was previously unchecked. This return value is now
> checked and the function exits on failure.
>
> Coverity issue: 350361
> Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
> Cc: pawelx.modrak@intel.com
> Cc: stable@dpdk.org
We had the same patch proposed in 19.11 timeframe that got deferred to 20.02.
https://patchwork.dpdk.org/patch/63375/
Will mark https://patchwork.dpdk.org/patch/65563/ as rejected.
Besides, we have a patch with the exact same subject than this one.
https://patchwork.dpdk.org/patch/65562/
A title must (briefly) describe what functional impact the patch has.
--
David Marchand
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-05 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 16:03 [dpdk-stable] [PATCH] examples/ioat: fix unchecked return value Ciara Power
2020-02-05 10:58 ` [dpdk-stable] [dpdk-dev] " David Marchand
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).