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 CF58EA0518; Fri, 24 Jul 2020 14:20:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D0881C2FB; Fri, 24 Jul 2020 14:20:29 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1FAD61C20A for ; Fri, 24 Jul 2020 14:20:27 +0200 (CEST) IronPort-SDR: z3INqHMYpT2PtJa2HBTvJGBlf9ugITji2xvtvKZsZSQRekjw0gFycWS5QSrKeLH/LMVR4QkHVY gasWY5QzpQ3w== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="215284165" X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="215284165" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 05:20:26 -0700 IronPort-SDR: EmZue/9Qdjg0J7FkT6D1i8bNirrapieR3mC8GbpROdPWeqZZgHr9Ke0Y0gsoOYr0nWfZtqfXcd yKmky0o535fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,390,1589266800"; d="scan'208";a="363352951" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga001.jf.intel.com with ESMTP; 24 Jul 2020 05:20:26 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 05:20:26 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX153.amr.corp.intel.com (10.22.226.247) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 05:20:26 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Jul 2020 05:20:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YNZNSVWkK6e7gbMfrZrOYHMgfrtUCdAtGjAxdJ6U+W5zvXxKtV0gvwaa4PCiQOn2PE0owvDq9uEXbmXTZxVPjq1WKKGX1xU0VO4IL76+PFNWAIcRj2Xa72fjtxGgTdNdW8Lg9h6VbsRKeczujZSVVxdo/yc76LLz6hq9ZAF9N15Wcpakr7c2Tc0CX++xZHI5ZZB3+IMx8o75sIBmus7BmxZY0SJsK+0cIs0Gt/OWblMk0rGtqkb9KRKMv/9bYZajppdV9rsgmGNdrwvwHrJQl0k/x1tt0mydMvmihxty2PYsm9T/4Hi4qeWpSn9RMdBGdlAwKJ1iEh0Eq3BAeEOTKg== 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=THoGtxfMHcLMK9uZttlDwLrYBEisqdTQ2DwKUIORLAY=; b=Tne5N5bL6GdPbJAiWrkxe9RbdWwEeAJu0nhglN1ns9NUZoY1gLIV57rL2E0DZNEo6HFxCWLE5yipiuKxm1xkkm6tMQhTAGV7I987HrKD0GnkK1YMiTmzgp6i1MyX2s3DclKRBYq1mmJ/PKueLdMOSF8iJOJEBl2RG6d4InNhoWPPts1i7farnO0XEfIOX5hDenYV/BpfGNR+o537znSM+XRhZNVoxD6BcOQaPxxdQ4IskIUgN8WEBezvqoVNQXF+wMKe7yqIBi+3wbGWhWixzVx4VC0jSQmvRK7yG4b/01C0+60+LG2z0FjNmfasrA4L4lvz9E5j4489lB9UsBenmw== 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=THoGtxfMHcLMK9uZttlDwLrYBEisqdTQ2DwKUIORLAY=; b=heasyg9rfKW2CRdZ7OjpTnaubmsBu4Jafl0yz9OaK35uIQ+XuYd8eZrGmPnEhrRPEuPUsDIOvFEKBRCcIusuCRUaIpTbYzdmQ3Ne29gxtsAu9TSOdQHoioWMtZueWNGo3umCEuRXE1IfVW6IcLQoy1gdIludMvdqtIynVwTw8mo= Received: from SN6PR11MB2880.namprd11.prod.outlook.com (2603:10b6:805:58::15) by SA0PR11MB4527.namprd11.prod.outlook.com (2603:10b6:806:72::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Fri, 24 Jul 2020 12:20:25 +0000 Received: from SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4]) by SN6PR11MB2880.namprd11.prod.outlook.com ([fe80::ec8b:8f35:800d:13f4%3]) with mapi id 15.20.3216.023; Fri, 24 Jul 2020 12:20:25 +0000 From: "Trahe, Fiona" To: "Dybkowski, AdamX" , "dev@dpdk.org" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH] common/qat: fix uninitialized variable bug Thread-Index: AQHWYZ6H+7Fpp6bs7UGPpApgwnhqw6kWnSPggAADEYCAAAWgIA== Date: Fri, 24 Jul 2020 12:20:24 +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-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 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: [51.37.123.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: edb32598-7fba-47d7-cbdd-08d82fcbf195 x-ms-traffictypediagnostic: SA0PR11MB4527: 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: pZz5pCP7ricxHnne1J0ep7ceGMcXGgxAs7wmZm/bs9Ufjjb6P6wYJF5bF7jX0U+Z1V7MdULZwIn7i+xRuQZeI2JFecRzI7oGsI7f5f51Uh0ysKK8VdmDqkkc4qTBkvqNi/XGgI+QV9CNdtf0Apfv9IH6gzSuLvPQL/fvZWBW1/3U1nUxpVDrIbv4cAOaP3GzO32A9WsRimUbgSSR1UVa2JMUmRlG7hOTVbLapcqMYhBQldbbR44l4oP2rNtvYKFhTl40u0y7QktA4QrTAHvlIxpOgbQJucVuIA++unSL8DbOVRkmFiXbx3RU9nXI+AU1 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2880.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(39860400002)(136003)(346002)(376002)(66946007)(64756008)(186003)(86362001)(66476007)(26005)(52536014)(478600001)(66446008)(66556008)(2906002)(76116006)(5660300002)(9686003)(316002)(110136005)(8676002)(71200400001)(53546011)(6506007)(83380400001)(7696005)(33656002)(8936002)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: yIgYgv79AZm+Mqa4mmWsWFp/oHBS/6xw0FfXod9AabmAhvvPCR7PdsZ3vZPQ65XIjXOpB9KSQEisnov4R56IGOrqWfyLWGSqcmCkt7Tz0LkEK6RbCEiF1n63RMFclDE8ggRKq/qBVsGHHlcCmDcQBeQm6RIlO5ko/a0MfjvgSSLTiYrMPIvxAO/XTnNzgIIzi+nm5KNVuA7nNJMFeJWd2o/Q/ncnoIoakeOkxQBGvQP/YlxtVJRzNtakOcusZeegT3Hc2G4Fth/4qQUTjo3omp5nJhsFRwwTtMR7feG+Ccn9Pruv2IgOkXM5t5nL9aj3ylJI5K9PFRxerK9AXWf1sURt0+kS6Zx0uNWa/nseDzutUNvYpfDMkCKTNg0bWKzF7CyFj4ooshT2VNz9vSi2HrZgxcPyLs9bNbSDzUPD3tQw2G+MQIjKDqdZLzOJFErlPcJyPldzgQ9RantY6A1fjk1GZO2wWQwDkRwl/IT7V/g= 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: SN6PR11MB2880.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: edb32598-7fba-47d7-cbdd-08d82fcbf195 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2020 12:20:24.9158 (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: AKWRFeqRKUb4hSBWrvGMHGeIPbvMyN0JLxSF2Cl6sWbIb94qfGwZypbY187g8lMol7Yw2IUAE56g83rOctr49g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4527 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: Dybkowski, AdamX > Sent: Friday, July 24, 2020 12:58 PM > To: Trahe, Fiona ; dev@dpdk.org; akhil.goyal@nxp.c= om > Subject: RE: [PATCH] common/qat: fix uninitialized variable bug >=20 > > -----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 > > > > > > > > > -----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= to 0 >=20 > [Adam] The ret variable value (signed) is not returned directly, please c= heck the rest of this function in src > code. This is just checked to calculate how many ops were enqueued. And i= f all checks skip (meaning the > op was not processed by sym crypto, asym crypto nor compression), we shou= ld note the user that the > actual op was NOT enqueued. That's why ret is set to -1. [Fiona] ok. makes sense thanks. In that case Acked-by: Fiona Trahe