From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 92A1D4C6C for ; Mon, 14 Jan 2019 13:07:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 04:07:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,477,1539673200"; d="scan'208";a="266971555" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by orsmga004.jf.intel.com with ESMTP; 14 Jan 2019 04:07:42 -0800 From: Konstantin Ananyev To: dev@dpdk.org Cc: akhil.goyal@nxp.com, pablo.de.lara.guarch@intel.com, ferruh.yigit@intel.com, Konstantin Ananyev Date: Mon, 14 Jan 2019 12:07:39 +0000 Message-Id: <1547467659-15812-1-git-send-email-konstantin.ananyev@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] ipsec: fix invalid assert condition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 12:07:47 -0000 fix invalid RTE_ASSERT condition in rsn_update_finish() Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment") Reported-by: Ferruh Yigit Signed-off-by: Konstantin Ananyev --- lib/librte_ipsec/ipsec_sqn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ipsec/ipsec_sqn.h b/lib/librte_ipsec/ipsec_sqn.h index 7de10bef5..a3ae7e2de 100644 --- a/lib/librte_ipsec/ipsec_sqn.h +++ b/lib/librte_ipsec/ipsec_sqn.h @@ -333,7 +333,7 @@ rsn_update_finish(struct rte_ipsec_sa *sa, struct replay_sqn *rsn) n = sa->sqn.inb.wridx; RTE_ASSERT(n != sa->sqn.inb.rdidx); - RTE_ASSERT(rsn - sa->sqn.inb.rsn == n); + RTE_ASSERT(rsn == sa->sqn.inb.rsn[n]); rte_rwlock_write_unlock(&rsn->rwl); sa->sqn.inb.rdidx = n; -- 2.17.1