Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753021AbcD1RDF (ORCPT ); Thu, 28 Apr 2016 13:03:05 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34257 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbcD1RDD (ORCPT ); Thu, 28 Apr 2016 13:03:03 -0400 Subject: Re: [RFC 07/20] net: dsa: list ports in switch\\ To: Andrew Lunn , Vivien Didelot References: <1461796217-18893-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1461796217-18893-8-git-send-email-vivien.didelot@savoirfairelinux.com> <20160427231537.GJ29024@lunn.ch> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Jiri Pirko From: Florian Fainelli Message-ID: <572241BB.1070304@gmail.com> Date: Thu, 28 Apr 2016 10:00:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160427231537.GJ29024@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 582 Lines: 14 On 27/04/16 16:15, Andrew Lunn wrote: > On Wed, Apr 27, 2016 at 06:30:04PM -0400, Vivien Didelot wrote: >> List DSA port structures in their switch structure, so that drivers can >> iterate on them to retrieve information such as their ports membership. > > And this would be so much easier using a plan array. Agreed, I do not see much value in doing this at the moment. Even if you have unused ports in a switch, allocating an array is a small price to pay compared to directly indexing by port number. NAK from me unless there is a compelling reason for doing so. -- Florian