From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31B82A04DD; Tue, 26 Nov 2019 06:18:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E97B62C60; Tue, 26 Nov 2019 06:18:30 +0100 (CET) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id A613D2B88; Tue, 26 Nov 2019 06:18:29 +0100 (CET) Received: by mail-io1-f66.google.com with SMTP id k13so19056319ioa.9; Mon, 25 Nov 2019 21:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bUf6N2rzxHiq6jvkMmYDr2iJV2w0CB7YvdB3ly56aYA=; b=QiVD3aPF2hHGFjEe/FKr30ZCI8iaPE+qmgpDxGto+oWM+4J0LPOnUQIABYk76zVAbk XQ+aw2xSxt+DhRoTB2ZgZEP05GU+JASl9s62xT+HmHi6LDPrqmAYGkAGEU13TXLeI62z Dmij6s9eTq0COBWzaXENeBI+56Y7+K+V2whhNb4L8NSspP+O4e9AzyeJMOpfqF+pQwYp icHO8ZKv4k6E/XX0wUzVM4AD720QD2jgdH+NFO2ztBDU7MwyD5r7S3x2U1lyQKIHXcsb VJnzfb6c8MVoqu3KGAxfyOWpfvgimgrHgRqE9WC+HzXfSuXFxEHBOLANn+ju8F7ppopT Jf3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bUf6N2rzxHiq6jvkMmYDr2iJV2w0CB7YvdB3ly56aYA=; b=kVO3Jx8BbBDJuPnnwYLKJYRU4J0tlKNwZc2ki2CG4rJ3a94yfTrNK/0kh7rQEf5qAT 205QV66QaRS/Y+X7B5n67z+et2I56Iq31AN8jbFPmo+HjGci5lLVP2cl0qaS0ghrJ2wm pR36l4pAr9MBQ8p+fqPjvwxjcpeXF1ewW985VbNIKP6XQBNhW4yQCeFwW3va7BUhmcdj vdi6rbEd4bd3quxMOXgeQZHBndX6z8V+47tWWOaPOD0VJmjzIpCMPA+ExNeWicscqSK9 95E5CU67mD7cakP8MSQfjAprloGrzeUy4fvILMOjtDdEfHkElpCWqFLQvQz6eUhIDwXN 17QA== X-Gm-Message-State: APjAAAU/b40f/3Wg4CxNos+V6DcVxy5bJnEnIUI252mCw0x8MQ1CZ5sr 5117C1Eu3d67AC36COMfJp0fV9A+rkG/AcrU+5U= X-Google-Smtp-Source: APXvYqzR4ERt4zrNHPeBr11k3pRDg/n3gV2Lb3fvBzN4gj5qSuZ9D7JHBSJ/PpC98xRDP0tGvahSZo/TMBOaZJN0wdE= X-Received: by 2002:a6b:7f03:: with SMTP id l3mr18661352ioq.271.1574745508704; Mon, 25 Nov 2019 21:18:28 -0800 (PST) MIME-Version: 1.0 References: <20191121192240.12326-1-pbhagavatula@marvell.com> <20191121192240.12326-2-pbhagavatula@marvell.com> In-Reply-To: <20191121192240.12326-2-pbhagavatula@marvell.com> From: Jerin Jacob Date: Tue, 26 Nov 2019 14:18:12 +0900 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 2/2] app/test-evnetdev: fix unchecked return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 22, 2019 at 4:23 AM wrote: > > From: Pavan Nikhilesh > > Fix unchecked return values reported by coverity. > > Coverity Issue: 336861 > Coverity Issue: 349906 > Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter") > Cc: stable@dpdk.org > > Signed-off-by: Pavan Nikhilesh Changed the subject to "app/test-eventdev: fix unchecked return value" Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/master. Thanks. > --- > app/test-eventdev/test_pipeline_common.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c > index 160461fb2..fa91bf229 100644 > --- a/app/test-eventdev/test_pipeline_common.c > +++ b/app/test-eventdev/test_pipeline_common.c > @@ -196,7 +196,12 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) > struct rte_eth_conf local_port_conf = port_conf; > uint32_t caps = 0; > > - rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps); > + ret = rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps); > + if (ret != 0) { > + evt_err("failed to get event tx adapter[%d] caps", i); > + return ret; > + } > + > if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) > t->internal_port = 0; > > @@ -424,7 +429,7 @@ int > pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt) > { > struct test_pipeline *t = evt_test_priv(test); > - int i; > + int i, ret; > > if (!opt->mbuf_sz) > opt->mbuf_sz = RTE_MBUF_DEFAULT_BUF_SIZE; > @@ -437,7 +442,13 @@ pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt) > uint16_t data_size = 0; > > memset(&dev_info, 0, sizeof(dev_info)); > - rte_eth_dev_info_get(i, &dev_info); > + ret = rte_eth_dev_info_get(i, &dev_info); > + if (ret != 0) { > + evt_err("Error during getting device (port %u) info: %s\n", > + i, strerror(-ret)); > + return ret; > + } > + > if (dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX && > dev_info.rx_desc_lim.nb_mtu_seg_max != 0) { > data_size = opt->max_pkt_sz / > -- > 2.17.1 >