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 67B0343C9C; Wed, 13 Mar 2024 08:24:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1786D40E01; Wed, 13 Mar 2024 08:24:40 +0100 (CET) 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 A752D4069D 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-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-bMUhnZmDOLmp83XMYa85qQ-1; Wed, 13 Mar 2024 03:24:35 -0400 X-MC-Unique: bMUhnZmDOLmp83XMYa85qQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2d45f7074faso7221451fa.2 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=SVjm09AhL+yGw7g4lHXXgDtuccUsFYBzT1z5DR2Iz9b5uW0tQuOuJgEJzB1dfXZWc/ tde5XIvBZC4XypgW9VtZjmPfFtDdHXUYiCDJswtuG6OUdACc8fg+Wl0Wj9VD0xfb7jmH 2BV8Iy6v9sJ0rPMj1BYJtiyvxXhhT6AKFP9UVBQtVHkGWJIOi0PBpwYt1cIox5P9hlqV ER0jHZXX26C8g47yKlApMkZtxKsdwDMQNCIysKSbDXTQmrWnd7dL6W7lOAr3kDGQlqsp JGHEpdsSM089YFwX/3WpDj5lo6rVJIdMuJ/HAF56AGNnoHKOODsoZxCqH7/ASnlbWVGb kN/g== X-Gm-Message-State: AOJu0YzCdtGRqWd3QDy1rvFoye3MjuAXVmpn0Qi6xypMUJ3dDfz7tD2F ewR9HQKgFy/c5AeX6ygIDbSF0f/m4HIfqcTIClzVjSZz13UUIfds40l2RjNQPfLegt3R0jPqMq3 NcN6i/04b735EjNET8Z8AhTs3gdZU9ptNeqjpSrxDuRwHhUoHARH7H8P37in7jVhPP32QR5yadi o3tt1kCxhZCASnfAw= X-Received: by 2002:a05:6512:45a:b0:513:5ed9:c193 with SMTP id y26-20020a056512045a00b005135ed9c193mr1674165lfk.35.1710314674402; 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: 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 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