DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, churchill.khangar@intel.com
Subject: [dpdk-dev] [PATCH] table: fix exact match lookup
Date: Thu,  5 Nov 2020 15:27:46 +0000	[thread overview]
Message-ID: <20201105152746.24821-1-cristian.dumitrescu@intel.com> (raw)

Fix for the exact match lookup function.

Fixes: d0a00966618b ("table: add exact match SWX table")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
---
 lib/librte_table/rte_swx_table_em.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c
index 85c77ad03..5f6722306 100644
--- a/lib/librte_table/rte_swx_table_em.c
+++ b/lib/librte_table/rte_swx_table_em.c
@@ -720,19 +720,19 @@ table_lookup(void *table,
 		uint32_t bkt_key_id;
 
 		bkt_sig0 = input_sig ^ bkt->sig[0];
-		if (bkt_sig0)
+		if (!bkt_sig0)
 			mask0 = 1 << 0;
 
 		bkt_sig1 = input_sig ^ bkt->sig[1];
-		if (bkt_sig1)
+		if (!bkt_sig1)
 			mask1 = 1 << 1;
 
 		bkt_sig2 = input_sig ^ bkt->sig[2];
-		if (bkt_sig2)
+		if (!bkt_sig2)
 			mask2 = 1 << 2;
 
 		bkt_sig3 = input_sig ^ bkt->sig[3];
-		if (bkt_sig3)
+		if (!bkt_sig3)
 			mask3 = 1 << 3;
 
 		mask_all = (mask0 | mask1) | (mask2 | mask3);
-- 
2.17.1


             reply	other threads:[~2020-11-05 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 15:27 Cristian Dumitrescu [this message]
2020-11-13 13:04 ` David Marchand

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=20201105152746.24821-1-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=churchill.khangar@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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).