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 2C7AA43CAD for ; Thu, 14 Mar 2024 01:10:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2566742E33; Thu, 14 Mar 2024 01:10:52 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id BEE0F4021E for ; Thu, 14 Mar 2024 01:10:50 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-413f26b1729so443555e9.2 for ; Wed, 13 Mar 2024 17:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710375050; x=1710979850; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=spq9u0jJPZHiU46WcydI/ZwaEORsoW4kshp7pLFGpiM=; b=GSijwyFBIebpPPfhAw4ML13VA6iG4CT85qdCvGx6hX/PyFoO4b0OVQNH+rzTbCRqLs 9cN3CTxlSsNXj4boBBLQa8bE11bdt7f7wP/OtZkZ3yAkYWBJJ5ZI6GYotj2o12yvafFa N3RpVEIWiiDmUUg6vGKs4Wd2oIFm9dzsFiXs5Rze75PiejjVxor2+gCwtG7gUx4eKYmQ 68zh4Cmv8SyMbI2G0jAAjVsXbLOAqKYBYr42yblaoKZqfQSbTz3/LNlNW7XLjtaWS5BE 8gus0Bkqhb3yuwTKDnyyXheXt2UT4ooYbRqlynReZae2fCNlWyc1/8r+U1yp2fdo2WEx Ov8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710375050; x=1710979850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=spq9u0jJPZHiU46WcydI/ZwaEORsoW4kshp7pLFGpiM=; b=kiyxzewjB6s0fPDiBbDcE5W9RKStQQ5ythKmKPfnz3vjiIY87kYtENaLQzxl9ttR4l unqxPBrVwntWjmnK8E50yjllHgSYELaaDS0CHMHqcwlRzJyRnBE0K1U5luUrLQa3OT49 Bup6GpXd2kqh7przHVqIC4tn5CSqTDKn+u0mSlQ0JmYSwprka1mQIo5uGmpTFVrWP+AL 8gxw95qAAKKfTKd6xmUwg5gbeYnXXU+oBXWZxNy/bEu6BuiDhfrkPjoEeavascIOI9ow ctWsTm8up8KPF8uxjdKmfGKC/MQutj92bCtfQdy+IoV2jpr5YbucgkZA7X2LwEBrxHMS Mv+Q== X-Forwarded-Encrypted: i=1; AJvYcCXNYBEegIlgYQ7d8OrK+88L8JtjA3rj1LjXuMlFhqahTqeYDFh6VXAlQisrTl39c7FDgpFP7E6Cc3t9zyerxVw= X-Gm-Message-State: AOJu0Yyv1WHMvrPUbQ7P//GM3bqjCOO1obBz4u9V2cCehQYrbay7/6nd bVbwcHTxIHu9QYFlhwZ3Nxv9AaODty7JB5QfgW+mWKKIzanVRQdVM26H0T86 X-Google-Smtp-Source: AGHT+IENoieDH0sloh2LgGRxXMsG823eqDRp8LeevJYnxHO9JGt3QfykwD3lnLRYai16wlZKeiSKMQ== X-Received: by 2002:a05:600c:a0e:b0:413:eb5d:d8c3 with SMTP id z14-20020a05600c0a0e00b00413eb5dd8c3mr192526wmp.32.1710375050413; Wed, 13 Mar 2024 17:10:50 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id r17-20020a05600c459100b00413429bfab0sm3784075wmo.16.2024.03.13.17.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 17:10:49 -0700 (PDT) From: luca.boccassi@gmail.com To: Dariusz Sosnowski Cc: Ori Kam , dpdk stable Subject: patch 'app/testpmd: fix async flow create failure handling' has been queued to stable release 22.11.5 Date: Thu, 14 Mar 2024 00:09:12 +0000 Message-Id: <20240314000957.2810803-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240314000957.2810803-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-102-luca.boccassi@gmail.com> <20240314000957.2810803-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/16/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/1b8a6de75f270592ace73d65dba3fdc9394b359e Thanks. Luca Boccassi --- >From 1b8a6de75f270592ace73d65dba3fdc9394b359e Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Wed, 28 Feb 2024 19:57:07 +0100 Subject: [PATCH] app/testpmd: fix async flow create failure handling [ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ] In case of an error when an asynchronous flow create operation was enqueued, test-pmd attempted to enqueue a flow destroy operation of that flow rule. However, this was incorrect because: - Flow rule index was used to enqueue a flow destroy operation. This flow rule index was not yet initialized, so flow rule number 0 was always destroyed as a result. - Since rte_flow_async_create() does not return a handle on error, then there is no flow rule to destroy. test-pmd only needs to free internal memory allocated for storing a flow rule. Any flow destroy operation is not needed in this case. Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations") Signed-off-by: Dariusz Sosnowski Acked-by: Ori Kam --- app/test-pmd/config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index e8a647a393..dca5431b98 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id, flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table, pattern, pattern_idx, actions, actions_idx, job, &error); if (!flow) { - uint32_t flow_id = pf->id; - port_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id); + free(pf); free(job); return port_flow_complain(&error); } -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-14 00:09:21.504778957 +0000 +++ 0016-app-testpmd-fix-async-flow-create-failure-handling.patch 2024-03-14 00:09:20.585614666 +0000 @@ -1 +1 @@ -From 0da12ecba770873851a3a63dc08052271a350aeb Mon Sep 17 00:00:00 2001 +From 1b8a6de75f270592ace73d65dba3fdc9394b359e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0da12ecba770873851a3a63dc08052271a350aeb ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index cd2a436cd7..968d2164ab 100644 +index e8a647a393..dca5431b98 100644 @@ -34,3 +35,3 @@ -@@ -2856,8 +2856,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id, - flow = rte_flow_async_create_by_index(port_id, queue_id, &op_attr, pt->table, - rule_idx, actions, actions_idx, job, &error); +@@ -2700,8 +2700,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id, + flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table, + pattern, pattern_idx, actions, actions_idx, job, &error); @@ -38 +39 @@ -- uint64_t flow_id = pf->id; +- uint32_t flow_id = pf->id;