From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EACC4A0C4E; Thu, 21 Oct 2021 15:43:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4F4141234; Thu, 21 Oct 2021 15:43:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 6D1C04118E for ; Thu, 21 Oct 2021 15:43:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634823798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=81sW8fvSr7qPBO6zFe9yNsNGSQbrkqljzAeo6SfrFl4=; b=axhITVdfy8Y1dT5TW8R2CCMNrDbkSQWWSmcIrDiXC3GjBh7BW+PU5/Q6ARPXzNDuKrFurp 0iHlaCU3KHxs0S96b5plRur1r1+QXbukLJAx8/cEtA9+NvfzYpaEqx/qT7ZqtmJ079sRlG +1/+LedUMeost7D7jOnaC5XrkfrjDrc= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-lNRl4v8iMFmjDMfjnqSHmQ-1; Thu, 21 Oct 2021 09:43:17 -0400 X-MC-Unique: lNRl4v8iMFmjDMfjnqSHmQ-1 Received: by mail-lf1-f71.google.com with SMTP id bp4-20020a056512158400b003fd96a37f3bso393300lfb.21 for ; Thu, 21 Oct 2021 06:43:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=81sW8fvSr7qPBO6zFe9yNsNGSQbrkqljzAeo6SfrFl4=; b=w73o8QH6y28P4BIA4tcEDxdeXR48Lp6qeY8SBKHid4KmwROhNnUAvxnKpFERivtjfU NzwGPVPiXOl1h3gCIrr5XRLcmU5wCKQjHmlc7btfEWTlSwip+T42M6IP8j73IVUgHvKf pTWu4o5oo9VcgQzzePicjNDXcImD7AHVMsBfDSMW5TVtR+CJIBuvN6AlpiQQ5Kn0WuBP OY+krjhomA23pXeChYXeKAePurwy6t+VAyLwHFg1CTl4XiwBsJoIsKrsUiX5nnSswY15 UXzBYFNaGFfAwdkQxstG0QJLYe1GfqsOPrBDaWhCmcRBwHDZACT23NMtHTKerPcLP/gK kuWA== X-Gm-Message-State: AOAM532IR/UOhmEwtPchsD1Y2Bk5qepYUrtzU8NCXZeiC4OrZqA0VHqj hZhoqCKJ8gTmvJwji4znkCbg6HOlJXQ+ha3sM8nvuLKqbOeVxDkLp4I4xV9LHRddYcmkaSpo1PP J3nlhJyDKN3VAI4udjLA= X-Received: by 2002:a05:6512:31c3:: with SMTP id j3mr5577040lfe.217.1634823796200; Thu, 21 Oct 2021 06:43:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJNREg2cbTz3yydHOv7/bAQvn30u5rFD6SBXqMfWWlCH7BZW3/eyD69os04W5m4ZQTxQ6Neyme30HMMn5pLeQ= X-Received: by 2002:a05:6512:31c3:: with SMTP id j3mr5577020lfe.217.1634823796022; Thu, 21 Oct 2021 06:43:16 -0700 (PDT) MIME-Version: 1.0 References: <20211020065944.19617-1-david.marchand@redhat.com> <20211021125938.52401-1-fengchengwen@huawei.com> <20211021125938.52401-2-fengchengwen@huawei.com> In-Reply-To: <20211021125938.52401-2-fengchengwen@huawei.com> From: David Marchand Date: Thu, 21 Oct 2021 15:43:04 +0200 Message-ID: To: Chengwen Feng Cc: dev , Ray Kinsella , Conor Walsh , Kevin Laatz , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 2/3] app/test: add check for DMA info get API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Thu, Oct 21, 2021 at 3:04 PM Chengwen Feng wrote: > > This patch add check for rte_dma_info_get() API. Fixes: 718f7804841f ("test/dma: add basic dmadev instance tests") > > Signed-off-by: Chengwen Feng Thanks for following up. > --- > app/test/test_dmadev.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c > index 8b58256afc..d6d5dfc803 100644 > --- a/app/test/test_dmadev.c > +++ b/app/test/test_dmadev.c > @@ -746,8 +746,11 @@ test_dmadev_instance(int16_t dev_id) > .nb_desc = TEST_RINGSIZE, > }; > const int vchan = 0; > + int ret; > > - rte_dma_info_get(dev_id, &info); > + ret = rte_dma_info_get(dev_id, &info); > + if (ret) Nit: ret != 0 > + ERR_RETURN("Error with rte_dma_info_get()\n"); > > printf("\n### Test dmadev instance %u [%s]\n", > dev_id, info.dev_name); > @@ -761,8 +764,8 @@ test_dmadev_instance(int16_t dev_id) > if (rte_dma_vchan_setup(dev_id, vchan, &qconf) < 0) > ERR_RETURN("Error with queue configuration\n"); > > - rte_dma_info_get(dev_id, &info); > - if (info.nb_vchans != 1) > + ret = rte_dma_info_get(dev_id, &info); > + if (ret || info.nb_vchans != 1) Nit: ret != 0 > ERR_RETURN("Error, no configured queues reported on device id %u\n", dev_id); > > if (rte_dma_start(dev_id) != 0) > -- > 2.33.0 > Reviewed-by: David Marchand -- David Marchand