From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [RFC 0/2] net: sched: indirect/remote setup tc block cb registering Date: Thu, 4 Oct 2018 10:19:41 -0700 Message-ID: <20181004101941.509d04b9@cakuba.netronome.com> References: <20181004045511.27733-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Or Gerlitz , Linux Netdev List , Jiri Pirko , oss-drivers@netronome.com, ozsh@mellanox.com, avivh@mellanox.com, Simon Horman To: John Hurley Return-path: Received: from mail-qk1-f172.google.com ([209.85.222.172]:36155 "EHLO mail-qk1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727454AbeJEAN7 (ORCPT ); Thu, 4 Oct 2018 20:13:59 -0400 Received: by mail-qk1-f172.google.com with SMTP id a85-v6so6256685qkg.3 for ; Thu, 04 Oct 2018 10:19:46 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 4 Oct 2018 17:20:43 +0100, John Hurley wrote: > > > In this case the hw driver will receive the rules from the tunnel device directly. > > > The driver can then offload them as it sees fit. > > > > if both instances of the hw drivers (uplink0, uplink1) register to get > > the rules installed on the block of the tunnel device we have exactly > > what we want, isn't that? > > > > The design here is that each hw driver should only need to register > for callbacks on a 'higher level' device's block once. > When a callback is triggered the driver receives one instance of the > rule and can make its own decision about what to do. > This is slightly different from registering ingress devs where each > uplink registers for its own block. > It is probably more akin to the egdev setup in that if a rule on a > block egresses to an uplink, the driver receives 1 callback on the > rule, irrespective of how may underlying netdevs are on the block. Right, though nothing stops the driver from registering multiple callbacks for the same device, if its somehow useful.