patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values
@ 2020-05-13 20:22 pbhagavatula
  2020-05-14 13:17 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2020-05-13 20:22 UTC (permalink / raw)
  To: jerinj; +Cc: dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Fix unchecked return values reported by coverity.

Coverity issue: 357755
Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_pipeline_common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 84c42b33c..f1c227941 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -392,8 +392,12 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
 		if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
 			uint32_t service_id = -1U;
 
-			rte_event_eth_tx_adapter_service_id_get(consm,
-					&service_id);
+			ret = rte_event_eth_tx_adapter_service_id_get(consm,
+								   &service_id);
+			if (ret != -ESRCH && ret != 0) {
+				evt_err("Failed to get Tx adptr service ID\n");
+				return ret;
+			}
 			ret = evt_service_setup(service_id);
 			if (ret) {
 				evt_err("Failed to setup service core"
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values
  2020-05-13 20:22 [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values pbhagavatula
@ 2020-05-14 13:17 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-05-14 13:17 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk-dev, dpdk stable

On Thu, May 14, 2020 at 1:53 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Fix unchecked return values reported by coverity.
>
> Coverity issue: 357755
> Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  app/test-eventdev/test_pipeline_common.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
> index 84c42b33c..f1c227941 100644
> --- a/app/test-eventdev/test_pipeline_common.c
> +++ b/app/test-eventdev/test_pipeline_common.c
> @@ -392,8 +392,12 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
>                 if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
>                         uint32_t service_id = -1U;
>
> -                       rte_event_eth_tx_adapter_service_id_get(consm,
> -                                       &service_id);
> +                       ret = rte_event_eth_tx_adapter_service_id_get(consm,
> +                                                                  &service_id);
> +                       if (ret != -ESRCH && ret != 0) {
> +                               evt_err("Failed to get Tx adptr service ID\n");

\n is not required as evt_err has it.

Acked-by: Jerin Jacob <jerinj@marvell.com>

Fixed and Applied to dpdk-next-eventdev/master. Thanks.



> +                               return ret;
> +                       }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-14 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 20:22 [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix unchecked function return values pbhagavatula
2020-05-14 13:17 ` Jerin Jacob

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git