* [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
@ 2019-04-04 15:45 Jasvinder Singh
2019-04-04 15:45 ` Jasvinder Singh
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jasvinder Singh @ 2019-04-04 15:45 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
Fix unchecked return value issue reported by Coverity.
Coverity ID 336852
Fixes: a958a5c07f4b ("net/softnic: support service cores")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic_thread.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index 57989a5aa..855408e98 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -137,7 +137,10 @@ thread_sc_service_up(struct pmd_internals *softnic, uint32_t thread_id)
uint16_t port_id;
/* service params */
- rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ if (status)
+ return status;
+
dev = &rte_eth_devices[port_id];
snprintf(service_params.name, sizeof(service_params.name), "%s_%u",
softnic->params.name,
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
2019-04-04 15:45 [dpdk-dev] [PATCH] net/softnic: fix unchecked return value Jasvinder Singh
@ 2019-04-04 15:45 ` Jasvinder Singh
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:34 ` Ferruh Yigit
2 siblings, 0 replies; 6+ messages in thread
From: Jasvinder Singh @ 2019-04-04 15:45 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
Fix unchecked return value issue reported by Coverity.
Coverity ID 336852
Fixes: a958a5c07f4b ("net/softnic: support service cores")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic_thread.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index 57989a5aa..855408e98 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -137,7 +137,10 @@ thread_sc_service_up(struct pmd_internals *softnic, uint32_t thread_id)
uint16_t port_id;
/* service params */
- rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);
+ if (status)
+ return status;
+
dev = &rte_eth_devices[port_id];
snprintf(service_params.name, sizeof(service_params.name), "%s_%u",
softnic->params.name,
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
2019-04-04 15:45 [dpdk-dev] [PATCH] net/softnic: fix unchecked return value Jasvinder Singh
2019-04-04 15:45 ` Jasvinder Singh
@ 2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:34 ` Ferruh Yigit
2 siblings, 1 reply; 6+ messages in thread
From: Rami Rosen @ 2019-04-04 17:20 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: dev, cristian.dumitrescu
Acked-by: Rami Rosen <ramirose@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
2019-04-04 15:45 [dpdk-dev] [PATCH] net/softnic: fix unchecked return value Jasvinder Singh
2019-04-04 15:45 ` Jasvinder Singh
2019-04-04 17:20 ` Rami Rosen
@ 2019-04-04 17:34 ` Ferruh Yigit
2019-04-04 17:34 ` Ferruh Yigit
2 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-04 17:34 UTC (permalink / raw)
To: Jasvinder Singh, dev; +Cc: cristian.dumitrescu
On 4/4/2019 4:45 PM, Jasvinder Singh wrote:
> Fix unchecked return value issue reported by Coverity.
>
> Coverity ID 336852
> Fixes: a958a5c07f4b ("net/softnic: support service cores")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] net/softnic: fix unchecked return value
2019-04-04 17:34 ` Ferruh Yigit
@ 2019-04-04 17:34 ` Ferruh Yigit
0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-04 17:34 UTC (permalink / raw)
To: Jasvinder Singh, dev; +Cc: cristian.dumitrescu
On 4/4/2019 4:45 PM, Jasvinder Singh wrote:
> Fix unchecked return value issue reported by Coverity.
>
> Coverity ID 336852
> Fixes: a958a5c07f4b ("net/softnic: support service cores")
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-04 17:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 15:45 [dpdk-dev] [PATCH] net/softnic: fix unchecked return value Jasvinder Singh
2019-04-04 15:45 ` Jasvinder Singh
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:20 ` Rami Rosen
2019-04-04 17:34 ` Ferruh Yigit
2019-04-04 17:34 ` Ferruh Yigit
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).