netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Eyal Birger <eyal.birger@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	shmulik@metanetworks.com, Eyal Birger <eyal@metanetworks.com>
Subject: Re: [PATCH net-next,v2 2/2] net: sched: add em_ipt ematch for calling xtables matches
Date: Sun, 28 Jan 2018 19:22:12 -0800	[thread overview]
Message-ID: <CAM_iQpW+3oQDaTQPmFf8sZYCTzRo7d4VTL0AKpPDFhV1F7c6Kg@mail.gmail.com> (raw)
In-Reply-To: <CAHsH6Gu8ZR699ndyB4UdbB9YSAEKTXyTRLx6EBpUBjSETrZ0ow@mail.gmail.com>

On Fri, Jan 26, 2018 at 11:57 AM, Eyal Birger <eyal.birger@gmail.com> wrote:
> On Fri, Jan 26, 2018 at 8:50 PM, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>> Isn't there a way to reject the use of this from ->change()? ie. from
>> control plane configuration.
>
> I wasn't able to find a simple way of doing so:
>
> - AFAIU tc filters are detached from the qdiscs they operate on via
> tcf_block instances
>   that may be shared by different qdiscs. I was not able to be sure that filters
>   attached to ingress qdiscs via tcf_blocks at configuration time
> cannot be later be shared
>   with non ingress qdiscs. Nor was I able to find another classifier
> making the ingress/egress
>   distinction at configuration time.
>
> - ematches are not provided with 'ingress/egress' information at
> 'change()' invocation, though
>   of course the infrastructure could be extended to provide this,
> given the distinction is available.
>

In the past you can check tp->q, but now we support shared tc filter
block, so it is hard. I think your v1 is okay, which just silently passes
the match on egress side. Or maybe we can just add a pr_info()
unconditionally in em_ipt_change() saying only ingress is supported.

  reply	other threads:[~2018-01-29  3:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 16:48 [PATCH net-next,v2 0/2] net: sched: introduce em_ipt ematch Eyal Birger
2018-01-26 16:48 ` [PATCH net-next,v2 1/2] net: sched: ematch: pass protocol to ematch 'change()' handlers Eyal Birger
2018-01-26 16:48 ` [PATCH net-next,v2 2/2] net: sched: add em_ipt ematch for calling xtables matches Eyal Birger
2018-01-26 18:50   ` Pablo Neira Ayuso
2018-01-26 19:57     ` Eyal Birger
2018-01-29  3:22       ` Cong Wang [this message]
2018-01-30  8:48         ` Eyal Birger

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=CAM_iQpW+3oQDaTQPmFf8sZYCTzRo7d4VTL0AKpPDFhV1F7c6Kg@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eyal.birger@gmail.com \
    --cc=eyal@metanetworks.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=shmulik@metanetworks.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).