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 824B2A0547; Wed, 27 Oct 2021 11:29:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B2C64068C; Wed, 27 Oct 2021 11:29:22 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 7BB9B4003F for ; Wed, 27 Oct 2021 11:29:20 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="316324416" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="316324416" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 02:29:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="447471680" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga003.jf.intel.com with ESMTP; 27 Oct 2021 02:29:19 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 02:29:18 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 02:29:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 27 Oct 2021 02:29:18 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) 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.2242.12; Wed, 27 Oct 2021 02:28:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltM/2L5+dwa1Io3X1xfEH9v0uXayhZRQUFnMENjtqijxgmmzMbp/ok3Hwd2ZWtlF6yOyveZooa4QEwsFY9exNMy6n10T3tGJW8BqWGzFPCkMzlZnjBdbdl8bZISz/V8fS0kEUOl5v7sM2saZcFLZs57kw07mNDY3KIf5s/G8sejWV+/BTnQLQWuE6hvd9LOepyjd5xhbzhUgZRDxOEmpTgz6p8o2MDNKwUCMc5vRGgKf5sTMVidy1ForfGWX3yezZVxEf6xFd2RLYWdprXoPTA0yG4ed6H2Q4PKIUvHVnau4O2XnNY5OGvqQoEeeHywTAO9R2QFGkNjfymF7oPSyhA== 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=zPTuOHLttNjKLWqrtLBiEl7frytP+3yPCovonsemlxM=; b=XrJdCaaZe8U76tKcX39Li4kEMLETLEcMG/tGxH6Vtp6jikkzTzlCzRPtrBUH8pUp0JJro3QYUaFPtXJurVGixgXrxwADIQjnlE/lSIkMoNkv6HbAgERuPPT9nlhBzXmMALLQW7Fnx2KVxUnVBcgZi/wZSpYlrq59vHYti6HtipY4ylgjTxEvbeecx+qKeFglbWLvpNb/EJMT6HkqrOKgsI4V7EkVHY+aJthwpae1lRk2f7ZdiXYOsoWM9UItjOL9YfgVuOLwRsNATudSBMk4W+8vlibofE8GpMcJ2/maZWGH0aofsV3i7AVPRdyN39GsrzGh8tRunvpi+aW20uBqjQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zPTuOHLttNjKLWqrtLBiEl7frytP+3yPCovonsemlxM=; b=tI/ZUfanWVE7Dbn/MtxpxqpL6Cgrth4nARHp7EyepHb2lKGfghPSKTn6o9mF+45UDnPeZYiwl9BgNkyFkeNx2KqIGU2ah84kgqQKrqsxKPVujfx47Knxl7mk8SsJ4tt3Lq2mgg5fsAaKVi8R5oHvNpySib3IwW2V8XudI52kkf0= Received: from MN2PR11MB3821.namprd11.prod.outlook.com (2603:10b6:208:f7::24) by MN2PR11MB4062.namprd11.prod.outlook.com (2603:10b6:208:150::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Wed, 27 Oct 2021 09:28:50 +0000 Received: from MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::304c:39f1:9d95:4ba2]) by MN2PR11MB3821.namprd11.prod.outlook.com ([fe80::304c:39f1:9d95:4ba2%6]) with mapi id 15.20.4628.020; Wed, 27 Oct 2021 09:28:50 +0000 From: "Power, Ciara" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "gakhil@marvell.com" , "Zhang, Roy Fan" , "Kusztal, ArkadiuszX" , "Ji, Kai" Thread-Topic: [dpdk-dev] [dpdk-dev v4 8/9] crypto/qat: add gen specific data and function Thread-Index: AQHXx2cK7q7k7jzlv02G9C+Cjf7FEKvmkH3g Date: Wed, 27 Oct 2021 09:28:50 +0000 Message-ID: References: <20211014161137.1405168-1-roy.fan.zhang@intel.com> <20211022170354.13503-1-roy.fan.zhang@intel.com> <20211022170354.13503-9-roy.fan.zhang@intel.com> In-Reply-To: <20211022170354.13503-9-roy.fan.zhang@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0b7b8d74-e081-4503-d010-08d9992c2fbb x-ms-traffictypediagnostic: MN2PR11MB4062: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1443; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 55jXZAZlY4JKNMbXzt882dQjQ8sCWlMRBWE6bi7u7DPtp5X9U1/0lA8et2R5wl3aIpbn5ZUXdsQ5QxscbFVPGT/qNNzqZ9CUwazEAnRwUB5fgo7YtPTb2SRaFLtYw60iEu6ua+Epr/2wwH8HBiqWtVlefeZ32bMMbgFi1ac5s6YOsGEFugf0na0Trtltkba0LQ3aHVdp/Fgl0kzgpwL9VbCNu38MUSc4acqmYUhxs4c0XAhGJvP9kxDO7HDH3h+aRimvNZ25qJrs+3j6Y9A59JdXC+4bbHNDj8gDdr/SGBktc9+WQ2XN0ehkMIABeATRZLWXbx5JOWzeDG9O49cGt2PLeUAaKjUkNjjDe3D+U7gEjCUNl5+f+1C9DQe+dKafeKFtZ/euN3Nst9S0ijvb+fi8MyZU5DO8UbKLgV4ng57ytgqEsHoAIZlDP/w8AlVlQlxSkF4E2ksR9K7zSt1avp+rghc5SBYaaXVjwbBbA9eLXSMD1KUE+HjaRTwnfsC3vQ7V+7lO5FfHjW3AienQvJFL3VtqBoeEp6afiytA194dhDPFkNXrt3sQfRUHMXI3F+BYp+duRkEM6R3tVaCYWH974OLHj3z2unMSAEy2Nt0ckXArwLnJ/yHEIoUR2H0JieJGjbNoZzcd2UHn0joZJplsJxXZK+gLmGB1Ekb8ecaFJi4xVW6ClaA7izzVE4yq0UTNqxcWXKxdHwfs1zxTYQ== 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:(366004)(76116006)(508600001)(7696005)(8676002)(86362001)(26005)(33656002)(2906002)(38070700005)(6506007)(66556008)(82960400001)(66946007)(83380400001)(66476007)(4326008)(107886003)(55016002)(66446008)(9686003)(64756008)(5660300002)(186003)(52536014)(38100700002)(316002)(110136005)(54906003)(8936002)(122000001)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1kTwd+DjWcrVc/svzDFk99Kk4KJ+tHIKZ9daaca+imAPkq6v5VFQ7TU+WwY8?= =?us-ascii?Q?ARJ5y8qKsPcKg82SjwUcp2FMDKyS3wGRoQSjx+emIKeFHp9D212gHATu7qKb?= =?us-ascii?Q?dFyJbYIKJ14YUiKP4Mat1yKXQ6XFR+soPOp2SoWzjcmR6vHytzENn6D6e6wK?= =?us-ascii?Q?pM17u3resruLs88sU8C8peQplo97pYp8/62YZ7D1f3jbITCJjNWdoJAZ8UnZ?= =?us-ascii?Q?BrwOsTS532MX4FJC5kIHJD7URlpEbz6yxR8rbdVwzup+QNHVC0IY7f9Gvisl?= =?us-ascii?Q?ivzi+JyLSlfvp6+c6hnr9iCzFerExY4MNX96iaqOw/kQvGr4CKL0vrDXAYKX?= =?us-ascii?Q?jm1DSng425oKb4xlFIK4jaZjJF6BILsR6IHYJJpJx6MXrWG6qWUSfIA7EK6F?= =?us-ascii?Q?OErP7OiXlwdG/MA2C45jK8TPga32NoI+UpeUu20P2tDj+UyZrjui/T+dhwCS?= =?us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CRdDdZxfVAgg7Ua1AWKpju8F?= =?us-ascii?Q?/Rl5SAvQbqJv2474BluaNvlceJ08MLyP86SZCCyM3yjFxFYfmbW/iKisQzEo?= =?us-ascii?Q?4ayAsXucl4vFd0jbdLk+Dv8YXh920uzb58ydM2a0FXprSkNzJRCVV0HZsZH7?= =?us-ascii?Q?xPnksoXjx8/LDFuACKz5iJrpYXuxz9VeZubkSxsDcxnrucBFnixt83oh9wqt?= =?us-ascii?Q?OgpZES98DepIuYYZVJINdCYScaKXOQG6QDkY7njKljTyIXqMYwsbuPa/deXw?= =?us-ascii?Q?udLn/xJzPvb2Dt6HqsG/DGU=3D?= 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: 0b7b8d74-e081-4503-d010-08d9992c2fbb X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2021 09:28:50.6255 (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: ITRC+VjobPYT/N2r75gVTYoknOls5hr1xokkOlM4Nk4ZXK4iJQxdr/+/Qy6Mx3xmxtuhao/Wcsq3/z9gW4WPVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4062 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-dev v4 8/9] crypto/qat: add gen specific data and function 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" Hi Fan, >-----Original Message----- >From: dev On Behalf Of Fan Zhang >Sent: Friday 22 October 2021 18:04 >To: dev@dpdk.org >Cc: gakhil@marvell.com; Zhang, Roy Fan ; Kusztal, >ArkadiuszX ; Ji, Kai >Subject: [dpdk-dev] [dpdk-dev v4 8/9] crypto/qat: add gen specific data an= d >function > >This patch adds the symmetric and asymmetric crypto data >structure and function prototypes for different QAT >generations. > >Signed-off-by: Arek Kusztal >Signed-off-by: Fan Zhang >Signed-off-by: Kai Ji >--- >@@ -101,19 +95,22 @@ qat_asym_dev_create(struct qat_pci_device >*qat_pci_dev, > .socket_id =3D qat_dev_instance->pci_dev- >>device.numa_node, > .private_data_size =3D sizeof(struct qat_cryptodev_private) > }; >+ struct qat_capabilities_info capa_info; >+ const struct rte_cryptodev_capabilities *capabilities; >+ const struct qat_crypto_gen_dev_ops *gen_dev_ops =3D >+ &qat_asym_gen_dev_ops[qat_pci_dev->qat_dev_gen]; > char name[RTE_CRYPTODEV_NAME_MAX_LEN]; > char capa_memz_name[RTE_CRYPTODEV_NAME_MAX_LEN]; > struct rte_cryptodev *cryptodev; > struct qat_cryptodev_private *internals; >+ uint64_t capa_size; > >- if (qat_pci_dev->qat_dev_gen =3D=3D QAT_GEN4) { >- QAT_LOG(ERR, "Asymmetric crypto PMD not supported on >QAT 4xxx"); >- return -EFAULT; >- } >- if (qat_pci_dev->qat_dev_gen =3D=3D QAT_GEN3) { >- QAT_LOG(ERR, "Asymmetric crypto PMD not supported on >QAT c4xxx"); >+ if (gen_dev_ops->cryptodev_ops =3D=3D NULL) { >+ QAT_LOG(ERR, "Device %s does not support asymmetric >crypto", >+ name); > return -EFAULT; > } I believe the name buffer is empty when it is included in the LOG above - i= t seems to be set below using snprintf. >+ > snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s", > qat_pci_dev->name, "asym"); > QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name); Thanks, Ciara