Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp622623ybv; Thu, 20 Feb 2020 04:33:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxbsPjhA/h5MnadcD3FQl1g3GsSIxGGNn+nbyVwrSapGUmhBidoukzwQHegmSdDtVfBzvH6 X-Received: by 2002:aca:814:: with SMTP id 20mr1803451oii.159.1582201999105; Thu, 20 Feb 2020 04:33:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582201999; cv=none; d=google.com; s=arc-20160816; b=TU5+LRVT2Zv2jdeRhwHIdvdMXX4kvyZLQHfX9HB4NWX4ZSbLT3MEI1qp7Rj7eRZBmP NDY7sEa10/bLckcLdUSe31yJYQRJ7DMN2ILKXjSfWSq+qBP+HL4ufpcEME2NJFIOQOKP MzT4RzLe8pkTdX+SKVHIuOWCaEUI8HKF3FvlfuQdp36ZoYfrexZe39HrJNp30jypE6nS mQQeIeTiDdgoWohf2M8are5Tk81zue2Je4X4bhRqwCWTM8GFm/6Py0QuPw9PdL6S8h6Y NwbvD5wfn9LDeHXp7mf+bPVbKd0k8vfgDcMbmGWDCHniY3dPzge3O/RaQIwvDzNtZuhj 52Jw== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=D+7sAxTkNdOvEs1pG63lROg2mJxqisv0gO3d7+etabU=; b=HnAqXmtUSWWYuw9NQSr3EIuIz7ye8DShSVB8Cnn9PazrE9KQfB9WqWNGT3/7J53uPu 5uPykHT8moFo2Evsp3iTKnvMqqtkgVmB9EOy+Qh7N6c4zcPPs6akp1Sv9yRTWr/5Pg2U k9AsF5N0G7qV/48e7qWg/r6CfkkBFfsQzuPtEYv8uqf65RYqSDFYqenV0siKWL3q3BKP d1dzrhVhbdeKnH6eBEK5B9rE/cqhBOr/OMkUefjJ3+NRSsakw4AIRyu9dGt6/aO7Z/pH uh0UahNDNzACTf2ZB0fHkvZn6OBDBRA6QDZ6rrJlHZA0eLRw+OKvhJ0oDxi3TzDA2QZS /How== 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 h125si10398412oia.253.2020.02.20.04.33.05; Thu, 20 Feb 2020 04:33:19 -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 S1727747AbgBTMdF (ORCPT + 99 others); Thu, 20 Feb 2020 07:33:05 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:10228 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727553AbgBTMdF (ORCPT ); Thu, 20 Feb 2020 07:33:05 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6CF862BA10B01F00F933; Thu, 20 Feb 2020 20:33:01 +0800 (CST) Received: from [127.0.0.1] (10.67.101.242) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Thu, 20 Feb 2020 20:32:53 +0800 Subject: Re: [PATCH 4/4] crypto: hisilicon/sec2 - Add pbuffer mode for SEC driver To: John Garry , , 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> <07f82b86-fa3a-c4e5-f4bc-f12c4dbefd09@huawei.com> CC: , , , , , , , From: Xu Zaibo Message-ID: <87969895-2275-81f2-34ba-821876639f50@huawei.com> Date: Thu, 20 Feb 2020 20:32:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <07f82b86-fa3a-c4e5-f4bc-f12c4dbefd09@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.101.242] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2020/2/20 20:20, John Garry wrote: > 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? Sorry for my misunderstanding. As our testing, no gain for no-iommu case, because of memory copy. > >> Yes, the same as SEC V1. > > So it could be factored out :) It is a good idea. However, now SEC V1 and V2 are in different directories, more, this checking logic is quite simple. And for our HPRE and ZIP, there is no performance or throughput problem as IOMMU on. Cheers, Zaibo . > > thanks, > john > . >