From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next v6 00/11] net: sched: allow qdiscs to share filter block instances Date: Sat, 6 Jan 2018 21:38:54 +0100 Message-ID: <20180106203854.GE2099@nanopsycho> References: <20180105230929.5645-1-jiri@resnulli.us> <20180106080728.GA2099@nanopsycho> <1b3e06a5-b07f-6de0-db1a-8add5ae8f140@gmail.com> <571e2252-61e4-11b7-edc1-f82cd7b69cc0@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Ahern , 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 To: Jamal Hadi Salim Return-path: Received: from mail-wr0-f193.google.com ([209.85.128.193]:41812 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752213AbeAFUi4 (ORCPT ); Sat, 6 Jan 2018 15:38:56 -0500 Received: by mail-wr0-f193.google.com with SMTP id o7so4439638wro.8 for ; Sat, 06 Jan 2018 12:38:55 -0800 (PST) Content-Disposition: inline In-Reply-To: <571e2252-61e4-11b7-edc1-f82cd7b69cc0@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: Sat, Jan 06, 2018 at 07:16:10PM CET, jhs@mojatatu.com wrote: >On 18-01-06 12:41 PM, David Ahern wrote: >> On 1/6/18 1:07 AM, Jiri Pirko wrote: >> > Sat, Jan 06, 2018 at 04:57:21AM CET, dsahern@gmail.com wrote: >> > > On 1/5/18 4:09 PM, Jiri Pirko wrote: >> > > > From: Jiri Pirko >> > > > > >> > > >> > > $ tc filter show block 22 >> > > $ echo $? >> > > 0 >> > > $ tc qdisc show | grep block >> > > qdisc ingress ffff: dev eth2 parent ffff:fff1 block 42 >> > >> > Yeah, I will try to fix this. The thing is, this is not error by kernel >> > but by the userspace. Kernel is perfectly ok with invalid device or >> > block index, it just does not dump anything and I would leave it like >> > that. I have to somehow check the validity of block_index in userspace. >> > Not sure how now. >> >> Ok. I saw a response about idr_alloc_ext. >> >> Here's another one: adding a filter to an unknown block id: >> >> $ tc filter add block 66 ingress protocol ip pref 1 flower dst_ip > > >BTW, above syntax looks redundant because of the ingress parent >specification. It is possible iproute2/tc is just ignoring it right now I'm sure that is just a typo on DaveA's side. >and the parent is not being used. >i.e Once the block is bound to ingress (aka parent ffff:) via: >qdisc ingress ffff: dev eth2 parent ffff:fff1 block 42 >then >it doesnt make sense to specify a parent again because >it should be possible to bind that block to many parent locations >eg clsact ingress of dev x and clsact egress of dev y. > >what am i missing? > >cheers, >jamal