DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Rapelly, Varun" <vrapelly@sonusnet.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] ACL Issue with single field rule and rest with wild card	entry
Date: Fri, 6 Feb 2015 11:44:59 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258213E389A@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <BLUPR03MB26439D70812C21D10A429C2B7380@BLUPR03MB264.namprd03.prod.outlook.com>

Hi Varun,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Rapelly, Varun
> Sent: Friday, February 06, 2015 7:25 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] ACL Issue with single field rule and rest with wild card entry
> 
> Hi,
> 
> struct ipv6_5tuple {
>    uint8_t proto;         /* Protocol, next header. */
>    uint32_t src_addr0;  /* IP address of source host. */
>    uint32_t src_addr1;  /* IP address of source host. */
>    uint32_t src_addr2;  /* IP address of source host. */
>    uint32_t src_addr3;  /* IP address of source host. */
> };
> 
> enum {
>    PROTO_FIELD_IPV6,
>    SRC_FIELD0_IPV6,
>    SRC_FIELD1_IPV6,
>    SRC_FIELD2_IPV6,
>    SRC_FIELD3_IPV6,
>    NUM_FIELDS_IPV6
> };
> 
> 
> I'm using the above data to insert in to ACL trie.
> 
> If I'm inserting rules with only different proto fields, [I'm expecting others fields as wild card entries]  then the rules are not matching.
> 
> But if I insert one rule with dummy entries [in the attached file line num 118-125], then the above issue is resolved.

Hmm, it is strange...
I took your source code compiled it, then commented out lines 118-125 and recompiled it.
Both binaries produce valid result for me:

1. original code:
ACL: Gen phase for ACL "ACL_example":
runtime memory footprint on socket -1:
single nodes/bytes used: 0/0
quad nodes/vectors/bytes used: 0/0/0
DFA nodes/group64/bytes used: 1/4/4104
match nodes/bytes used: 4/512
total: 6816 bytes
max limit: 18446744073709551615 bytes
ACL: Build phase for ACL "ACL_example":
node limit for tree split: 2048
nodes created: 5
memory consumed: 8388615
ACL: trie 0: number of rules: 4, indexes: 1
rte_acl_classify() returns 0
, res[0]=11


2. code with lines 118-125 commented out:
ACL: Gen phase for ACL "ACL_example":
runtime memory footprint on socket -1:
single nodes/bytes used: 0/0
quad nodes/vectors/bytes used: 0/0/0
DFA nodes/group64/bytes used: 1/4/4104
match nodes/bytes used: 3/384
total: 6688 bytes
max limit: 18446744073709551615 bytes
ACL: Build phase for ACL "ACL_example":
node limit for tree split: 2048
nodes created: 4
memory consumed: 8388615
ACL: trie 0: number of rules: 3, indexes: 1
rte_acl_classify() returns 0
, res[0]=11

Wonder what results are you getting for both cases?

Konstantin

> 
> Please let me know:
> 
> 
> 1.       Can we have rules with only one entry and others as wild card entries?
> 
> 2.       Is there any other way to match wild card entries in a rule?
> 
> Regards,
> Varun

  reply	other threads:[~2015-02-06 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06  7:24 Rapelly, Varun
2015-02-06 11:44 ` Ananyev, Konstantin [this message]
     [not found]   ` <BLUPR03MB26439FB073B40A02131C823B7380@BLUPR03MB264.namprd03.prod.outlook.com>
2015-02-09 16:28     ` Ananyev, Konstantin

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=2601191342CEEE43887BDE71AB977258213E389A@irsmsx105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=vrapelly@sonusnet.com \
    /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).