DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast
@ 2019-01-02  6:32 Wei Zhao
  2019-01-03 13:47 ` Zhang, Qi Z
  2019-01-04  8:34 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix multicast table enable error for VF Wei Zhao
  0 siblings, 2 replies; 8+ messages in thread
From: Wei Zhao @ 2019-01-02  6:32 UTC (permalink / raw)
  To: dev; +Cc: stable, jingjing.wu, Wei Zhao

In ixgbe PMD code, all vf ars set with bit IXGBE_VMOLR_ROMPE,
which make vf accept packets that match the MTA table,
if some vf update IXGBE_MTA in function ixgbe_vf_set_multicast,
then all vf will receive packets from these address.
So thhere is need to set VMOLR register bit ROPE onlty after this
vf has been set multicast address. If this bit is when pf host doing
initialization, this vf will receive multicast packets with address
written in MTA table. Align to ixgbe pf kernel 5.3.7 code to fix this
bug.

Fixes: 00e30184daa0 ("ixgbe: add PF support")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 4b833ff..0f4b96b 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -351,7 +351,7 @@ ixgbe_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint32_t vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
 
-	vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_ROMPE |
+	vmolr |= (IXGBE_VMOLR_ROPE |
 			IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE);
 	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
 
@@ -503,6 +503,7 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	const uint32_t IXGBE_MTA_BIT_MASK = (0x1 << IXGBE_MTA_BIT_SHIFT) - 1;
 	uint32_t reg_val;
 	int i;
+	u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
 
 	/* Disable multicast promiscuous first */
 	ixgbe_disable_vf_mc_promisc(dev, vf);
@@ -525,6 +526,9 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		IXGBE_WRITE_REG(hw, IXGBE_MTA(mta_idx), reg_val);
 	}
 
+	vmolr |= IXGBE_VMOLR_ROMPE;
+	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
+
 	return 0;
 }
 
-- 
2.7.5

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

end of thread, other threads:[~2019-01-07  6:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-02  6:32 [dpdk-dev] [PATCH] net/ixgbe: fix MAT enable for VF in multicast Wei Zhao
2019-01-03 13:47 ` Zhang, Qi Z
2019-01-04  8:34   ` Zhao1, Wei
2019-01-04 12:13     ` Zhang, Qi Z
2019-01-04  8:34 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix multicast table enable error for VF Wei Zhao
2019-01-04 12:20   ` Zhang, Qi Z
2019-01-07  1:25     ` Zhao1, Wei
2019-01-07  5:39   ` [dpdk-dev] [PATCH v3] " Wei Zhao

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