[{"id":1764169,"web_url":"http://patchwork.ozlabs.org/comment/1764169/","msgid":"<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","list_archive_url":null,"date":"2017-09-06T14:46:48","subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","submitter":{"id":15889,"url":"http://patchwork.ozlabs.org/api/people/15889/","name":"Vivien Didelot","email":"vivien.didelot@savoirfairelinux.com"},"content":"Hi Andrew,\n\nAndrew Lunn <andrew@lunn.ch> writes:\n\n> SWITCHDEV_ATTR_ID_PORT_PARENT_ID is used by the software bridge when\n> determining which ports to flood a packet out. If the packet\n> originated from a switch, it assumes the switch has already flooded\n> the packet out the switches ports, so the bridge should not flood the\n> packet itself out switch ports. Ports on the same switch are expected\n> to return the same parent ID when SWITCHDEV_ATTR_ID_PORT_PARENT_ID is\n> called.\n>\n> DSA gets this wrong with clusters of switches. As far as the software\n> bridge is concerned, the cluster is all one switch. A packet from any\n> switch in the cluster can be assumed to of been flooded as needed out\n> all ports of the cluster, not just the switch it originated\n> from. Hence all ports of a cluster should return the same parent. The\n> old implementation did not, each switch in the cluster had its own ID.\n>\n> Also wrong was that the ID was not unique if multiple DSA instances\n> are in operation.\n>\n> Use the MAC address of the master interface as the parent ID. This is\n> the same for all switches in a cluster, and should be unique if there\n> are multiple clusters.\n\nThat is not correct. Support for multiple CPU ports is coming and in\nthis case, you can have two CPU host interfaces wired to two switch\nports of the same tree. So two different master MAC addresses.\n\nOnly the tree ID assigned by DSA core is unique to a given tree.\n\n\nThanks,\n\n        Vivien","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnRMX3zHYz9t50\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 00:50:16 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932643AbdIFOuO (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 10:50:14 -0400","from mail.savoirfairelinux.com ([208.88.110.44]:58758 \"EHLO\n\tmail.savoirfairelinux.com\" rhost-flags-OK-OK-OK-OK) by\n\tvger.kernel.org with ESMTP id S932562AbdIFOuN (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 6 Sep 2017 10:50:13 -0400","from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id C3A729C19DD;\n\tWed,  6 Sep 2017 10:50:12 -0400 (EDT)","from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10032)\n\twith ESMTP id UZfO7vmPQLmD; Wed,  6 Sep 2017 10:50:12 -0400 (EDT)","from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id 0F45D9C1BB7;\n\tWed,  6 Sep 2017 10:50:12 -0400 (EDT)","from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10026)\n\twith ESMTP id ctTyzs9JeuqS; Wed,  6 Sep 2017 10:50:11 -0400 (EDT)","from localhost (modemcable249.105-163-184.mc.videotron.ca\n\t[184.163.105.249])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTPSA id CD2BB9C19DD;\n\tWed,  6 Sep 2017 10:50:11 -0400 (EDT)"],"X-Virus-Scanned":"amavisd-new at mail.savoirfairelinux.com","From":"Vivien Didelot <vivien.didelot@savoirfairelinux.com>","To":"Andrew Lunn <andrew@lunn.ch>, netdev <netdev@vger.kernel.org>","Cc":"jiri@resnulli.us, nikolay@cumulusnetworks.com,\n\tFlorian Fainelli <f.fainelli@gmail.com>, Andrew Lunn <andrew@lunn.ch>","Subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","In-Reply-To":"<1504654510-31004-9-git-send-email-andrew@lunn.ch>","References":"<1504654510-31004-1-git-send-email-andrew@lunn.ch>\n\t<1504654510-31004-9-git-send-email-andrew@lunn.ch>","Date":"Wed, 06 Sep 2017 10:46:48 -0400","Message-ID":"<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","MIME-Version":"1.0","Content-Type":"text/plain","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1764182,"web_url":"http://patchwork.ozlabs.org/comment/1764182/","msgid":"<20170906150825.GB15315@lunn.ch>","list_archive_url":null,"date":"2017-09-06T15:08:25","subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"> > Use the MAC address of the master interface as the parent ID. This is\n> > the same for all switches in a cluster, and should be unique if there\n> > are multiple clusters.\n> \n> That is not correct. Support for multiple CPU ports is coming and in\n> this case, you can have two CPU host interfaces wired to two switch\n> ports of the same tree. So two different master MAC addresses.\n\nYes, you are correct. I will change this.\n\n     Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnRmb0Pkzz9s7C\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 01:08:31 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932757AbdIFPI2 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 11:08:28 -0400","from vps0.lunn.ch ([178.209.37.122]:58749 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S932657AbdIFPI0 (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tWed, 6 Sep 2017 11:08:26 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dpbwH-0004R2-2B; Wed, 06 Sep 2017 17:08:25 +0200"],"Date":"Wed, 6 Sep 2017 17:08:25 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Vivien Didelot <vivien.didelot@savoirfairelinux.com>","Cc":"netdev <netdev@vger.kernel.org>, jiri@resnulli.us,\n\tnikolay@cumulusnetworks.com, Florian Fainelli <f.fainelli@gmail.com>","Subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","Message-ID":"<20170906150825.GB15315@lunn.ch>","References":"<1504654510-31004-1-git-send-email-andrew@lunn.ch>\n\t<1504654510-31004-9-git-send-email-andrew@lunn.ch>\n\t<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1764226,"web_url":"http://patchwork.ozlabs.org/comment/1764226/","msgid":"<0D9EF30F-ED95-486E-91B0-E18D5E8689FE@gmail.com>","list_archive_url":null,"date":"2017-09-06T16:09:03","subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On September 6, 2017 8:08:25 AM PDT, Andrew Lunn <andrew@lunn.ch> wrote:\n>> > Use the MAC address of the master interface as the parent ID. This\n>is\n>> > the same for all switches in a cluster, and should be unique if\n>there\n>> > are multiple clusters.\n>> \n>> That is not correct. Support for multiple CPU ports is coming and in\n>> this case, you can have two CPU host interfaces wired to two switch\n>> ports of the same tree. So two different master MAC addresses.\n>\n>Yes, you are correct. I will change this.\n\nA switch cluster should be tied to the same dsa_switch_tree though, can we use dst->tree as an unique identifier?","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"AfFnUNXS\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnT6c62LBz9sRV\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 02:09:12 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755246AbdIFQJK (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 12:09:10 -0400","from mail-oi0-f46.google.com ([209.85.218.46]:34914 \"EHLO\n\tmail-oi0-f46.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754249AbdIFQJJ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 6 Sep 2017 12:09:09 -0400","by mail-oi0-f46.google.com with SMTP id n18so44223882oig.2\n\tfor <netdev@vger.kernel.org>; Wed, 06 Sep 2017 09:09:09 -0700 (PDT)","from ?IPv6:2001:470:d:73f:815a:9e66:852a:ad00?\n\t([2001:470:d:73f:815a:9e66:852a:ad00])\n\tby smtp.gmail.com with ESMTPSA id\n\tl10sm218925oig.16.2017.09.06.09.09.07\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 06 Sep 2017 09:09:07 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=date:user-agent:in-reply-to:references:mime-version\n\t:content-transfer-encoding:subject:to:cc:from:message-id;\n\tbh=iggHbSvgnik/BYNmJfZaHi2YxCAwrsFv2D9ZTHmLB9g=;\n\tb=AfFnUNXSw+5JhzED7Mn+e3zCleRJ7ygoTUZBh82kvQpPO4KXNRlAPJwjqDcSLH0hdu\n\tDfDvC0dDZhh95NVMDEsDTeHsY/Yv6hNjOkMoJ+tfLomFsEqArn6Z32ViT6KEia6wWbnI\n\t8ZV0CUwFalbQjGZMngKsF5vXSoZ3NHCyVIJgPFK65nc7k5zJn478iEJ2h9IEK5paKyss\n\t/dL1fMZCXuHlhFnbr0RsffZle0KC3huKzKITXUqaN6mnJF1D3Vh+1clPMv6Ttz1wco/t\n\ttXTzxxb1KcRn4ghQNVU5xQ995BmhIbp+eLF+ydojZTXzHZSngH9IRCExtISCtlx4SsYk\n\tXZGQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:user-agent:in-reply-to:references\n\t:mime-version:content-transfer-encoding:subject:to:cc:from\n\t:message-id;\n\tbh=iggHbSvgnik/BYNmJfZaHi2YxCAwrsFv2D9ZTHmLB9g=;\n\tb=ba3CF88gRj9o07ebAQmcRJPJL/XaP5tTZbJiHyfDKTMXZdDSL2zo7vLXgAMg3ozN6g\n\tAvFLov1X6Znc6I6kaWHHiVuHl0ubun3+NHl/aE3Lxzli2r59aD6CQfmUL9p4afkd42jd\n\teJUfeLm7dF/n3ZQTVGby4A297QSFWd4sHc8a/DTCWy9L2o9u+YyDH9nkEj/cZH6iedol\n\trPFc2jxpvw8/X8xiR/LeQmNx2Y4BMIO0oFIxkPLFkRPKIWDyigvEYWPHK5PZYsxosYul\n\tgpp0G/1uSmqB/YXtx9dl/Yij9UslcdxqkkvYcrSRKWwRk3nTFf/QucKIOXFy5TdGmOtb\n\tKA/g==","X-Gm-Message-State":"AHPjjUgZ9T2RmeZ3CgDp0krXwzNmvOwFYbrmo1yzHJ5CAIx3HHpa+0dE\n\tCoGBfmikl/OfRLpgjWI=","X-Google-Smtp-Source":"ADKCNb4D2vdZF4G9aoh36zW8gKxVSPzC+ojfIfbnhvn/AYOeNhr+sN/TCpuz1eHOWpE1gDLnxSgzuw==","X-Received":"by 10.202.212.15 with SMTP id l15mr3138120oig.276.1504714149076; \n\tWed, 06 Sep 2017 09:09:09 -0700 (PDT)","Date":"Wed, 06 Sep 2017 09:09:03 -0700","User-Agent":"K-9 Mail for Android","In-Reply-To":"<20170906150825.GB15315@lunn.ch>","References":"<1504654510-31004-1-git-send-email-andrew@lunn.ch>\n\t<1504654510-31004-9-git-send-email-andrew@lunn.ch>\n\t<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>\n\t<20170906150825.GB15315@lunn.ch>","MIME-Version":"1.0","Content-Type":"text/plain;\n charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","To":"Andrew Lunn <andrew@lunn.ch>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>","CC":"netdev <netdev@vger.kernel.org>, jiri@resnulli.us,\n\tnikolay@cumulusnetworks.com","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<0D9EF30F-ED95-486E-91B0-E18D5E8689FE@gmail.com>","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1764245,"web_url":"http://patchwork.ozlabs.org/comment/1764245/","msgid":"<20170906162933.GD15315@lunn.ch>","list_archive_url":null,"date":"2017-09-06T16:29:33","subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"> >Yes, you are correct. I will change this.\n> \n\n> A switch cluster should be tied to the same dsa_switch_tree though,\n> can we use dst->tree as an unique identifier?\n\nYes, that is what Vivien was suggesting.\n\n     Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnTZD3wD2z9s7F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 02:29:40 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755461AbdIFQ3h (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 12:29:37 -0400","from vps0.lunn.ch ([178.209.37.122]:58850 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753775AbdIFQ3g (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tWed, 6 Sep 2017 12:29:36 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dpdCn-00051S-PK; Wed, 06 Sep 2017 18:29:33 +0200"],"Date":"Wed, 6 Sep 2017 18:29:33 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Florian Fainelli <f.fainelli@gmail.com>","Cc":"Vivien Didelot <vivien.didelot@savoirfairelinux.com>,\n\tnetdev <netdev@vger.kernel.org>, jiri@resnulli.us,\n\tnikolay@cumulusnetworks.com","Subject":"Re: [PATCH v2 rfc 8/8] net: dsa: Fix\n\tSWITCHDEV_ATTR_ID_PORT_PARENT_ID","Message-ID":"<20170906162933.GD15315@lunn.ch>","References":"<1504654510-31004-1-git-send-email-andrew@lunn.ch>\n\t<1504654510-31004-9-git-send-email-andrew@lunn.ch>\n\t<87d17351gn.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>\n\t<20170906150825.GB15315@lunn.ch>\n\t<0D9EF30F-ED95-486E-91B0-E18D5E8689FE@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<0D9EF30F-ED95-486E-91B0-E18D5E8689FE@gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]