Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp6074398ybg; Tue, 22 Oct 2019 12:43:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiL0sMbQIcFTf480bW8BC0Wcgzz6AhcHLDZSpFgukYr/KItCGx48WQbVhTA2aHxqv+vSva X-Received: by 2002:a05:6402:2022:: with SMTP id ay2mr33134015edb.219.1571773406291; Tue, 22 Oct 2019 12:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571773406; cv=none; d=google.com; s=arc-20160816; b=PMNa0VHmMDBT+cY+T/Jg9R4Fm96wZmbRc7ttsZRCOL/8xmNngAs0YYydZIfaFJU0oQ qYRfyb4jOgA1hGPWWTrK26qFlnH7nx/JkXNdDU3rr6TXv8pM+LvBqSxYy5At4UvFPFwC Ake9OVRaoMZI6QoOjooPvsToYJOQL9E93rUNg1T2ni4gyHZHiRPhi7jcXBo1p/dXbaMR cUHq+yzm15Z6g5bO4NqCRRBf8mDa5pl5XIOWMcMzZz/HVHshJ0blKq77kp8iAp181/E8 tkBGcLBeNOxMoo/SivBE5ajy2PEtZuis7NKsW0xC2xp7H4Ys2wrnEQqJA+lqtoD2N4VX 87cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=IsSJ5eVHCLYF53VNonxhHNCQH5QFu6jimMBy8vLyOog=; b=JZooZawo7Xtt94sqEQYRsshkUgWDcMwWQG8d585qmk/dP7m0uYWiPE1EGjouFcf94O MaFR7KOOpD+xM96P1+wa5O+gaefyyIl6gyCWKh2W5hY5Bpd+luVwDPXJdenzkcmm0NZh NHMNGztkKZ7wBt2zOk9OdE01mNdEYuExNFOYHkfPmYZgURJl8HojicWXvjSH2nuRck+A e/xEQt6wgE4x9j1+D6N5niRoJuXovyzjB/weaOrspQL7DY1qdRXnAgP2PMFrXanCLAFj GRfjf9SxX/zmG54/gjzz6Cv220Hn6O8APDSNOy9K1a8LbHmv/9e/WOtr40XTXa4LcpP6 ZFGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=v2Z48XpB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rk26si2342993ejb.303.2019.10.22.12.43.02; Tue, 22 Oct 2019 12:43:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=v2Z48XpB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388205AbfJVTlz (ORCPT + 99 others); Tue, 22 Oct 2019 15:41:55 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39085 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731806AbfJVTlz (ORCPT ); Tue, 22 Oct 2019 15:41:55 -0400 Received: by mail-lj1-f193.google.com with SMTP id y3so18482413ljj.6 for ; Tue, 22 Oct 2019 12:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=IsSJ5eVHCLYF53VNonxhHNCQH5QFu6jimMBy8vLyOog=; b=v2Z48XpBFwFxbMTkDf5egKRLy0tlp5zDEydT5/ivTps8yEnycEIoL8jhDGVwWfGvuI ppvyGHZ+DubsGU6a4x8vJX5X5CMUORUc+1cW5DRzs+Ke+Y9l+dXtC010OxB0Xg++o1pp gqb2Vad2XVp7sY546Rfu+2Jo6osuGA9tiwrBDaMHXX9G4V+v9cslCip/jMjYnA/9QZp9 5Sq+yRvUN3ooc4mwRKWhsMXBSDeK7rIbpKt7xZtBfPdxFCCVh29BXIwQIX1sI3Q0+HAh e7yIyte7XiodG0qau49JmLor0pn10VNoV/udV5S8PuvxYA6HzhO+kGoogMs2EurO/DOk XOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=IsSJ5eVHCLYF53VNonxhHNCQH5QFu6jimMBy8vLyOog=; b=cu5iaNZfLAJKNd2yU7N3bCuvJ9x+eYDQwc+CYGhiZInbp199h8KJI+GuJz3nIM/dJG Rl56wZSq3pRQAd8uyZ/FzooClrAlm0+lx5nIVNQ+wht8nCmjDXV8Cco0NbQk32d8ZXqG t7VLV1g0AVBcfod53nid0Zmd0DSt/fdv4Q3k+SvUk1/OgynYvROfuPNBJoXVHkRQ47WJ vL9a3dQffukwXjcV2v0EOB1FLKZJ6fepWclZzVeVrryWpSvewlHn6iAhlG4lu1wzQNcR BDjH8CAoMhh/w9flKwfR/1oF4Zu7xoh5MebBqf9Hs4+3ljv87OYUN4oxoiARgZ9BGN/s 8yIQ== X-Gm-Message-State: APjAAAUmUgFUlST6xA99Vo/Wb7qXbj/sPC2W8lxWl1gsQEBbLmSwzJs7 QNKgqkSthakPXOsMhZxCJAZCeg== X-Received: by 2002:a2e:8118:: with SMTP id d24mr2950056ljg.111.1571773313303; Tue, 22 Oct 2019 12:41:53 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id l24sm1168910lfc.53.2019.10.22.12.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 12:41:53 -0700 (PDT) Date: Tue, 22 Oct 2019 12:41:46 -0700 From: Jakub Kicinski To: Vivien Didelot Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Florian Fainelli , Andrew Lunn , netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 00/16] net: dsa: turn arrays of ports into a list Message-ID: <20191022124146.25c1fdbc@cakuba.netronome.com> In-Reply-To: <20191021205130.304149-1-vivien.didelot@gmail.com> References: <20191021205130.304149-1-vivien.didelot@gmail.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Oct 2019 16:51:14 -0400, Vivien Didelot wrote: > The dsa_switch structure represents the physical switch device itself, > and is allocated by the driver. The dsa_switch_tree and dsa_port structures > represent the logical switch fabric (eventually composed of multiple switch > devices) and its ports, and are allocated by the DSA core. > > This branch lists the logical ports directly in the fabric which simplifies > the iteration over all ports when assigning the default CPU port or configuring > the D in DSA in drivers like mv88e6xxx. > > This also removes the unique dst->cpu_dp pointer and is a first step towards > supporting multiple CPU ports and dropping the DSA_MAX_PORTS limitation. > > Because the dsa_port structures are not tight to the dsa_switch structure > anymore, we do not need to provide an helper for the drivers to allocate a > switch structure. Like in many other subsystems, drivers can now embed their > dsa_switch structure as they wish into their private structure. This will > be particularly interesting for the Broadcom drivers which were currently > limited by the dynamically allocated array of DSA ports. > > The series implements the list of dsa_port structures, makes use of it, > then drops dst->cpu_dp and the dsa_switch_alloc helper. Applied, thanks!