netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Kochan <vadim4j@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Vadim Kochan <vadim4j@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 3/3] ss: Filtering logic changing, with fixes
Date: Sun, 4 Jan 2015 00:58:11 +0200	[thread overview]
Message-ID: <20150103225811.GA5972@angus-think.lan> (raw)
In-Reply-To: <20150103095707.37e69147@urahara>

On Sat, Jan 03, 2015 at 09:57:07AM -0800, Stephen Hemminger wrote:
> On Sat,  3 Jan 2015 02:44:37 +0200
> Vadim Kochan <vadim4j@gmail.com> wrote:
> 
> > +struct filter default_dbs[MAX_DB] = {
> > +	[TCP_DB] = {
> > +		.states   = SS_CONN,
> > +		.families = (1 << AF_INET) | (1 << AF_INET6),
> > +	},
> 
> I like table driven code, so this is good. But please make
> mark the table as const.

I did re-test, and I still don't like very much my results (some cases
are not logically) even if they (IMHO) better than the 'master' version,
so I will try to change filer options applying in the following way:

    0) default filter should have only default states & all dbs

    1) apply all selected families with their default dbs & states from table

    2) logical AND selected dbs with dbs of the selected families and their default
        states from table, also select families by db from table if there no
        already selected families

    3) logical AND selected states with selected dbs and their default states from table,
        also select families and dbs from table by states if there no
        already selected dbs & families

So with such approach the options should affect each other in the strict
predictable way:

    families -> dbs (socket tables) -> socket states

I hope I will success with this ...

I appreciate any feedback.

Regards,
Vadim Kochan

      reply	other threads:[~2015-01-03 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-03  0:44 [PATCH iproute2 0/3] ss: Fix sockets filtering Vadim Kochan
2015-01-03  0:44 ` [PATCH iproute2 1/3] ss: Unify unix stats output from netlink and proc Vadim Kochan
2015-01-03 17:56   ` Stephen Hemminger
2015-01-03  0:44 ` [PATCH iproute2 2/3] ss: Unify packet " Vadim Kochan
2015-01-03  0:44 ` [PATCH iproute2 3/3] ss: Filtering logic changing, with fixes Vadim Kochan
2015-01-03 17:57   ` Stephen Hemminger
2015-01-03 22:58     ` Vadim Kochan [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=20150103225811.GA5972@angus-think.lan \
    --to=vadim4j@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).