From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935138AbcHaO4K (ORCPT ); Wed, 31 Aug 2016 10:56:10 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:59814 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933835AbcHaO4G (ORCPT ); Wed, 31 Aug 2016 10:56:06 -0400 Date: Wed, 31 Aug 2016 16:56:04 +0200 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: add MDB support Message-ID: <20160831145604.GF15078@lunn.ch> References: <20160829203246.18811-1-vivien.didelot@savoirfairelinux.com> <20160829203246.18811-4-vivien.didelot@savoirfairelinux.com> <20160831135719.GC15078@lunn.ch> <874m618095.fsf@ketchup.mtl.sfl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874m618095.fsf@ketchup.mtl.sfl> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Do you mean the something like this? > > if (obj->id == SWITCHDEV_OBJ_ID_PORT_FDB) { > ... > } else if (obj->id == SWITCHDEV_OBJ_ID_PORT_MDB) { > ... > } else { > return -EOPNOTSUPP; > } Hi Vivien The -ENONOTSUPP is even better. I was not going as far as that. > No the signatures are differentes. See _fdb vs. _mdb. Ah, missed that. Then two functions are O.K. I don't think we should consolidate it in the DSA layer. Andrew