From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxWwF-0006gx-4z for qemu-devel@nongnu.org; Mon, 10 Apr 2017 06:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxWwB-0002k1-7D for qemu-devel@nongnu.org; Mon, 10 Apr 2017 06:52:51 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:3362 helo=dggrg03-dlp.huawei.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxWwA-0002gT-Ej for qemu-devel@nongnu.org; Mon, 10 Apr 2017 06:52:47 -0400 Message-ID: <58EB63ED.4020504@huawei.com> Date: Mon, 10 Apr 2017 18:52:29 +0800 From: "Longpeng (Mike)" MIME-Version: 1.0 References: <1491814852-62512-1-git-send-email-longpeng2@huawei.com> <20170410101853.GI3655@redhat.com> In-Reply-To: <20170410101853.GI3655@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.10 14/19] crypto: cipher: add af_alg cipher support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: xuquan8@huawei.com, arei.gonglei@huawei.com, qemu-devel@nongnu.org On 2017/4/10 18:18, Daniel P. Berrange wrote: > On Mon, Apr 10, 2017 at 05:00:52PM +0800, Longpeng(Mike) wrote: >> Adds afalg-backend cipher support: introduces some private APIs >> firstly, and then intergrates them into qcrypto_cipher_afalg_driver. >> >> Signed-off-by: Longpeng(Mike) >> --- >> crypto/Makefile.objs | 1 + >> crypto/cipher-afalg.c | 229 ++++++++++++++++++++++++++++++++++++++++++++ >> crypto/cipher.c | 30 +++++- >> include/crypto/afalg-comm.h | 11 +++ >> include/crypto/cipher.h | 7 ++ >> tests/test-crypto-cipher.c | 10 +- >> 6 files changed, 286 insertions(+), 2 deletions(-) >> create mode 100644 crypto/cipher-afalg.c >> > ... > > > All methods in this file should be named 'qcrypto_afalg_...' > Hi Daniel, Now the libiary-backend methods are named as "nettle(gcrypt,glib,builtin)_...", so if I rename them with "qcrypto_afalg_" prefix , then the libiary-backend methods need with "qcrypto_nettle(gcrypt,glib,builtin)_" prefix , right ? >> + >> +struct QCryptoCipherDriver qcrypto_cipher_afalg_driver = { >> + .cipher_encrypt = afalg_cipher_encrypt, >> + .cipher_decrypt = afalg_cipher_decrypt, >> + .cipher_setiv = afalg_cipher_setiv, >> + .cipher_free = afalg_comm_ctx_free, >> +}; > > > > > Regards, > Daniel -- Regards, Longpeng(Mike)