From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang 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 Message-ID: References: <1516985333-5156-1-git-send-email-eyal.birger@gmail.com> <1516985333-5156-3-git-send-email-eyal.birger@gmail.com> <20180126185019.tz45rkkjbrgizgln@salvia> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Pablo Neira Ayuso , David Miller , Jamal Hadi Salim , Linux Kernel Network Developers , shmulik@metanetworks.com, Eyal Birger To: Eyal Birger Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:44307 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbeA2DWd (ORCPT ); Sun, 28 Jan 2018 22:22:33 -0500 Received: by mail-pf0-f195.google.com with SMTP id 17so2274290pfw.11 for ; Sun, 28 Jan 2018 19:22:33 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 26, 2018 at 11:57 AM, Eyal Birger wrote: > On Fri, Jan 26, 2018 at 8:50 PM, Pablo Neira Ayuso 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.