net/i40e: fix VFIO interrupt mapping in VF
authorWei Dai <wei.dai@intel.com>
Fri, 3 Nov 2017 08:47:29 +0000 (16:47 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 3 Nov 2017 19:13:42 +0000 (20:13 +0100)
commit66b8304f9d5f8be5dccd169a7ced4fb6c058b488
tree0dc5d6969602380eba4421cb586db02cdc6b90e6
parent52960057f1d4958b541331ccba88c3241ebe9613
net/i40e: fix VFIO interrupt mapping in VF

When a VF port is bound to VFIO-PIC, only miscellaneous interrupt
is mapped to VFIO vector 0 in i40evf_dev_init( ).
In i40evf_dev_interrupt_handle( ) and i40evf_dev_rx_queue_intr_enable( ),
if previous VFIO interrupt mapping set in i40evf_dev_init( ) is not
cleared, it will fail when PMD tries to map Rx queue interrupt to other
VFIO vectors by calling rte_intr_enable( ).

This patch clears the VFIO interrupt mappings before setting both
miscellaneous and Rx queue interrupt mappings again to avoid failure.
And remove the calling of rte_intr_enable( ) in
i40evf_dev_interrupt_handler( ) as there is no need to map VFIO interrupt
in this function repeatedly.

Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/i40e_ethdev_vf.c