From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f179.google.com ([209.85.220.179]:41999 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbeCEWIF (ORCPT ); Mon, 5 Mar 2018 17:08:05 -0500 Received: by mail-qk0-f179.google.com with SMTP id b130so22548290qkg.9 for ; Mon, 05 Mar 2018 14:08:04 -0800 (PST) Date: Mon, 5 Mar 2018 14:08:00 -0800 From: Jakub Kicinski To: John Hurley Cc: netdev@vger.kernel.org, jiri@mellanox.com, ogerlitz@mellanox.com, simon.horman@netronome.com Subject: Re: [RFC net-next 0/6] offload linux bonding tc ingress rules Message-ID: <20180305140800.0737eda1@cakuba.netronome.com> In-Reply-To: <1520256514-27885-1-git-send-email-john.hurley@netronome.com> References: <1520256514-27885-1-git-send-email-john.hurley@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 5 Mar 2018 13:28:28 +0000, John Hurley wrote: > The linux bond itself registers a cb for offloading tc rules. Potential > slave netdevs on offload devices can then register with the bond for a > further callback - this code is basically the same as registering for an > egress dev offload in TC. Then when a rule is offloaded to the bond, it > can be relayed to each netdev that has registered with the bond code and > which is a slave of the given bond. As you know I would much rather see this handled in the TC core, similarly to how blocks are shared. We can add a new .ndo_setup_tc notification like TC_MASTER_BLOCK_BIND and reuse the existing offload tracking. It would also fix the problem of freezing the bond and allow better code reuse with team etc. For tunnel offloads we necessarily have to stick to the weak offload model, where any offload success satisfies skip_sw, but in case of bonds we should strive for the strong model (as you are doing AFAICT). The only difficulty seems to be replaying the bind commands when port joins? I mean finding all blocks on a bond. But that should be surmountable..