Hi > -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of ??? > Sent: Sunday, February 15, 2015 9:19 AM > To: dev at dpdk.org > Subject: [dpdk-dev] ACL lookup doesn't work for some schemes > > Hi, I noticed that ACL lookup doesn't work for some schemes.1. If the > first field is not uint8_t, even all fields are wildcard, lookup > doesn't find the matching rule. See acl_8last.c.2. I prepended a uint8_t > field, keep other fields be wildcard, lookup returns the correct > result. See acl_8last2.c3. Then I change last field from 8bitmask_WILDCARD to > 8bitmask(1, 0x1) (matches odd numbers) or 8bitmask(0, > 0x1) (match even numbers), lookup doesn't return the correct. See > acl_8last3.c. And I noticed the similar behavior for uint16_t > ranges(date doesn't match 0-0x8000 nor 0x8001-0xffff). Above behaviors are > tricky. Does ACL do some undocumented assumptions > or the table schema? Regards,Zhichang Yu
Yes, right now, libtre_acl to work correctly first field has to be 1B long and all subsequent grouped into sets of 4 consecutive bytes. I thought we have it documented into our PG, ACL section: http://dpdk.org/doc/guides/prog_guide/packet_classif_access_ctrl.html Though re-reading it again: "For performance reasons, the inner loop of the search function is unrolled to process four input bytes at a time. This requires the input to be grouped into sets of 4 consecutive bytes. The loop processes the first input byte as part of the setup and then subsequent bytes must be in groups of 4 consecutive bytes." It probably not very clear and need to be explained in more details. Will update the doc. Konstantin