Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3701446ybg; Sun, 20 Oct 2019 19:54:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM22pYEGdygDd5aui3HofVcEfFqsip8DZ5KOGWSKkWWvqwzxBBD80Hv5adsRLcwGatQiWT X-Received: by 2002:a05:6402:1359:: with SMTP id y25mr22596471edw.183.1571626496864; Sun, 20 Oct 2019 19:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571626496; cv=none; d=google.com; s=arc-20160816; b=QX/FHfhzRMPy4L+Ug0w8kbSTiQvWNMUfCdBvaIE83i1K77x3O8paJc2VjnPg9F1ZuK 89ivuYCfHQJNTK6u+r3OwQJjCFgWGBlpyNlNCKn/b/Liw7gVoW/ICPnuKFNybFNCsL61 3aJ/xcfhmP59wkQINJ84XwknFRDhaPbZPk7KnG54KopxWAWyrcr7kAS2y/f8SknG+Ru3 W0yBm9h2mtnbwA4SYTP0CimzqVzdLHJzGxJSwpbZYuApxUpVbnY7Q6tbgcWI2E0miMcL C17MJ5xv7Nso8LvdwyjcLkaIjIGYQwFXJ+yPciYX6ZCyNxEIKhnRUTYoaHJBbAaqxIGI j3PA== 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=3YcbFlGeukZjRaHUc52Yo3oow3dwGRvRToPt56X0JRM=; b=j6SXxlXaF5x0f9YCuTrAff72dDKsGZUX+omCT4lzZbLKbz3Fo2qVc1K49Jq3UkFHq/ OmXtfeg6xtcFTMDLcgTNMdH1rhRkiSvoXkk3xaY57NeYSAEb4PxXCmPN6wlLSoWB4HjO ks5pEFE1pue5v0lri6SgNDf50QXCloP0WPp7MkaiS2UlOJH+AqrpcthwOTTxMQ/aCCrt 7ZAmYIU0RhQtyuv5rz3zaN/Sagqz0SxCeOXUX4wW2FQLJQPVMQ5GLUQa37nlYS94U5S7 khaZvr2+7m52DdZMhJkIGZg/XfFVkJh1WhhjrmE7KHs5Iswiji19C7BzbMg82uWRqRVy u6TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JvI3M1rW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si8690656edx.361.2019.10.20.19.54.32; Sun, 20 Oct 2019 19:54:56 -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=@gmail.com header.s=20161025 header.b=JvI3M1rW; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726909AbfJUCwK (ORCPT + 99 others); Sun, 20 Oct 2019 22:52:10 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42288 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbfJUCwK (ORCPT ); Sun, 20 Oct 2019 22:52:10 -0400 Received: by mail-pg1-f194.google.com with SMTP id f14so6809703pgi.9; Sun, 20 Oct 2019 19:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3YcbFlGeukZjRaHUc52Yo3oow3dwGRvRToPt56X0JRM=; b=JvI3M1rWTuzFM3iSmyK6InPBkB4WEv/pU/GpE+bjUHjj0Fa0/IK2SCua5cuAieKgIo 7YAOfmLd8d/Q0vaQ1aZLg3xVzse2dRHE2I54Lnp9iOMXSmhtA2q7mwytiY1cpkpEx+FB BfpLRHkL/PbuJQ9P2DcZOZbHXwEKbORTuVuwqPLQT6XytdE3jU92IcdW3/bJzISHaRlr ZSbVoELp5O1s7gYzkDL0hC3zCtSgYYLMYHxymywZWZMTHE1r+NJtcyxA2aelZRdL1kyt rRUg55BMbWbt4PpcWAObWrgPR8KjlD20exC1VVOjcbFy8ejMAhHX8YXbLfKMxmLyUjOM EKlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3YcbFlGeukZjRaHUc52Yo3oow3dwGRvRToPt56X0JRM=; b=MlvXGfv3o1IqFw5OfX0a2+WHTEJVM3ngUMm+tuEI+KocULekGjGfSnbsrjr3ZtQGsj afY8qXNtE5ZpPXiARU4kU7TzAxF9Fv2lqClAw9LIT+Urb4eOLR1dN1sF/SAZP197pa0D 5NbQY6vvr1bYX/XwH8DkYKMrkj1j4osTnp8dglbeVRcQpbr0brYWO8QeX9+Ebm2buS39 5AX0EP+KSQfqQ20Pksui2LxLGIKSwUc5VW83m7j6NHYv+56IoJbM8lQ7Lbgy6V02gtFg e2dHD2Japwq800KlNfv98DSlDupWIkuFTIO3YBs97NwgIwy6JUcns/v1kPG2FZTKrz5T pRAA== X-Gm-Message-State: APjAAAUsVu3NDRJSqI3mybi8UVP9fQeEBkeEX4r3EEwS3nZWIv68UAkv NvDGWi2i5Fh8xJD5rzew+zKEpP0E X-Received: by 2002:a63:e056:: with SMTP id n22mr22410398pgj.73.1571626329018; Sun, 20 Oct 2019 19:52:09 -0700 (PDT) Received: from [192.168.1.3] (ip68-111-84-250.oc.oc.cox.net. [68.111.84.250]) by smtp.gmail.com with ESMTPSA id c8sm14454465pfi.117.2019.10.20.19.52.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Oct 2019 19:52:08 -0700 (PDT) Subject: Re: [PATCH net-next 13/16] net: dsa: mv88e6xxx: use ports list to map bridge To: Vivien Didelot , "David S. Miller" Cc: linux-kernel@vger.kernel.org, Andrew Lunn , netdev@vger.kernel.org References: <20191020031941.3805884-1-vivien.didelot@gmail.com> <20191020031941.3805884-14-vivien.didelot@gmail.com> From: Florian Fainelli Message-ID: Date: Sun, 20 Oct 2019 19:52:07 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191020031941.3805884-14-vivien.didelot@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/2019 8:19 PM, Vivien Didelot wrote: > Instead of digging into the other dsa_switch structures of the fabric > and relying too much on the dsa_to_port helper, use the new list > of switch fabric ports to remap the Port VLAN Map of local bridge > group members or remap the Port VLAN Table entry of external bridge > group members. > > Signed-off-by: Vivien Didelot > --- [snip] > - for (port = 0; port < ds->num_ports; ++port) { > - if (dsa_to_port(ds, port)->bridge_dev == br) { > - err = mv88e6xxx_pvt_map(chip, dev, port); > + list_for_each_entry(dp, &dst->ports, list) { > + /* Remap the Port VLAN Map of local bridge group members and > + * remap the PVT entry of external bridge group members. > + */ If you do a v2, I would tend to put these comments under the appropriate branches taken below for clarify although the code is actually clearer this want than it was before IMHO, so up to you :) Reviewed-by: Florian Fainelli -- Florian