Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp610890ybv; Thu, 20 Feb 2020 04:20:36 -0800 (PST) X-Google-Smtp-Source: APXvYqxZxZjduyHU/s9jWMSUy/A3DPVDiMac4FTyU11kQSSNTmXWqu+CmiYchv2z4szornUmtpO/ X-Received: by 2002:a9d:32f:: with SMTP id 44mr22581652otv.234.1582201236559; Thu, 20 Feb 2020 04:20:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582201236; cv=none; d=google.com; s=arc-20160816; b=KEj6jKfuyi0/rXZ1F0AOk42E3mnzKqqHTSa8P56+aVHREmvAR+clAe22SAsXALHiNj Dn7WdlNAt07/Dzo9OUTyGHVi3fs80t/9NWFx++5sKhxij3tlYwCNzXcQR6KhM33bYUJ4 9dwG1QJYxK9s7bUe/knU5EN8ILiAx10KSBqYcxCUzqRaArVmRQGOUhnheG+F8Sqe95TZ l1KWbNdTV0tUXqrpGuYrFs/1Rp0TFStmC9rmEO19hNapGO1nF0VSxF6Uu85YG/lU7e0e SJUOLThGS8qjcbHcBmpK1FUhbUA4Qzlx0CCqC6kj9Su5sBOxvXNyuyvMbgKdUep/pJ5I 9/BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=P3BlmOvd6cO9HDv8d9Tdtc2+tjXDkoxVpLX87/P+crc=; b=iXxiYDUFy3C+4/q8o4mY8T9SwOylxf0oRgYQHZsymhYqG2iGQE1B8fDkeANpJtpZbV pRI0G/4KW6pbbsAZEVGQEEE+X4pvBKmEX6NXJn76sh8ZZghdqMxhScEjxOAYVpVQ84gS 4p6ERZhid8qoBDEUomkT5+gPnTuH/gQkNd+NvRxLygmjNgZFx/n0Fq0hqu4VlhNRvC4m bfgCxFsKW7DCAwzaAAyG7RVk1mgGdlKcQh1IDH134A66ehVh0qtWigma9vwH7oYitNA6 EFZhQjL111sdA+CY8bANLpXP/0WF5ZaJ80oTTNOf0WqeZqhRqdugrTupwR+2gxTiyiT9 zvqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si1458949otp.295.2020.02.20.04.20.24; Thu, 20 Feb 2020 04:20:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727553AbgBTMUW (ORCPT + 99 others); Thu, 20 Feb 2020 07:20:22 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2450 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727393AbgBTMUW (ORCPT ); Thu, 20 Feb 2020 07:20:22 -0500 Received: from lhreml709-cah.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id DFCF6F25C691815EB3BF; Thu, 20 Feb 2020 12:20:20 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by lhreml709-cah.china.huawei.com (10.201.108.32) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 20 Feb 2020 12:20:20 +0000 Received: from [127.0.0.1] (10.202.226.45) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 20 Feb 2020 12:20:20 +0000 Subject: Re: [PATCH 4/4] crypto: hisilicon/sec2 - Add pbuffer mode for SEC driver To: Xu Zaibo , , CC: , , , , , , , References: <1582189495-38051-1-git-send-email-xuzaibo@huawei.com> <1582189495-38051-5-git-send-email-xuzaibo@huawei.com> <011d8794-b4ab-a5ad-b765-e6e2c09991aa@huawei.com> <69fe2d60-428e-9747-b7c0-d69cf25efc0e@huawei.com> <87591c1f-5c6b-64bd-5dc2-900e1481b5ca@huawei.com> From: John Garry Message-ID: <07f82b86-fa3a-c4e5-f4bc-f12c4dbefd09@huawei.com> Date: Thu, 20 Feb 2020 12:20:19 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.45] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 20/02/2020 12:16, Xu Zaibo wrote: > > On 2020/2/20 19:07, John Garry wrote: >> On 20/02/2020 10:10, Xu Zaibo wrote: >>> Hi, >>> >>> >>> On 2020/2/20 17:50, John Garry wrote: >>>> On 20/02/2020 09:04, Zaibo Xu wrote: >>>>> From: liulongfang >>>>> >>>>> In the scenario of SMMU translation, the SEC performance of short >>>>> messages >>>>> (<512Bytes) cannot meet our expectations. To avoid this, we reserve >>>>> the >>>>> plat buffer (PBUF) memory for small packets when creating TFM. >>>>> >>>> >>>> I haven't gone through the code here, but why not use this method >>>> also for non-translated? What are the pros and cons? >>> Because non-translated has no performance or throughput problems. >>> >> >> OK, so no problem, but I was asking could it be improved, and, if so, >> what would be the drawbacks? >> >> As for the change to check if the IOMMU is translating, it seems exact >> same as that for the hi1616 driver... >> > Currently, I find the only drawback is needing more memory :), OK, so that is a drawback. > what's > your idea? I am just asking if we get any performance gain for using this same method for non-IOMMU case, and does the gain (if any) in performance outweigh the additional memory usage? > Yes, the same as SEC V1. So it could be factored out :) thanks, john