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 E65B843C9C for ; Wed, 13 Mar 2024 08:24:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D954C40689; Wed, 13 Mar 2024 08:24:39 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 9446340689 for ; Wed, 13 Mar 2024 08:24:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710314677; 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=W2fuPlzJCLbn6TIWy1wW6Msf5JCY9xHMyNGzFsnXjus=; b=NAJURA2iQ6WIwZxBXx3/FwwSWN+PCoS7W+JTbod2N44dsZDP9Kc7U0QKhgEHlb3QjTYm1g 53af2OQXBpV4+AsX3X1ghym2knQkRWkUyZP1sghEGVbbh76GC1vAY0GdcHTGxkG46lrxJ3 sJhY0lO1Gfk8orj2rltxMZqfBD7QFFE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-VFgHE_jMNUO13RnwjIfOMA-1; Wed, 13 Mar 2024 03:24:35 -0400 X-MC-Unique: VFgHE_jMNUO13RnwjIfOMA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-513ca5dac68so221705e87.3 for ; Wed, 13 Mar 2024 00:24:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710314674; x=1710919474; 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=W2fuPlzJCLbn6TIWy1wW6Msf5JCY9xHMyNGzFsnXjus=; b=HQ4WZrRuFszKcn1klhca8DrMtLqYUw8+azeWYYRz7N7ud/0gyRrCJ+5XrSYECRqMeS hAjEMzLMUPd8DdwJHQzlUB8da48HP4Iou+pnrg1X8VXpMnDB1Br4nKbo+7CXVDL2XPvD 17LjQF1v/m+6MgYtzp+Hu/KZTnnebe8i16VdPIeVxJo7rN1Uh9ssUcz28myupC2ct6l/ PDKtMqWn3SxZ308hXL+aLAL5FRtR973MIMXVSircSizB6mCebkGKmp9fkrAI5sQ+OuKg k4/eTm+l0+zMmDo5qnSGUimjHwYfI+657IVB0AJj2Dn1bHN/VtgIcv1I2mua+WZ8rCm/ 0yvw== X-Forwarded-Encrypted: i=1; AJvYcCWI96u7lOjxGmmY9J67E2TUe3aqH1CAqu3IWi+wGN2XUtIWrIuyKaX0/b9X3U7yRH85Ae6ZcEDf/9cWakcoyvg= X-Gm-Message-State: AOJu0YwJMfGYtrp1tqhr4dO5V5zHv/ADRCGGw8N3bAaImvLqCktCYkQP YHJygizMvxWxSyTdXlUfX470SVIUUlzNtJqNVgqSRfl86GKO3YjwJfmEUUze5gj6FTdGn/26Nqk Gb3fhMZXRns+ONJDvlbFrC3YmpiKFi5hDKe6GU6GeghczEMt4XTo9lR66evKigsLETBMOjeNmoB D0cRCq+kmH8ErlI2S7LI8= X-Received: by 2002:a05:6512:45a:b0:513:5ed9:c193 with SMTP id y26-20020a056512045a00b005135ed9c193mr1674171lfk.35.1710314674405; Wed, 13 Mar 2024 00:24:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyCDG234AHWVd68VB4gZ2WznvzJqEjkchsnXqS82ak+jWCKKYgG+57W19t1m3neL7OzjSkX95J528ChotmWsw= X-Received: by 2002:a05:6512:45a:b0:513:5ed9:c193 with SMTP id y26-20020a056512045a00b005135ed9c193mr1674149lfk.35.1710314674054; Wed, 13 Mar 2024 00:24:34 -0700 (PDT) MIME-Version: 1.0 References: <20240308144841.3615262-1-david.marchand@redhat.com> <20240308144841.3615262-3-david.marchand@redhat.com> <92e9792e-9054-4c8e-a409-739176707175@amd.com> In-Reply-To: <92e9792e-9054-4c8e-a409-739176707175@amd.com> From: David Marchand Date: Wed, 13 Mar 2024 08:24:22 +0100 Message-ID: Subject: Re: [PATCH 2/4] app/testpmd: fix burst option parsing To: Ferruh Yigit Cc: dev@dpdk.org, stable@dpdk.org, Aman Singh , Yuying Zhang , Ivan Ilchenko , Andrew Rybchenko , Bernard Iremonger X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Mar 12, 2024 at 5:47=E2=80=AFPM Ferruh Yigit = wrote: > > On 3/8/2024 2:48 PM, David Marchand wrote: > > rte_eth_dev_info_get() is not supposed to fail for a valid port_id, but > > for the theoretical case when it would fail, raise an error rather than > > skip subsequent options. > > > > Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info"= ) > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > > --- > > app/test-pmd/parameters.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c > > index d715750bb8..8c21744009 100644 > > --- a/app/test-pmd/parameters.c > > +++ b/app/test-pmd/parameters.c > > @@ -1128,9 +1128,9 @@ launch_args_parse(int argc, char** argv) > > 0, > > &dev_info= ); > > if (ret !=3D 0) > > - return; > > - > > - rec_nb_pkts =3D dev_info > > + rec_nb_pkts =3D 0; > > + else > > + rec_nb_pkts =3D dev_info > > .default_rxportconf.burst= _size; > > > > if (rec_nb_pkts =3D=3D 0) > > 'eth_dev_info_get_print_err()' already fail, but it may not be very > clear to the user, > OK to print a failure log, but setting 'rec_nb_pkts =3D 0;' as above also > will generate an error message that also may be confusing to the user. > > What about print an explicit error message for the > 'eth_dev_info_get_print_err()' failed case? rte_exit(EXIT_FAILURE, "Failed to retrieve device info, this is probably a driver bug. " "To workaround this issue, please provide a value between 1 and %d\n", MAX_PKT_BURST); Does it work for you? --=20 David Marchand