Message ID | 20230116173738.562322-5-bruce.richardson@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | David Marchand |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02D53423F2; Mon, 16 Jan 2023 18:38:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28AD242D2A; Mon, 16 Jan 2023 18:38:02 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B3FBF42D0E for <dev@dpdk.org>; Mon, 16 Jan 2023 18:37:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673890679; x=1705426679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=clFEMN+caSJ2XWJZ8CvtgRiTLoqxEFz9MbLvMRL/uW0=; b=LqU6UNj5tPajUNvmoeO/fduzbL/GY6YVOEVucKZJFpuFV3/9mAqhDoIZ uvlA9WRsJ3ZR5SPWqbHfRhQElSLw6ZjpN8fYn53NfH3WrDLyEZPYwUHk+ HilJth/kqoPQdMKKIzt2Y88D4YR1GC36UmkCRChKNgufIbTzN347aauy6 ctc93JCfxpOq7wlK20bb+ILDAZzQ1Ya1q+nRQi2IBBTB33/IN3Ntuj6sN HIwR4yHYXenH8TtgfxBK1SwPduMO0wUCxPR52yXll+giu6y9J/xN81gup L/myK6/svtG93RzCP8iK9g05i5o3zhRnvZwcFJknPmjTEEjwuOGrCUTU9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326570399" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="326570399" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 09:37:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="987869185" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="987869185" Received: from silpixa00401385.ir.intel.com ([10.237.214.55]) by fmsmga005.fm.intel.com with ESMTP; 16 Jan 2023 09:37:58 -0800 From: Bruce Richardson <bruce.richardson@intel.com> To: dev@dpdk.org Cc: Bruce Richardson <bruce.richardson@intel.com>, Chengwen Feng <fengchengwen@huawei.com>, Kevin Laatz <kevin.laatz@intel.com> Subject: [PATCH v2 4/6] test/dmadev: check result for device stop Date: Mon, 16 Jan 2023 17:37:35 +0000 Message-Id: <20230116173738.562322-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116173738.562322-1-bruce.richardson@intel.com> References: <20230116153714.554470-1-bruce.richardson@intel.com> <20230116173738.562322-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
dma/ioat: fix issues with stopping and restarting device
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Bruce Richardson
Jan. 16, 2023, 5:37 p.m. UTC
The DMA device stop API can return an error value so check that return
value when running dmadev unit tests.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/test_dmadev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
> The DMA device stop API can return an error value so check that return > value when running dmadev unit tests. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Hi Chengwen, On Mon, Jan 16, 2023 at 6:38 PM Bruce Richardson <bruce.richardson@intel.com> wrote: > > The DMA device stop API can return an error value so check that return > value when running dmadev unit tests. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > app/test/test_dmadev.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Can you review the last three patches of this series? Thanks!
On 16/01/2023 17:37, Bruce Richardson wrote: > The DMA device stop API can return an error value so check that return > value when running dmadev unit tests. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > app/test/test_dmadev.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Sorry late to see. On 2023/1/17 1:37, Bruce Richardson wrote: > The DMA device stop API can return an error value so check that return > value when running dmadev unit tests. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > app/test/test_dmadev.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c > index fe62e98af8..4e1dbcaa19 100644 > --- a/app/test/test_dmadev.c > +++ b/app/test/test_dmadev.c > @@ -837,7 +837,11 @@ test_dmadev_instance(int16_t dev_id) > goto err; > > rte_mempool_free(pool); > - rte_dma_stop(dev_id); > + > + if (rte_dma_stop(dev_id) < 0) { > + rte_mempool_free(pool); The pool already freed in above. I think just add ERR_RETURN here. > + ERR_RETURN("Error stopping device %u\n", dev_id); > + } > rte_dma_stats_reset(dev_id, vchan); > return 0; > >
On Wed, Feb 15, 2023 at 09:26:01AM +0800, fengchengwen wrote: > Sorry late to see. > > On 2023/1/17 1:37, Bruce Richardson wrote: > > The DMA device stop API can return an error value so check that return > > value when running dmadev unit tests. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > --- > > app/test/test_dmadev.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c > > index fe62e98af8..4e1dbcaa19 100644 > > --- a/app/test/test_dmadev.c > > +++ b/app/test/test_dmadev.c > > @@ -837,7 +837,11 @@ test_dmadev_instance(int16_t dev_id) > > goto err; > > > > rte_mempool_free(pool); > > - rte_dma_stop(dev_id); > > + > > + if (rte_dma_stop(dev_id) < 0) { > > + rte_mempool_free(pool); > > The pool already freed in above. > I think just add ERR_RETURN here. > Yep, good catch. Will fix in v3.
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index fe62e98af8..4e1dbcaa19 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -837,7 +837,11 @@ test_dmadev_instance(int16_t dev_id) goto err; rte_mempool_free(pool); - rte_dma_stop(dev_id); + + if (rte_dma_stop(dev_id) < 0) { + rte_mempool_free(pool); + ERR_RETURN("Error stopping device %u\n", dev_id); + } rte_dma_stats_reset(dev_id, vchan); return 0;