DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler
@ 2017-12-27 20:22 Qi Zhang
  2017-12-27 20:22 ` [dpdk-dev] [PATCH 2/2] net/e1000: " Qi Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Qi Zhang @ 2017-12-27 20:22 UTC (permalink / raw)
  To: wenzhuo.lu; +Cc: dev, wei.dai, liang-min.wang, Qi Zhang, stable

Mailbox interrupt handler only take care of PF reset notification, for
other message ixgbe_read_mbx should not be called since it get chance
to break the foreground VF to PF communication.
This can be simply repeated by
testpmd>rx_vlan rm all 0

Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff19a56..02121f4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8165,13 +8165,17 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	u32 in_msg = 0;
 
-	if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
-		return;
+	/* peek the message first */
+	in_msg = IXGBE_READ_REG(hw, IXGBE_VFMBMEM);
 
 	/* PF reset VF event */
-	if (in_msg == IXGBE_PF_CONTROL_MSG)
+	if (in_msg == IXGBE_PF_CONTROL_MSG) {
+		/* dummy mbx read to ack pf */
+		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
+			return;
 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL, NULL);
+	}
 }
 
 static int
-- 
2.7.4

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

end of thread, other threads:[~2018-01-13 16:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27 20:22 [dpdk-dev] [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler Qi Zhang
2017-12-27 20:22 ` [dpdk-dev] [PATCH 2/2] net/e1000: " Qi Zhang
2018-01-12  2:32   ` Dai, Wei
2018-01-13 16:14   ` Zhang, Helin
2017-12-28  4:38 ` [dpdk-dev] [PATCH 1/2] net/ixgbe: " Dai, Wei
2018-01-11  8:07   ` Zhang, Qi Z
2018-01-12  2:29     ` Dai, Wei
2018-01-12  2:30 ` Dai, Wei
2018-01-13  6:27 ` Zhang, Helin
2018-01-13 16:13 ` Zhang, Helin

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