net/ixgbe: fix mailbox interrupt handler

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

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

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
This commit is contained in:
Qi Zhang 2017-12-27 15:22:29 -05:00 committed by Ferruh Yigit
parent c473d362e3
commit 6810c63926

View File

@ -8141,13 +8141,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);
}
}
static int