From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [patch net-next v7 09/13] net: sched: allow ingress and clsact qdiscs to share filter blocks Date: Thu, 11 Jan 2018 12:02:39 -0500 Message-ID: <8c27126e-6556-0c44-36b2-8c5e2aa59c40@mojatatu.com> References: <20180109140731.1022-1-jiri@resnulli.us> <20180109140731.1022-10-jiri@resnulli.us> <66883304-2004-7154-4700-9839203cecff@mojatatu.com> <20180111142457.GJ2053@nanopsycho.orion> <3da16333-3954-91c4-98c3-22a19d2bd5d9@mojatatu.com> <20180111144151.GM2053@nanopsycho.orion> <6193cf78-2dba-0d63-c745-3b48439a0a85@mojatatu.com> <20180111150708.GN2053@nanopsycho.orion> <6d71cc06-80e1-e624-6f67-80b8744f52c0@mojatatu.com> <20180111161518.GQ2053@nanopsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, xiyou.wangcong@gmail.com, mlxsw@mellanox.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, michael.chan@broadcom.com, ganeshgr@chelsio.com, saeedm@mellanox.com, matanb@mellanox.com, leonro@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com, alexander.h.duyck@intel.com, ogerlitz@mellanox.com, john.fastabend@gmail.com, daniel@iogearbox.net, dsahern@gmail.com To: Jiri Pirko Return-path: Received: from mail-it0-f68.google.com ([209.85.214.68]:45788 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932158AbeAKRCn (ORCPT ); Thu, 11 Jan 2018 12:02:43 -0500 Received: by mail-it0-f68.google.com with SMTP id x42so5717964ita.4 for ; Thu, 11 Jan 2018 09:02:43 -0800 (PST) In-Reply-To: <20180111161518.GQ2053@nanopsycho.orion> Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On 18-01-11 11:15 AM, Jiri Pirko wrote: > Thu, Jan 11, 2018 at 04:44:32PM CET, jhs@mojatatu.com wrote: >> On 18-01-11 10:07 AM, Jiri Pirko wrote: >>> Thu, Jan 11, 2018 at 03:46:09PM CET, jhs@mojatatu.com wrote: >>>> On 18-01-11 09:41 AM, Jiri Pirko wrote: >>>>> Thu, Jan 11, 2018 at 03:37:08PM CET, jhs@mojatatu.com wrote: >> >>>> >>>> I only looked at the kernel code. Good you can stop it at tc >>>> but the API does not stop it (unless you expect the rest of the >>>> world to only use tc). >>> >>> Jamal, apparently, you did not looked at the kernel code either :) >>> Look at the changes done in net/sched/sch_ingress.c - there is where the >>> parsing of block attr takes place. >>> >> >> reason i raised it is from looking at tc_ctl_tfilter(). >> If i specify ifindex != TCM_IFINDEX_MAGIC_BLOCK, >> parent = 0XFFFF.... and block = 22 that should work, no? >> i.e regardless of whether parent is INGRESS etc. > > No, the block needs to be created first by qdisc instance. > Seems to me that you are mixing apples and oranges a bit. > You are correct, the qdisc attachment must exist first ;-> >> TCA_BLOCK sounds appealing - could be a speacial tlv with many block ids >> maybe? I really would like to use this for egress as well - and what >> i described earlier should work for me. > > I don't get what you mean by "tlv with many block ids". What is it good > for? :O > I meant A TLV with a bunch of 32 bit values, so you can have more than one block id in it. But what Roopa suggested is more explicit (and better). cheers, jamal