From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by dpdk.org (Postfix) with ESMTP id 075E2B47D for ; Tue, 21 Jun 2016 15:49:49 +0200 (CEST) Received: by mail-lb0-f172.google.com with SMTP id ak10so11254792lbc.3 for ; Tue, 21 Jun 2016 06:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=L2oJwIKifz6Afo8YtPI2fHirq0aTvHCJ+8Kr+2bWnd8=; b=l0d8nubCWiZcboMfcg9jWq/L78vqsjl1p4RS1WemqKaZc8a4roA+Rge7XLZrvLKvx5 +LAI4uLAFHzmEp6svtOQDonR1FnTeVXtgv7jnZk43u6IKHIw2MQCBtNZRnzrr94tAbUa ymWjKudyRZZD+POpaLVIMWSYwmKDQ4ivKOWXqwQHszfvUiT5oQdENxh6v6DgGPapYRQD Ka1QhE7uSh7Jobr86tLOriwg58TzvjcwLDAYa1jPujp3cIXtckCsEcEu8etJ8Yqvro99 mgwv4xUYZ1WyjhINsQnetYsiBrJubvwTvENffwjly3DTD7Bk91dLy6qALRl78XaxU4Wv YCqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=L2oJwIKifz6Afo8YtPI2fHirq0aTvHCJ+8Kr+2bWnd8=; b=bjyJciFXxQMgGDrS1ijlnDAkYhREZKT0QCheR2FmANwvdUIkvJAW8wEtst1DiOAuEy fxEBneLA9KrScQaFWjAV28z+kSfG7P6E7eTNq7TSoCmjUpc6Uv6x++tg4NOqbppXLFu2 5X8DiHE9i+VSkpj3GoZTHO136OvfvDaK86czAu6UX090aqPSS1JmvTZkIBXm4+XwZwMg 8vVnUbOPfU/6G7jvpP0hNeddyFeYSIGUkuO89blmZxQut5nN5QbmlJAEcMs45D+opfA8 kfxtBBM6Z5/59gYAStIwkfAXjgIERZJi3V1bxlEZzf/tV1GU+Mbt6Ut84bdK4rtIa1pc xyUA== X-Gm-Message-State: ALyK8tK47hi7vn2gC+My9iSt+bP5WWOb87dmAbQva+2++dvrbsjsMms3e5MaCwY8ncuT3hvZ X-Received: by 10.194.105.200 with SMTP id go8mr3095232wjb.83.1466516989514; Tue, 21 Jun 2016 06:49:49 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id m5sm3103760wmm.10.2016.06.21.06.49.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jun 2016 06:49:48 -0700 (PDT) From: Thomas Monjalon To: John Griffin Cc: dev@dpdk.org, deepak.k.jain@intel.com, pablo.de.lara.guarch@intel.com Date: Tue, 21 Jun 2016 15:49:48 +0200 Message-ID: <3195917.C7veDrCJq7@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1466513759-55842-1-git-send-email-john.griffin@intel.com> References: <1466513759-55842-1-git-send-email-john.griffin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] qat: addition of optimized content descriptor for AES128-SHA1-HMAC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 13:49:50 -0000 Hi, I'm not used to review crypto patches but I think this patch can be improved. 2016-06-21 13:55, John Griffin: > Adding an optimized content descriptor for AES128-SHA1-HMAC to > improve thoughput performance. Maybe you can explain how it improves the performance. > +/* > + * Function which will return if it's possible to use the > + * optimised content descriptor. > + */ > +int qat_crypto_sym_use_optimized_alg(struct qat_session *session) [...] > +/* > + * Function to create an optimised content descriptor for AES128 SHA1. > + */ > +int qat_crypto_create_optimzed_session(struct qat_session *session, These function are very specific with a generic name. Maybe that CBC AES128 SHA1 or something like that must be part of the function name. Otherwise you will come with yet another crypto refactoring patch in few weeks. > case ICP_QAT_FW_LA_CMD_CIPHER: > - session = qat_crypto_sym_configure_session_cipher(dev, xform, session); > + session = qat_crypto_sym_configure_session_cipher(dev, xform, > + session); > break; > case ICP_QAT_FW_LA_CMD_AUTH: > - session = qat_crypto_sym_configure_session_auth(dev, xform, session); > + session = qat_crypto_sym_configure_session_auth(dev, xform, > + session); > break; > case ICP_QAT_FW_LA_CMD_CIPHER_HASH: > - session = qat_crypto_sym_configure_session_cipher(dev, xform, session); > - session = qat_crypto_sym_configure_session_auth(dev, xform, session); > - break; > + session = qat_crypto_sym_configure_session_cipher(dev, xform, > + session); > + session = qat_crypto_sym_configure_session_auth(dev, xform, > + session); > + if (qat_crypto_sym_use_optimized_alg(session)) > + qat_crypto_sym_configure_optimized_session(dev, xform, > + session); > + break; > case ICP_QAT_FW_LA_CMD_HASH_CIPHER: > - session = qat_crypto_sym_configure_session_auth(dev, xform, session); > - session = qat_crypto_sym_configure_session_cipher(dev, xform, session); > - break; > + session = qat_crypto_sym_configure_session_auth(dev, xform, > + session); > + session = qat_crypto_sym_configure_session_cipher(dev, xform, > + session); > + if (qat_crypto_sym_use_optimized_alg(session)) > + qat_crypto_sym_configure_optimized_session(dev, xform, > + session); > + break; There is a lot of indent fixing mixed with the addition here. 2 patches would make things easier to understand. > @@ -551,11 +591,11 @@ qat_crypto_sym_configure_session_auth(struct rte_cryptodev *dev, > auth_xform->algo); > goto error_out; > } > - cipher_xform = qat_get_cipher_xform(xform); > > if ((session->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_128) || > (session->qat_hash_alg == > ICP_QAT_HW_AUTH_ALGO_GALOIS_64)) { > + cipher_xform = qat_get_cipher_xform(xform); > if (qat_alg_aead_session_create_content_desc_auth(session, How this move is related to the patch?