From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EC9EA0C44; Mon, 12 Apr 2021 10:29:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AD80140FCA; Mon, 12 Apr 2021 10:29:59 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2054.outbound.protection.outlook.com [40.107.92.54]) by mails.dpdk.org (Postfix) with ESMTP id F3DC7140FCA for ; Mon, 12 Apr 2021 10:29:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCOTJ9RBsS/Gtj4z7Gj4jFcncyy0h/NFQ7sXu6s9wZQEVXw5COrEbpN3MBqPlL9T1orM9v6RRmJdv71KxzEPn4hw8arntZXs9DYZmIi3N/RIkJJQ7817VFWJQhYpMjW99YkdLjwtHUKRomJEZz3TxZvoR1YCV9t7ErQ30UhZK7opMLnNw5rxdWNIZYXLDipWCR3wja1Tztc24WlvIPoELKmPS8Lc1iT2JZwqlxruKk6E9+ov8vmCFSiLVqTPT5ftfSNwkuV6AUBnwniNWpBaxvZLiaOGeElcwGOtWZ0rs5N0C90UwjSG5V3oYT3ZkDYoLXPe+/I/mQBI4kZ7nlltdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8jsOthZgdbHaclVLQNhOol3JjwxZCik2l34MmsjEmfY=; b=eX5o97OUnPjNWuV0ZY63PwJjDF5qeLqKBsWnlX13s9SFGiJwJsYae6enfatM3OXH5zsFN9ErASGIckdad74KeZxjmYJXyjtg9vUba74kOIL2smR8zjS+xnCZ17At8Ge0Vlrfs6wJuPn23+/aXjRFbKa5sKaa4gpyD9Z5xB6FzlHDX+vXHsP20Y9DNPzIM4R9KQDFfIt9HgM8otn5AeewOK4o6s5DLFokH/ru+almauYUfYhZTMFUHnQecx3AEVqnrhzJYeXn/a1u5330Z0XJz3z8Dfpc+t+5Zv9peWRth9utQScjC+bziqMyS+jw4yhVWUSIEjP7AvdOjm8j75KGhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8jsOthZgdbHaclVLQNhOol3JjwxZCik2l34MmsjEmfY=; b=s8GI4CXE9f6BI0zlwNcNuCe8e0iudZ3dhXCXvl1LHZnOWW9VOof/CW8jd1Y9E+6/7DWbOu+N0K0AorwdJZLerQtDJ2IQkk7foVvDCdgyJLzj4HhWi6PWS9ylwwWDLZ/Lwbz7c1W1XYx1iWl2oPWzDQvk907gEhad7PoLnnLXL2CKpo1O+7VUbQTbsd8ZgmN6cH52XsQW/p78ughQgHPeKVIESVzRjBmePcDTBKuEmzXAK5Vq9I9UKohyMpyEHuRt61yL0Z0pohqLKn2KMWL2vo1sddzc2TcXU0qX2WiBZ+IZ8xDPro0CwysG7TKsWOD1Ch3KLEMoErC2UNiCYSEykg== Received: from BY5PR12MB4324.namprd12.prod.outlook.com (2603:10b6:a03:209::10) by BY5PR12MB4901.namprd12.prod.outlook.com (2603:10b6:a03:1c5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Mon, 12 Apr 2021 08:29:56 +0000 Received: from BY5PR12MB4324.namprd12.prod.outlook.com ([fe80::b919:53f4:6757:331c]) by BY5PR12MB4324.namprd12.prod.outlook.com ([fe80::b919:53f4:6757:331c%5]) with mapi id 15.20.4020.022; Mon, 12 Apr 2021 08:29:56 +0000 From: "Xueming(Steven) Li" To: "Xueming(Steven) Li" , NBU-Contact-Thomas Monjalon CC: "dev@dpdk.org" , Parav Pandit , Ray Kinsella , Neil Horman Thread-Topic: [RFC] bus/auxiliary: introduce auxiliary bus Thread-Index: AQHXFnbDirYEodb9l0OPxds995sF/Kqwvjkg Date: Mon, 12 Apr 2021 08:29:56 +0000 Message-ID: References: <20210311130113.31382-1-xuemingl@nvidia.com> In-Reply-To: <20210311130113.31382-1-xuemingl@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [240e:46c:230:e0d:f0b5:2601:d111:e6a] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f2787096-0301-462e-97e5-08d8fd8d2788 x-ms-traffictypediagnostic: BY5PR12MB4901: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:425; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: C9y7U/HUSZ5O0iO5Ww8CF/wELwBwZItpHMZuvMW58X9tlli4+36zAiLGnRqDNdH8imK+p0bj7veNeg9+bRoyvjrRUY7iONJdHaVqgXGwYUP2xraZhJ+vowkwxMTsI1JReabUy98SwJ8VTphBviZZj0ArFsMDr+m3lEHqczHcIuzxIlDp4L/K50rcWumyjARO/3oHXeS4wxoW0C1UbQirJJhODEbfuqHNyS22tEVIb8l9v4BI4Q3UuTnYyATpaSq0yRsxyL3M86JrbQjh3wsliCoKF5mK+bnyRJ9jpVQKxJ5oU+tEHs42r/CyzXvcy2GJIKwl1KNn12iJYGV7vhUVuM/Hfc80lSATy7L6IQyca8n1Tx71appfXGSxhnfT1Qdn023VLGrONxahq/hfBnrpOxqV5wiriy/Xst6EJQtBac6SmOdWxbJkxU1RH8VpRZl89CfOCX6LQ5LBXwI8RDLY5wH1kzDLRmqvY78dRnC8q0HtpBTqxg1LujwpXj4cCbVShH+Dklt3ftyxJoq4aCOVoM8I5QM4ziEAp5hfiSSRE5eZfSQjgXos7TSX3SNEsarc4UtoEr+pdxGUbkgG+sN4KK3/CDbmbOy0IZkv+BwHjn0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4324.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(366004)(136003)(346002)(396003)(33656002)(71200400001)(55016002)(8936002)(52536014)(9686003)(86362001)(66946007)(54906003)(110136005)(186003)(478600001)(38100700002)(5660300002)(66556008)(66476007)(4744005)(8676002)(83380400001)(7696005)(316002)(64756008)(4326008)(6506007)(2906002)(76116006)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Uvms+2r1Kl3Sb04OxEAUMW5/J9sJ7Mo5qF1V5oRiZcrerpKj7X+jd+H8pnh7?= =?us-ascii?Q?nP/3i33f3qBxnU/Z88Ehtg6C0YiGglbpGb+w8nFyOZmhH1L2IptW0BDkF36E?= =?us-ascii?Q?ZWLowXv6ylEUaubzHeo8FLC/T+VjqZYhYTCjMIrNtIkhPLj+rsAQVsa5Lw1H?= =?us-ascii?Q?dOJpYSND+N4IelZaUVksywd3kx8pzwHX4QrFR676lZYGeq+o9gPzahMEZRGT?= =?us-ascii?Q?GJFUT8rDNOIz3muMc9Y7fgP7lm0M7ixuRuc9aj1ZBsPVVWA91PTBXFHAvX60?= =?us-ascii?Q?Nn9xZZOH2oldittQnbwM/BTLeBfZAPWmTNz/+LgGziRfvn3J4Bk63fYT2Wr4?= =?us-ascii?Q?cHnW8PmiMzWQT5xPASNQ4kOfATgbHnt3a5PvqqmRR1k4OLaLv36bg1ARQ9eV?= =?us-ascii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SSIRI6t?= =?us-ascii?Q?a4puhqo2CtvEcPbujTFY/RpLnxe4UJxpizEgiurk19m31iNg19/JQhhH+eKS?= =?us-ascii?Q?QoPSKSc=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4324.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2787096-0301-462e-97e5-08d8fd8d2788 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2021 08:29:56.6552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +GBoUI6Rl8+LV5x/4ZR0fP45s+ikMFS8DMqUf0n2f/YJmGeHqHkLXMNaCED+gFN6KPsQdqW4KVOBPcWHNjybHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4901 Subject: Re: [dpdk-dev] [RFC] bus/auxiliary: introduce auxiliary bus X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > +/* > + * Test whether the auxiliary device exist */ bool > +auxiliary_exists(const char *name) { > + DIR *dir; > + char dirname[PATH_MAX]; > + > + snprintf(dirname, sizeof(dirname), "%s/%s", > + rte_auxiliary_get_sysfs_path(), name); > + dir =3D opendir(rte_auxiliary_get_sysfs_path()); > + if (dir =3D=3D NULL) > + return true; Should return false here. > + closedir(dir); > + return false; Return true, will fix in next version. > +}