net/e1000: fix mailbox interrupt handler

Mailbox interrupt handler only takecare of the PF reset notification,
for other message mbx->ops.read should not be called since it gets
chance to break the foreground VF to PF communication.

Fixes: 316f4f1adc ("net/igb: 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:30 -05:00 committed by Ferruh Yigit
parent 6810c63926
commit dd18b06a32

View File

@ -2961,13 +2961,17 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
struct e1000_mbx_info *mbx = &hw->mbx;
u32 in_msg = 0;
if (mbx->ops.read(hw, &in_msg, 1, 0))
return;
/* peek the message first */
in_msg = E1000_READ_REG(hw, E1000_VMBMEM(0));
/* PF reset VF event */
if (in_msg == E1000_PF_CONTROL_MSG)
if (in_msg == E1000_PF_CONTROL_MSG) {
/* dummy mbx read to ack pf */
if (mbx->ops.read(hw, &in_msg, 1, 0))
return;
_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
NULL);
}
}
static int