From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A25EA0518; Fri, 24 Jul 2020 13:58:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97B3C1BFE7; Fri, 24 Jul 2020 13:58:26 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6E9771BFE3 for ; Fri, 24 Jul 2020 13:58:24 +0200 (CEST) IronPort-SDR: zcrtHdeQUnFJ8mf0Z3yLe4Sc0yyLet9YOcqAJ8hI8jPhSFa4ks8p4xEbrS2mm/1KPq9C1VjS3E jAAWdd/lFyHA== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="149886383" X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="149886383" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 04:58:22 -0700 IronPort-SDR: jakltW+wRBwqhBmv0VJeMaKtd0VnujLlIqcQxHqt+rubdImmPnHeBaA3oXqhY1qRIpHHv23hhC zhVPzIxwYYlg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="319289093" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 24 Jul 2020 04:58:21 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 04:58:21 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 04:58:21 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 04:58:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AsZ2kBuUs3NSEpmmx4NwVc4Ykyhs93u7ugFJBfWk5lgURrk6ea3/c7nnZkXra6FFr2jWMgMN/zHlAdWByUOsh2/kfL+7zEtjA8BgzZRFU2kPk3LXVzi+CBOk9UnD0/sLxlpolP0z/k87sZSeB1S6bRYsGouWffmKnzIIKvdHtiJM+hgti3G2XCn0Vm/iclNeMk40Sl3ndfgnh+nwZcFYtCvSdiZ8YGs+JjJUVxezG3d2TWCO5F78yo5cs6OmsLUnxBSRlhARM5vxZks8j55PqgQyfrhEL3gY80OV0VO1qteIoe0zbU6MV/AR5neHUzBarYt+gkfVpL3raeBMV+DtcQ== 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-SenderADCheck; bh=HH3EuVOzWw4M+FNtAUpYHhJbxsowR+VF2ES5408gtYE=; b=d4Cni8wNquio8lz/WtevkBMk+C7EawwmTukyFQFQsUWP3n6fN9y9f2MnQ5WP10F0UYoKuPftf7tGXZbCFfPHwSZkXKIjVSh2QMkY1cnvBYh6y3fJPKq9cEBnN18tnJiNIrczxFZ5wnVO3Nb0tYjgk7l3PCx5kjuJEKteImCugVD31uJG5mCKGJ3vHc8rQSybLNMLvI47R3sHxA0BI6fjVXCc5hvMEW+sWubVrF/ZTqFWLqJP/NcZ8aACRgiLl/F/yxFqP/cDEBUmQjx8EXtjbW1d2bzuMTLk+pJiKyOCtdkaZp9y74nYDi5yGyYVKMnQvkvYE4JmjpsRlgbJKHe01Q== 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=HH3EuVOzWw4M+FNtAUpYHhJbxsowR+VF2ES5408gtYE=; b=k5PgT1ROX5BqxJt9nJZUVWoEjVWuZz3Qdshw768PbgdCbgMDGeEKkzDQ6kglJcqRf6JBLaWmV13pz7p4SbJqINzlx7kA98QB/K12a4gBLGhNK4njS7OlKiDM68c8+Nv/CXh8P9cGgwmwvzdjcRjO9SH/EjbVkRa6e31PXekamIM= Received: from BY5PR11MB3910.namprd11.prod.outlook.com (2603:10b6:a03:185::13) by BY5PR11MB4005.namprd11.prod.outlook.com (2603:10b6:a03:18c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20; Fri, 24 Jul 2020 11:58:20 +0000 Received: from BY5PR11MB3910.namprd11.prod.outlook.com ([fe80::5863:43f6:ee65:e7c7]) by BY5PR11MB3910.namprd11.prod.outlook.com ([fe80::5863:43f6:ee65:e7c7%2]) with mapi id 15.20.3216.023; Fri, 24 Jul 2020 11:58:19 +0000 From: "Dybkowski, AdamX" To: "Trahe, Fiona" , "dev@dpdk.org" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] common/qat: fix uninitialized variable bug Thread-Index: AQHWYZ6HCNe3uIJCm02ODeWgau4oH6kWnySAgAAAPsA= Date: Fri, 24 Jul 2020 11:58:19 +0000 Message-ID: References: <20200724094010.1025-1-adamx.dybkowski@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 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-originating-ip: [83.24.6.118] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6ea9472a-a22d-4d23-162f-08d82fc8dbae x-ms-traffictypediagnostic: BY5PR11MB4005: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LzT4KkJwsNfRbtNnp+jEJol9a8HH+mVkrVrfKR7uyMRPqUB7vPu1oqO3SUGHiJdymtdY/caHF9F51v1RRmz9EqcRp1SwuCkDW8PV7OMaR0cjtKWcQne7GJmAKMAFCDQCr9eoYOFA/cNcvFgSgFzy2xiAbeEd9lgJAAB3bWK3gUi2Pab0aZkRzD6ZXttFJw7P0DLSWc3Qv8IGJ98n6/+tPKaOinD/1KUSwfHPhuakCvot834p1OMvnu0SdtZ5YwpF4RrKX73N43EeYWIMEvD1b0Iwz2wzPgCzpxvb5Ycf9iulCqlDrX3hEOklXQXQYdx6 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3910.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(366004)(316002)(86362001)(5660300002)(64756008)(66946007)(66476007)(76116006)(66556008)(110136005)(66446008)(33656002)(2906002)(7696005)(52536014)(6506007)(53546011)(478600001)(83380400001)(8676002)(186003)(55016002)(8936002)(26005)(71200400001)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: HVlWLhzIdtEYh+QstFpeWEh5eJiuV7tPH6AWhfYdwMcl7guEwSyuW2ek7kx/lssOXDCupgzinVn82egFjimaYRbCPND0gyKtmDvHwT+mR1NkMUu4LJ3chBqTbzMdsZOox0ruZtjMeYIlDHteBoXpBAO2RyxNep8nyOdTJWp79swdUal3aupx9VTqTZ9fMkulTlEJujZ/+peQWMhGky46bShoJfqo8kYudSCX0Bw9KOmeUEGB9Mg23hJ4zimgHgA/RMYEu8sb9e8iv4h46J4Ei6abgKkUuRvZ6OPFYxgg6dBdIjO0HUrGU3IZcnkTzGDS/z9a4Is9xvG7sorQ1DYoc53hO9PmmTmjSPQEVvD3KVKhLE5RdcwqzD3fjHT6KDVQ4cYD1J+j4JtBEybdnGP5p3Vg4Zvo1r0IDnmoF7HVYtBxG3FmBqPjrUIqVhegbLpsbRTd1K4JvYPZKf1OtLIiPoQVYxcFimyDCawKyxCbbZw= 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: BY5PR11MB3910.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ea9472a-a22d-4d23-162f-08d82fc8dbae X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2020 11:58:19.6790 (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: HQAnmDvBd1SojV7xMApxq8aDfhTc5pRjtSZFsbQVY6VITz//hBMm+KTNFaFELtm6V+5Wu1TdTi1y8Xp0zKlWhPO0JjdiMvZ+J/mjZLLKXTY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4005 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] common/qat: fix uninitialized variable bug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > -----Original Message----- > From: Trahe, Fiona > Sent: Friday, 24 July, 2020 13:55 > To: Dybkowski, AdamX ; dev@dpdk.org; > akhil.goyal@nxp.com > Cc: Trahe, Fiona > Subject: RE: [PATCH] common/qat: fix uninitialized variable bug >=20 >=20 >=20 > > -----Original Message----- > > From: Dybkowski, AdamX > > Sent: Friday, July 24, 2020 10:40 AM > > To: dev@dpdk.org; Trahe, Fiona ; > > akhil.goyal@nxp.com > > Cc: Dybkowski, AdamX > > Subject: [PATCH] common/qat: fix uninitialized variable bug > > > > This patch fixes the uninitialized variable bug in QAT PMD. > > > > Fixes: 9f27a860dc16 ("crypto/qat: move generic qp function to qp > > file") > > > > Signed-off-by: Adam Dybkowski > > --- > > drivers/common/qat/qat_qp.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c > > index aacd4ab21..0ee713955 100644 > > --- a/drivers/common/qat/qat_qp.c > > +++ b/drivers/common/qat/qat_qp.c > > @@ -582,7 +582,7 @@ qat_enqueue_op_burst(void *qp, void **ops, > uint16_t nb_ops) > > register struct qat_queue *queue; > > struct qat_qp *tmp_qp =3D (struct qat_qp *)qp; > > register uint32_t nb_ops_sent =3D 0; > > - register int ret; > > + register int ret =3D -1; > Nack - this fn returns an unsigned. So the correct option is to default t= o 0 [Adam] The ret variable value (signed) is not returned directly, please che= ck the rest of this function in src code. This is just checked to calculate= how many ops were enqueued. And if all checks skip (meaning the op was not= processed by sym crypto, asym crypto nor compression), we should note the = user that the actual op was NOT enqueued. That's why ret is set to -1. Adam