From: Cristian Dumitrescu Date: Thu, 5 Nov 2020 15:27:46 +0000 (+0000) Subject: table: fix exact match SWX table lookup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5725870c8cdb493de0a1f7341d8167a9de4293cf;p=dpdk.git table: fix exact match SWX table lookup Fix for the exact match lookup function. Fixes: d0a00966618b ("table: add exact match SWX table") Signed-off-by: Churchill Khangar Signed-off-by: Cristian Dumitrescu --- diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c index 85c77ad031..5f67223060 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);