From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140071.outbound.protection.outlook.com [40.107.14.71]) by dpdk.org (Postfix) with ESMTP id 1C9CE2BC9 for ; Mon, 8 Apr 2019 10:59:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QHFwAxarmawhDnBl/ouzc2NtAFAkFKYdsHPLBftUp5k=; b=lysSFekyvSGaxGsRvmu+WODLG1gBNekSTv00ZIrdmuNCscTzeNG+VwsBmaoKQuPKZCDYDnP/n4gmM29BntSgWgPsABS6xNJUveamXZSUVPYEvC7nHcQKgnEz600Jyr9Tx5UooRdP+cu/tfXqkOtE7ElWIWqf/P/oagiCQcSxBZ8= Received: from VE1PR04MB6365.eurprd04.prod.outlook.com (10.255.118.78) by VE1PR04MB6605.eurprd04.prod.outlook.com (20.179.234.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.13; Mon, 8 Apr 2019 08:59:30 +0000 Received: from VE1PR04MB6365.eurprd04.prod.outlook.com ([fe80::f5ad:f178:4c55:13e0]) by VE1PR04MB6365.eurprd04.prod.outlook.com ([fe80::f5ad:f178:4c55:13e0%3]) with mapi id 15.20.1771.016; Mon, 8 Apr 2019 08:59:30 +0000 From: Gagandeep Singh To: "dev@dpdk.org" , Akhil Goyal CC: Gagandeep Singh Thread-Topic: [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case Thread-Index: AQHU7elgVN0j4pqGgk2MAzAwZ9jEbA== Date: Mon, 8 Apr 2019 08:59:30 +0000 Message-ID: <1554736925-13184-2-git-send-email-g.singh@nxp.com> References: <1554736925-13184-1-git-send-email-g.singh@nxp.com> In-Reply-To: <1554736925-13184-1-git-send-email-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::14) To VE1PR04MB6365.eurprd04.prod.outlook.com (2603:10a6:803:12a::14) x-mailer: git-send-email 1.9.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=G.Singh@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.120.1.67] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d825875-4a6a-4fe1-9274-08d6bc00827a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VE1PR04MB6605; x-ms-traffictypediagnostic: VE1PR04MB6605: x-microsoft-antispam-prvs: x-forefront-prvs: 0001227049 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(396003)(39860400002)(346002)(199004)(189003)(99286004)(105586002)(2616005)(2906002)(26005)(476003)(11346002)(102836004)(446003)(6512007)(4326008)(106356001)(6116002)(6506007)(186003)(3846002)(256004)(486006)(53936002)(386003)(2501003)(52116002)(66066001)(316002)(76176011)(110136005)(25786009)(71190400001)(86362001)(6486002)(97736004)(71200400001)(6436002)(8936002)(14444005)(68736007)(72206003)(478600001)(81156014)(14454004)(8676002)(7736002)(6636002)(81166006)(36756003)(305945005)(4744005)(50226002)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6605; H:VE1PR04MB6365.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: MiyaHobLaN1bCjD+E+7YF3s2D+C4BPTjhrqPU5zmKkofXQn6kPRSAB1xwcMSePT4BNFpRxOSnMwK+X8VCzI+lO8CN+lQWXRDzzrC2Qs1uMcsNPdqgJ3+H+B88vvyH/3yeylWDGgjbxcszPWRLfBg15AHeysosG+fZymnTPSlNs06v3HSvjmvxv630S89vTg34KlnNks4GNBST2K7Fz0Zsat6IKcT/LTph8e2uRV6tGtamazC1tp8KCk4LcHPVLw51t1W3pDDv7T5DiUMUl7E0dH/h6YRaClsAbnaWs1kH46L26SpdMjLjTxZ/SxSp4v0m7hCZ3kF0xfT+mYX2cZ/R7OIrMvrPjMlS1eXYM3J0SCLbiU7Jlh9JVnqgCjcjds4WLYjI6909leyvxd1fn2S4kD4zxjdZTKIwgEOihEiSJE= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d825875-4a6a-4fe1-9274-08d6bc00827a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2019 08:59:30.1551 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6605 Subject: [dpdk-dev] [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case 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: , X-List-Received-Date: Mon, 08 Apr 2019 08:59:31 -0000 CAAM return wrong digest value in AUTH only sg test case because digest calculated on wrong length of data Fixes: 71dd6b9d44e7 ("crypto/caam_jr: add scatter gather") Cc: g.singh@nxp.com Signed-off-by: Gagandeep Singh --- drivers/crypto/caam_jr/caam_jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam= _jr.c index 20452e3..efc69b6 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -798,7 +798,7 @@ void caam_jr_stats_reset(struct rte_cryptodev *dev) sg->len =3D cpu_to_caam32(ses->digest_length); length +=3D ses->digest_length; } else { - length -=3D ses->digest_length; + sg->len -=3D ses->digest_length; } =20 /* last element*/ --=20 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id ED8C5A0096 for ; Mon, 8 Apr 2019 10:59:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D294A4CA7; Mon, 8 Apr 2019 10:59:34 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140071.outbound.protection.outlook.com [40.107.14.71]) by dpdk.org (Postfix) with ESMTP id 1C9CE2BC9 for ; Mon, 8 Apr 2019 10:59:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QHFwAxarmawhDnBl/ouzc2NtAFAkFKYdsHPLBftUp5k=; b=lysSFekyvSGaxGsRvmu+WODLG1gBNekSTv00ZIrdmuNCscTzeNG+VwsBmaoKQuPKZCDYDnP/n4gmM29BntSgWgPsABS6xNJUveamXZSUVPYEvC7nHcQKgnEz600Jyr9Tx5UooRdP+cu/tfXqkOtE7ElWIWqf/P/oagiCQcSxBZ8= Received: from VE1PR04MB6365.eurprd04.prod.outlook.com (10.255.118.78) by VE1PR04MB6605.eurprd04.prod.outlook.com (20.179.234.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.13; Mon, 8 Apr 2019 08:59:30 +0000 Received: from VE1PR04MB6365.eurprd04.prod.outlook.com ([fe80::f5ad:f178:4c55:13e0]) by VE1PR04MB6365.eurprd04.prod.outlook.com ([fe80::f5ad:f178:4c55:13e0%3]) with mapi id 15.20.1771.016; Mon, 8 Apr 2019 08:59:30 +0000 From: Gagandeep Singh To: "dev@dpdk.org" , Akhil Goyal CC: Gagandeep Singh Thread-Topic: [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case Thread-Index: AQHU7elgVN0j4pqGgk2MAzAwZ9jEbA== Date: Mon, 8 Apr 2019 08:59:30 +0000 Message-ID: <1554736925-13184-2-git-send-email-g.singh@nxp.com> References: <1554736925-13184-1-git-send-email-g.singh@nxp.com> In-Reply-To: <1554736925-13184-1-git-send-email-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::14) To VE1PR04MB6365.eurprd04.prod.outlook.com (2603:10a6:803:12a::14) x-mailer: git-send-email 1.9.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=G.Singh@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [92.120.1.67] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d825875-4a6a-4fe1-9274-08d6bc00827a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VE1PR04MB6605; x-ms-traffictypediagnostic: VE1PR04MB6605: x-microsoft-antispam-prvs: x-forefront-prvs: 0001227049 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(396003)(39860400002)(346002)(199004)(189003)(99286004)(105586002)(2616005)(2906002)(26005)(476003)(11346002)(102836004)(446003)(6512007)(4326008)(106356001)(6116002)(6506007)(186003)(3846002)(256004)(486006)(53936002)(386003)(2501003)(52116002)(66066001)(316002)(76176011)(110136005)(25786009)(71190400001)(86362001)(6486002)(97736004)(71200400001)(6436002)(8936002)(14444005)(68736007)(72206003)(478600001)(81156014)(14454004)(8676002)(7736002)(6636002)(81166006)(36756003)(305945005)(4744005)(50226002)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6605; H:VE1PR04MB6365.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: MiyaHobLaN1bCjD+E+7YF3s2D+C4BPTjhrqPU5zmKkofXQn6kPRSAB1xwcMSePT4BNFpRxOSnMwK+X8VCzI+lO8CN+lQWXRDzzrC2Qs1uMcsNPdqgJ3+H+B88vvyH/3yeylWDGgjbxcszPWRLfBg15AHeysosG+fZymnTPSlNs06v3HSvjmvxv630S89vTg34KlnNks4GNBST2K7Fz0Zsat6IKcT/LTph8e2uRV6tGtamazC1tp8KCk4LcHPVLw51t1W3pDDv7T5DiUMUl7E0dH/h6YRaClsAbnaWs1kH46L26SpdMjLjTxZ/SxSp4v0m7hCZ3kF0xfT+mYX2cZ/R7OIrMvrPjMlS1eXYM3J0SCLbiU7Jlh9JVnqgCjcjds4WLYjI6909leyvxd1fn2S4kD4zxjdZTKIwgEOihEiSJE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d825875-4a6a-4fe1-9274-08d6bc00827a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2019 08:59:30.1551 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6605 Subject: [dpdk-dev] [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case 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" Message-ID: <20190408085930.Lg_jhVDfgWUjgr4bHzLOeGoNcbKM8OYVdkyXXaJLSjE@z> CAAM return wrong digest value in AUTH only sg test case because digest calculated on wrong length of data Fixes: 71dd6b9d44e7 ("crypto/caam_jr: add scatter gather") Cc: g.singh@nxp.com Signed-off-by: Gagandeep Singh --- drivers/crypto/caam_jr/caam_jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam= _jr.c index 20452e3..efc69b6 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -798,7 +798,7 @@ void caam_jr_stats_reset(struct rte_cryptodev *dev) sg->len =3D cpu_to_caam32(ses->digest_length); length +=3D ses->digest_length; } else { - length -=3D ses->digest_length; + sg->len -=3D ses->digest_length; } =20 /* last element*/ --=20 1.9.1