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 B61CD425A5; Fri, 15 Sep 2023 14:59:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A61A5400D5; Fri, 15 Sep 2023 14:59:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 977D640041 for ; Fri, 15 Sep 2023 14:59:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694782753; x=1726318753; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PEGrBg1UauroZNiozUWasg4vbTKyyPWMhW9uOdsolDM=; b=MMu1uQT0wQczXmhJnwe6+kJCpWIWbS3jrdMy+on4KOhZNTjjeiBi8Nru 5Hh/C6ZsPty9QjFHSpdb3Zs2f8T+Y6zvKjTPo0lfD/k3lLKMbL8QcTv3Y L9V6zSFMNrLZAwoB/Ja+o3zurWVwokfDOre6Sj3f26ktKbWnaYGuUEv5z b27O8y5+z7P6shoM3tS46VXHl1j33X5PMr+t1N4Q3YWU8qVFSOAazJ6Xx EPuWwiafRSrOknw6O2NfcH8415x1nVznlJAX+JMI21zQxryy21VA8qjZC SgxFdKnb1xRouuq4Pl0JLnBhPBKM8njaVKlsoqR8S/HC8uHFK/zOjCd/S Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="376576395" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="376576395" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 05:59:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="810509200" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="810509200" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Sep 2023 05:59:11 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 15 Sep 2023 05:59:10 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 15 Sep 2023 05:59:09 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 15 Sep 2023 05:59:09 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 15 Sep 2023 05:59:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjsUCnnElJWQPczDDn7ofyS9Ckd2z7nJgFN9QvNzUkOiF02pa/GrOGllNn3BrgLtsG4Z8PBSj25ozH3p2l8l0J9xM/olVBkXhKOG/YvIa4RkTVfWaTmc337UDG8yUmdLsMCJdZyHrihi8vu6SsiYVqccUSvQuMQV17iTaKOizA4FsybuXnjdJrVg/mn6zIBuFjeOVmSDdYmrDnbQ7JT65Rmw+pQzP9qZH3PwjPCoN6RFJbn3Rv942fdJ0BWjrHP9fXXZyhLqHJfVnnVy2X0xgAw+GO13QFZfWat6Q9JWfmCqjBotn6GMmfOz/88mC9mddx0NPBEMiImGS/5gphzn+g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VRjuCP2WHTfuTcuPHR2/yvvJmS/ZySfRO8JTPRtEzIk=; b=W80vaHdnk7jvgsDpwgqO7YtSuIuOF1qJOHD32Kq40uYzFDyuCQrDjTuEmb226fAjEPC1tJMNU6GGw/G/H8QD4XQ1XCj98KtDptFxzrG08Y1Xa+LD2zSataK93mYnT6maW9JvAcRAuc5UuohwYIEdm2kg0bwnzTTDfic9AvNCtSrCiZBRW1k02OHOlNw3/8Lk3o6bGtnUQy3kqbYYJi0wrpQtuxgt66bCmBi3ji7IaSYB8D2WRBlfP5RF68FEA4XJpcq9WR2mu8awFOHF/4q6fnWh/rWHPRgUvq91rsOUo3iPNeF9GsHtVtfHbuCCBzSF+C7pMajdFQrpZzWdIipj4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH8PR11MB6803.namprd11.prod.outlook.com (2603:10b6:510:1cb::12) by MN0PR11MB6060.namprd11.prod.outlook.com (2603:10b6:208:378::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Fri, 15 Sep 2023 12:59:07 +0000 Received: from PH8PR11MB6803.namprd11.prod.outlook.com ([fe80::7602:b1b7:3114:c3da]) by PH8PR11MB6803.namprd11.prod.outlook.com ([fe80::7602:b1b7:3114:c3da%3]) with mapi id 15.20.6768.029; Fri, 15 Sep 2023 12:59:07 +0000 From: "Van Haaren, Harry" To: Thomas Monjalon , "david.marchand@redhat.com" , "Richardson, Bruce" , Andrew Rybchenko , Chaoyong He , Niklas Soderlund CC: "ferruh.yigit@amd.com" , "dev@dpdk.org" , Tyler Retzlaff , =?iso-8859-1?Q?Morten_Br=F8rup?= Subject: RE: drivers use of service cores Thread-Topic: drivers use of service cores Thread-Index: AQHZ4A9T5JyZA1cZUkyW1RPhrS9IPrAb5Y4g Date: Fri, 15 Sep 2023 12:59:07 +0000 Message-ID: References: <6541993.tM3a2QDmDi@thomas> In-Reply-To: <6541993.tM3a2QDmDi@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH8PR11MB6803:EE_|MN0PR11MB6060:EE_ x-ms-office365-filtering-correlation-id: ef2c7ecb-e25b-42a4-9014-08dbb5eb8bff x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OTQRQ/u6wjevKhOfTiMIjgZXyqqOwNUuzZfxm3NmGeudmDyEe5SD78uf1a9wYDVX2QR5+yHXiS3rY92e367ABcelkaPkrxl4YyLGI99IQTWGyQD/mSGRJ7v0jMTtE79mQvxtfV72bZcYT7L2gbEHwLC10CzDV4IH/OAecNoHa5Cyv9UTaTo+Xff2aAZnTlUgJixM7kNrSqEwuSeQnTuE3ySYw+CG33v8qlJC2sC4I5VQBX6tL/BtiMuQU0JUmgfLYnRpYaybIPJslOiIvELncju0Vh/WH0LJmeshV5VacRbFXRfxvCsTj65GJ0pMrW/wtGizELgF3s3hTBEMoQa0U7VFmwIkgyHUC7qUbAps3a2pfwdvEnT6T/IVE+cVw3gVMknxHarX4K2YPlGh1R4JK0vGbXr8CiPa8i2jrZRpg0O9GxRQdp9XKfrr6te8NKFyVldYHr4Erj7skmSsoU8tpv8bYPGlfGJ/G76kuQasTCcK7gdJKqADNthVgecYauEwV9z+LTuwj+z7sy2klC1RM8iAw/t2K9igr3m/mRzTL2re+mDI8ZZgIZwLpYoqwpR1+7+IoIxyqmXFu62asSA8wWZiUVwQYpQrGUIA02vUB9+hJRoeSJXHRoo9eGvMAHsz x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH8PR11MB6803.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(366004)(39860400002)(376002)(136003)(451199024)(1800799009)(186009)(5660300002)(52536014)(41300700001)(4326008)(110136005)(76116006)(66946007)(66556008)(8676002)(8936002)(66446008)(66476007)(54906003)(316002)(64756008)(122000001)(55016003)(82960400001)(38070700005)(38100700002)(83380400001)(33656002)(9686003)(26005)(86362001)(53546011)(2906002)(6506007)(7696005)(478600001)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?BEvfITmh1sP8KB6oBRXe1PnD0YKrSRt/pI3oNinswbv++pFnN1TasLq1KJ?= =?iso-8859-1?Q?iJJmVWJCjxKOqzKIcDUW62evdNJ30OAvzUM7pPA7sQKJC182U7XnkwEAme?= =?iso-8859-1?Q?2s/Zv2dICuDLiljitG5QOCHWf2Y59X4Scxv+H1lRNSJG3vp3aQxUq9L1K/?= =?iso-8859-1?Q?lXGd1K0qVAf1ZGu19IzhcNt7u2pj8ZLjrdFiGjMDwOv+/NhMDfkpNXLguR?= =?iso-8859-1?Q?nI4kzf956pG9/IlB040cxZUcnPyBygSWb49JmrQFlCW+u2bA2lI83Q/wtq?= =?iso-8859-1?Q?iNm7JMtnLV/3l1vuudXkp+W1c17LTsyvPzpFYABmipgbzxA2GT0uV5FErF?= =?iso-8859-1?Q?spcA0Be7tZBuUPnOWolRqII/zyavRIQzhfL3eWlEz0NB/0Wxdh3o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RCYcyDctsuFU4UkDSS8MOAM1v0ee6bFjfJhiRvxs?= =?iso-8859-1?Q?/EB+iluXbfmm+bzqiGwmcJrgTKIz2mIIbQ98UBg51crEhTG0zfTk7BeICv?= =?iso-8859-1?Q?EnWghCIRWss7okuQX3V8B6n6oLlCWWt5a/y/JyTYLcLqq7+0yh3PYfwK00?= =?iso-8859-1?Q?AkjOXW1JJ0eXU0b7cqccDfsABLD3/uKmx57ClsNB3hqYxwNSjuvNk0wMQb?= =?iso-8859-1?Q?Ma4f3cSuoP4mbiBmF00uu1NwPmo3OIa4t17/gpS/ibe+CXEODXcTa2yAOZ?= =?iso-8859-1?Q?28+Tv9XBVgG6/g2ilEnfCVZ/ZdHFWBqh/qUKAqYAnQsI6jpC4QKvO+2SAe?= =?iso-8859-1?Q?Z6E74DTw+yOaMWY9pENYsFwawvio/uiZmH?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB6803.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef2c7ecb-e25b-42a4-9014-08dbb5eb8bff X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2023 12:59:07.3533 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BP1scRdeywEi1Zu4O2Vzr9pwDYxE40J2hruKRfEEpp5EOHPjmH5K6IDHq5lhvVAoXhs+xcYnjx+LYEQS5isj4WBLxa1REI0i+u6+Le/kfUU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6060 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, September 5, 2023 4:40 PM > To: Van Haaren, Harry ; > david.marchand@redhat.com; Richardson, Bruce > ; Andrew Rybchenko > ; Chaoyong He > ; Niklas Soderlund > > Cc: ferruh.yigit@amd.com; dev@dpdk.org; Tyler Retzlaff > > Subject: drivers use of service cores >=20 > Hello, Hi All, For context, Thomas and I (and a few others) had a brief discussion about t= his topic at userspace in Dublin earlier this week. I have a bit of better understan= ding of the problem-space, and we made some progress in technical solutions too. > I think we can improve the developer experience for using service cores > from a driver, like finding or allocating a service core. > We may take some code and ideas from sfc and nfp drivers, > like in these functions: > nfp_map_service() > sfc_mae_counter_service_register() > sfc_get_service_lcore() >=20 > If it is not possible to use a service core, we could default to using a = control thread. > So the driver would never fail because of a thread initialization. There was input from a few people that "hidden threads" that their DPDK app= lication doesn't know about can cause issues (e.g. a driver creating a thread "behin= d the application's back"). I think Thomas suggested a callback function the application could hook-int= o, to either accept/decline the drivers "request" to create a thread. The default could be "accept" if the application doesn't hook the callback,= allowing drivers to default to achieving work, and allowing power-users to manually handle specific thread= ing-requirements. I have not strong preference here, just writing down the discussions and feedback = from Userspace. > What do you think about proposing such a high level API > in order to get more drivers using it? I believe service-cores was required to transparently enable certain use-ca= ses of HW-acceleration, Initially Eventdev/SW PMD, but it is of course possible for other component= s in DPDK to use it. I do recall some folks had concerns over "scope creep" when initially discu= ssing service-cores upstreaming, and perhaps they're right. I'm not sure how much more functionality is desired here, vs better usabili= ty of the service-cores APIs. Perhaps a POC patch of the NFP, SFC, etc use-cases would help drive towards a code-level discussion? Regards, -Harry