Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp959807ima; Wed, 6 Feb 2019 11:11:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IbqWxC2WvxQm8ez6TbtcVjNVjE0EZvuiBftymq2Nn87agTFzYJXcA1m5/Sg9clowL7HXgt/ X-Received: by 2002:a62:9fd9:: with SMTP id v86mr11958827pfk.191.1549480305450; Wed, 06 Feb 2019 11:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549480305; cv=none; d=google.com; s=arc-20160816; b=cXvWv/ZUcsr7o/gpAU7kchpUfnlEj8M7ZcywIUBwZ4wEU9jxSYVjx7TUR9tksCNT81 EiBmgsxRqfDsftzrRhXlKs1x71RqWuA0P8oPxXVSLhgUWI1P1gNwBhHsWVs2D4SlcqcO ACQMc363IHSxNms/6wa2Bjq4X19lAHrKuurJplyc+GJim+QXDlG32r4ZTbkl0lQpY96h bThMzP0zzbMWtOcNRzrwROtUFcCTjRNUab037D/pUqbAD9CKz8HBSbf+Jofoht3yFTQx dEV/9XIm4Ppe0JHv+QqpQ1iA6Lr/DzX7/xiLbAPgPzjs1ykDOU6CDLXI/Pngvz1YSaQr FzcQ== 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 :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=4WUrlRyTPx9ms/obiKo4Y3M+wr2OosRYgHONM+0vVlA=; b=T4YS3xgnvefcxubxD9S8HjAfdkB7PP7yuWI2nlCZ7fTBImUW4gm21bTIML5smpJILh TQF0A7K5QxfncPpMNyUotQqmd3luzSoWGZLQdhAiLKGMuGDsHlOsWSPQCsj5ezlOK+2Q 2TlUc6Vp7UqPdYvgG5i9kwykwYtUtsvW9DNOXIiM6G0efkziFmPQtA1LESP5VCGTbMRs gXMvDBN2NxITF+IqxgQ2dz4oO1LC+KDiX4f0ApqSIcz2OPhWnzCVj8Mm3FbfT7/KzhVK 40GifPQ1db1zHUGvHu7ycic6MXnFx7miyLxX9yDm+h843JMjFwjLG8SbxPSh/yyg1Ohq 0g/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=cYoZ7GuN; 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=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si6997145pls.16.2019.02.06.11.11.29; Wed, 06 Feb 2019 11:11:45 -0800 (PST) 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=@Mellanox.com header.s=selector1 header.b=cYoZ7GuN; 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=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726925AbfBFTLB (ORCPT + 99 others); Wed, 6 Feb 2019 14:11:01 -0500 Received: from mail-eopbgr80071.outbound.protection.outlook.com ([40.107.8.71]:46464 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725928AbfBFTLB (ORCPT ); Wed, 6 Feb 2019 14:11:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4WUrlRyTPx9ms/obiKo4Y3M+wr2OosRYgHONM+0vVlA=; b=cYoZ7GuN8Xg2/H+O0pJU+9G8QvSe9DKDHK4CZ8qatjZ6zC5Eggk8BdY7Hfs/r05Z688CZStiNjlKYQbMf+XMsf5ihRZy/1tVeR+05UO1KhSuwSa7UBDQY9IMiJ58ZKEzD9TkjiFpSJeZF+Hu61LQ1otJzP1HVivqImkzHsS8sO8= Received: from AM6PR05MB5240.eurprd05.prod.outlook.com (20.177.196.214) by AM6PR05MB5016.eurprd05.prod.outlook.com (20.177.36.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.19; Wed, 6 Feb 2019 19:10:56 +0000 Received: from AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866]) by AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866%5]) with mapi id 15.20.1601.016; Wed, 6 Feb 2019 19:10:56 +0000 From: Ido Schimmel To: Florian Fainelli CC: "netdev@vger.kernel.org" , "David S. Miller" , open list , "open list:MELLANOX MLX5 core VPI driver" , "open list:NETRONOME ETHERNET DRIVERS" , "open list:STAGING SUBSYSTEM" , "moderated list:ETHERNET BRIDGE" Subject: Re: [PATCH net-next v4 01/12] net: Introduce ndo_get_port_parent_id() Thread-Topic: [PATCH net-next v4 01/12] net: Introduce ndo_get_port_parent_id() Thread-Index: AQHUvkPXEtsdn4gDAUWZIN6ALGcZ+KXTItUA Date: Wed, 6 Feb 2019 19:10:56 +0000 Message-ID: <20190206191054.GC14340@splinter> References: <20190206174546.23597-1-f.fainelli@gmail.com> <20190206174546.23597-2-f.fainelli@gmail.com> In-Reply-To: <20190206174546.23597-2-f.fainelli@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0402CA0012.eurprd04.prod.outlook.com (2603:10a6:203:90::22) To AM6PR05MB5240.eurprd05.prod.outlook.com (2603:10a6:20b:64::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.229.58] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM6PR05MB5016;6:/hnBOOZcxK1yM5L3UgWuFjY/qZFXwmqLWADkapzjG44A0UI4wHUA2UonMg1qFgLfcyZgUG2OdYjiZPSZHCPND+M1OX3RllVeme7nXpHLmvVyj3J+4NcT3lCnlj3q6RJr4QGqaWRmq2bnalCUIShxx/JQDfTkM+r4+W45WEIBjF7JBtBXALDHNLt9ZiC2Lhd2lrpMpM/pceuthnbIsJ1KV9XwBov7pghmb1kO/1Mji7HBiPsVpiwMj8LCwIXed8/z7DYDmCX1jzOfyt4X+k0rY6FEjiCsA45IreCXxaSdzNXpJPiWrcqqYaC7pEwvjyAI9ws7ejXG8ntQHimExmA+ZT6adANS2XRFMxjfuf+K31zPH+ZAVCcDbfS2NlkKimwyqqy8GCZwdoSPOlTDTPqZHfWxJAGG4401+xryWQfpflmSo2V9/ZfRwBHnOvoNLjaFZiv2jlXt3RjBsyn8iAEEvQ==;5:7R+VjXWOl7pylLrGj4DiLJ1k3/Hofx/7m/OK+OWpa0futY0nsGaLNSrjSOzZqrPX4e0UdPyynkUT/VIKhfM22LuaqpXrPVjsTEySKKuEu9F2W/bNANC/cVT5Veg3AT2sy6spEB9BzOiE0VY2k5fnARObNGxVQqqqZTNewV1DKtxrfhsIJiGeJph0sC0ox82ntro3Ik21JO706EdnKNV7QQ==;7:c1VtRztTEUseEbOYh5xd4daJC6Z3Vkr9EfVzTwDNTxp5bi2Ks2wSiWIN9xwX+pIAzyKVFsFQz9krkRPBUpxInUZArwOC2Rg4VQODiWx8GgBB91M9sYPdUNmgZjhN/DTZiOw4MbGal+sTy+Yf4EwLSQ== x-ms-office365-filtering-correlation-id: 3ca506ab-1ff6-4ad3-7ba5-08d68c66d26e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB5016; x-ms-traffictypediagnostic: AM6PR05MB5016: x-microsoft-antispam-prvs: x-forefront-prvs: 0940A19703 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(39860400002)(376002)(346002)(396003)(366004)(136003)(189003)(199004)(305945005)(256004)(54906003)(26005)(71190400001)(71200400001)(33716001)(316002)(6246003)(102836004)(229853002)(6116002)(3846002)(2906002)(186003)(6486002)(99286004)(97736004)(76176011)(25786009)(11346002)(14454004)(8936002)(33896004)(68736007)(386003)(446003)(4326008)(6916009)(1076003)(476003)(8676002)(6436002)(478600001)(7736002)(66066001)(6512007)(9686003)(486006)(86362001)(105586002)(81166006)(106356001)(33656002)(81156014)(52116002)(6506007)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB5016;H:AM6PR05MB5240.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ncgsErdinSL5bm2UpYhDIY+9HzRs4oZKBHL7ndQNE+QButh7HBi6/u1uUcnUewqDeFowfsgeDVe5WPvnyj/SHG6f7/KUv7p7X9aMtW0klCW5XLgwZHmRQGCcCgWwGoUhZfMNJYqqMD/Yo46sKrDEzqyJCRFp0cNL02E2hQ8kYi2Jz/gYRZ6hdUkBj7F39B9/VBfxuDSp5L1GxvnOP+vpg6bFHhPSTAptIjD7I8ANDu+XtC0WLm8ewtfY8F5m982uPmQuS+kA00IV0YVbwHC6VZHILCJJd1NTtS//p4v92kvi15/7b3KwM/Aal0/BwVm3IgWB5s1dLoH9Kq0ilaSDplgFLDWhSw/O8TMiQGSrPzJPl7oT6vSfIrVEeBaj2U0bG3d5CeAM/YFGjXArR0u+FLyvgxTTo3xSJUUeXtB0n5k= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ca506ab-1ff6-4ad3-7ba5-08d68c66d26e X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2019 19:10:56.2221 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5016 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 06, 2019 at 09:45:35AM -0800, Florian Fainelli wrote: > In preparation for getting rid of switchdev_ops, create a dedicated NDO > operation for getting the port's parent identifier. There are > essentially two classes of drivers that need to implement getting the > port's parent ID which are VF/PF drivers with a built-in switch, and > pure switchdev drivers such as mlxsw, ocelot, dsa etc. >=20 > We introduce a helper function: dev_get_port_parent_id() which supports > recursion into the lower devices to obtain the first port's parent ID. >=20 > Convert the bridge, core and ipv4 multicast routing code to check for > such ndo_get_port_parent_id() and call the helper function when valid > before falling back to switchdev_port_attr_get(). This will allow us to > convert all relevant drivers in one go instead of having to implement > both switchdev_port_attr_get() and ndo_get_port_parent_id() operations, > then get rid of switchdev_port_attr_get(). >=20 > Acked-by: Jiri Pirko > Signed-off-by: Florian Fainelli Reviewed-by: Ido Schimmel