Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3655617imm; Mon, 25 Jun 2018 02:18:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLcSDNnW7Ie975ljdR8V8uOiR+DJV8sBF9BB61PUW3sgfRcTkeW6Y7FazeeBcwzlAYjoILs X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr11438264plg.68.1529918293201; Mon, 25 Jun 2018 02:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529918293; cv=none; d=google.com; s=arc-20160816; b=hdw/5f6IaKiDrJPX2qA5s4sIK7j/hpDBmuk2m0KUfY7cgFRhdevxezOpM1nAEYcg5A y3L3s08mv0le5CANu8e7nt+FnhrsYCRZAVjb9q4yDZVIUq4VudBO7M1C1qAVeYfALywO thYu4bvWidFKwlT7AHTYqtSPsv4AeMYCZ52IdFEAyBFDvLQVdhXKWKvYdLGde1sdjwxO JiWhCxwv9keT1dWdlGmbf0+IlCeT4O78IAa4bSm6kzzvTelOAKcwAAtwMmhxjgNr7yq6 zd17egkU72VCsnMfjdlwdEOiQmIuZ6ToicW7kLXAPyRsWRVuA+zVetBoVda7HhwXlaWY r+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=/LerCyzUS9JKAJHkfMoUIj30RC9wZl+DNMFkr7FzWVQ=; b=muD+XZJzGCIyTCC4dFUNy9JXA/0tktepzVJAte2jGiVK1ZKSY6QA2wFNA4r8S81152 baNbSawhFEs1v91ufA0qyd/R6xubPGSytn2W3BVqXxNM7lRB8AoV91KPrm7noAs7nxN0 v/9gxtKM34OyrnpKocgpN41Kcrd9+Q+XiQv5uD0/73FdyjdyC59S4Fs3shc82abdt91F A0IDX4ObMmvbZW9Zrs9ju05YfD6GndmINI/vdDi38DOq68Ybu9lvT2dt5x7V867aM/85 SZpN0csdxstdRLsaMCkkikpWtc/VrEtX1oW+vIinsBlVqfDDIzbjGkHn/Ip74+CJlB4O iKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="d1M0f/ML"; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1-v6si13298083plb.172.2018.06.25.02.17.58; Mon, 25 Jun 2018 02:18:13 -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=@linaro.org header.s=google header.b="d1M0f/ML"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754465AbeFYJRU (ORCPT + 99 others); Mon, 25 Jun 2018 05:17:20 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:38041 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754449AbeFYJRS (ORCPT ); Mon, 25 Jun 2018 05:17:18 -0400 Received: by mail-wr0-f196.google.com with SMTP id e18-v6so12862605wrs.5 for ; Mon, 25 Jun 2018 02:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/LerCyzUS9JKAJHkfMoUIj30RC9wZl+DNMFkr7FzWVQ=; b=d1M0f/MLP/Vy1MkdRSo4IHZblIjYK7Cookao0l1nLbp8+gmtYeIBVULm3tIkU6eM4A +bv63yx020qzUwrduqxlBAZ0vKtRTtXTjSfWOmG+gOXc7CG1X7nUZLJzmYlbvz0ia/lQ hHqydpqBsEnM6VCRMgAUKfQM32zMxHGAiPm4s= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/LerCyzUS9JKAJHkfMoUIj30RC9wZl+DNMFkr7FzWVQ=; b=fqto2HJbRM+lU5ZkZpHvTEB0A7zwg4VvGKmELl7ywBKm1TrOxbKQkL0xJQ+Wvp1s6M Uu7n6KB5vAdozpxAILI6OP17xIUJXQJCUqjCMPMUoedsSE7opx9qkI1RMq2iepX9EBhI zQR+NbiMF5/az9b7ORi1DxZ0dNzQsHvnAj1HrKwEXy6AOHa24cIs9ZaKs6O1j2rrT3NM XOvu8seaqK9fhTpnfMH3OxWVwYGqckUopZ5OMPsosEVRTPVEpIo1cRET2ooF051MQs+o oFAIoRi6jaJ0lp/z7usqcVG1KJlBj6t8omgJ7ebtAolKBFgY2Dt9s1ztfvauU8BdtyGA IHSQ== X-Gm-Message-State: APt69E2I1I/Hxf52+nzlBSFw5+4z6LES1eINVLxsTyw3diF8hpDU2b9F In8qPDbfAtYzR3qJXsqaEiHsYw== X-Received: by 2002:a5d:4608:: with SMTP id t8-v6mr5013827wrq.52.1529918237260; Mon, 25 Jun 2018 02:17:17 -0700 (PDT) Received: from apalos ([2a02:587:4609:4e00:a1a6:2387:fbc6:4245]) by smtp.gmail.com with ESMTPSA id j131-v6sm1175730wmb.25.2018.06.25.02.17.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 02:17:16 -0700 (PDT) Date: Mon, 25 Jun 2018 12:17:13 +0300 From: Ilias Apalodimas To: Petr Machata Cc: Florian Fainelli , netdev@vger.kernel.org, jiri@mellanox.com, Andrew Lunn , Vivien Didelot , "David S. Miller" , open list Subject: Re: [PATCH RFT] net: dsa: Allow configuring CPU port VLANs Message-ID: <20180625091713.GA13442@apalos> References: <20180624153339.13572-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 12:13:10PM +0300, Petr Machata wrote: > Florian Fainelli writes: > > > if (netif_is_bridge_master(vlan->obj.orig_dev)) > > - return -EOPNOTSUPP; > > + info.port = dp->cpu_dp->index; > > The condition above will trigger also when a VLAN is added on a member > port, and there's no other port with that VLAN. In that case the VLAN > comes without the BRIDGE_VLAN_INFO_BRENTRY flag. In mlxsw we have this > to get the bridge VLANs: > > if (netif_is_bridge_master(orig_dev)) { > [...] > if ((vlan->flags & BRIDGE_VLAN_INFO_BRENTRY) && > [...] > > This doesn't appear to be done in DSA unless I'm missing something. Petr's right. This will trigger for VLANs added on 'not cpu ports' if the VLAN is not already a member. This command has BRIDGE_VLAN_INFO_BRENTRY set: bridge vlan add dev br0 vid 100 pvid untagged self I had the same issue on my CPSW RFC and solved it exactly the same was as Petr suggested. > > Thanks, > Petr Regards Ilias