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 5B570A04FD; Mon, 3 Oct 2022 18:39:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E00E40DFB; Mon, 3 Oct 2022 18:39:11 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D8CF740695 for ; Mon, 3 Oct 2022 18:39:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664815149; x=1696351149; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=u0DlVZDRMMcJnL/bVvkgiKfcNizA2NuST9WFOlbnIj8=; b=gs6bSIIcu/cODYx0J4R9UYDsrXvh8prCAhzbE/KThT2VpLiKVlIJbjpI BYhQlyyLkNL+zX7NxnRetO8yOGdjWVzEpbmCxI28lH2b0DQlMx5VSLr3k YVi4caGqKW6mI1DlxR/PR5c3MhGpO6ifLcZmyvUNR42EJR8lVrwUnK9Zn 3JiNhT8yqHfUf419dYQxRw0X3HiEeoj9X6urBs5ABTbE+byw4mCCw/UI+ 5S3urtNY2+Ad/9w1gfTGbWgraLXJsbOEmzsIBL8QiJtgWbsFAPdBXgbqx IqbtADE2e04h0pYFWZS3kg30h6tVMVV0RRsShQGHnHw//zAOnjx0yztwf Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10489"; a="301408362" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="301408362" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2022 09:39:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10489"; a="574696291" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="574696291" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 03 Oct 2022 09:39:07 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 3 Oct 2022 09:39:07 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 3 Oct 2022 09:39:06 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.31 via Frontend Transport; Mon, 3 Oct 2022 09:39:06 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 3 Oct 2022 09:39:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHC28/ucTb8r9U3p+cu81alxb5I9EBmGqlp5J9R4yw19nevZX+9ToMykPcYQPHgy+qU0fU/97WCFGSyq5zf5wBWItsQBNQRbLK305KgcBb3siEM4GL0Eugfe3ptQj0WCbQZkM43+Irnhw/ilFYJouaBErGSrO4mtyzqoRXSnlAgEzah8HBPt7lR2I4T+/AgdhwcyYGS4zpKULds/0Lnwby4ivQrdWmWXHXistAqz0vXSWTtv/kxpPNsAuZbPTBlWQ7ObfWVDgeXB/Bjua2HYD7p3QMqawoxXigFCrNKbwC+eufBcRTAccnObg3jYRWlacV6OrfINYpGHi42IfOzP5w== 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=JC1DGt2utpjefpRBXoKbaLoWs9j/pE16U/5z2iHBoTk=; b=Mx6tK0HZYcg1lkjEycEHsF/YCVf0xVGmNY0GsN5h4kPvhW00+Usy8BkEm2rhYAapfq94uHORbbOYcLjYd+hDXkZsXJEGCg9Xudzo2P6vSfeRXzwZ0+GYHYPh6Djupt1/HX0S4hkJ/GmbgUwevi0aFTAV3bOlsb3we64wpt+J416Fckil/6t04WA4/jXzvnU22tE1FtJthq6322RKz0t51jZjnYxeBkoeK77TkR3JOl2eSRWS3T0BJkvNgX90gKzU2ZeFUlxwMeM+fEIK0Z6f7BOQU0THDKmURmtGZL6WDNy1VjmJCgTRnMkJPoy06MrhVmVoEe9V+brvtj8+lq9L/g== 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 MN2PR11MB3821.namprd11.prod.outlook.com (2603:10b6:208:f7::24) by DM4PR11MB6454.namprd11.prod.outlook.com (2603:10b6:8:b8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.28; Mon, 3 Oct 2022 16:39:03 +0000 Received: from MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::2012:6737:5f8:2dfe]) by MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::2012:6737:5f8:2dfe%7]) with mapi id 15.20.5676.030; Mon, 3 Oct 2022 16:39:03 +0000 From: "Power, Ciara" To: "Ji, Kai" , "dev@dpdk.org" CC: "gakhil@marvell.com" , "Ji, Kai" Subject: RE: [dpdk-dev v3 1/1] lib/cryptodev: multi-process IPC request handler Thread-Topic: [dpdk-dev v3 1/1] lib/cryptodev: multi-process IPC request handler Thread-Index: AQHY1rCbb3ycgjaXzUy5L7u0c18Lja382z6Q Date: Mon, 3 Oct 2022 16:39:03 +0000 Message-ID: References: <20221002014333.41385-1-kai.ji@intel.com> <20221002224436.39571-1-kai.ji@intel.com> In-Reply-To: <20221002224436.39571-1-kai.ji@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action 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: MN2PR11MB3821:EE_|DM4PR11MB6454:EE_ x-ms-office365-filtering-correlation-id: 24edd728-227e-4e6a-4b8e-08daa55dc80e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tvp1B/LkHPlyPnfh9YT+1zycQIvFFVXuuJwZcWirGHXWd+s2EkG5UrQKCndjxV6b1b1GyASVUFMULD26IJCZRSouY7upwKVOspYuycH06OnE7g0dh1Jd+K3ms8f7v6wmQHOUX8YrRKEg2dwROEBEm7uLrC7OfMjfcHTYZmux8hETAAKUvi9C8p6gwMuejWzHGnQEXKRk79SK9nA/90n+1t1x3QQrdllGkFyIddsWyLmkvohPTSTNjODDAYG7xBfaJ4+IQW4aF7anNviviGPNDkZSIhSFjAZk3Y1i6XiEf4ndSea5+SMGRsgASEhwYBcKI3dE/5OzIUeSMMUuZWAtLZbzedCHFrar5zQrrRWh6FrP+hhwsmWEiGBxFQiEU5kjJY3N8eoCQCAnfkhcEznKI8Ek9eA8N/dn5RND6l+afAWExvhgf8XqazP3ah+5R3Fv11ip2E+FXgDbXxnAO0pc+iQlgfyd2MO7i0Bch3GgMR1je+2cACngNZvDMnuk7+/krWftwL+OFu1LRkV6brgIH/8Zr407dA6JgtzTc52xknSfu9cKh6qm0iA2/0Mf+5TODGvcQ8RVnVNoK2zQSSxogkdoOnoYhhroa/OtLqEZl4sgcfQXFfTvmEQVIX8nCtt4IZW/3nd14TG3Mx5m1f+5AfYN4c6h5goqboNpIatN5bc/Wo9xeHWc5i0VLEpJF+CWMDI+V/3Kck48DBusXeM9Dg3qzSygqHkXUqhryaMv/v6U0/ApbL/NLrrYE1L7+U+FH8j0wfUYSwGYzZQYzE9ecw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3821.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(346002)(376002)(366004)(396003)(136003)(451199015)(7696005)(6506007)(53546011)(26005)(9686003)(54906003)(110136005)(55016003)(71200400001)(8676002)(4326008)(122000001)(316002)(76116006)(82960400001)(38100700002)(86362001)(33656002)(186003)(478600001)(107886003)(83380400001)(2906002)(38070700005)(5660300002)(66946007)(52536014)(66476007)(66446008)(64756008)(66556008)(8936002)(41300700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fhCXljb8ZpamFu1jPoZH72nyRxF8H8eb1pQXTL6szZ4yYaX/rXNznSZqDgyY?= =?us-ascii?Q?YBarbGvj+TsZCBFakpzKjDdrrAWExfcuNcs38MaokaOorX8aNFZX7YfXd0Xu?= =?us-ascii?Q?6HLqa66/osbG4cYdvhUmziIa2/xWBg3XeLr66mEWPM66C35bK6vSZVwEIvcw?= =?us-ascii?Q?An/nplCv2godGJnXusY3ULZzj4929mMZNI8KgrYZ32CYKK08U5QiljLeUo0z?= =?us-ascii?Q?0q/rUty2TMoM2pag/zgHvHly1Tg4FOPSQM4wM643n+xY1tG9isW8WSdPjKkL?= =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2bOsaMg0fG9muSejW4jg5Wp?= =?us-ascii?Q?lQN8YDDnDixBqVx1jfZ/3IUK8W63AXp7BOW94/hORn9ktd2njUEBlWckP/VG?= =?us-ascii?Q?54tCL1RXxOVXSnG67Li9+Dm9v/zTdoLQhAzs9mQgCjWsdZ9fdGP85UthCTPZ?= =?us-ascii?Q?84Xbeqv/kpPBbJ1SoCJks8iAeE5FIVsOLAK2d+MinPWa14sSGfu8CHMeqTVX?= =?us-ascii?Q?1GXC7bHg/dGaU0gN73IYrg/+a/I5GzZ6xGm3uC3X1CV0ghPRrBMZiA542+MA?= =?us-ascii?Q?Hx17YS058q/3RHkRD1zyAQ3lA/j/hWH3iD1zgyMgi7sxTwS32nQE1n4je1n5?= =?us-ascii?Q?mkblvLLeAVG3LQ/Bq0j/GMUpmF61PBW2fCceowdgqEIgdR2CJ5OY2jFx12cJ?= =?us-ascii?Q?tZy0kI9dj81ZjukinbBrU73xLUGP44yMPY+6+IrO?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24edd728-227e-4e6a-4b8e-08daa55dc80e X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2022 16:39:03.2955 (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: evLi1I/c2R+8g/8280zHz/bsB5X6lZFfI4Nux4J7/U88mCzsSQ775wRFN/kiy885RzjNVxQE0TeJyvEgbJdthQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6454 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 Kai, Some small comments below. > -----Original Message----- > From: Kai Ji > Sent: Sunday 2 October 2022 23:45 > To: dev@dpdk.org > Cc: gakhil@marvell.com; Ji, Kai > Subject: [dpdk-dev v3 1/1] lib/cryptodev: multi-process IPC request handl= er >=20 > This patch add a function to support queue-pair configuration request to = allow > the primary or secondary process to setup/free the queue-pair via IPC han= dler. > Add in queue pair in-used by process id array in rte_cryptodev_data for p= id > tracking. >=20 > Signed-off-by: Kai Ji > +static int > +rte_cryptodev_ipc_request(const struct rte_mp_msg *mp_msg, const void > +*peer) { > + struct rte_mp_msg mp_res; > + struct rte_cryptodev_mp_param *res =3D > + (struct rte_cryptodev_mp_param *)mp_res.param; > + const struct rte_cryptodev_mp_param *param =3D > + (const struct rte_cryptodev_mp_param *)mp_msg->param; [CP]=20 The "param" name could be improved I think - maybe follow the "res" naming = and call this one "msg" Both are "mp_***->param" so I think it is confusing to have one named "para= m" > + > + int ret; > + struct rte_cryptodev *dev; > + uint16_t *qps_in_used_by_pid; [CP]=20 Possible typo - change to "qp_in_use_by_pid" to match the naming of "dev-= >data->qp_in_use_by_pid" > +int rte_cryptodev_mp_request_register(void) > +{ > + RTE_ASSERT(rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY); > + return rte_mp_action_register(CRYPTODEV_MP_REQ, > + rte_cryptodev_ipc_request); > +} > + > +void rte_cryptodev_mp_request_unregister(void) > +{ > + RTE_ASSERT(rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY); > + rte_mp_action_unregister(CRYPTODEV_MP_REQ); > +} > + [CP]=20 The above two functions should have the function return type on its own lin= e. > +/** > + * Register multi process request IPC handler > + * > + * @return > + * - 0: Success registered > + * - 1: Failed registration failed > + * - -EINVAL: device was not configured [CP]=20 Indent is off for success result Thanks, Ciara