From: Chaoyong He <chaoyong.he@corigine.com>
To: stable@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH 23.11 2/2] net/nfp: forbid offload flow rules with empty action list
Date: Wed, 14 Aug 2024 10:50:38 +0800 [thread overview]
Message-ID: <20240814025038.1698473-3-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240814025038.1698473-1-chaoyong.he@corigine.com>
[ 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 <chaoyong.he@corigine.com>
---
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 9ad434affb..91ebee5db4 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3741,6 +3741,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.1
next prev parent reply other threads:[~2024-08-14 2:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 2:50 [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Chaoyong He
2024-08-14 2:50 ` [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Chaoyong He
2024-08-14 2:50 ` Chaoyong He [this message]
2024-08-21 8:56 ` [PATCH 23.11 0/2] backport NFP patches to DPDK 23.11.2 Xueming Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240814025038.1698473-3-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).