Received: by 10.213.65.68 with SMTP id h4csp2371360imn; Mon, 2 Apr 2018 06:26:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx48K+SJCzD7ap9Zn5P9/iUcjKEuq5nFX93J+T0VJK6e0d7CbN7Y2Ic/IEktq39j5wMkXOLqr X-Received: by 2002:a17:902:ab81:: with SMTP id f1-v6mr9718452plr.5.1522675594021; Mon, 02 Apr 2018 06:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522675593; cv=none; d=google.com; s=arc-20160816; b=I5ShsVYhVvmxo0s73TG58cHXZpCaPTlzzBI19hl0qjtRkv4H7AOZUhpOJiH2K1fuRO ZYpzq6XKkaP/z0AsgKLCf0ANKj+6OA8rQBlo985vJVSnZk8oA0UayVzPoUzYL7B1CYuo cZ3MawuzSd3AIQhIyV4A3ZPABGzPzZjGmsuGfKVyQ0PQY+6qf6DKSaLUcp8wX5BVfdJQ wULwnpcEt7aQ0Q6eJxKRKvEqgY13PAFHwu3zAMsk3XpbgIAkYvjqLsB6tBLP/BasGkSp aCy507eDiNCdnm7yHt8HNNuBXY+OdymFA6BZ2LEjDfFN7GWI42KD/dMm59SJ6qoYZmZB feNQ== 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=pG3eMTrMJVgfYjR9bgyRlVHIxOVqtM7h2iS1I6h8xC0=; b=fPzFuq5n0ZcxtGpjoH/G9dEP63l6q1c7pixvhxE7V1jipyuSYTFibMTmsSJAPlPbH7 J4QaG6aD6fBlSvouuUq2tJti0mTbJrloeyX+e3/8xxHqpq8BuDgGyFJR2N1SewWHZ9YA Mi5MzL9m6600geEPnIM85Gtq0yiVRYUTjMc11SZrZU2ZZaFxHxzjcnKHMjmbmTq0u7mW 37byqOpf6GhY9sbBvgWHiNm06/al8cXOHCmbVdrM1GJHUxh+U/UOdccodv3h86LmAwGT Z4tAAuekZAxKEvd9ZciAauWk69er2h9SStXMWB4CwhQki70N1F9ewU80Oj4CYTuPS15c KHMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=KGKuOG2U; 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 t6si229824pgo.630.2018.04.02.06.26.19; Mon, 02 Apr 2018 06:26:33 -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=KGKuOG2U; 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 S1751249AbeDBNZG (ORCPT + 99 others); Mon, 2 Apr 2018 09:25:06 -0400 Received: from mail-db5eur01on0075.outbound.protection.outlook.com ([104.47.2.75]:26818 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750724AbeDBNZC (ORCPT ); Mon, 2 Apr 2018 09:25:02 -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=pG3eMTrMJVgfYjR9bgyRlVHIxOVqtM7h2iS1I6h8xC0=; b=KGKuOG2U4ReyqF43m/D9T1BhWBUW4vR6lphSOit3PmaqAdvrd7VfdzMqGEILYH04/F4xsW/T9tRUkun7pBILWKfY/Z9EQLcB+jLISA8iGrr8pKEgN8mOFIowOhR2riEu0zP7WKrXL7fkmvG16c/Zc2ydQ6A684jIjlQ4fGO1fmI= Received: from HE1PR04MB3212.eurprd04.prod.outlook.com (10.170.253.152) by HE1PR04MB1129.eurprd04.prod.outlook.com (10.162.27.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Mon, 2 Apr 2018 13:24:58 +0000 Received: from HE1PR04MB3212.eurprd04.prod.outlook.com ([fe80::f883:80a3:fbf3:3d70]) by HE1PR04MB3212.eurprd04.prod.outlook.com ([fe80::f883:80a3:fbf3:3d70%13]) with mapi id 15.20.0631.012; Mon, 2 Apr 2018 13:24:58 +0000 From: Ioana Ciornei To: Andrew Lunn , Arnd Bergmann CC: gregkh , Laurentiu Tudor , Linux Kernel Mailing List , Stuart Yoder , Ruxandra Ioana Ciocoi Radulescu , Razvan Stefanescu , Roy Pledge , Networking Subject: RE: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support Thread-Topic: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support Thread-Index: AQHTwr0rRbeSymdCeEiXdPiYqeyzd6PfBFwAgAPKwGCAAwJ/AIAADHGAgAenJTA= Date: Mon, 2 Apr 2018 13:24:58 +0000 Message-ID: References: <20180328162811.GB15827@lunn.ch> In-Reply-To: <20180328162811.GB15827@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HE1PR04MB1129;7:/7RvhK5A3WVcU4cOYhfH1JBv3tOvinvj5y8vBMp5LLJgKsOEeyqkDEZvIBc/evae4GWPb0nBO64de8woi9fTXUb3moJiVPQBxQIMEjOUdnNu0kTxNstocwG113WL0xeEBnCmecFrBe2hsPsIe4wioofxwr4/liOgozohkIlWL0EXIIj3OopbV0HKZ7Lydmc/Mc9lDyCcYJbP26s5KKmBrVcCfdq0TnNe6++rVSEpofN23Re0kf/Ip4zOb0YV1IhT x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: e72bd5ba-0f13-47e4-0b86-08d5989d21a4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:HE1PR04MB1129; x-ms-traffictypediagnostic: HE1PR04MB1129: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(84791874153150); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:HE1PR04MB1129;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1129; x-forefront-prvs: 0630013541 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(39380400002)(376002)(39860400002)(346002)(189003)(199004)(7736002)(8676002)(39060400002)(486005)(486005)(11346002)(476003)(14454004)(2906002)(2900100001)(446003)(4326008)(7696005)(8936002)(5250100002)(93886005)(76176011)(97736004)(99286004)(305945005)(81156014)(81166006)(74316002)(86362001)(6246003)(54906003)(68736007)(6116002)(66066001)(316002)(3846002)(5660300001)(53936002)(106356001)(186003)(9686003)(55016002)(110136005)(6306002)(3660700001)(25786009)(26005)(105586002)(102836004)(3280700002)(229853002)(478600001)(6436002)(6506007)(33656002)(6346003)(966005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1129;H:HE1PR04MB3212.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ioana.ciornei@nxp.com; x-microsoft-antispam-message-info: 0BBBoIMqX6ppqOfj3ZxgqW+/QGt9F9yJ2CJiB0KDXBdBeKmTuS4bBEmTz/PcnbU6bXfxPXGiyqgvbLe4UXgiCwH/jBQmkKIi04CkR9ArhYI80/aX4+2BoWwsXZCkMEYTjtNZzv6Vs9a3lQI7fgnha09jJy3mHENmqb0sfLdNBHi0+IyRs2yLRXyb8ZV6ktQjZMWy1bF6bFfXP0KaBhxcBj7bG3VKwsn4wVTomtEkwqioU2gH0LVVQG8B9e0W+3dlPO30V5HUdSEt3ShUK9+hrEXBG5Qt58FJ9M9mMYBO+Kc6Evra6fk3DpjliSt2kwcIyPw+kNJjOFVp9Qm1kxPIVGToaHfzF8Z3rYJbS+5dx6pAckkGrjgWV6xpAuqFARxfM0e4S6FQAfdNFsefVncJaqo2eOtWuC7V/RzRfPHNLXQ= 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: e72bd5ba-0f13-47e4-0b86-08d5989d21a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2018 13:24:58.3073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1129 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > > I'm still not convinced either way (high-level or low-level > > interface), but I think this needs to be discussed with the networking > > maintainers. Given the examples on the github page you linked to, the > > high-level user space commands based on these ioctls > > > > ls-addni # adds a network interface > > ls-addmux # adds a dpdmux > > ls-addsw # adds an l2switch > > ls-listmac # lists MACs and their connections > > ls-listni # lists network interfaces and their connections > > > > and I see that you also support the switchdev interface in > > drivers/staging/fsl-dpaa2, which I think does some of the same things, > > presumably by implementing the switchdev API using fsl_mc_command > > low-level interfaces in the kernel. >=20 > Hi Arnd >=20 > I agree that switchdev and devlink should be the correct way to handle th= is. The > low level plumbing of the hardware should all be hidden. There should not= be > any user space commands needed other than the usual network configuration > tools and devlink. >=20 Hi, The commands listed above are for creating/destroying DPAA2 objects in Mana= gement Complex and not for runtime configuration where standard userspace t= ools are used. Restool is responsible for creating objects in Management complex and this = process can be seen as the equivalent of hotplugging a peripheral rather th= an configuring it, thus there is no standard userspace tool to handle that. * The Management Complex is configured to create a specific set of DPAA2 ob= jects dynamically through Restool (by sending create commands) or staticall= y, at boot time, through a configuration file (Data Path Layout file) * The objects are then probed and configured by the corresponding drivers * The objects are controlled at runtime by the user via standard tools (e.g= . ethtool for network interfaces). =20 I hope this gives a better understanding on the DPAA2 hardware and software= architecture. The fsl-mc bus documentation gives more details on this: htt= ps://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/Docume= ntation/networking/dpaa2/overview.rst?h=3Dstaging-next Ioana