From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbdKIPGx (ORCPT ); Thu, 9 Nov 2017 10:06:53 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:59292 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbdKIPGv (ORCPT ); Thu, 9 Nov 2017 10:06:51 -0500 From: Vivien Didelot To: Egil Hjelmeland , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Andrew Lunn Subject: Re: [PATCH net-next 1/6] net: dsa: remove trans argument from mdb ops In-Reply-To: <01a09219-c348-5aa5-c052-c8ea505c769d@egil-hjelmeland.no> References: <20171108171917.5965-1-vivien.didelot@savoirfairelinux.com> <20171108171917.5965-2-vivien.didelot@savoirfairelinux.com> <01a09219-c348-5aa5-c052-c8ea505c769d@egil-hjelmeland.no> Date: Thu, 09 Nov 2017 10:06:49 -0500 Message-ID: <87mv3vqynq.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> 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 Hi Egil, Egil Hjelmeland writes: > On 08. nov. 2017 18:19, Vivien Didelot wrote: >> The DSA switch MDB ops pass the switchdev_trans structure down to the >> drivers, but no one is using them and they aren't supposed to anyway. >> >> Remove the trans argument from MDB prepare and add operations. >> >> - int (*port_mdb_prepare)(struct dsa_switch *ds, int port, >> - const struct switchdev_obj_port_mdb *mdb, >> - struct switchdev_trans *trans); >> - void (*port_mdb_add)(struct dsa_switch *ds, int port, >> - const struct switchdev_obj_port_mdb *mdb, >> - struct switchdev_trans *trans); >> + int (*port_mdb_prepare)(struct dsa_switch *ds, int port, >> + const struct switchdev_obj_port_mdb *mdb); >> + void (*port_mdb_add)(struct dsa_switch *ds, int port, >> + const struct switchdev_obj_port_mdb *mdb); >> int (*port_mdb_del)(struct dsa_switch *ds, int port, >> const struct switchdev_obj_port_mdb *mdb); > > Hi Vivien > Nice to get rid of "trans". I recall I was confused by this parameter. > "Am I supposed to do something with this parameter?". > > But when at it. What about getting rid of switchdev_obj_port_mdb, making > similar signatures as the new .port_fdb_xxx functions? Would that make > sense? There is definitely something to do to factorize FDB and MDB operations, since an Ethernet switch driver will only manipulate an address database in the end. I have something in mind but this is out-of-scope ATM. Thanks, Vivien