Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5646590ybg; Tue, 22 Oct 2019 06:26:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3xMlJH40MWKBPqtqUcr7njQFdJJvdwt4TAs0DGoHfmK2nJtFrOyxZfkgEzPUJrAKIGqfm X-Received: by 2002:aa7:db59:: with SMTP id n25mr31637243edt.288.1571750786685; Tue, 22 Oct 2019 06:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571750786; cv=none; d=google.com; s=arc-20160816; b=TchF56KOgZCIrC/DcflmRXt3Po4iitIMHitfedjajy7R2zVuTgYz/H1EfrDLYdocjL wXJFfNgQY+kI2yzGlIxG7vUY1y8mYDahSnK0CIuQHadqP2/n5gju8967GV9zVykkkDWl Fk5rZKrIC4s0huPmfgnqmUBFiPOYKFWUGCU9C2RX9cpi5/PsXeviT9fRmL2JroWwZWNx 2NLcIpWs7qGNqB0DYmjvE7zl4U3fBPEZOTrzU5hm+9Q98dj9egGZzRI5JZ+7ru7m2XDp yr8UNZzK01r+aHYP0kf5fZgVXd7qXXFgLNa3dT/5/T6qG9nvqVxHPLwsg/Md7x1kxhzQ UE6A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=PL+MS9WK2NxE5fJ6IsanL5YnouIlzoCz8e3JcSi9SiE=; b=vt1wbfWCt/4uxFxMM9968AERB9GcmdKIUShNzliInNvKSMroqbH9cMevy5RIcAagja JEGz1f9nw3jJaI/0xYalztt/w6xIY0hG//QhGbsp2QUUzclCYOkta0QDbwZil1v/gLUZ w6vWdSoF5nXOT+Z4GWv0Y6kKt+y1xlM6YsDH+YIoToEAklCRA/PYopEq2yBgTNgCM+XB Wr7Px48zNs4sJfIqaC8OSTwpZgWGJfFyCcJLdBCwHVRjssgjm1sjBpmLldpUSWS0Uu9P W8JxXbSaeUB0e7zRr0CV8sLN+PCuLzrk8Nt24fK21Mzxyxq9l4KcBBnxZyj4K03Anrif OMnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=AzTQz9pY; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si11867632edn.267.2019.10.22.06.26.01; Tue, 22 Oct 2019 06:26: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 (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=AzTQz9pY; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388710AbfJVLnX (ORCPT + 99 others); Tue, 22 Oct 2019 07:43:23 -0400 Received: from uho.ysoft.cz ([81.19.3.130]:35272 "EHLO uho.ysoft.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730515AbfJVLnW (ORCPT ); Tue, 22 Oct 2019 07:43:22 -0400 Received: from [10.1.8.111] (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id 354F1A36DE; Tue, 22 Oct 2019 13:43:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1571744598; bh=PL+MS9WK2NxE5fJ6IsanL5YnouIlzoCz8e3JcSi9SiE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=AzTQz9pYhDZOCi91CgiwkkbtNt12CVtYy4QsoUb7wWKndEklWRtIZfgW+gmNclpLA eQ4yhItpShkPRWwmzhGEakDlj/3+ZDHX2lhoCsaPFSCZRzbdJIH3E0NUAblBi4E+g8 TkOqT16lZ+UARIyFWNnqWln83hW5MLf/8SWJ2qPY= Subject: Re: [PATCH net-next v2 00/16] net: dsa: turn arrays of ports into a list To: Vivien Didelot Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Florian Fainelli , Andrew Lunn , netdev@vger.kernel.org References: <20191021205130.304149-1-vivien.didelot@gmail.com> From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= Message-ID: <821609f6-5430-5c46-82a4-a30a6eb85531@ysoft.com> Date: Tue, 22 Oct 2019 13:43:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191021205130.304149-1-vivien.didelot@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21. 10. 19 22:51, 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. I just tried the whole series on our imx6dl-yapp4-hydra with QCA8334 switch and did not notice any problems as well. Thank you. Tested-by: Michal Vokáč