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 99EE9455AD for ; Mon, 15 Jul 2024 17:31:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 945FA40E1D; Mon, 15 Jul 2024 17:31:34 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 3658B40A71 for ; Mon, 15 Jul 2024 17:31:33 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4279ca8af51so26102805e9.3 for ; Mon, 15 Jul 2024 08:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057493; x=1721662293; 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=i1q9GSvM0NtpuT/9PTXgSZLrL0wQOXVTMKproe5FSFE=; b=JYugx6ZmErhzjroXdAlmcTJjXzQP4hiEDwPNgDdddvOf+bdanuy0PUpLpETaUCcVDY bzsYQZhhjATEq42DC5Yt5ZX8qyfw0FaUmLqbPJE5J2B5Vm6unouOMOF6CRHg/S+cjb22 bCokpcW/r7EpKIEWjntMWqXcsOB0ZNrAZpRWDlHeRXE49j14CD7EykCdnRuxm9TEUV3r cXcyBH1KPac7KHkXbVqMmjeZCT7yp6hYfbcIcXCEa19wWt2b6HjJgqoc3Ji/TY6dUrDy ZprWTiC4DX1/3b552KL2FH99HAqaEb+XtntRekTuwKUj02RLD/W02Agx7/7qXIc54TdQ MY0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057493; x=1721662293; 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=i1q9GSvM0NtpuT/9PTXgSZLrL0wQOXVTMKproe5FSFE=; b=FXh9TrbmrMhMT0+T0uCSzobiiXEsYhFHuSH9eL9+4rzYF/IEedJ2sSLxBYJh2WCVdV OSuCkUBT/sXso26kW1So1mOh6C6XAKjChGiNibzBjAOJH3HhWRrb83usjdXuyt8IYynV kHP1PPszpVpOFHbLkir65KOxFbrDEfWPk3TU9mF4DA8u0nA2FmC0fxi3DqNKcUdgQHJS rm2F9X+jDmP6ymZfMimxr7Twdei1X4a41wmyGEBoFas6ycoBY8OYy+m1XkG7nYT1KIvj 67nK7A1Qv3kF9ZLxCE52iEqVZStfEZTy1u2dKprxseIpOjn90a0ezq32ooe+AndLGpBW 3aqQ== X-Forwarded-Encrypted: i=1; AJvYcCXCw2NsX+Vl2USHf57UfUz4AVC7Fus1CIZ7Bx6hr34v1KYBZUVOV94nQEtoZIOkGwtHkWFS2ewPWxL6JuRMMf8= X-Gm-Message-State: AOJu0Yzdoa/VUD8GMP5YSOyWEVGcNeD5YiSuP9uxxvQwTO8avHc+/p6n lShRvkbUYGoWGPDr+Y2J9X8PPW/aJxMk7ReKrnsHR+BfEkMU9pZqNSgsWvNtdh4= X-Google-Smtp-Source: AGHT+IFapzHVTuiAmrZsTNgMzbvS6d4iqYVIlRUd+Qss/Zdm0QXWxsbdjsZEqyh+lNeuxxpWrltzbg== X-Received: by 2002:a05:600c:1594:b0:426:6ea2:31af with SMTP id 5b1f17b1804b1-426708fa7dbmr115666785e9.37.1721057492808; Mon, 15 Jul 2024 08:31:32 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5edb540sm92202325e9.30.2024.07.15.08.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:31:32 -0700 (PDT) From: luca.boccassi@gmail.com To: Chaoyong He Cc: Long Wu , Peng Zhang , dpdk stable Subject: patch 'net/nfp: forbid offload flow rules with empty action list' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:27:01 +0100 Message-Id: <20240715152704.2229503-83-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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/59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Thanks. Luca Boccassi --- >From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Mon, 24 Jun 2024 09:57:11 +0800 Subject: [PATCH] net/nfp: forbid offload flow rules with empty action list [ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ] The original logic allow offload flow rules with empty action list, but the matched packets will be drop by the flower firmware. Fix this by forbidding offload this type flow rules. Fixes: 4d946034bf9c ("net/nfp: support basic flow actions") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_flow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 2635ba4cea..17c091ffa0 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, total_actions++; } + if (nfp_flow->install_flag && total_actions == 0) { + PMD_DRV_LOG(ERR, "The action list is empty"); + return -ENOTSUP; + } + if (drop_flag) nfp_flow_meta->shortcut = rte_cpu_to_be_32(NFP_FL_SC_ACT_DROP); else if (total_actions > 1) -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:38.699568278 +0100 +++ 0083-net-nfp-forbid-offload-flow-rules-with-empty-action-.patch 2024-07-15 16:19:34.736210050 +0100 @@ -1 +1 @@ -From 78bbab16282a2b6b8b3983677b7b1a32543b909b Mon Sep 17 00:00:00 2001 +From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - drivers/net/nfp/flower/nfp_flower_flow.c | 5 +++++ + drivers/net/nfp/nfp_flow.c | 5 +++++ @@ -21,5 +22,5 @@ -diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c -index f6a520248b..cf2b919e7e 100644 ---- a/drivers/net/nfp/flower/nfp_flower_flow.c -+++ b/drivers/net/nfp/flower/nfp_flower_flow.c -@@ -4803,6 +4803,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, +diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c +index 2635ba4cea..17c091ffa0 100644 +--- a/drivers/net/nfp/nfp_flow.c ++++ b/drivers/net/nfp/nfp_flow.c +@@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, @@ -34,2 +35 @@ - nfp_flow_meta = nfp_flow->payload.meta; - if (flag.drop_flag) + if (drop_flag) @@ -36,0 +37 @@ + else if (total_actions > 1)