DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM
@ 2020-09-01 17:18 Rahul Lakkireddy
  2020-09-11 23:47 ` [dpdk-dev] [PATCH v2] " Rahul Lakkireddy
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Lakkireddy @ 2020-09-01 17:18 UTC (permalink / raw)
  To: dev; +Cc: kaara.satwik, stable

From: Karra Satwik <kaara.satwik@chelsio.com>

During MAC address insertion to MPS TCAM, add a default mask when
the mask is not explicitly specified. Othewise, driver misses the
mask comparison and ends up inserting duplicate entries in the

Fixes: 6fda3f0ddda9 ("net/cxgbe: add API to program hardware MPS table")
Cc: stable@dpdk.org

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 drivers/net/cxgbe/mps_tcam.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/cxgbe/mps_tcam.c b/drivers/net/cxgbe/mps_tcam.c
index 5302d1343..6e5fae992 100644
--- a/drivers/net/cxgbe/mps_tcam.c
+++ b/drivers/net/cxgbe/mps_tcam.c
@@ -140,6 +140,7 @@ int cxgbe_mpstcam_modify(struct port_info *pi, int idx, const u8 *addr)
 	/* idx can now be different from what user provided */
 	entry = &mpstcam->entry[idx];
 	memcpy(entry->eth_addr, addr, RTE_ETHER_ADDR_LEN);
+	memset(entry->mask, ~0, RTE_ETHER_ADDR_LEN);
 	/* NOTE: we have considered the case that idx returned by t4_change_mac
 	 * will be different from the user provided value only if user
 	 * provided value is -1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-14 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 17:18 [dpdk-dev] [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM Rahul Lakkireddy
2020-09-11 23:47 ` [dpdk-dev] [PATCH v2] " Rahul Lakkireddy
2020-09-14 17:46   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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).