Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753324AbdIXWCR (ORCPT ); Sun, 24 Sep 2017 18:02:17 -0400 Received: from aibo.runbox.com ([91.220.196.211]:45090 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752992AbdIXWCP (ORCPT ); Sun, 24 Sep 2017 18:02:15 -0400 Subject: Re: [PATCH net-next 2/2] net: dsa: lan9303: Add basic offloading of unicast traffic To: Andrew Lunn Cc: vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170921094139.4250-1-privat@egil-hjelmeland.no> <20170921094139.4250-3-privat@egil-hjelmeland.no> <20170921142127.GB27589@lunn.ch> <20170922200810.GJ3470@lunn.ch> <2c5fec6d-18b3-97e9-dd64-85560382d2f7@egil-hjelmeland.no> <20170923143123.GA21228@lunn.ch> From: Egil Hjelmeland Message-ID: <1e8ac407-bf63-5ccc-fe23-4af0ea83923d@egil-hjelmeland.no> Date: Mon, 25 Sep 2017 00:02:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170923143123.GA21228@lunn.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 23 Den 23. sep. 2017 16:31, skrev Andrew Lunn: >> The point is: Once both external ports are in "forwarding", I see no way >> to prevent traffic flowing directly between the external ports. > > Generally, there are port vectors. Port X can send frames only to Port > Y. > > If you don't have that, there are possibilities with VLANs. Each port > is given a unique VLAN. All incoming untagged traffic is tagged with > the VLAN. You just need to keep the VLAN separated and add/remove the > VLAN tag in the dsa tag driver. > > Andrew > Thanks. The lan9303 has nothing like "port vectors". The port tagging scheme is VLAN based, but is does not prevent direct forwarding between the external ports. In order to not break the strong port separation in the current driver; I will stick to my solution, and only add caching of the STP state register. Egil