Received: by 10.213.65.68 with SMTP id h4csp156172imn; Mon, 12 Mar 2018 22:52:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvb/tKr4GXbhEwIzdeC0gde7mb74O7d6wzMyhnV4hG70ZW1xOVoC27R20euSRpqTyey0cwr X-Received: by 10.101.65.71 with SMTP id x7mr8810761pgp.203.1520920366032; Mon, 12 Mar 2018 22:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520920366; cv=none; d=google.com; s=arc-20160816; b=yrbVJI9qxK3K+eC8G4CwnmeqD0JSpZfMlPj5TkqL5pKElFLc9SQ2UHA1BCbAR3K7S0 xf+Si2WYA7XH3Xm6y5bOYWGSdAcsQIWSSlrePaSozuXV1/2ZLmvnJSxor0SFaeRNgymi phX1TxRjCe0aOonFR9w9uUU2G2wjYKJL/braEGX7nPVDMCm6GOVVDOy+t0JfTcOALEB+ /bu52DGJ59iaCMPRAEubJtOmPadG9dmvH/tYW0LBpjm1tglduh2mwgXNrxMMbkCNXDm7 gJaKirTYsdW2JqIoW0Jfbyxw72dpg5vujX1WtjNEf3vtbtehaX7LgcWpyf0sDhCEfejv zSNQ== 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=d7LwqY4i4Wxeh2gBT/pvYiKCaH+OA3tF4QI5V3erSrk=; b=OlOZ8QOv3sCvNupOR/EFIDndTrxRuTROXBs+RqBdtZXixVrOxeEIaMpxjUpeB6v24F +O57/LEMt1nkvPIoEr1ILxaykmsdSyWshGS5p3C3YOqesNxbMiUH0Bu1mTUp31k4uQyn hOuR/Tm85L4lwFj/ddG4Sx34LAyxP59dsT9FWmQMKYYf7ExMGzs8PTL2FekszMZ+OD0v MN8+tEjBmVSUEKYggmO+ClWf/eKuD7bsX72N7Ii9I7hAnU55iqV28bqZS0kxsz5V/HlX jvI847UnQ+b1Lq+YbMayjnaN4Cs5w+E43S0AstPEU3sD2dpy2pR6P1DfCfkDCa+foyyZ b84w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=L4cMp3kU; 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 a1-v6si7213138plt.549.2018.03.12.22.52.31; Mon, 12 Mar 2018 22:52:45 -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=L4cMp3kU; 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 S1751806AbeCMFvS (ORCPT + 99 others); Tue, 13 Mar 2018 01:51:18 -0400 Received: from mail-ve1eur01on0083.outbound.protection.outlook.com ([104.47.1.83]:37632 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751723AbeCMFvQ (ORCPT ); Tue, 13 Mar 2018 01:51:16 -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=d7LwqY4i4Wxeh2gBT/pvYiKCaH+OA3tF4QI5V3erSrk=; b=L4cMp3kU6zDncuDRUc1Ju+8ZAd3KD6rVOdVPB5ynqIpPPcLfijcg7kywgoMxpI+Tx9NCCeBDTCG8aw9GAbzWMkreRX0R+OkpOfWUecZrlvk013T60sbon13C3jtXQrQwIvXuNbkYR1lt3QZXb/Uep42lBGmdqS2ex49SokPFJVI= Received: from AM3PR04MB0743.eurprd04.prod.outlook.com (10.160.5.23) by AM3PR04MB1313.eurprd04.prod.outlook.com (10.163.7.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.12; Tue, 13 Mar 2018 05:51:13 +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 05:51:13 +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 v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Thread-Topic: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Thread-Index: AQHTug+U5raiWiQO4Ue3AwT4ZMsTrKPNqhaA Date: Tue, 13 Mar 2018 05:51:13 +0000 Message-ID: References: <20180312084955.12686-1-razvan.stefanescu@nxp.com> <20180312084955.12686-3-razvan.stefanescu@nxp.com> <20180312143654.GB21068@lunn.ch> In-Reply-To: <20180312143654.GB21068@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;AM3PR04MB1313;7:0zeVwIVlYIqc3w9BBZkKk2GvEyDy+Vqv2JtkPUuZlUDLcnH3n7IKIZwjoY2L87bvw30yWwkC1BDJJjYRpzsmP9olOHmjk1TRHTEcD4aFFccHRWkYir1HtvO95/Xj8nsVfQUXZbFi/G06XIQv2wLqjGJ3QdIU1krnI4HzXBrdMJkibf7NauBGdJdvMwGOqwIZ2OtVhxWB1KM5FaNh2Bdk7C7LtM9iTKZfY+TdBleqLUAe8qmd4oWFWSordlNXNzXB x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fa160fae-11b4-40b4-7c7c-08d588a66e31 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM3PR04MB1313; x-ms-traffictypediagnostic: AM3PR04MB1313: 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)(93006095)(93001095)(10201501046)(3002001)(3231221)(944501244)(52105095)(6055026)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:AM3PR04MB1313;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB1313; x-forefront-prvs: 0610D16BBE x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39380400002)(396003)(376002)(39860400002)(366004)(13464003)(189003)(199004)(6116002)(3846002)(3280700002)(5660300001)(316002)(8676002)(74316002)(25786009)(345774005)(229853002)(305945005)(14454004)(478600001)(7736002)(76176011)(81156014)(106356001)(68736007)(86362001)(81166006)(2906002)(4326008)(39060400002)(7696005)(6916009)(3660700001)(2950100002)(102836004)(33656002)(105586002)(2900100001)(6506007)(97736004)(54906003)(99286004)(6436002)(186003)(53546011)(66066001)(6246003)(26005)(53936002)(9686003)(8936002)(5250100002)(55016002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB1313;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: nPzRHVR9lOnumzw4TUsH9pSdYxLkhwbuS7pLdvtIVKLJo9lz/dYX2O97uVCLQutEatDNutkqjc5s8gclWWWD9KMYKBZmx1PLtMSccow7gfd+2BBqNRTgLwU4u/jwevsO+z7gZDnRAt7V5WPM0s6l5Zn3y9SINgVDTB6q7aRpO7l/GXd5fQV04kDekjh2WLP3b2ZxyKPCkaZo7Hf/QyEukxFKnXx2pXROOVUd+q1/VodYxVws+IlRvSqBXHbgDGz6R3CICQsWutufH/k2tkkrKCE9AGuOlbhnOp1uP1qbZXCF8CfvnBLlJSl0S3Jx3JiU6uWWXUzz9vkIBDynWzu3Ag== 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: fa160fae-11b4-40b4-7c7c-08d588a66e31 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2018 05:51:13.6228 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1313 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: Monday, March 12, 2018 4:37 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 v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 > Ethernet Switch driver >=20 > > +static int port_netdevice_event(struct notifier_block *unused, > > + unsigned long event, void *ptr) > > +{ > > + struct net_device *netdev =3D netdev_notifier_info_to_dev(ptr); > > + struct netdev_notifier_changeupper_info *info =3D ptr; > > + struct net_device *upper_dev; > > + int err =3D 0; > > + > > + if (netdev->netdev_ops !=3D ðsw_port_ops) > > + return NOTIFY_DONE; > > + > > + /* Handle just upper dev link/unlink for the moment */ > > + if (event =3D=3D NETDEV_CHANGEUPPER) { > > + upper_dev =3D info->upper_dev; > > + if (netif_is_bridge_master(upper_dev)) { > > + if (info->linking) > > + err =3D port_bridge_join(netdev); > > + else > > + err =3D port_bridge_leave(netdev); > > + } > > + } > > + > > + return notifier_from_errno(err); > > +} >=20 > I could be missing something here, but don't you need to pass to > port_bridge_join() which bridge the port is joining. There can be > multiple bridges, so you need to ensure the port joins the correct > bridge. >=20 Thank you for noticing this. I'll add proper checks in next version. Razvan > Andrew