From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0644A0093; Tue, 14 Jun 2022 14:43:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F2B840A81; Tue, 14 Jun 2022 14:43:22 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 17DBA4069C; Tue, 14 Jun 2022 14:43:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655210600; x=1686746600; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WCre41A1HKxamu/1ETPx0MLUDzPb9INtN2ENXQZ6nPY=; b=fGIdh40uolky1N8Cjd4zjexA5UJKqQ9n0QyZxpG2esh4VRPPitPyz0eq uAwxrJNRhfdZSf10zpUa32Ahw2+4Bp/QrQst/fVXp0vNufjN4ZrGaPTQQ dx2RyiuTM2LF8A8MjEFc8HDYqaY8jaPwMI7Zr8v8xd7wOcl/O4MAOHjyw FKkdNhP7B4++HmNI5H5+9LwPyZEC/Z4TM8hlcLtNX0YUq4bWinjFRuxwo GOMaJcGjLUIkQ5LEBYCY9I8ma34X6lQ4sk9hHaxmoOrUIz2NQVUS5UGwi nNpYNZf7MOrmErvO0H6y8/qcfJ8XccuCsmR+37mq1pUVzNlke9VPzGWwW g==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="258441571" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="258441571" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 05:43:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="830403677" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by fmsmga006.fm.intel.com with ESMTP; 14 Jun 2022 05:43:16 -0700 From: Radu Nicolau To: Radu Nicolau , Akhil Goyal Cc: dev@dpdk.org, stable@dpdk.org Subject: [PATCH] examples/ipsec-secgw: fix ESN setting Date: Tue, 14 Jun 2022 13:43:13 +0100 Message-Id: <20220614124313.1562369-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 ESN option flag and initial value for the rte_ipsec library path. Fixes: 560029d5cfc9 ("examples/ipsec-secgw: define initial ESN value") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau --- examples/ipsec-secgw/sa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 0b27f11fc0..8505a676ef 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -1488,6 +1488,11 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss, prm->ipsec_xform.options.ecn = 1; prm->ipsec_xform.options.copy_dscp = 1; + if (ss->esn > 0) { + prm->ipsec_xform.options.esn = 1; + prm->ipsec_xform.esn.value = ss->esn; + } + if (IS_IP4_TUNNEL(ss->flags)) { prm->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4; prm->tun.hdr_len = sizeof(*v4); -- 2.25.1