<div dir="ltr">Hi konstantin, <a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:stephen@networkplumber.org" tabindex="-1">@stephen@networkplumber.org</a><br><div><br></div><div>Thanks for the reply and your suggestions. I will try to see what can best fit into my application.</div><div><br></div><div>Thanks & Regards,</div><div>Venkatesh.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 18, 2022 at 4:01 PM Konstantin Ananyev <<a href="mailto:konstantin.ananyev@huawei.com">konstantin.ananyev@huawei.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Thu, 17 Nov 2022 19:28:12 +0530<br>
> venkatesh bs <<a href="mailto:venki.bsv@gmail.com" target="_blank">venki.bsv@gmail.com</a>> wrote:<br>
> <br>
> > Hi DPDK Team,<br>
> ><br>
> > After the ACL match for highest priority DPDK Classification API returns<br>
> > User Data Which is as mentioned below in the document.<br>
> ><br>
> > 53. Packet Classification and Access Control — Data Plane Development Kit<br>
> > 22.11.0-rc2 documentation (<a href="http://dpdk.org" rel="noreferrer" target="_blank">dpdk.org</a>)<br>
> ><br>
> ><br>
> > - *userdata*: A user-defined value. For each category, a successful<br>
> > match returns the userdata field of the highest priority matched rule. When<br>
> > no rules match, returned value is zero<br>
> ><br>
> > I Wonder Why User Data Support does not returns 64 bit values,<br>
<br>
As I remember if first version of ACL code it was something about space savings<br>
to improve performance...<br>
Now I think it is more just a historical reason.<br>
It would be good to change userdata to 64bit, but I presume it will be ABI breakage.<br>
<br>
> Always its<br>
> > possible that User Data in Application Can be 64bit long, But since 64 bit<br>
> > User data can't be returned by DPDK ACL Library, Application should have<br>
> > the conversion algorithm from 64 to 32 bit during Rule add and vice versa<br>
> > after classification.<br>
> ><br>
> > I Wonder if anyone would have faced this issue, Please suggest any<br>
> > suggestions if somewhere am wrong in understanding/Possible Solution if<br>
> > someone has already gone through this issue.<br>
> ><br>
> > Thanks In Advance.<br>
> > Regards,<br>
> > Venkatesh B Siddappa.<br>
> <br>
> It looks like all users of this API use the userdata to be the index<br>
> into a table of application specific rules.<br>
<br>
Yes, that's the most common way.<br>
Another one would be always (build/search) acl rules with two categories:<br>
rule for both categories will be identical, while data different (low/ho 32bits),<br>
but that's a bit too awkward from my perspective. <br>
<br>
<br>
<br>
<br>
</blockquote></div>