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 0019842CD6; Fri, 16 Jun 2023 16:50:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C66D64161A; Fri, 16 Jun 2023 16:50:16 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 14A094161A; Fri, 16 Jun 2023 16:50: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=1686927014; x=1718463014; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=g+irwqDJHhWDUoZ81BUPEGXpgbOLddO9ccYMaqAUwUA=; b=WUSPQ97/apbkJC6//yanrg/CNX4KLw2dh7i+Ma5mdifctEHcSeoMlvSZ QfBLtvqvxBJ85Q0ghBgYN6/0TgpWJ4dSXK7zS3UOzgnVL4BPq4fiyJOFE Ja3fceH0bKO1wt4Ae1QlC+BPe4yztRsaeAYuOvYGla0zawi7nx7iVhLqG zXJDVcvUd+wmzfm/7r9IvyqE5x2CwOqiHZBLWunGeHXHztqbxxtgblz/X 662KvnOTE5wd25rJSLTGNzP7dFNtsy4/8qNAzETDJxkZ5jH428ZP/REsg /RHTNsVM5reHI59aSYaUEXZ9+IC2rza5ZVhR3mNLbwi6njOk4ObqJik3k A==; X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="362643729" X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="scan'208";a="362643729" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2023 07:50:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="857414739" X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="scan'208";a="857414739" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 16 Jun 2023 07:50:12 -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.23; Fri, 16 Jun 2023 07:50:11 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.23 via Frontend Transport; Fri, 16 Jun 2023 07:50:11 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.44) 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.23; Fri, 16 Jun 2023 07:50:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mV1riu+RFcPjdSOG42pdzCPuClJU3NXf9ghg97cXyErDOvbNhpcTbZS2l+zIK44XWouEuO41YdiGdH/O6M40TgqB5hufVP+saqBCjbuMBvY/gxO8Cir895b9xJQdfsV61a5qJ9Chqd5o5QDAJuHbp3n81w+iolorrboKnPJaQrayscX3pz2Vf//1HmWIQDXXn70jNLlzolVKjE+cGc0N8Uo+mZXNCgAPeywydUASSYAxJmHjoUCilPfhaETxqmDvldPRO349yRsLjarX8naKNrFZ+e6m5JkBLn0xbQLJqzTUPqlaVZs0O2FQzYfOAcBkghs47qGQ/2oXa/xLnjH21Q== 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=6EUD4nGU1W/dlrPYg8Jo/MFahIhvwm+FOSRm6rHdWYY=; b=HNoymiP1oxQPc7TfSujYD7uXTaP9RmqhBh8L1p6SnrPEXMdFNQn6uXqi7W01Io2nfPbJzeRJ/G4cDjZtHI9mg3BIBtQ7hW643ppg6XM8542t/VgqNEVgPdDpyVTkqK396Y+Bm94RyPAUjltZXf6TUQSvpahl0YLX3tQdPkgqlOAtc/MKe43r78r/Cm2WTs0b9PC8yhxQAym2BVrBlCsdVUItGWeebr59sO9CSJlcpGKkV04QOVOpXDP49x2SuYOCr/9mUof4COgsm6G4228VKi7jiRelF0NU33JEhmcJCConET2MMBVxugwcqw+uITtOJ1opG9wtUqlev9hu5XpyjQ== 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 IA1PR11MB7248.namprd11.prod.outlook.com (2603:10b6:208:42c::13) by MW6PR11MB8438.namprd11.prod.outlook.com (2603:10b6:303:241::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 14:50:08 +0000 Received: from IA1PR11MB7248.namprd11.prod.outlook.com ([fe80::5f63:677:480:6c40]) by IA1PR11MB7248.namprd11.prod.outlook.com ([fe80::5f63:677:480:6c40%4]) with mapi id 15.20.6477.037; Fri, 16 Jun 2023 14:50:08 +0000 From: "Poddar, Vikash ChandraX" To: "Ji, Kai" , Akhil Goyal CC: "dev@dpdk.org" , "stable@dpdk.org" , "Kusztal, ArkadiuszX" Subject: RE: [PATCH v2] common/qat: fix qat_dev_cmd_param corruption Thread-Topic: [PATCH v2] common/qat: fix qat_dev_cmd_param corruption Thread-Index: AQHZjx8R9g7Y3b4AB0qpgTAbMx+Qj6+Noe8g Date: Fri, 16 Jun 2023 14:50:08 +0000 Message-ID: References: <20230523090641.1659274-1-vikash.chandrax.poddar@intel.com> <20230525153849.1722448-1-vikash.chandrax.poddar@intel.com> In-Reply-To: <20230525153849.1722448-1-vikash.chandrax.poddar@intel.com> 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: IA1PR11MB7248:EE_|MW6PR11MB8438:EE_ x-ms-office365-filtering-correlation-id: 7d9d0f30-cf65-4a8d-bbe4-08db6e78fae0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qz8H210zgZd+e+ldj+g7FLwBInRuu/alAykRjSxEFPkF2ZO9CY5htbjr0gZZahc0eZQlVmYyShowC+qDhh8gE8vbWgj6qZQgdU3eiUnZzdMfOYPipbz6FJk0DDsyjZdmvJ1KXcF22/MpW8H+Ey/5cTvckpX0rH5g0spvMZgfFUycPZrQYfJTWnsiyCnZBryCpzGrKYmyMKtHV+z1B7Yu054xDszli4QvPaTTbiXyEf+vA1zxj5jguqR55XEjZocwsYgYEVCDV5QzJIXp+qHOvvY9m3BRXjRXqp7N3sQLbvki9ge6IdqxoSJgqReVYb6HvDwpULJ7qrD2Ayt4vm1r4nI8hpw/6pMMoPDFHt6vCfynXcJTdjm62eacKWjqlPMMg3GIxzkmLxsa+PmKCC9SSX98kl57vpUbv1fj8xY2SINrixFxxgRErSK7Zx2J/+yiJMdUo7a4pe2w0kQrypBGN0oHeICowViSoaIUAKw79cwa6eSGa7qhoC1c029s03rQdscFn1nNGvo6geuKQT6llk6rCsfFZL+jqMEzjzvcZ9Tq7dfAvNBSusWDcYbZBl4G5SA7JozX6XtNOwKJ93Y/ty35j0YbnpubdXSKgfDpLRE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR11MB7248.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(136003)(39860400002)(396003)(376002)(346002)(451199021)(55016003)(83380400001)(66446008)(66476007)(66556008)(66946007)(76116006)(9686003)(26005)(53546011)(6506007)(71200400001)(7696005)(966005)(107886003)(478600001)(2906002)(110136005)(186003)(54906003)(86362001)(4326008)(8936002)(8676002)(52536014)(5660300002)(33656002)(122000001)(82960400001)(41300700001)(38070700005)(38100700002)(316002)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1Ef5vqX7nOVGcDQmbyi824D8Z1scjfWeY0UsnqR723qYhYPoV3m/rHdDylfa?= =?us-ascii?Q?JMx+WXrsA3V7ZIVsjr4iLN+XSzZYj89xxWUi/KPu7qvB20iRsWhGSuspAV2M?= =?us-ascii?Q?MjX99RH+Kft6MvoccZbY1va6U5glSTCv6AqEdxb31gk0wcQDP2ReZTLvBUSz?= =?us-ascii?Q?OZ5FF9qIANGh4lQVxPxNTl8wnn7ovsYvAYkco9ELGCy/g9oWvE5uibpEwjC5?= =?us-ascii?Q?/NayXIoWq8eRaJLnPp7HqfXK3MWhdsI1S7roe7tOy5/MopFiX/A37xMrCCfr?= =?us-ascii?Q?IdatL7+sMu/Cz9S9vCcTO8hdXAgBwYCpmHDlYRYCcfwMGTvejD9O190kUSBX?= =?us-ascii?Q?cAOHlTnNt+OnzQTVD95WP3OQA+cXxjyZWS2uleXIqyALLUU2ulSg8tfe/YFg?= =?us-ascii?Q?FtdNJQ5BhyrXh3tUPYRXHqbVxr5Z2axUv3zJ+xsnzSoSLj2DdXW/i3aHA7S6?= =?us-ascii?Q?ntnYCFcHe/emg8slkemRxSN4BXAlME1zlc7sgLyq10yNUZz/uruRh0tC9fCY?= =?us-ascii?Q?Pt63gKVR9DXXL/HTijfxSqVQH80fgPA7ii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?us-ascii?Q?OQV60G5n9V5YqhpvlvrUSCgrZ9JinB1o6CZwjMJ457TqVtcph1O6gIC7HFw2?= =?us-ascii?Q?TseyQjWAjP1tREUD4DgX1he8ntZDPLIGjUGvLYd1r4sudU19xJJLqlMPIyh7?= =?us-ascii?Q?5UpW33aSl1Y7VmtANs+1RDXT5aXt8GcW1MgpBkAsp8K+FIYXid7/+xVuHfPV?= =?us-ascii?Q?FA=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7248.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d9d0f30-cf65-4a8d-bbe4-08db6e78fae0 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2023 14:50:08.6939 (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: k/n3yc+M2vQrlKjX3zUpDOC9jz4E0Q6sRnUdw2911B644NATR7S+0esZQGAMCUJnh5ppfxSu4oE/U283GRRFM00rCQ616sybqNpn7xD4nzxBSnc3JiL2R515LwJArLx7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR11MB8438 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable 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 This patch can be abandon. Since these changes are linked with "crypto/qat: support to enable insecure= algorithms" commit. New patch series is https://patchwork.dpdk.org/project/dpdk/list/?series=3D= 28560 -----Original Message----- From: Poddar, Vikash ChandraX = Sent: Thursday, May 25, 2023 9:09 PM To: Ji, Kai Cc: dev@dpdk.org; Poddar, Vikash ChandraX ; stable@dpdk.org; Kusztal, ArkadiuszX Subject: [PATCH v2] common/qat: fix qat_dev_cmd_param corruption Adding fix to address the memory corruption issue for qat_dev_cmd_param str= ucture on QAT GEN3. This fix aligns the storage where it stores the value on 4 byte unsigned in= teger data type after reading slice configuration of QAT capabilities. Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration") Cc: stable@dpdk.org Cc: arkadiuszx.kusztal@intel.com Signed-off-by: Vikash Poddar --- v2: Updated the commit message --- drivers/common/qat/dev/qat_dev_gen1.c | 2 +- drivers/common/qat/dev/qat_d= ev_gen2.c | 2 +- drivers/common/qat/dev/qat_dev_gen3.c | 2 +- drivers/com= mon/qat/dev/qat_dev_gen4.c | 2 +- drivers/common/qat/qat_device.c | 2 +- drivers/common/qat/qat_device.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/common/qat/dev/qat_dev_gen1.c b/drivers/common/qat/dev= /qat_dev_gen1.c index cf480dcba8..dd2e878e90 100644 --- a/drivers/common/qat/dev/qat_dev_gen1.c +++ b/drivers/common/qat/dev/qat_dev_gen1.c @@ -242,7 +242,7 @@ qat_dev_get_extra_size_gen1(void) } = static int -qat_get_dev_slice_map_gen1(uint16_t *map __rte_unused, +qat_get_dev_slice_map_gen1(uint32_t *map __rte_unused, const struct rte_pci_device *pci_dev __rte_unused) { return 0; diff --git a/drivers/common/qat/dev/qat_dev_gen2.c b/drivers/common/qat/dev= /qat_dev_gen2.c index f51be46eb0..061dfdb698 100644 --- a/drivers/common/qat/dev/qat_dev_gen2.c +++ b/drivers/common/qat/dev/qat_dev_gen2.c @@ -22,7 +22,7 @@ static struct qat_qp_hw_spec_funcs qat_qp_hw_spec_gen2 = =3D { }; = static int -qat_dev_get_slice_map_gen2(uint16_t *map __rte_unused, +qat_dev_get_slice_map_gen2(uint32_t *map __rte_unused, const struct rte_pci_device *pci_dev __rte_unused) { return 0; diff --git a/drivers/common/qat/dev/qat_dev_gen3.c b/drivers/common/qat/dev= /qat_dev_gen3.c index e4197f3c0f..f01b98ff86 100644 --- a/drivers/common/qat/dev/qat_dev_gen3.c +++ b/drivers/common/qat/dev/qat_dev_gen3.c @@ -68,7 +68,7 @@ static struct qat_qp_hw_spec_funcs qat_qp_hw_spec_gen3 = =3D { }; = static int -qat_dev_get_slice_map_gen3(uint16_t *map, +qat_dev_get_slice_map_gen3(uint32_t *map, const struct rte_pci_device *pci_dev) { if (rte_pci_read_config(pci_dev, map, diff --git a/drivers/common/qat/dev/qat_dev_gen4.c b/drivers/common/qat/dev= /qat_dev_gen4.c index 1b3a5deabf..1ce262f715 100644 --- a/drivers/common/qat/dev/qat_dev_gen4.c +++ b/drivers/common/qat/dev/qat_dev_gen4.c @@ -283,7 +283,7 @@ qat_dev_get_misc_bar_gen4(struct rte_mem_resource **mem= _resource, } = static int -qat_dev_get_slice_map_gen4(uint16_t *map __rte_unused, +qat_dev_get_slice_map_gen4(uint32_t *map __rte_unused, const struct rte_pci_device *pci_dev __rte_unused) { return 0; diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_devic= e.c index 8bce2ac073..ed75b66041 100644 --- a/drivers/common/qat/qat_device.c +++ b/drivers/common/qat/qat_device.c @@ -361,7 +361,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv= __rte_unused, { int sym_ret =3D 0, asym_ret =3D 0, comp_ret =3D 0; int num_pmds_created =3D 0; - uint16_t capa =3D 0; + uint32_t capa =3D 0; struct qat_pci_device *qat_pci_dev; struct qat_dev_hw_spec_funcs *ops_hw; struct qat_dev_cmd_param qat_dev_cmd_param[] =3D { diff --git a/drivers/c= ommon/qat/qat_device.h b/drivers/common/qat/qat_device.h index bc3da04238..= 4a79cdded3 100644 --- a/drivers/common/qat/qat_device.h +++ b/drivers/common/qat/qat_device.h @@ -37,7 +37,7 @@ typedef int (*qat_dev_get_misc_bar_t) typedef int (*qat_= dev_read_config_t) (struct qat_pci_device *); typedef int (*qat_dev_get_extra_size_t)(void); -typedef int (*qat_dev_get_slice_map_t)(uint16_t *map, +typedef int (*qat_dev_get_slice_map_t)(uint32_t *map, const struct rte_pci_device *pci_dev); = struct qat_dev_hw_spec_funcs { -- 2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact = the sender and delete all copies.