Message ID | 20230512104044.163279-1-j-choudhary@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp5002026vqo; Fri, 12 May 2023 03:49:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bPttfu3q66ebUjofxR6z8u4F2Z3AVD/EJPEBA4SNBw6Tg6jCsVrleXwpG4qXNw7PU2MUJ X-Received: by 2002:a17:902:f54c:b0:1ac:3b69:bb9c with SMTP id h12-20020a170902f54c00b001ac3b69bb9cmr31223320plf.28.1683888575603; Fri, 12 May 2023 03:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683888575; cv=none; d=google.com; s=arc-20160816; b=w3gPEAV4ugnIrUpQtbFFKVrxOQnonz2QoB0f9QrsPptL21kIRKxsavoWmd2mRHud3U +tAeYG/Ut0T5qxGIjIW6zPOiS+xgAs/zSok52+dxJ1NLMfjejJFcomai6evYYeYRUhqt HOY3Zr23cn/4ICstqpzk9+B0hJrcqT/ZJC+wf2scBKiWmhHLvwlkvK9eoNRTI96M3wgt KslWqasg6hUXAzPp2Wr2KlT56qTxh0p27FJYSLvdvI4ZN7RE5Z9odAwUTItUsPIbDw/N NczsoUpM6OikrjBxpON9tCvABJoiaAj36gkKG0P8ns3N7vY2I7haLi+LW6ZlpDIBlmai 0cqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8SxkRosU+5sptrW+a2kD7cwTFrcO+YdyW+ZrnrbVrDI=; b=X1jvl2BsRXIG2EYN6U1Uy0oPtRlQIAfIDfDFCZtYLIIJq2W5JvMlUCIe0xP6wc7m8c 9THc3aeZ3x5osCKb6vdMaFdbOCllaj9OtDgqpjhahSIjRawlhIKhLQ+kqLXn6cWcsxgF SVMaHD/nnbj3rm6D44nDTj43cwMFdD0ySYwG+dggeF+nCr3V5u6yW8YM0Wvz+f4IHRLQ NjspfxShsi8s5MlwXxaqNQphuXrjSwYOltd6eWk39Zglj4TCvOfUz08kbL4Z4LKpiO6Q 7bayiXSwTkPRK6N8JZkqB3kytcmiees68Mda7eaf9ZfS+maFQ+HhmQ53WRSI2ZS5Vxmi /czQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A+Vu2BrT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020a170902dac900b001a1b238d1c0si9812876plx.636.2023.05.12.03.49.21; Fri, 12 May 2023 03:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=A+Vu2BrT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240723AbjELKlA (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Fri, 12 May 2023 06:41:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240605AbjELKk6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 12 May 2023 06:40:58 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1011FD6; Fri, 12 May 2023 03:40:56 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34CAekj4037117; Fri, 12 May 2023 05:40:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683888046; bh=8SxkRosU+5sptrW+a2kD7cwTFrcO+YdyW+ZrnrbVrDI=; h=From:To:CC:Subject:Date; b=A+Vu2BrTl8l2vnucAi5N560zj9QTiMDqJbfIDyorzpwb/7FslxbkQYL1UIj3DTU3s sM0YSVASdrA/F7ER6T5SV0olR6d4PUp6MFKFq9VuE/RX8s/kDOl5ERojLqbeEkzkqY BkhIzdDjRAQYfSbAFzUPsKCvjBwiseXtsoa3yE+w= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34CAekT8014448 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 May 2023 05:40:46 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 12 May 2023 05:40:46 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 12 May 2023 05:40:45 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34CAejHN011203; Fri, 12 May 2023 05:40:45 -0500 From: Jayesh Choudhary <j-choudhary@ti.com> To: <herbert@gondor.apana.org.au>, <davem@davemloft.net> CC: <kristo@kernel.org>, <kamlesh@ti.com>, <u-kumar1@ti.com>, <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <j-choudhary@ti.com> Subject: [PATCH] crypto: sa2ul: change unsafe data size limit to 255 bytes Date: Fri, 12 May 2023 16:10:44 +0530 Message-ID: <20230512104044.163279-1-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765685147149578033?= X-GMAIL-MSGID: =?utf-8?q?1765685147149578033?= |
Series |
crypto: sa2ul: change unsafe data size limit to 255 bytes
|
|
Commit Message
Jayesh Choudhary
May 12, 2023, 10:40 a.m. UTC
From: Tero Kristo <t-kristo@ti.com> 256 bytes is quite often used in performance benchmarks and this size appears to be also working just fine, so mark it as safe so that we do not fallback to software implementation for this packet size. Otherwise there is a strange bump up in crypto performance at 256 byte packet size. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> --- drivers/crypto/sa2ul.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, May 12, 2023 at 04:10:44PM +0530, Jayesh Choudhary wrote: > From: Tero Kristo <t-kristo@ti.com> > > 256 bytes is quite often used in performance benchmarks and this size > appears to be also working just fine, so mark it as safe so that we do > not fallback to software implementation for this packet size. Otherwise > there is a strange bump up in crypto performance at 256 byte packet size. > > Signed-off-by: Tero Kristo <t-kristo@ti.com> > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> > --- > drivers/crypto/sa2ul.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks.
diff --git a/drivers/crypto/sa2ul.h b/drivers/crypto/sa2ul.h index 92bf97232a29..12c17a68d350 100644 --- a/drivers/crypto/sa2ul.h +++ b/drivers/crypto/sa2ul.h @@ -170,7 +170,7 @@ struct sa_tfm_ctx; * the following range, so avoid using it. */ #define SA_UNSAFE_DATA_SZ_MIN 240 -#define SA_UNSAFE_DATA_SZ_MAX 256 +#define SA_UNSAFE_DATA_SZ_MAX 255 struct sa_match_data;