From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Sid ali cherrati <scherrati1@gmail.com>
Cc: users@dpdk.org
Subject: Re: DPDK Flow Filtering Not Working as Expected
Date: Tue, 28 Jan 2025 21:46:16 +0300 [thread overview]
Message-ID: <20250128214616.3f9324de@sovereign> (raw)
In-Reply-To: <CALn3+CP3vKCjp8vR1Uwki3XaW8Nu04Et5PBdop78Cp48=DhOow@mail.gmail.com>
Hi Ali,
2025-01-28 17:54 (UTC+0100), Sid ali cherrati:
> I am attempting to use DPDK's rte_flow API to filter incoming packets at
> the hardware level. My goal is to drop all packets except those with a
> specific IP address and UDP port.
>
> I have implemented the following flow filtering rule in my code:
> [...]
> However, despite this configuration, I continue to receive packets with
> other IP addresses and ports that do not match the specified filter.
Packets that do not match the rule pattern are processed as usual.
If without the rule queue RX_ID could receive any packet,
it will also receive them after the rule is created.
You need another rule with lower priority (BTW, 0 is the highest one)
that matches all packets and drops them or steers to other queues.
If you want your DPDK app to only process packets matching the rule
and to leave all other traffic for the OS to process,
flow isolated mode may be what you're looking for:
https://doc.dpdk.org/guides/prog_guide/ethdev/flow_offload.html#flow-isolated-mode
> Could you provide any insights into why the filtering isn't working as
> expected? Any advice on ensuring the rule is properly applied at the
> hardware level would be greatly appreciated.
The usual way to check that the rule is matched
is to all a counter to the rule and check if it increases.
I suggest using testpmd for playing with flow rules:
https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html#flow-rules-management
There was also a useful talk abound HW rules debugging on DPDK Summit:
https://dpdksummit2024.sched.com/event/1iAtU/debug-functional-and-performance-issues-in-rteflow-dariusz-sosnowski-nvidia-corp
next prev parent reply other threads:[~2025-01-28 18:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 16:54 Sid ali cherrati
2025-01-28 18:46 ` Dmitry Kozlyuk [this message]
2025-02-03 13:51 ` Sid ali cherrati
2025-02-03 15:00 ` Dmitry Kozlyuk
2025-02-03 15:05 ` Sid ali cherrati
2025-02-03 17:12 ` Sid ali cherrati
2025-02-04 9:28 ` Dariusz Sosnowski
2025-02-04 15:41 ` Medvedkin, Vladimir
2025-02-04 15:50 ` Sid ali cherrati
2025-02-04 17:41 ` Medvedkin, Vladimir
2025-01-28 18:47 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2025-01-28 16:50 Sid ali cherrati
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=20250128214616.3f9324de@sovereign \
--to=dmitry.kozliuk@gmail.com \
--cc=scherrati1@gmail.com \
--cc=users@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).