From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B12DCC43218 for ; Fri, 26 Apr 2019 19:22:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DAB42086A for ; Fri, 26 Apr 2019 19:22:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbfDZTWx (ORCPT ); Fri, 26 Apr 2019 15:22:53 -0400 Received: from mail.us.es ([193.147.175.20]:35318 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbfDZTWw (ORCPT ); Fri, 26 Apr 2019 15:22:52 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 698D911ED8A for ; Fri, 26 Apr 2019 21:22:50 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 5C502DA705 for ; Fri, 26 Apr 2019 21:22:50 +0200 (CEST) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 40B72DA70B; Fri, 26 Apr 2019 21:22:50 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 3DFF2DA706; Fri, 26 Apr 2019 21:22:48 +0200 (CEST) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Fri, 26 Apr 2019 21:22:48 +0200 (CEST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (sys.soleta.eu [212.170.55.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id 1912B4265A32; Fri, 26 Apr 2019 21:22:48 +0200 (CEST) Date: Fri, 26 Apr 2019 21:22:47 +0200 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: Jakub Kicinski Cc: Jiri Pirko , netfilter-devel@vger.kernel.org, davem@davemloft.net, netdev@vger.kernel.org, jiri@mellanox.com, john.hurley@netronome.com, ogerlitz@mellanox.com Subject: Re: [PATCH net-next,RFC 0/9] net: sched: prepare to reuse per-block callbacks from netfilter Message-ID: <20190426192247.qrqxe4sa3q73as27@salvia> References: <20190426003348.30745-1-pablo@netfilter.org> <20190426143258.GC2249@nanopsycho.orion> <20190426162836.6hy7q42b6itckzff@salvia> <20190426112956.7bbd2b87@cakuba.netronome.com> <20190426184145.oioesc7eqy5p7sps@salvia> <20190426115512.18263215@cakuba.netronome.com> <20190426191440.meuab6yu3eh4zh5i@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190426191440.meuab6yu3eh4zh5i@salvia> User-Agent: NeoMutt/20170113 (1.7.2) X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Apr 26, 2019 at 09:14:40PM +0200, Pablo Neira Ayuso wrote: > On Fri, Apr 26, 2019 at 11:55:12AM -0700, Jakub Kicinski wrote: > > On Fri, 26 Apr 2019 20:41:45 +0200, Pablo Neira Ayuso wrote: > > > If netfilter supports for chain definitions like this: > > > > > > table x { > > > chain y { > > > type filter hook ingress devices = { eth0, eth1 } priority 0; > > > } > > > } > > > > > > Then the chain 'y' implicitly becomes the block for the 'eth0' and > > > 'eth1' devices. > > > > Can there be more chains for those devices? Or those will only run y > > from netfilter perspective? > > In software, the existing control plane allows you to register as > many chains as you want, that would allow to include 'eth0' and 'eth1'. I mean, you could add 'eth0' and 'eth1' to several chains, yes. > However, But I don't have a usecase for this: One single chain should > be enough given that the ingress hook is only used for filtering. We > are inheriting this semantics from iptables, where multiple tables at > different priorities (which specifies the order) make sense, such as > 'raw', 'mangle' and so on. At ingress, these don't make sense and a > single chain with priority 0 should be enough. .. but it doesn't make much sense as I explained. > In case of hardware offload, I think we should just allow one single > chain at ingress with 'eth0' and 'eth1', just like tc does. Just > return EOPNOTSUPP.