DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, pablo.de.lara.guarch@intel.com,
	ferruh.yigit@intel.com,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: [dpdk-dev] [PATCH] ipsec: fix invalid assert condition
Date: Mon, 14 Jan 2019 12:07:39 +0000	[thread overview]
Message-ID: <1547467659-15812-1-git-send-email-konstantin.ananyev@intel.com> (raw)

fix invalid RTE_ASSERT condition in rsn_update_finish()

Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 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

             reply	other threads:[~2019-01-14 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 12:07 Konstantin Ananyev [this message]
2019-01-14 13:37 ` Ferruh Yigit
2019-01-14 13:46   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1547467659-15812-1-git-send-email-konstantin.ananyev@intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).