Received: by 10.213.65.68 with SMTP id h4csp415428imn; Tue, 13 Mar 2018 08:21:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtf+7n/5lAq1K8qKd5lIDm7C+GjkLeqNBiVLzkXRYIhRe6dBTHomQK9EhNqTJR+cgzyX9Tp X-Received: by 2002:a17:902:6ec5:: with SMTP id l5-v6mr902449pln.113.1520954519502; Tue, 13 Mar 2018 08:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520954519; cv=none; d=google.com; s=arc-20160816; b=rmvmkpdHl0MusTa0BWUp+EW8LJ0r2jIZhL8p6gcb2ugoxzIaBvd85M3LpaydQc8qk+ Q7pSF5Dl7YlfCsrlHtpgnbDnV8riH1/R7y+JwK+W1kp45SR4vdOTSt9WUBM7Y4liJR/k ftPEyJY70N9uM0eHT0RJFT8HPpQ+3bIsI6MBt1ARNAnNJqYks7Cys+0A1+809HKNDKgX GuKaylXycAjTihaUm4ke9i2CZNVCgHQzwJLbTcvU/r1XTVtESsIckfZyMgYAAfQb04vq rNxEYy781luQFcZdfQtwo3cFR6fTUY2LyQtgOttpVimXZOJWQgZyczQNifVIhRAUMGeM MFoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=gFng3P7XDbmwc1Y+UC7aRw0TqenRvsp5feb8QnJzDb0=; b=05tXej6uyYJR/NFuejC0Rjs8f+bvLlqJra/2F92T7EYCVtqTuH13uPLmQZnU/Llf0S Soze4PGQZ8er/usbdHoDtW1DKgxOzS/w71FdUnDYD3hpe3PH6Bl+svSDYMmj2BVZSMPW DFw8uhdFqd0TTvJhV3ABEu1qUkv7xAvCJxisDinuwwc/hU5NoWknb5Ish7Qf7bh5nczC f1qRwTr4UxfIwCOtfEe71TSOuagpMo9SSMtH3aTuWVVV/VBHJByVSWZ4j11fWbdmM6lT bBwfhrq6LypRGt9McDhn6VRukz+83wcSnhonYa3gBuzhsZ91uz2zYbk6MJz3zon10yHi s8kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=NI4EGF4w; 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si256569plw.587.2018.03.13.08.21.44; Tue, 13 Mar 2018 08:21:59 -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=@nxp.com header.s=selector1 header.b=NI4EGF4w; 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbeCMPUo (ORCPT + 99 others); Tue, 13 Mar 2018 11:20:44 -0400 Received: from mail-ve1eur01on0061.outbound.protection.outlook.com ([104.47.1.61]:14256 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751089AbeCMPUm (ORCPT ); Tue, 13 Mar 2018 11:20:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gFng3P7XDbmwc1Y+UC7aRw0TqenRvsp5feb8QnJzDb0=; b=NI4EGF4wlEqQujtLQJIqxLOQhMV+10LMhv1w4eEkcHaX/fGkgrsTY2XRoGaUteBu5/3rQ6kHHqJN5teOYGBZwQ8RNtViW0A/VQaHsV1MVPPa1O0D1wwJFDwgJ3OrXxOndANDxua5+9jdHO8C64mYPRwRnWAfupFDkHTX7b25QLs= Received: from AM3PR04MB0743.eurprd04.prod.outlook.com (10.160.5.23) by AM3PR04MB1380.eurprd04.prod.outlook.com (10.163.185.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.12; Tue, 13 Mar 2018 15:20:39 +0000 Received: from AM3PR04MB0743.eurprd04.prod.outlook.com ([fe80::b1bf:ae2c:250:9d3]) by AM3PR04MB0743.eurprd04.prod.outlook.com ([fe80::b1bf:ae2c:250:9d3%17]) with mapi id 15.20.0567.018; Tue, 13 Mar 2018 15:20:39 +0000 From: Razvan Stefanescu To: Andrew Lunn CC: "gregkh@linuxfoundation.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Alexander Graf , "arnd@arndb.de" , Alexandru Marginean , Ruxandra Ioana Ciocoi Radulescu , Ioana Ciornei , Laurentiu Tudor , "stuyoder@gmail.com" Subject: RE: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Thread-Topic: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Thread-Index: AQHTutbMhVVZowRKSkyV9LKDFfki76POQC1w Date: Tue, 13 Mar 2018 15:20:38 +0000 Message-ID: References: <20180313135156.3322-1-razvan.stefanescu@nxp.com> <20180313135156.3322-3-razvan.stefanescu@nxp.com> <20180313142251.GB3814@lunn.ch> In-Reply-To: <20180313142251.GB3814@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=razvan.stefanescu@nxp.com; x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM3PR04MB1380;7:ktyLmxvLehtCL2a8bN4Oz1FZq+KmuOEoev6mz/bzB63p6TiErDPalfvcJAmRDdDDr1ITGiEKPBLPdyidg3jCISuFtlxo0Hc9pq+EdfFGswvU11B5KS+K8VtWk9jZI3srSxOKqayUWliGMBeBgVG7XulFsyEvJTKQvmtPnjaboRal6ftL7q0W04rbrqYM4VV2x9vaTKkjp61DxizQBk71Gn3noqYyYtJck7xPBoW9SlYf2eRKnebp4n1VSjrgi1+6 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a14ec9fd-215b-4a46-2a4f-08d588f5fa77 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM3PR04MB1380; x-ms-traffictypediagnostic: AM3PR04MB1380: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231221)(944501244)(52105095)(6055026)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011);SRVR:AM3PR04MB1380;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB1380; x-forefront-prvs: 0610D16BBE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(39860400002)(39380400002)(376002)(346002)(13464003)(189003)(199004)(6916009)(7736002)(2906002)(2900100001)(7696005)(66066001)(316002)(5250100002)(3846002)(6116002)(81166006)(81156014)(3280700002)(76176011)(8936002)(68736007)(9686003)(55016002)(6436002)(5660300001)(106356001)(53546011)(102836004)(59450400001)(97736004)(54906003)(229853002)(86362001)(99286004)(105586002)(33656002)(4326008)(2950100002)(8676002)(6506007)(3660700001)(25786009)(74316002)(478600001)(26005)(14454004)(53936002)(305945005)(6246003)(186003)(39060400002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB1380;H:AM3PR04MB0743.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OkgXs2pK+NjlEdF/7VvxcBEjzEZJ+2FWGk9oaSFIPnfenRDnjzuwAutPW/6/DembOR/Z20AEjwwFs7LQY3tt1rB73Edop3jxznBpEzQ9yGQ8WAU3Wti89oWcu30subNVC36kNUqwf0TPPndsq6GPX82xLxNdVgWs4AH2TKBCX64lV+SAOlG1X3YZyKkruEUGul9C/jsD5S/4vZYtIm5RRExDEz0WBwRbHMoG4+MddShspYs5Pyk8+OwEddimqwp8cP/WOmO1TAKOoF2wDmJbknE7EmWxiFtk+5c6vnhIOGQNrnM0qzH47se9xHynOgikfO35wJMsPitdMJWpf5aOUA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a14ec9fd-215b-4a46-2a4f-08d588f5fa77 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2018 15:20:38.7178 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1380 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Andrew Lunn [mailto:andrew@lunn.ch] > Sent: Tuesday, March 13, 2018 4:23 PM > To: Razvan Stefanescu > Cc: gregkh@linuxfoundation.org; devel@driverdev.osuosl.org; linux- > kernel@vger.kernel.org; netdev@vger.kernel.org; Alexander Graf > ; arnd@arndb.de; Alexandru Marginean > ; Ruxandra Ioana Ciocoi Radulescu > ; Ioana Ciornei ; > Laurentiu Tudor ; stuyoder@gmail.com > Subject: Re: [PATCH v5 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 > Ethernet Switch driver >=20 > > +/* For the moment, only flood setting needs to be updated */ > > +static int port_bridge_join(struct net_device *netdev, > > + struct net_device *upper_dev) > > +{ > > + struct ethsw_port_priv *port_priv =3D netdev_priv(netdev); > > + struct ethsw_core *ethsw =3D port_priv->ethsw_data; > > + int i, err; > > + > > + for (i =3D 0; i < ethsw->sw_attr.num_ifs; i++) > > + if (ethsw->ports[i]->bridge_dev && > > + (ethsw->ports[i]->bridge_dev !=3D upper_dev)) { > > + netdev_err(netdev, > > + "Another switch port is connected to %s\n", > > + ethsw->ports[i]->bridge_dev->name); > > + return -EINVAL; > > + } > > + > > + /* Enable flooding */ > > + err =3D ethsw_port_set_flood(port_priv, 1); > > + if (!err) > > + port_priv->bridge_dev =3D upper_dev; > > + > > + return err; > > +} >=20 > Hi Razvan >=20 > That is not what i was meaning. >=20 > brctl addbr br0 > brctl addbr br1 > brctl addif br0 lan0 > brctl addif br0 lan1 > brctl addif br1 lan2 > brctl addif br1 lan3 >=20 > Is there somewhere in the code which sets the scope for the flooding? > lan0 can flood to lan1, but it should not flood to lan2 or lan3, since > they are in a different bridge. I was expecting that > ethsw_port_set_flood() takes upper_dev, in order to configure which > ports it should flood to. >=20 > Andrew Hello Andrew, The current driver implementation uses only a single FDB for the switch, so it is not possible configure multiple flooding domains to accommodate ports partitioning. =20 The configuration that you mentioned will be possible when support for multiple FDBs in the switch is added. Ports added to the same bridge will have their flooding domain limited to a specific FDB. Switch ports partitioning is a feature on the roadmap. I will add this information to the TODO list. Best regards, Razvan Stefanescu