DPDK usage discussions
 help / color / mirror / Atom feed
From: Anupam Kapoor <anupam.kapoor@gmail.com>
To: Nikhil Jagtap <nikhil.jagtap@gmail.com>
Cc: konstantin.ananyev@intel.com, dev@dpdk.org, users@dpdk.org
Subject: Re: [dpdk-users] [dpdk-dev] acl: delete/modify rule support
Date: Tue, 15 Nov 2016 11:14:06 +0530	[thread overview]
Message-ID: <CAEXHiZFFncJXn5zYjU3nB4A00FRfOo9uHOA0hbNnon3GMFHPSg@mail.gmail.com> (raw)
In-Reply-To: <CANKBMf1eDvZ=PEAu3wMU1yiwsZTZ5QQNyrVZ3zzJgThiWtM-EQ@mail.gmail.com>

On Tue, Nov 15, 2016 at 10:40 AM, Nikhil Jagtap <nikhil.jagtap@gmail.com>
wrote:

> Is it possible to build the ACL context over a period of time, one rule
> at a time by calling build post each add operation?
> Something like this :
>     rte_acl_add_rules(ctx, rule1, 1);
>     rte_acl_build(ctx, build_cfg);
>     rte_acl_add_rules(ctx, rule2, 1);
>     rte_acl_build(ctx, build_cfg);
>     rte_acl_add_rules(ctx, rule3, 1);
>     rte_acl_build(ctx, build_cfg);
>
> I tried this, and it seems to be working - but still wanted to confirm.
>
​yes this is fine. but building the querying data-structure is not thread
safe. so more often than not, you are better of having a rule-list, and
then building it all in one fell swoop...
​


>
> 2) I did not find any delete-rule API. I understand from one of the email
> archives (http://dpdk.org/ml/archives/dev/2015-June/018868.html) that it
> is
> not supported. Any specific reason why deletion of rule is not supported?
> Any plan to support it?
> Any alternative way other than destroying the whole context, adding the new
> set of rules and building the rules again?
>
current implementation uses multibit-trie​s. to conserve memory, rules are
split into multiple non-overlapping/non-intersecting rules. i would wager
that implementing deletion would be non-trivial :)

better option might be to add/modify/delete your rule-list, and rebuild,
and then re-use...

​--
kind regards
anupam​


In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.

      reply	other threads:[~2016-11-15  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15  5:10 [dpdk-users] " Nikhil Jagtap
2016-11-15  5:44 ` Anupam Kapoor [this message]

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=CAEXHiZFFncJXn5zYjU3nB4A00FRfOo9uHOA0hbNnon3GMFHPSg@mail.gmail.com \
    --to=anupam.kapoor@gmail.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=nikhil.jagtap@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).