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 19459A00C2; Thu, 6 Oct 2022 20:51:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B48C6400D6; Thu, 6 Oct 2022 20:51:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5A66440042 for ; Thu, 6 Oct 2022 20:51:10 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2969IeCZ006914; Thu, 6 Oct 2022 11:49:04 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k1v9at6m7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Oct 2022 11:49:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NzSTqaN8AD0deRE3KKkSdVfvFdZw0ekErCbRvMofgddvG3BTMiRImD7adjmJzfUiRIzkuCEaQYNLSC/HiquqbfYxRDRY5f0vyiyOpZa7ufomaCLQDxo7d7NjArZDkoFz8gFH7+1dTsVMcM41rzqhAMQ25Lr726K2bQ7WYosYa7df1cgc4u+fesSdyHki/MadCjZSFElDHzATh5XMpwCUB33F9YTRrUpcYyPpbuG8a/mKD+OuZKNm9G6c4ABMZxZHpQRx4An3jIeMp+unkWo4ADF2lKEFiMSUMawAbbtspoY9YgclZov7YJ96b5zFKG3nOkJKDQVhAGCMabC3Ot33NQ== 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=U9j0TG6VQEGUrehbXBffKmvqHGwwI1ljU0UtQf4bDrk=; b=KP1ftqyxUbFF2JEOM/XZr4vE+pfA6xdrItNFZUKVR7xS6qQjgNbrkqFwdK8Uni9Wr+JwoVwM1P16Z9FJarjXGhVucIANu5h0zmIAnurQYB03bBXrH8lAdLqo6E+G5FWPn+PP9WK3lIha+bU4A23HAFvr3EnUDrffu7EOKzXPkH2TQQVD/36qlvkPAb/fyYJSSCUM5ynSJpxdCd8/UeSfec2qt/226HyZSbklO0bJgZIhhvsBS2kjfF0EAzCd3tMNrTB6f4vwuK+gixSrU0BglStWkQD9lvy+5JYzJ212KgaIGIdQ4FagIJlJHaqzgovEzdSCjQvvrklamDs4bf7TyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U9j0TG6VQEGUrehbXBffKmvqHGwwI1ljU0UtQf4bDrk=; b=AAmkh9S5Jqadw1uzlonAj+F1WRgUYbfs2Kt+lVrzolzBZ4QfkG75elJtjkqPyVLnyQbWvDKnH4QWW/+9QyZNmRbqKOdkkiF7EdeuwjJNP6oRzbjD1J06L8KepZ1gRdeMjGOekTDCuL9Xz1bFRO03+wCGfWhCL1s7qIG3RyBnpws= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BN9PR18MB4139.namprd18.prod.outlook.com (2603:10b6:408:134::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.32; Thu, 6 Oct 2022 18:49:01 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ee27:3b96:a580:ba9e]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ee27:3b96:a580:ba9e%9]) with mapi id 15.20.5676.033; Thu, 6 Oct 2022 18:49:01 +0000 From: Akhil Goyal To: Kai Ji , "dev@dpdk.org" CC: Fan Zhang , Ray Kinsella , Anatoly Burakov , "john.mcnamara@intel.com" Subject: RE: [EXT] [dpdk-dev v5] lib/cryptodev: multi-process IPC request handler Thread-Topic: [EXT] [dpdk-dev v5] lib/cryptodev: multi-process IPC request handler Thread-Index: AQHY2aYPVFlc6Pj6VEyK9E+zogYVgq4BofsA Date: Thu, 6 Oct 2022 18:49:01 +0000 Message-ID: References: <20221006081646.81901-1-kai.ji@intel.com> <20221006170612.94392-1-kai.ji@intel.com> In-Reply-To: <20221006170612.94392-1-kai.ji@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|BN9PR18MB4139:EE_ x-ms-office365-filtering-correlation-id: 6e5882af-0f0d-44a8-06f5-08daa7cb6f67 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TXvhbEnEKuICUnfP0DFBuicPmCTgczcjQ0md+G5MKBTp5+DK/nVFQUZZtj3p8mxQJFh8WRHuzdigFQXtHmEFuz3Pd7mJnxAXoE8JAfeq4S8iQoja5YPOU4b8899cSoSRinsP/Y0etuSBrNYVe2haZpBRVgryGg8z11v9z2xgvzoNQRHEt8p4Y3W8aopzbjmylfRDzCfG+9w+u3NtHQWDYmv2EIKH3B8PCQpvqDkUoMQRxQMcHvJkqcmD/09/Q9QshXxa7gKURpQ38wDCuTJ1XO/q868mGZRscCp7q7T9pQ0R11CigiBhn242uS0PXIOVY6jErKyk/pGKZT4H5s4Ezy+pha8qVuBwTek99t9y7HsqFQE7XeZR8xuzEiEnGIh+eLfhfaEp22L6C+/KUb4xUJuPkQAz+blYee6Zxwuj9yzaGwfsdyr/VyX8wy27Cz2QgCocun4VI3IMpkmdY+atMMqZ2afAZdqc+hEe8U7OlDxf0XUv0wAFXfKXFURfZ0FRd22Bh8t7RxhP55TjAeqFX9byjZj1tjktafU4LPk/sgzZkwy5TZshOH7Zcpy6hsJ3qkTrZmSzHzgAEN51K3mntFC4izeYEnbDvzbskx3tpOOaiXpboaIm0gygKXBwiwl5+0Ldb5bCAEUejgF9eCVeiSn0SRvxq9iI0AQMGIW5bypVSe+RJC6iiWV3WcPrU1lyJyZEU/txevG+2la9DkIpJFKubvVEZwOHAA81TD9ygurM9jDqe1qNhWc7bN2BMoNrwQBecS4Atdomf2yVLnVJ6A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(136003)(396003)(366004)(346002)(376002)(451199015)(2906002)(186003)(83380400001)(38070700005)(122000001)(4326008)(38100700002)(8676002)(66946007)(64756008)(41300700001)(76116006)(66556008)(66446008)(316002)(66476007)(8936002)(55016003)(5660300002)(52536014)(110136005)(55236004)(9686003)(6506007)(7696005)(26005)(71200400001)(54906003)(478600001)(33656002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Ky9XT0T6AtHp7UGQb8uNGDp4FDAnjy+kv/MYoNizQNS06pTXv4eKh5Qv7aiY?= =?us-ascii?Q?EboTeRXkqHRvk0D4gyUkP9UkD5BZV+kTgx8xxFsvnKOAKk8pLElZRIHVQ0nJ?= =?us-ascii?Q?bMHe9kz+M5w6pC0X1nVnxMgJ+XG7tO6104dxeSlSn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jppVOsf5R7SQ7voTP2o7DYsKBpzWZLxohfs0HJuU+y5x?= =?us-ascii?Q?EkBWSztclPeJ0coYic9Dmj0liqMQlRwaIayyV8HVPbAabS4PnrH1h3mBWpP0?= =?us-ascii?Q?P2KMikGNZTGOkYP+8tDevBpI14HPY/NjyZVuyhyxpDcAcdDFZNTJXpyLKqH3?= =?us-ascii?Q?zaiO+Ma1sDY5i8q/Oh08FDtJBfkxmzIPHll6WMgzSUcZFUPs1AG29LQaF5fr?= =?us-ascii?Q?biWZ2q4nYTWgERb7YOg9tJxvycbAvqLCcXNvBU3v4jg/QdOpJ1lrRhor6n++?= =?us-ascii?Q?P1uPTiwG6+BED3PxYBJZLbV/5+bfxSrFHUw9blHv6ChzJ1OWjMjVS8m4aqDt?= =?us-ascii?Q?j0IGkQVuF4f5z5K/4m42evXEH1657mEOkTpyBzohXVUOHEwF7SdVTyc1GSIA?= =?us-ascii?Q?fjXwFnxg40U1WX2Lm6nuGDxGUKXVcr3Uez6byUfW52B04eXYUkaKLOwHcOm9?= =?us-ascii?Q?saanT836AzoiqdYrJ9pRaeWW2M/plIG8F1Ekr24R1mJSzBJycxWix3FtBPOU?= =?us-ascii?Q?rd1wCVUCqw2brjVNF3GNAZm5VZ+BsAMfmB6XAtSU?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e5882af-0f0d-44a8-06f5-08daa7cb6f67 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2022 18:49:01.4944 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9xpSHy3f6SAuNNVfHXUmbtwjPyID6j3i6W7jPYIQ1Jnt6Yb66q85Z1gwtJCJFTJD5+ZWqasHbQOQE0AUDgjSmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR18MB4139 X-Proofpoint-GUID: fbgUeA8fzC3STOXLxSr1MIR1NB8VvIG7 X-Proofpoint-ORIG-GUID: fbgUeA8fzC3STOXLxSr1MIR1NB8VvIG7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-06_04,2022-10-06_02,2022-06-22_01 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 > As some cryptode PMDs have multiprocess support, the secondary > process needs queue-pair to be configured by the primary process before > to use. This patch adds an IPC register function to help the primary > process to register IPC action that allow secondary process to configure > cryptodev queue-pair via IPC messages during the runtime. Why are we forcing user another alternate API for secondary process to work= ? Can we not register the IPC inside rte_cryptodev_queue_pair_setup() ? As I understand till now,=20 You have introduced another API rte_cryptodev_mp_request_register(), Which will be called by application if primary-secondary communication is r= equired. And if it is registered, rte_cryptodev_ipc_request() will be called from so= mewhere(not sure when this will be called). And the call to rte_cryptodev_queue_pair_setup() from the secondary will do= nothing. Is this a correct understanding? If it is correct, then it is an unnecessar= y overhead for the application. We should update the rte_cryptodev_queue_pair_setup instead to handle prima= ry and secondary configuration. IMO, you do not need to change anything in the library. Everything can be handled in the PMD. When the queue_pair_setup is called f= or particular qp_id, Store the getpid() of the calling process into the priv data of queue pair = if it is not already configured And if configured return failure. And in case of release you can also check the same. The configuration of queues for multi process is specific to PMDs. There may be PMDs which may support same queue pair to be used by different= processes. Rx queue from the qp by one process and Tx queue from the qp by another pro= cess. This will be needed if one process is doing only enqueue and the other only= dequeue on the same qp. So in that case, your implementation will not work. > After setup, a new "qp_in_used_pid" param stores the PID to provide > the ownership of the queue-pair so that only the PID matched queue-pair > free request is allowed in the future. >=20 qp_in_used_pid looks very cryptic, I believe this should be part of queue p= air private data of PMD. Adding this in cryptodev data is not justified. This property is per queue = and not per crypto device. Hence adding in device data does not make sense to me.