From patchwork Tue Mar 1 13:41:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 108439 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8F716A04A4; Tue, 1 Mar 2022 14:41:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C31C426DE; Tue, 1 Mar 2022 14:41:50 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 87B8540DF6; Tue, 1 Mar 2022 14:41:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646142109; x=1677678109; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=j0LmnnUvHyHIM+wrsYlGwDlbjMImOrLiZRHY9cVGSqI=; b=VCqtJKCD+TU/c3FMNKfhhiSVaFawObhzY9RPuZDCnR7IhvRr62TezNBy YZBOlIEDit655jXMtEoI3oMT6i6JuA/MlzUM2UmjUaP9oLhpXdbB4kTKq L/sdLuVfZXc43emlTwhtFR3SJTJaInvw4KKI2K4CdgThTounSLEPLBp+5 opluZSuF1Mb/Sl6k8Vf7LoloKEPEb44P2zCPAEXuJM8t+EzoTJSvEMLir OmXqQNj9nYrKSCk+xTrAHxmldc+1O/+qrYR6SSOHZablPGlivVqmkriv3 Pg4RDCGGYhGuLRgNVzX1fdwq4Oth6fM0HjXcmmYsXpmc1q3iDx4SVgpvC Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="240544063" X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="240544063" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 05:41:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,146,1643702400"; d="scan'208";a="639371541" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga002.fm.intel.com with ESMTP; 01 Mar 2022 05:41:46 -0800 From: Radu Nicolau To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, daniel.m.buckley@intel.com, qi.z.zhang@intel.com, Radu Nicolau , stable@dpdk.org Subject: [PATCH] net/iavf: fix AES-GMAC IV size Date: Tue, 1 Mar 2022 13:41:31 +0000 Message-Id: <20220301134133.1886839-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix AES-GMAC size, set it to the required value, unlike lookaside where it also includes salt length. Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau Reviewed-by: Qi Zhang --- drivers/net/iavf/iavf_ipsec_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c index d6875eb6aa..b1949cee91 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.c +++ b/drivers/net/iavf/iavf_ipsec_crypto.c @@ -614,7 +614,7 @@ set_session_parameter(struct iavf_security_ctx *iavf_sctx, if (conf->crypto_xform->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) { sess->block_sz = get_auth_blocksize(iavf_sctx, conf->crypto_xform->auth.algo); - sess->iv_sz = conf->crypto_xform->auth.iv.length; + sess->iv_sz = sizeof(uint64_t); /* iv len inc. salt */ sess->icv_sz = conf->crypto_xform->auth.digest_length; } else { sess->block_sz = get_cipher_blocksize(iavf_sctx,