From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [patch net-next v4 00/10] net: sched: allow qdiscs to share filter block instances Date: Thu, 4 Jan 2018 07:55:05 -0500 Message-ID: <5163c8db-8b2c-0746-b148-28a7e0fec2c4@mojatatu.com> References: <780a80d0-9384-ae34-4cab-3070b004b64e@gmail.com> <20171225102346.GB1885@nanopsycho> <20180102194944.GG2051@nanopsycho.orion> <20180103094025.GA2067@nanopsycho.orion> <20180103172209.GD2067@nanopsycho.orion> <20180103155152.7e94a295@cakuba.netronome.com> <20180104065702.GH2067@nanopsycho.orion> <20180103230658.595eac7d@cakuba.netronome.com> <20180104101257.GA2213@nanopsycho> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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, 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: Jiri Pirko , Jakub Kicinski Return-path: Received: from mail-io0-f196.google.com ([209.85.223.196]:39358 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbeADMzI (ORCPT ); Thu, 4 Jan 2018 07:55:08 -0500 Received: by mail-io0-f196.google.com with SMTP id g70so2114591ioj.6 for ; Thu, 04 Jan 2018 04:55:08 -0800 (PST) In-Reply-To: <20180104101257.GA2213@nanopsycho> Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On the egress issue and sharing. Let me provide a simple example to illustrate. tc qdisc add dev enps7 root handle 1: prio block 1 Creates 3 classes $ tc class ls dev enps7 class prio 1:1 parent 1: class prio 1:2 parent 1: class prio 1:3 parent 1: tc qdisc add dev enps8 root handle 10: prio block 1 Creates 3 classes $ tc class ls dev enps8 class prio 10:1 parent 10: class prio 10:2 parent 10: class prio 10:3 parent 10: So now i add filters, today I can do: tc filter add dev enps7 parent 1:0 protocol ip priority 10 flower ... classid 1:2 I could also have added this via the new block interface i.e $ tc filter add block 1 protocol ip priority 10 flower ... classid 1:2 Looks good - things will work fine for packets showing up on egress of enps7 which match the flower rule and classid 1:2 is selected to queue the packet on. Things will not _work fine_ for packets showing up on egress of ensp8. There is no classid 1:2 on egress of enps8. The prio qdisc is a bad example because it has a default queue (i think 10:2) in this case. Other qdiscs(off top of my head DRR) will just drop the packet. I think this is resolvable - but it will take more to the patches than the current set you posted Jiri. A simple solution is to say sharing only works for ingress (but that sounds very lame). cheers, jamal