All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alexei Starovoitov <ast@plumgrid.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Daniel Borkmann <dborkman@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	Kees Cook <keescook@chromium.org>,
	Network Development <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH v3 net-next] net: filter: cleanup sk_* and bpf_* names
Date: Tue, 29 Jul 2014 18:42:26 +0200	[thread overview]
Message-ID: <20140729164226.GA6069@salvia> (raw)
In-Reply-To: <CAMEtUuwO0nGox4Mfj8Gs2fVudBpYtZ_NSwyFQCFz5NeYKgAdpA@mail.gmail.com>

On Tue, Jul 29, 2014 at 08:55:04AM -0700, Alexei Starovoitov wrote:
> > I don't think this is the right moment to add this, but we have to
> > keep in mind that something similar to this will need to be
> > accomodated in struct sk_filter at some point to avoid sloppy changes
> > that may result in reintroducing code later on.
> 
> I thought in v1 series you were arguing exactly about introducing them now...
> ok, I will drop callbacks and keep refcnt,rcu,filter_size and bpf_prog pointer
> in there. Sounds good?

Agreed.

> > Next step should be to wrap the specific bpf fields in struct
> > bpf_prog in some clean way IMO, which was partially the aim of this
> > patch.
> 
> it seems your only objection is 'rcu_head' still being there and rebasing
> on top of yours will fix it...

Almost. I just wanted to leave in place struct sk_filter for the
coming up generalization, that structure should contain the refcnt,
rcu_head and the struct bpf_prog after some of your follow up patches.
Please, also leave sk_filter_charge/uncharge/get_filter whatever will
provide the room the generalization under net/core/filter.c, not need
to move these to kernel/bpf/

After my patch (and your follow up), we don't have sloppy usage of
rcu_head for unattached filter anymore and I guess Willem is going to
same save bytes in his iptables/bpf rules given that he can directly
use bpf_prog instead of sk_filter.

  reply	other threads:[~2014-07-29 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29  6:29 [PATCH v3 net-next] net: filter: cleanup sk_* and bpf_* names Alexei Starovoitov
2014-07-29 15:31 ` Pablo Neira Ayuso
2014-07-29 15:55   ` Alexei Starovoitov
2014-07-29 16:42     ` Pablo Neira Ayuso [this message]
2014-07-29 17:25       ` Alexei Starovoitov

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=20140729164226.GA6069@salvia \
    --to=pablo@netfilter.org \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=willemb@google.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 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.