Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754143AbcCMSk2 (ORCPT ); Sun, 13 Mar 2016 14:40:28 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:44804 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbcCMSkV (ORCPT ); Sun, 13 Mar 2016 14:40:21 -0400 From: Vivien Didelot To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Jiri Pirko , Ido Schimmel , Kevin Smith Subject: Re: [RFC PATCH net-next 0/3] net: dsa: finer bridging control In-Reply-To: <20160313174713.GC10666@lunn.ch> References: <1457851346-26257-1-git-send-email-vivien.didelot@savoirfairelinux.com> <20160313174713.GC10666@lunn.ch> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) Date: Sun, 13 Mar 2016 14:40:16 -0400 Message-ID: <87h9ga1asv.fsf@ketchup.mtl.sfl> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 850 Lines: 23 Hi Andrew, Andrew Lunn writes: > On Sun, Mar 13, 2016 at 01:42:23AM -0500, Vivien Didelot wrote: >> This patchset renames the bridging routines of the DSA layer, make the >> unbridging routine return void, and rework the DSA netdev notifier handler, >> similar to what the Mellanox Spectrum driver does. > > Tested-by: Andrew Lunn > > Do you think there could be some consolidation of code with Mellanox, > and other switchdev devices? Moving it into the switchdev core? We cannot move all this code to switchdev core, because switchdev is stateless, so there is no place to register the netdevice notifier(s). But it might be possible to provide a generic switchdev_netdevice_event helper, using new switchdev operations to check a port device, and add/del upper devices. I'll think about that. Thanks! Vivien