[dpdk-dev,1/2] ixgbe: fix vfio ioctl SET_IRQS error
Commit Message
The vector number may change during 'dev_start'. Before enabling a new vector mapping,
it's necessary to disable/unmap the previous setting.
Fixes: 7ab8500037f6 ("ixgbe: fix VF start with PF stopped")
Reported-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
Comments
Tested-by: Yong Liu <yong.liu@intel.com>
> -----Original Message-----
> From: Liang, Cunming
> Sent: Friday, November 13, 2015 10:50 AM
> To: dev@dpdk.org
> Cc: Liu, Yong; Liang, Cunming
> Subject: [PATCH 1/2] ixgbe: fix vfio ioctl SET_IRQS error
>
> The vector number may change during 'dev_start'. Before enabling a new
> vector mapping,
> it's necessary to disable/unmap the previous setting.
>
> Fixes: 7ab8500037f6 ("ixgbe: fix VF start with PF stopped")
>
> Reported-by: Yong Liu <yong.liu@intel.com>
> Signed-off-by: Cunming Liang <cunming.liang@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 19ddb52..c2be264 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -1976,6 +1976,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
> return -EINVAL;
> }
>
> + /* disable uio/vfio intr/eventfd mapping */
> + rte_intr_disable(intr_handle);
> +
> /* stop adapter */
> hw->adapter_stopped = 0;
> ixgbe_stop_adapter(hw);
> --
> 2.4.3
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Liu, Yong
> Sent: Friday, November 13, 2015 2:08 PM
> To: Liang, Cunming <cunming.liang@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] ixgbe: fix vfio ioctl SET_IRQS error
>
> Tested-by: Yong Liu <yong.liu@intel.com>
>
> > -----Original Message-----
> > From: Liang, Cunming
> > Sent: Friday, November 13, 2015 10:50 AM
> > To: dev@dpdk.org
> > Cc: Liu, Yong; Liang, Cunming
> > Subject: [PATCH 1/2] ixgbe: fix vfio ioctl SET_IRQS error
> >
> > The vector number may change during 'dev_start'. Before enabling a new
> > vector mapping, it's necessary to disable/unmap the previous setting.
> >
> > Fixes: 7ab8500037f6 ("ixgbe: fix VF start with PF stopped")
> >
> > Reported-by: Yong Liu <yong.liu@intel.com>
> > Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
@@ -1976,6 +1976,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
return -EINVAL;
}
+ /* disable uio/vfio intr/eventfd mapping */
+ rte_intr_disable(intr_handle);
+
/* stop adapter */
hw->adapter_stopped = 0;
ixgbe_stop_adapter(hw);