From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbdGYIgo (ORCPT ); Tue, 25 Jul 2017 04:36:44 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.140]:21046 "EHLO mail1.bemta5.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdGYIfY (ORCPT ); Tue, 25 Jul 2017 04:35:24 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIKsWRWlGSWpSXmKPExsVyeL7SP92TTOW RBnPWGFucv3uI2eLJgXZGiznnW1gsfr07wm6xaupOFouFbUtYLC7vmsNmcWyBmMWsI/uZHDg9 tqy8yeSxc9Zddo+dOz4zeSzum8zq0f/XwOPKxrlMHp83yQWwR7Fm5iXlVySwZpz8cpW1YCNXx bV/bg2Muzm6GLk4hATWMkqsaJ3MCOEsYZS4cGwbexcjJ4ewQKBE347FbCAJEYEGJokPu96wgS SEBCokZv5aAWazCRhL7Jq+mQnE5hWwkzi+bSELiM0ioCrReGYJWFxUIFxi//drzBA1ghInZz4 Bq+EUsJX4dGYSmM0sYCExc/55RghbXOLWk/lMELa8xPa3c5gh9mpI7O3sAqrn4JAAip87UAQS lhCIk9i09gXzBEbBWUg2zEIydRaSqbOQTF3AyLKKUaM4tagstUjX0EgvqSgzPaMkNzEzR9fQw FQvN7W4ODE9NScxqVgvOT93EyMwqhiAYAdj3yznQ4ySHExKorzpu8oihfiS8lMqMxKLM+KLSn NSiw8xynBwKEnwGjCWRwoJFqWmp1akZeYA4xsmLcHBoyTCu4QBKM1bXJCYW5yZDpE6xagoJc5 bCtInAJLIKM2Da4OllEuMslLCvIxAhwjxFKQW5WaWoMq/YhTnYFQS5k0GmcKTmVcCN/0V0GIm oMVzZpSCLC5JREhJNTA2tEgF/P235WaVRuBdSZtNORdTp0QUnbXQ6PDbwNX35ta5hRXsm+cvu cN7dl8T++EAvhc/4ziDAtSZjJqb/DRWvlfkfKa13eynQuACif2TFjd1HNz6M2ndRLnbTXoZx8 3CdYt27JUUjAk/+ao4vLjDufFvolzJPNmZx84mH93/SlDprAzrjAtKLMUZiYZazEXFiQClKQL yJAMAAA== X-Env-Sender: Egil.Hjelmeland@zenitel.com X-Msg-Ref: server-5.tower-178.messagelabs.com!1500971720!107817209!3 X-Originating-IP: [195.159.34.254] X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=zenitel.com,-,- X-VirusChecked: Checked Subject: Re: [PATCH 12/13] net: dsa: lan9303: Added "stp_enable" sysfs attribute To: Florian Fainelli , , , , , , , , References: <08c405e265564e47a4649f7fe264a908@nooslMX1.zenitelcss.com> <27565dee-8fc5-79dc-e272-a8cf8556e3a5@gmail.com> From: Egil Hjelmeland Message-ID: <576f8440-bc05-03b9-7401-d8e83a49aa7e@zenitel.com> Date: Tue, 25 Jul 2017 10:34:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <27565dee-8fc5-79dc-e272-a8cf8556e3a5@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.5.202.90] X-ClientProxiedBy: nooslMX1.zenitelcss.com (10.5.2.91) To nooslMX1.zenitelcss.com (10.5.2.91) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24. juli 2017 18:55, Florian Fainelli wrote: > On 07/20/2017 06:42 AM, Egil Hjelmeland wrote: >> Must be set to 1 by user space when STP is used on the lan9303. >> If bridging without local STP, leave at 0, so external STP BPDUs >> are forwarded. >> >> Hopefully the kernel can be improved so the driver can handle this >> without user intervention, and this control can be removed. > > Same here, we can't have a driver-specific sysfs attribute just for > this, either we find a way to have the bridge's STP settings propagate > correctly to the switch driver, or you have to make better decisions > based on hints/calls you are getting from switchdev -> dsa -> driver. > I can't see that the driver gets enough information now. But please correct me if I am wrong. Problem is that when disabling multicast_flood, then the BPDUs are not forwarded by the SW bridge, so I can not have the 01:80:c2:00:00:00 entry in always. Perhaps the kernel could do port_fdb_add/del on 01:80:c2:00:00:00 when STP is turned on/off? Or could that break other DSA chips? When we are at it, it would be good if the driver could return some capability information to the kernel, so it can adapt accordingly. It does not feel right that user space has to disable the xxxx_flood flags, the kernel should be able to figure that out by it self. DISCLAIMER: This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.