From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7C62845980;
	Thu, 19 Sep 2024 15:36:33 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 0B44640A7D;
	Thu, 19 Sep 2024 15:36:33 +0200 (CEST)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.133.124])
 by mails.dpdk.org (Postfix) with ESMTP id EA169406FF
 for <dev@dpdk.org>; Thu, 19 Sep 2024 15:36:30 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1726752990;
 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:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=fvuEbp/x2BVTh6r4lL6qylnAU3GuPJZf/vJYxWTUOjQ=;
 b=A9JuO1CbxGhS+8TeQ23laRXKFt9jo5fTIbds5g5nw1F9b8syRFYoeg5nhMlb2/gFLb8imE
 351s2oi+3TvnuiUSicUM5o9nwmbw+XmGTyFN92wozjPk1vo0aSjJ+rn7ICTvbTVNEJZUae
 tnKbmd8GKNhRMcQtBVhOwu6t2nmmNLo=
Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com
 [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
 us-mta-458-XzLTWGyQNxaIej0GePWUFw-1; Thu, 19 Sep 2024 09:36:29 -0400
X-MC-Unique: XzLTWGyQNxaIej0GePWUFw-1
Received: by mail-pg1-f199.google.com with SMTP id
 41be03b00d2f7-7d50dadb7f8so1225068a12.0
 for <dev@dpdk.org>; Thu, 19 Sep 2024 06:36:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1726752988; x=1727357788;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=fvuEbp/x2BVTh6r4lL6qylnAU3GuPJZf/vJYxWTUOjQ=;
 b=unmkL2eSmcd+UPDU5sRS/fAr5mWfPx3+SA2EriG1mSudVYf+tZQ+tvG9SZI/jC8p8X
 yGscRf1mQiA3tjGjaqhFwQVl5Dmymx5lZa5lQvBgAsMdrgciuGUVgI+/GYee97zQko3R
 rRj+iYDsyyXO8J7tU6pQ4Vc+gmhmV3ZgzmEN8COdfRaJcnlIsNTgf0trdp2jvkcao8Fl
 tr+oY7vc1S+L/rg7ylr2mG86g9CTaiYr03I+N6nu/tfMqPSfRzFPgbeEezo/hapR/wXw
 ijrBpQuss+L0UbFA/s27CPp8RpKTinJCN/adFKHDbiNl92+qs4aPWVD/Ze15FhbSeXME
 PDHA==
X-Gm-Message-State: AOJu0Yx7tZ4Jk0s3IyPO0pe16TdCQtJcHpIWsaTgtvowkhoyy41lios1
 jysDbi3k3yL5/PeAcPJr+sHhk2QdOykrwPgw5xY4wmJ45lfORcv90d2XFKIRnPE3VA80EJOvoqb
 uh7JXwapkvPdhh88qXiq0JofLrr6rvQwQdAFAhcL5ZjxPAR9ihYCqmYbH5gaTZmTVnyy8yRWF3M
 xrmZl/BtMyM/94a+c=
X-Received: by 2002:a17:90a:880d:b0:2d8:7c44:487c with SMTP id
 98e67ed59e1d1-2dd6ce237aamr4757636a91.12.1726752988360; 
 Thu, 19 Sep 2024 06:36:28 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHbCrB4w4ty31jvTg0eb2SILWvG75T/oxr8UXJV2jTDIhrSax9Gy7SC2jxuZv6+f/BJA1GyZsCcS6oilNVV0PY=
X-Received: by 2002:a17:90a:880d:b0:2d8:7c44:487c with SMTP id
 98e67ed59e1d1-2dd6ce237aamr4757607a91.12.1726752988014; Thu, 19 Sep 2024
 06:36:28 -0700 (PDT)
MIME-Version: 1.0
References: <20240812132910.162252-1-bruce.richardson@intel.com>
 <20240814104933.14062-1-bruce.richardson@intel.com>
 <20240814104933.14062-4-bruce.richardson@intel.com>
In-Reply-To: <20240814104933.14062-4-bruce.richardson@intel.com>
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 19 Sep 2024 15:36:13 +0200
Message-ID: <CAJFAV8yjj+w3ku0tDHbM2xu3Z9mGN7cLyS3oc4N4SNTkqg4KKQ@mail.gmail.com>
Subject: Re: [PATCH v3 03/26] app/test-bbdev: remove use of ethdev queue count
 value
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, ferruh.yigit@amd.com, thomas@monjalon.net, 
 mb@smartsharesystems.com, Maxime Coquelin <maxime.coquelin@redhat.com>
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
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

On Wed, Aug 14, 2024 at 12:50=E2=80=AFPM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Replace the use of RTE_MAX_QUEUES_PER_PORT, which is intended as an
> ethdev define, with the limit from the bbdev library.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Morten Br=C3=B8rup <mb@smartsharesystems.com>

Cc: Maxime

> ---
>  app/test-bbdev/test_bbdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
> index 0bbce6ca92..2e626efd74 100644
> --- a/app/test-bbdev/test_bbdev.c
> +++ b/app/test-bbdev/test_bbdev.c
> @@ -297,7 +297,7 @@ test_bbdev_configure_stop_queue(void)
>                         "Failed test for rte_bbdev_queue_stop "
>                         "invalid dev_id ");
>
> -       TEST_ASSERT_FAIL(rte_bbdev_queue_stop(dev_id, RTE_MAX_QUEUES_PER_=
PORT),
> +       TEST_ASSERT_FAIL(rte_bbdev_queue_stop(dev_id, RTE_BBDEV_DEFAULT_M=
AX_NB_QUEUES),

According to lib/bbdev/rte_bbdev_pmd.h:

/** Suggested value for SW based devices */
#define RTE_BBDEV_DEFAULT_MAX_NB_QUEUES RTE_MAX_LCORE

So it is not clear to me that this is a safe maximum value.

I would instead pass a queue id which is >=3D devinfo.num_queues.


>                         "Failed test for rte_bbdev_queue_stop "
>                         "invalid queue_id ");
>
> @@ -1176,7 +1176,7 @@ test_bbdev_invalid_driver(void)
>                         "invalid dev_id ");
>
>         TEST_ASSERT_FAIL(rte_bbdev_queue_info_get(dev_id,
> -                       RTE_MAX_QUEUES_PER_PORT, &qinfo),
> +                       RTE_BBDEV_DEFAULT_MAX_NB_QUEUES, &qinfo),

Idem.

>                         "Failed test for rte_bbdev_info_get: "
>                         "invalid queue_id ");
>


--=20
David Marchand