From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next 00/10] net: sched: introduce multichain support for filters Date: Fri, 28 Apr 2017 08:53:49 +0200 Message-ID: <20170428065349.GB1886@nanopsycho.orion> References: <1493291540-2119-1-git-send-email-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux Kernel Network Developers , David Miller , Jamal Hadi Salim , David Ahern , Eric Dumazet , Stephen Hemminger , Daniel Borkmann , Alexander Duyck , mlxsw@mellanox.com, Simon Horman To: Cong Wang Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:36617 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424096AbdD1Gxx (ORCPT ); Fri, 28 Apr 2017 02:53:53 -0400 Received: by mail-wr0-f196.google.com with SMTP id v42so6025503wrc.3 for ; Thu, 27 Apr 2017 23:53:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Thu, Apr 27, 2017 at 07:46:03PM CEST, xiyou.wangcong@gmail.com wrote: >On Thu, Apr 27, 2017 at 4:12 AM, Jiri Pirko wrote: >> Simple example: >> $ tc qdisc add dev eth0 ingress >> $ tc filter add dev eth0 parent ffff: protocol ip pref 33 flower dst_mac 52:54:00:3d:c7:6d action goto chain 11 >> $ tc filter add dev eth0 parent ffff: protocol ip pref 22 chain 11 flower dst_ip 192.168.40.1 action drop >> $ tc filter show dev eth0 root > >Interesting. > >I don't look into the code yet. If I understand the concepts correctly, >so with your patchset we can mark either filter with a chain No. to >choose which chain it belongs to _logically_ even though >_physically_ it is still in the old-fashion chain (prio, proto)? You have to see the code :) There are physically multiple chains > >If so, you have to ensure proto is same since the protocol of >the packet does not change dynamically? And the original >priority becomes pointless with chains since we can just to >any other chain in any order? > >By default, without any chain No., you use 0 for all the chains, >so the old-fashion chain still works. Yes. > >Thanks.