<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>You can also try with the existing X540-AT2 NIC the following :</p>
<p>- Init NIC with 2 queues</p>
<p>- set the FDIR flow for your particular ip/port to route your
packet to a queue number, say 1</p>
<p>- Instead of using rte_flow to drop all other packets, use RSS.
Rewrite the RSS ReTa (see rte_eth_dev_rss_reta_update) with queue
id you are not going to poll, so in this case with queue id = 0.
All ReTa entries will be 0, so packets not matched with the FDIR
will be assigned to this queue.</p>
<p>- ignore rx on the queue 0<br>
</p>
<p>I believe this approach would be better for your particular use
case, than relying on rte_flow to drop all the traffic, which, as
we could see, depends on the internal HW implementation.<br>
</p>
<div class="moz-cite-prefix">On 04/02/2025 15:50, Sid ali cherrati
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CALn3+CNWgVyF2RAPxC_UsGJucUsTEV59aDvYVqfAaNGjAwPkDQ@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<p>Hello Vladimir,</p>
<p>Thank you for the clarification.</p>
<p>I'll try using the E810 and provide an update on the issue.</p>
<p>Best regards,<br>
Ali</p>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">Le mar. 4 févr. 2025
à 16:41, Medvedkin, Vladimir <<a href="mailto:vladimir.medvedkin@intel.com" moz-do-not-send="true" class="moz-txt-link-freetext">vladimir.medvedkin@intel.com</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
all,<br>
<br>
The goal that Ali is trying to achieve is not possible with
the X540-AT2 <br>
NIC (as with any other ixgbe NIC). The problem is related
to:<br>
<br>
1. The first rule is processed by the FDIR engine<br>
<br>
2. FDIR engine is executed in the HW pipeline almost in the
end (just <br>
before RSS), i.e. after other filters that we could use to
match all <br>
other packets (5tuple filter engine in this particular
case).<br>
<br>
Therefore my recommendations here would be to use a modern
NIC such as <br>
E810 to implement the required filtering logic.<br>
<br>
On 04/02/2025 09:28, Dariusz Sosnowski wrote:<br>
> Hi,<br>
><br>
> Anatoly, Vladimir - Would you be able to help with the
issue regarding DROP action not being supported on X540-AT2?<br>
><br>
> Best regards,<br>
> Dariusz Sosnowski<br>
><br>
>> From: Sid ali cherrati <<a href="mailto:scherrati1@gmail.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">scherrati1@gmail.com</a>><br>
>> Sent: Monday, February 3, 2025 18:12<br>
>> To: Dmitry Kozlyuk <<a href="mailto:dmitry.kozliuk@gmail.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">dmitry.kozliuk@gmail.com</a>><br>
>> Cc: <a href="mailto:users@dpdk.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">users@dpdk.org</a><br>
>> Subject: Re: DPDK Flow Filtering Not Working as
Expected<br>
>><br>
>> External email: Use caution opening links or
attachments<br>
>><br>
>> Here is a better version of the code :<br>
>><br>
<snip><br>
>><br>
>> Le lun. 3 févr. 2025 à 16:00, Dmitry Kozlyuk
<mailto:<a href="mailto:dmitry.kozliuk@gmail.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">dmitry.kozliuk@gmail.com</a>>
a écrit :<br>
>> 2025-02-03 14:51 (UTC+0100), Sid ali cherrati:<br>
>>> [...]<br>
>>> if (!rte_flow_validate(port_id, &attr,
pattern, actions, &error)){<br>
>>> flow = rte_flow_create(port_id, &attr,
pattern, actions, &error);<br>
>>> }<br>
>>><br>
>>> if(flow != 0){<br>
>>> printf("Filed to create drop flow filter \n");<br>
>>> return -1;<br>
>>> }<br>
>>> [...]<br>
>>> The issue is that when I implement this, I get
an error on the drop filter:<br>
>>> "Failed to create rule." Do you have any idea
why this might be happening?<br>
>> There is no this exact error text in your code or
DPDK,<br>
>> I assume we're talking about the quoted fragment.<br>
>> `flow` is a pointer, the correct error condition is
`if (flow == NULL)`,<br>
>> so your code probably misinterprets success as
error.<br>
>> Also `flow` is not assigned if
`rte_flow_validate()` returns non-0.<br>
<br>
-- <br>
Regards,<br>
Vladimir<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Regards,
Vladimir</pre>
</body>
</html>