All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
	Elise Lennion <elise.lennion@gmail.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v3 2/2] datatype: Implement binary search in symbolic_constant_print()
Date: Tue, 29 Nov 2016 11:04:18 +0100	[thread overview]
Message-ID: <20161129100418.GD11456@breakpoint.cc> (raw)
In-Reply-To: <20161129083548.GA973@salvia>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Mon, Nov 28, 2016 at 11:12:23PM +0100, Florian Westphal wrote:
> > This is unmaintanable.  I have no clue what value ETH_P_8021Q is, and that
> > this has to be placed at spot #2 to not break things.
> 
> OK, let's try to make this a bit more maintainable, another proposal
> in steps:
> 
> 1) Update symbol_table definition to:
> 
> struct symbol_table {
>         unsignd int                     size;
>         const struct symbolic_constant  *symbols; <---
> };

[..]

> Florian, are you OK if Elise follows this approach? If this is overly
> complicated and not worth, rise your hand.

Is a linear search of ~300-element symtable list a problem?

If it is, then your proposal seems like a sane approach.
But I'd probably benchmark this first.

(Since Elise already did a patch for bsearchable symtable
 it should not be too much work to verify this).

      reply	other threads:[~2016-11-29 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 20:23 [PATCH nft v3 2/2] datatype: Implement binary search in symbolic_constant_print() Elise Lennion
2016-11-28 22:12 ` Florian Westphal
2016-11-29  8:35   ` Pablo Neira Ayuso
2016-11-29 10:04     ` Florian Westphal [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=20161129100418.GD11456@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=elise.lennion@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.