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 6496E42B15; Wed, 17 May 2023 07:19:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E74BF4114A; Wed, 17 May 2023 07:19:49 +0200 (CEST) Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) by mails.dpdk.org (Postfix) with ESMTP id 476C14067B for ; Wed, 17 May 2023 07:19:48 +0200 (CEST) Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-783eb20d96cso158203241.0 for ; Tue, 16 May 2023 22:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684300787; x=1686892787; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=F6wlzk/Nb4kbKhtULAk2vvcwHPSRlAwk7zf2r8s52MU=; b=SkWCNVOKt9AxizEjMouFbGbFJnUSgIhITTp3IKwgeNItEfLiEKPjNzhXweqoEA2olm sqFNpQXEOTRiVBR3OhIToK43bDLzPKEzEuOzL+dg1vCp8JFWALCx90mPKpk7ATmT89yF 6CCGvoOiQTJdPxBjlbe17llUTc2CEej6FaavCM0izVdJVLDh7LEU2SNwIAhMOdoVIztl MtDtPoaP9eWaSMbpOR17RkJJWxM8R61RlhPRyK7ZIk7Lj3ysUAOtjEIheUVNezBAI3gv t925DIHZvVvvc+NLg0wLe4h7sd2nQ0NeV8RtD7wg11i9BuefvxMiDEOeVTXWc5Lq0J8L /LQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684300787; x=1686892787; 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=F6wlzk/Nb4kbKhtULAk2vvcwHPSRlAwk7zf2r8s52MU=; b=incPD9mLVAJJ9RuEvueBkGIkboEHpjtzwJdIkY7fTKioIeARC7dnlC7PwQQPAvIU9O Er+xfqa2RRGaS0+1wVkkNeEEBdSGsGdB0ctJLhYmeP4pOPQ5shZTyArpqBqX+8ZIT0hc vxN3/uQ3LtTidjxzNQij04ZaujhIECiJX7HpVbGs5/YIZ/dkX0DgbLz3yBK6ipjDtVIy seeLml2f1rETLh9cDmHjO5POZAdnCp3zWqGXohQ42+kvzMOwkF8XijAAouCg9Q9P4e+X BwfNB0GDZVsKuyDZkW//oH7d2oikJfw0OUn20GSvrgobFFZa2YWfdytgJuc8Eau5Xu53 L6iw== X-Gm-Message-State: AC+VfDwTRQZI7JjKIrJajwKYnSTLHO/Cf3JPMrKAWPIjrM1zqZ233zS1 vjbZX82HWnCaGKHAjORMdTP33m3PP+jGt9AXMdw= X-Google-Smtp-Source: ACHHUZ7X002q7urQjEBRJoWysZ+PZ/QI578GlXbdsq+0BBMfXB/Pe3HbMozB5hpx/F1q4TOjppCCDi9cMTMa4EWdDT4= X-Received: by 2002:a05:6102:303a:b0:434:50e9:164d with SMTP id v26-20020a056102303a00b0043450e9164dmr14892273vsa.17.1684300787378; Tue, 16 May 2023 22:19:47 -0700 (PDT) MIME-Version: 1.0 References: <20230502053613.1131362-1-s.v.naga.harish.k@intel.com> <20230502055711.1133134-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20230502055711.1133134-1-s.v.naga.harish.k@intel.com> From: Jerin Jacob Date: Wed, 17 May 2023 10:49:21 +0530 Message-ID: Subject: Re: [PATCH v2] eventdev/eth_tx: fix runtime parameter test To: Naga Harish K S V Cc: jerinj@marvell.com, dev@dpdk.org, jay.jayatheerthan@intel.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, May 2, 2023 at 11:27=E2=80=AFAM Naga Harish K S V wrote: > > TX adapter capability check logic is simplified. > The UT has been updated to skip the test, if the API > to set runtime parameters is not supported. > > Fixes: 1d176c7add08581 ("eventdev/eth_tx: support runtime set/get paramet= ers") > > Signed-off-by: Naga Harish K S V > --- > app/test/test_event_eth_tx_adapter.c | 11 ++++++--- > lib/eventdev/rte_event_eth_tx_adapter.c | 33 +++++-------------------- > 2 files changed, 14 insertions(+), 30 deletions(-) Please fix Is it candidate for Cc: stable@dpdk.org backport? eventdev/eth_tx: fix runtime parameter test Invalid patch(es) found - checked 1 patch check-git-log failed ### [PATCH] eventdev/eth_tx: fix runtime parameter test WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("")' - ie: 'Fixes: 1d176c7add08 ("eventdev/eth_tx: support runtime set/get parameters")' #10: Fixes: 1d176c7add08581 ("eventdev/eth_tx: support runtime set/get parameter= s") total: 0 errors, 1 warnings, 90 lines checked 0/1 valid patch checkpatch failed > > diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_e= th_tx_adapter.c > index 4e1d821bf9..616c972ac0 100644 > --- a/app/test/test_event_eth_tx_adapter.c > +++ b/app/test/test_event_eth_tx_adapter.c > @@ -800,13 +800,17 @@ tx_adapter_queue_start_stop(void) > static int > tx_adapter_set_get_params(void) > { > - int err; > + int err, rc; > struct rte_event_eth_tx_adapter_runtime_params in_params; > struct rte_event_eth_tx_adapter_runtime_params out_params; > > err =3D rte_event_eth_tx_adapter_queue_add(TEST_INST_ID, > TEST_ETHDEV_ID, > 0); > + if (err =3D=3D -ENOTSUP) { > + rc =3D TEST_SKIPPED; > + goto skip; > + } > TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > > err =3D rte_event_eth_tx_adapter_runtime_params_init(&in_params); > @@ -916,13 +920,14 @@ tx_adapter_set_get_params(void) > TEST_ASSERT(in_params.flush_threshold =3D=3D out_params.flush_thr= eshold, > "Expected %u got %u", > in_params.flush_threshold, out_params.flush_threshold= ); > - > + rc =3D TEST_SUCCESS; > +skip: > err =3D rte_event_eth_tx_adapter_queue_del(TEST_INST_ID, > TEST_ETHDEV_ID, > 0); > TEST_ASSERT(err =3D=3D 0, "Expected 0 got %d", err); > > - return TEST_SUCCESS; > + return rc; > } > > static int > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_e= vent_eth_tx_adapter.c > index 131e11e01d..360d5caf6a 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -1310,36 +1310,15 @@ rte_event_eth_tx_adapter_runtime_params_init( > } > > static int > -txa_caps_check(uint8_t id, struct txa_service_data *txa) > +txa_caps_check(struct txa_service_data *txa) > { > - uint32_t caps =3D 0; > - struct rte_eth_dev *eth_dev =3D NULL; > - struct txa_service_ethdev *tdi; > - int i; > - > if (!txa->dev_count) > return -EINVAL; > > - /* The eth_dev used is always the same type. > - * Hence first valid eth_dev is taken. > - */ > - for (i =3D 0; i < txa->dev_count; i++) { > - tdi =3D &txa->txa_ethdev[i]; > - if (tdi->nb_queues) { > - eth_dev =3D tdi->dev; > - break; > - } > - } > - if (eth_dev =3D=3D NULL) > - return -EINVAL; > - > - if (txa_dev_caps_get(id)) > - txa_dev_caps_get(id)(txa_evdev(id), eth_dev, &caps); > - > - if (caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT) > - return -ENOTSUP; > + if (txa->service_id !=3D TXA_INVALID_SERVICE_ID) > + return 0; > > - return 0; > + return -ENOTSUP; > } > > int > @@ -1361,7 +1340,7 @@ rte_event_eth_tx_adapter_runtime_params_set(uint8_t= id, > if (txa =3D=3D NULL) > return -EINVAL; > > - ret =3D txa_caps_check(id, txa); > + ret =3D txa_caps_check(txa); > if (ret) > return ret; > > @@ -1392,7 +1371,7 @@ rte_event_eth_tx_adapter_runtime_params_get(uint8_t= id, > if (txa =3D=3D NULL) > return -EINVAL; > > - ret =3D txa_caps_check(id, txa); > + ret =3D txa_caps_check(txa); > if (ret) > return ret; > > -- > 2.23.0 >