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 9D73CA0543; Fri, 12 Aug 2022 10:06:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 408AC40A7D; Fri, 12 Aug 2022 10:06:19 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B9E03406A2 for ; Fri, 12 Aug 2022 10:06:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660291577; x=1691827577; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=cJFKOs7r7FMSV85ncE7NSIApqxPTbSUMRViNe41KZVE=; b=KHtWt5/smwlOvXEW7aHu1hRxSg6TXI7RqYzRIXvq/1FMMl+vs3MqAgkL tBPuivnrFS/fVCuTi7gXXPwPKDpF9PkQzx1FMQDEgr4sw6MfXXHt5+smm qACREovEoMcKrkzqz2/4ZVSGLFWKri9BkxnlAU/5gsn0eHqK0m/pectfS XkVmBcmoaTz3OUm2+A2aRELv819NJG1eewhp2tl2hmADcQ3ahDVRSK7wb 0X/KoNb0j1Cpt+Ibfc8VNGqIQE9YXtL7KQorKLQM8lYDxZKqooCSBZFAv AruE2d1HVtAxaxg/wTXn8uNw6GQXxyz8S3oONL3EyNRKNSZmYRUg7+BYD Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="271321290" X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="271321290" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2022 01:06:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,231,1654585200"; d="scan'208";a="605840398" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga002.jf.intel.com with ESMTP; 12 Aug 2022 01:06:16 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 12 Aug 2022 01:06:15 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 12 Aug 2022 01:06:15 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Fri, 12 Aug 2022 01:06:15 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Fri, 12 Aug 2022 01:06:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgptNLKRl4AsydeH7TVwaeG2X3R3hQVX7SOD7UP2EB3QXwHVm4ilE0EoW7bkDPffFFQqX9ffBE+OC6/lB1bAH5KAYenG0mUsAdQHUcOiq5FMMr2cjpgnHNp12KesBIMAIcv9hkhp+GLvC+OCd967efENOQdtsMPVQRQyuq1vwLkaWt0qRAbG6bCW3nrrPZIZGJxfAZHhzIdLzjnTKCoeLdvWbb4WaDjlRG4KTYpVHWWE3MqkgZZ77FrczRkDU+9jaGm/OFRdyaoMKDtlgI/GlWy22q/h3DMfI/i75bDcK5MdxRAjaBUfPJ4leWLkC7NX6OXZgjuG08//WTtvvBSlfg== 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=VjmtuVGNRokakTXK5jDIxJEGTB5jpSIjN3VaDXZmYg4=; b=W7UiDNuG+GZwlMCEHTi3B8znF/WYPDh16XBiBABEb7qsHBcazKO53luZshEcwWexF1KV5dL6r2KGqsGQJ7tYI51GUzfUApr5bhjBHD3qHlR7BlsXuwdUsHmBelxozr1bl3L182p1+Fhk/XCgNuiVczW4wSzQ/6cmvz5jRj7aQuKUXGQXdSROxDyx2WjCvVusUOfGvZSw432cfZQ8YPj8FvTzdJZxaJEIcK56jP7ucxe62zViOYl1Gcf6MJ4pW5IafbYUg/PUHD8PCkurANwdDU0rs4FK3t/hAlWD2++9jeQna26WXDN93V53Yf6byJ075sCklsCSecFGU/B3XIBNNQ== 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 MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by MN2PR11MB3565.namprd11.prod.outlook.com (2603:10b6:208:ea::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.17; Fri, 12 Aug 2022 08:06:13 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::65e1:a4c0:f349:72a2]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::65e1:a4c0:f349:72a2%4]) with mapi id 15.20.5525.011; Fri, 12 Aug 2022 08:06:13 +0000 From: "Zhang, Roy Fan" To: Akhil Goyal , "Zhang, Roy Fan" , "Ji, Kai" , "dev@dpdk.org" CC: Anoob Joseph , "hemant.agrawal@nxp.com" , Chandubabu Namburu , Ruifeng Wang , "ajit.khaparde@broadcom.com" , Michael Shamis , Nagadheeraj Rottela , "matan@nvidia.com" , Jay Zhou Subject: RE: [EXT] [dpdk-dev v1] lib/cryptodev: multi-process IPC request handler Thread-Topic: [EXT] [dpdk-dev v1] lib/cryptodev: multi-process IPC request handler Thread-Index: AQHYoUSe2+TA1dJIG0m+oJbVLF393K2Rn0gAgA5mlJCABKyiAIAGTQnQ Date: Fri, 12 Aug 2022 08:06:13 +0000 Message-ID: References: <20220726230804.90036-1-kai.ji@intel.com> In-Reply-To: Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0123130b-c595-419f-295f-08da7c39865e x-ms-traffictypediagnostic: MN2PR11MB3565:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Lx3lhUsYBR/1XeqmnUJxOvVEhRxvaPTTYEv3VhUvY+rrU2V2uuG2/Rl5192A6st2OwoGKevH6mL8Sm+37zYRbZy8NiCZc5nt3vWYOOtljFhaczaRejV0GvOwZRu2aiKFEdfWAx6CTW2ThjuSa+cemO2bjRff3mpM5aez+ZQd7XlUkC8/7iVLiyW8HF23oVUzetvtsHczgCIfBTwcNgyqpEU0gmdB+Q5Y8loqiQ43+ErGFTz21pgEW8xYjhr9VZ/0M7BNuJ5b0WmD1yuwOVda+DRmxhYAG4+aRUPVaUIr1yZUv9AdVgsg+lrPmeaQG1pG00cNTII/NP8M4EkgXUZX3M+U+9PCb9kmvXuHPXV803JanQoN6pVxdBLdSQ6AwFdjmvoO3QVUzUUJ9aXJ96JiqcmeXU/MFfgyXnAZ1fQYfPQiD7/UzLIkHb/Hri3jeNPMPPe/GKolT1jolWn+RE7J4LbJvaYEoVZjwa1enkhrkP/zYJtmGzSxPDW8FWzlPmU+IAYxgKREXXiv6bpTYKUCk/7NBLGe4JfvFEKfB1QZfDae8nL8g+VoQyvi1Tomh4qdwL6RMZk4Ogy8XpqiBNLQLPIo0ickugjPme48OV2L69bgwB2+AfMTPQqXPCiTJXhocs8JWtEgT5ZCUiA+7as6vnbdDGn6B1Q3ebyFmSaQPOmXpCWL+ortEwudDArJSOF4mVzooU5cdUNogcuRRp3EbhjCYuNKcLYMrPYVQYdJ9RUkJKdzU5scmNc/XcpsXf94rWtvRT7UkWN9Ca53Hd4Q42omx9rBp7YMLNYWcM1UpxkJnhZGMQwOeH/islDs6jPs x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(396003)(136003)(376002)(346002)(39860400002)(316002)(66476007)(66446008)(66556008)(4326008)(478600001)(76116006)(64756008)(5660300002)(66946007)(54906003)(110136005)(8676002)(38100700002)(55016003)(86362001)(33656002)(2906002)(7416002)(52536014)(8936002)(83380400001)(122000001)(82960400001)(38070700005)(71200400001)(6506007)(41300700001)(9686003)(7696005)(26005)(186003)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?fvw/Ncl82sEHBr4alBVfMZhIXvCCZExb1QO+Xg70TSBP5iGCujpUutUV?= =?Windows-1252?Q?yhekgJf0wMvkKlr3Q8YRZGneUiL8viGEF8QOBsn5nXH0zegtcLU7QiFH?= =?Windows-1252?Q?sjecSu9kkYOUB5n5EY5q0OtVMtxhcGV4JQfXUm0YC2P9bEFGe3DV9A9n?= =?Windows-1252?Q?p7S4qawbXVKlrtWj4yzctBMZChFL9w+7B5iA6jsQyM2XKbLtU0mM0jRK?= =?Windows-1252?Q?3+k5WA92UTY82RcB1aPIclEC49GR5y8bwGsq2mGvbt7SxIYADAaS+lw4?= =?Windows-1252?Q?ys3optuGfEo2VevOpoSnwSBqQvmhfE/F5c7FVvllz4SHQaXh/RAag1wA?= =?Windows-1252?Q?UY06wIwT1jxsik+IdOF00F0pso+/LLeHNLwdytb5gH0FBVyj4BbV27hx?= =?Windows-1252?Q?9eOBFM7lrwY7htS5WZg1Gj6u7qTrpOrME6KNoWq8VjGaraD0qycfVrLh?= =?Windows-1252?Q?IKXiXo4/5nB3PhmDPCAv7IbFjXEL90nUUW2EoJhkG3jWWNE13Gh/TgvV?= =?Windows-1252?Q?BeosM5jZI9BsBc+NUsQ+dOHOLAJe+BX6ZfpMDiH/5WJzw6TCf/UPcir3?= =?Windows-1252?Q?xKeYACP1pUAf1m6/Qiez/BqX0/EZm4E3GwDQausw02zXR5e/mHPKRhua?= =?Windows-1252?Q?ZXNYyXB1AePCoF/qMqkhkoSF6EUm3qDolkOKBefcFYwD6rk1ed5A03AB?= =?Windows-1252?Q?ieDomnKraKuWA6s0LdSm8aUGkkAkKf2bGLk6qMFu2sX5vhFCXXhK+S6D?= =?Windows-1252?Q?8987kyf2mmAW6knfRfkbcH7I5voBRKzAII3Dj6yfr/WXjjWs4lqY+8TY?= =?Windows-1252?Q?lESp+QiqxG9+uy+F5jn4fvClqNQP3G05vmUlv53V+nrx6jC7OVCpSXYJ?= =?Windows-1252?Q?ZCGyFjcANgUsKgW1xYmBRoBb24HhoMeOLmlKdatqGqoxz8kpLQ6ip/dk?= =?Windows-1252?Q?7eZsZtqM2vcwrA5oYXimTs4BBV9cV7Aj1KMyy7NddHfJy5LQbHGYBmLd?= =?Windows-1252?Q?0mjUDO2kUer4jJQP1z9G3Ch0J/96xO9wPd9MZsxavszD76RH24inghfr?= =?Windows-1252?Q?mWBj+56BbkR5bMeQ3+ecu6teGo/3avsqLF6eFqK9/1gvJ6SYOAPg2SDy?= =?Windows-1252?Q?FIji7oCrfLfiLBvOlA55/d7UClYZIy2eaQOxRBUVYdTIwWCt2CUYCQJm?= =?Windows-1252?Q?6xJl0zr2qec/lJtCA8+NX5zSNIjvVPfS6sjUm1J/9Qp/I4HeIvAEPrsw?= =?Windows-1252?Q?qXKN1mKaKIW4NFw4MqHEcWS3jwQQK/Btmwub5sW3PEKTxl0Wm02kbXOR?= =?Windows-1252?Q?VSm2RRFp0+bu8uoLoyZVQ4zENO6LUms/PtW7nQVFDDE05f4zabKIHplH?= =?Windows-1252?Q?pne/qTYv14XdAeMb63pJCqedAnSMmqQj9TNv9T0gE8vKXKYYcdFNh/U1?= =?Windows-1252?Q?KsCwygBRxtKnuizSeE0MYUnTvokkZRaY/rwDqXcCVh7R6qQQpeQ6bvXp?= =?Windows-1252?Q?j/NiZfuaeD1uUHh21xYYKgT/7meGH82ffEGRHE/9rThxhrbdpTwhmfep?= =?Windows-1252?Q?XPwToFfi3VgQUAvxEpdOwS1UtHf9IvOcyupx9O0PElKxhs+9V1seOzuD?= =?Windows-1252?Q?cUKOx3cpRK1hCkjKyx/WEylQ5ZsHaUiA/xR3Uk7uaDYFaErNHi1ha5RF?= =?Windows-1252?Q?zdTikE7Ltl8kdhYi9hOT5KS2AehWFAVv?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0123130b-c595-419f-295f-08da7c39865e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2022 08:06:13.5019 (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: NQKb5cq96VzBIJhove3ms/Kew5ATqD6mu4u/3lwMl6XCqf0eYM9XKcQF2d/eHc2ixHzQIjm07AHsJ+5unTO8gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3565 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 HI Akhil, > -----Original Message----- > From: Akhil Goyal > Sent: Monday, August 8, 2022 8:43 AM > To: Zhang, Roy Fan ; Ji, Kai ; > dev@dpdk.org > Cc: Anoob Joseph ; hemant.agrawal@nxp.com; > Chandubabu Namburu ; Ruifeng Wang > ; ajit.khaparde@broadcom.com; Michael Shamis > ; Nagadheeraj Rottela > ; matan@nvidia.com; Jay Zhou > > Subject: RE: [EXT] [dpdk-dev v1] lib/cryptodev: multi-process IPC request > handler >=20 > Hi Fan, > > Hi Akhil, > > > > > This is a library change you should cc all PMD owners while sending p= atch. > > Kai is in holiday at the moment and will be back in a week. I will sync= with > him > > then. > > > > > > > This patch add in multi-process IPC request handler function in rte > > > > cryptodev. This function intend to support a queue-pair configurati= on > > > > request to allow the secondary process to reconfigure the queue-pai= r > > > > setup'ed by the primary process. > > > > > > Who will release the queue pair already setup by primary in the first= place? > > > > Fan: If the queue pair already setup by primary the secondary shall not > recreate > > it > > but use it instead. >=20 > OK but the description says secondary would reconfigure the qp setup by > primary. >=20 > > > > > Currently, all queues are setup by primary and secondary uses them. > > > So if a queue is re-initialized by secondary, and if it is being used= in > primary > > > process, > > > Wont that drop packets abruptly if the queue is re-initialized? > > > > You are right. What about creating a variable in the queue pair with ei= ther > PID > > or thread id who own the queue pair? >=20 > I believe we should not expose the PID/thread id via queue to the user > application. > This may be security issue. You have a point. >=20 > Instead an "in_use" parameter can be added which can tell if sone other > process is using it or not. > And this in_use param also need not be exposed to user. It can be > completely hidden in the PMD. > User will get an error number(probably -EUSERS) indicating the queue pair= is > already in use. Great idea. That's what I am after too. So can I sum up the following chang= e? - each queue pair has a "in_use" param. I believe we can refine this a bit = by a "not_in_use", "in_use_by_primary" and "in_use_by_secondary" enum. - the secondary process may request to configure a queue pair by sending message to primary - as of requesting freeing a queue pair - primary can free any queue pair. - but for secondary to free a queue pair, we have a problem: - we may allow secondary to request freeing the queue pair if it is "in_use_by_secondary". But then there may be a security issue as a secondary can free a queue pair used by different secondary process. - or we may not allow secondary process to request freeing any queue pair, it is securer, but less flexible. >=20 > Regards, > Akhil Regards, Fan