> -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, December 28, 2017 4:23 AM > To: Lu, Wenzhuo <wenzhuo...@intel.com> > Cc: dev@dpdk.org; Dai, Wei <wei....@intel.com>; Wang, Liang-min > <liang-min.w...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; > sta...@dpdk.org > Subject: [PATCH 2/2] net/e1000: fix mailbox interrupt handler > > Mailbox interrupt handler only take care of the PF reset notification, for > other message mbx->ops.read should not be called since it get chance to > break the foreground VF to PF communication. > > Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link > up/down") > Cc: sta...@dpdk.org > > Signed-off-by: Qi Zhang <qi.z.zh...@intel.com> Acked-by: Wei Dai <wei....@intel.com>
> --- > drivers/net/e1000/igb_ethdev.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/e1000/igb_ethdev.c > b/drivers/net/e1000/igb_ethdev.c index fdc139f..0d8bc49 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -2970,13 +2970,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, NULL); > + } > } > > static int > -- > 2.7.4