patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM
@ 2020-09-01 17:18 Rahul Lakkireddy
  2020-09-11 23:47 ` [dpdk-stable] [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
MPS TCAM.

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
-- 
2.24.0


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

* [dpdk-stable] [PATCH v2] net/cxgbe: fix duplicate MAC addresses in MPS TCAM
  2020-09-01 17:18 [dpdk-stable] [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM Rahul Lakkireddy
@ 2020-09-11 23:47 ` " Rahul Lakkireddy
  2020-09-14 17:46   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Lakkireddy @ 2020-09-11 23:47 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. Otherwise, driver misses the
mask comparison and ends up inserting duplicate entries in the
MPS TCAM.

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>
---
v2:
- Fix spelling Othewise to Otherwise in commit message.

 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
-- 
2.24.0


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

* Re: [dpdk-stable] [PATCH v2] net/cxgbe: fix duplicate MAC addresses in MPS TCAM
  2020-09-11 23:47 ` [dpdk-stable] [PATCH v2] " Rahul Lakkireddy
@ 2020-09-14 17:46   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-09-14 17:46 UTC (permalink / raw)
  To: Rahul Lakkireddy, dev; +Cc: kaara.satwik, stable

On 9/12/2020 12:47 AM, Rahul Lakkireddy wrote:
> 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. Otherwise, driver misses the
> mask comparison and ends up inserting duplicate entries in the
> MPS TCAM.
> 
> 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>

Applied to dpdk-next-net/main, thanks.

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

end of thread, back to index

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-stable] [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM Rahul Lakkireddy
2020-09-11 23:47 ` [dpdk-stable] [PATCH v2] " Rahul Lakkireddy
2020-09-14 17:46   ` Ferruh Yigit

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox