From patchwork Mon Aug 29 09:50:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 115594 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 60CA0A0542; Mon, 29 Aug 2022 11:50:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 054CB4069D; Mon, 29 Aug 2022 11:50:51 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id A43F94003C; Mon, 29 Aug 2022 11:50:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661766649; x=1693302649; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qDn4Ek3k0CI80JMlcKAeX7yFW7FtEGz8eQv/hWBz9B0=; b=TqJenefZb3KZo506jGVcQ+Hw2jByiHN0i64bDU2sz8gGSed4cSclJiua o0cK+TnYgwa6fcx/IFkTJvnATAtLGaSs7yzn3ndNBG59pXE4eVI8+FCBx 69J4Y+pGwsL7+55t4dxVxCzueZfyLxTpiWKbUIqrIWVmdIEIK1qMNbfVl GM/SroF1NIRChcs0FGFoXCs52CqDkkZ7e2EwNHS4q7AbtOsXxPh4IXXO6 Oe0NM4ePPDZeNWARIejoHSgIBJ2n1WrKhzSelx8QyAFgAf8eKWyONZABy KPgSL4zS401uwPGwqVRw5KQDMVtfUnTtPSYPfeCnBhgXrWAchkfElZTtX Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10453"; a="295633390" X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="295633390" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 02:50:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="856663810" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga006.fm.intel.com with ESMTP; 29 Aug 2022 02:50:36 -0700 From: Radu Nicolau To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, qi.z.zhang@intel.com, Radu Nicolau , stable@dpdk.org Subject: [PATCH] net/iavf: update ESN values when updating session Date: Mon, 29 Aug 2022 10:50:25 +0100 Message-Id: <20220829095026.977308-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 When updating an ingress session update the internal values before making the virtual channel request. Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ipsec_crypto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c index 75f05ee558..1d465b4419 100644 --- a/drivers/net/iavf/iavf_ipsec_crypto.c +++ b/drivers/net/iavf/iavf_ipsec_crypto.c @@ -893,11 +893,12 @@ iavf_ipsec_crypto_session_update(void *device, * iavf_security_session for outbound SA for use * in *iavf_ipsec_crypto_pkt_metadata_set* function. */ + iavf_sess->esn.hi = conf->ipsec.esn.hi; + iavf_sess->esn.low = conf->ipsec.esn.low; if (iavf_sess->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) rc = iavf_ipsec_crypto_sa_update_esn(adapter, iavf_sess); - else - iavf_sess->esn.hi = conf->ipsec.esn.hi; + } return rc;