* [dpdk-dev] [PATCH] net/ixgbe: fix VFIO interrupt mapping in VF @ 2017-09-20 10:09 Wei Dai 2017-09-28 2:28 ` [dpdk-dev] [PATCH v2] " Wei Dai 0 siblings, 1 reply; 7+ messages in thread From: Wei Dai @ 2017-09-20 10:09 UTC (permalink / raw) To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai, stable When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in ixgbevf_dev_init( ). In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in ixgbevf_dev_init( ) is not cleard, it will fail when calling rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO vectors. This patch clears the VFIO interrupt mappings before setting both miscellaneous and Rx queue interrupt mappings again to avoid failure. Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down") Cc: stable@dpdk.org Signed-off-by: Wei Dai <wei.dai@intel.com> --- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 9ca5cbc..f7a8dc8 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) } ixgbevf_configure_msix(dev); + /* When a PF port is bound to VFIO-PCI, only miscellaneous interrupt + * is mapped to VFIO vector 0 in ixgbe_dev_init( ). + * If previous VFIO interrupt mapping set in ixgbe_dev_init( ) is + * not cleared, it will fail when following rte_intr_enable( ) tries + * to map Rx queue interrupt to other VFIO vectors. + * So clear uio/vfio intr/evevnfd first to avoid failure. + */ + rte_intr_disable(intr_handle); + rte_intr_enable(intr_handle); /* Re-enable interrupt for VF */ -- 2.7.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF 2017-09-20 10:09 [dpdk-dev] [PATCH] net/ixgbe: fix VFIO interrupt mapping in VF Wei Dai @ 2017-09-28 2:28 ` Wei Dai 2017-10-10 3:29 ` Dai, Wei 2017-10-11 3:16 ` Lu, Wenzhuo 0 siblings, 2 replies; 7+ messages in thread From: Wei Dai @ 2017-09-28 2:28 UTC (permalink / raw) To: wenzhuo.lu, konstantin.ananyev, cunming.liang, jianwei.ma Cc: dev, Wei Dai, stable When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO vectors. This patch clears the VFIO interrupt mappings before setting both miscellaneous and Rx queue interrupt mappings again to avoid failure. Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down") Cc: stable@dpdk.org Signed-off-by: Wei Dai <wei.dai@intel.com> --- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 9ca5cbc..f49c616 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) } ixgbevf_configure_msix(dev); + /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt + * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). + * If previous VFIO interrupt mapping setting in eth_ixgbevf_dev_init( ) + * is not cleared, it will fail when following rte_intr_enable( ) tries + * to map Rx queue interrupt to other VFIO vectors. + * So clear uio/vfio intr/evevnfd first to avoid failure. + */ + rte_intr_disable(intr_handle); + rte_intr_enable(intr_handle); /* Re-enable interrupt for VF */ -- 2.7.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF 2017-09-28 2:28 ` [dpdk-dev] [PATCH v2] " Wei Dai @ 2017-10-10 3:29 ` Dai, Wei [not found] ` <B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com> 2017-10-11 3:16 ` Lu, Wenzhuo 1 sibling, 1 reply; 7+ messages in thread From: Dai, Wei @ 2017-10-10 3:29 UTC (permalink / raw) To: Lu, Wenzhuo, Ananyev, Konstantin, Liang, Cunming, Ma, Jianwei; +Cc: dev, stable Hi, Jianwei How about your test result ? Hi Wenzhuo Would you please review this patch ? Thanks a lot ! > -----Original Message----- > From: Dai, Wei > Sent: Thursday, September 28, 2017 10:29 AM > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org > Subject: [PATCH v2] net/ixgbe: 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 eth_ixgbevf_dev_init( ). > In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in > eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling rte_intr_enable( ) > tries to map Rx queue interrupt to other VFIO vectors. This patch clears the > VFIO interrupt mappings before setting both miscellaneous and Rx queue > interrupt mappings again to avoid failure. > > Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link > up/down") > Cc: stable@dpdk.org > > Signed-off-by: Wei Dai <wei.dai@intel.com> > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 9ca5cbc..f49c616 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) > } > ixgbevf_configure_msix(dev); > > + /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt > + * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). > + * If previous VFIO interrupt mapping setting in eth_ixgbevf_dev_init( ) > + * is not cleared, it will fail when following rte_intr_enable( ) tries > + * to map Rx queue interrupt to other VFIO vectors. > + * So clear uio/vfio intr/evevnfd first to avoid failure. > + */ > + rte_intr_disable(intr_handle); > + > rte_intr_enable(intr_handle); > > /* Re-enable interrupt for VF */ > -- > 2.7.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com>]
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF [not found] ` <B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com> @ 2017-10-11 7:07 ` Dai, Wei 2017-10-11 7:22 ` Dai, Wei 1 sibling, 0 replies; 7+ messages in thread From: Dai, Wei @ 2017-10-11 7:07 UTC (permalink / raw) To: Ma, Jianwei, Lu, Wenzhuo, Ananyev, Konstantin, Liang, Cunming; +Cc: dev, stable I look through from web browser and not find following mail from Jianwei Ma <Jianwei.ma@intel.com> Hope this can add his test result in the mail list to community. > -----Original Message----- > From: Ma, Jianwei > Sent: Tuesday, October 10, 2017 4:47 PM > To: Dai, Wei <wei.dai@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > Ananyev, Konstantin <konstantin.ananyev@intel.com>; Liang, Cunming > <cunming.liang@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF > > Verified with l3fwd-power. It worked well with this patch plus > http://dpdk.org/dev/patchwork/patch/29000/ " [dpdk-dev] net/ixgbe: fix > Rx queue interrupt mapping in VF" > > -----Original Message----- > From: Dai, Wei > Sent: Tuesday, October 10, 2017 11:30 > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF > > Hi, Jianwei > How about your test result ? > > Hi Wenzhuo > Would you please review this patch ? > > Thanks a lot ! > > > -----Original Message----- > > From: Dai, Wei > > Sent: Thursday, September 28, 2017 10:29 AM > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > > <konstantin.ananyev@intel.com>; Liang, Cunming > > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org > > Subject: [PATCH v2] net/ixgbe: 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 eth_ixgbevf_dev_init( ). > > In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in > > eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling > > rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO > > vectors. This patch clears the VFIO interrupt mappings before setting > > both miscellaneous and Rx queue interrupt mappings again to avoid > failure. > > > > Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link > > up/down") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Dai <wei.dai@intel.com> > Tested-by: Jianwei Ma <Jianwei.ma@intel.com> > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index 9ca5cbc..f49c616 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) > > } > > ixgbevf_configure_msix(dev); > > > > + /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt > > + * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). > > + * If previous VFIO interrupt mapping setting in eth_ixgbevf_dev_init( ) > > + * is not cleared, it will fail when following rte_intr_enable( ) tries > > + * to map Rx queue interrupt to other VFIO vectors. > > + * So clear uio/vfio intr/evevnfd first to avoid failure. > > + */ > > + rte_intr_disable(intr_handle); > > + > > rte_intr_enable(intr_handle); > > > > /* Re-enable interrupt for VF */ > > -- > > 2.7.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF [not found] ` <B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com> 2017-10-11 7:07 ` Dai, Wei @ 2017-10-11 7:22 ` Dai, Wei 1 sibling, 0 replies; 7+ messages in thread From: Dai, Wei @ 2017-10-11 7:22 UTC (permalink / raw) To: Ma, Jianwei, Lu, Wenzhuo, Ananyev, Konstantin, Liang, Cunming; +Cc: dev, stable Reply for correct mail format. > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, October 11, 2017 3:07 PM > To: Ma, Jianwei <jianwei.ma@intel.com>; Lu, Wenzhuo > <wenzhuo.lu@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Liang, Cunming > <cunming.liang@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF > > I look through from web browser and not find following mail from Jianwei > Ma <Jianwei.ma@intel.com> Hope this can add his test result in the mail list > to community. > > > -----Original Message----- > > From: Ma, Jianwei > > Sent: Tuesday, October 10, 2017 4:47 PM > > To: Dai, Wei <wei.dai@intel.com>; Lu, Wenzhuo > <wenzhuo.lu@intel.com>; > > Ananyev, Konstantin <konstantin.ananyev@intel.com>; Liang, Cunming > > <cunming.liang@intel.com> > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF > > > > Verified with l3fwd-power. It worked well with this patch plus > > http://dpdk.org/dev/patchwork/patch/29000/ " [dpdk-dev] net/ixgbe: > > fix Rx queue interrupt mapping in VF" > > > > -----Original Message----- > > From: Dai, Wei > > Sent: Tuesday, October 10, 2017 11:30 > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > > <konstantin.ananyev@intel.com>; Liang, Cunming > > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF > > > > Hi, Jianwei > > How about your test result ? > > > > Hi Wenzhuo > > Would you please review this patch ? > > > > Thanks a lot ! > > > > > -----Original Message----- > > > From: Dai, Wei > > > Sent: Thursday, September 28, 2017 10:29 AM > > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > > > <konstantin.ananyev@intel.com>; Liang, Cunming > > > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > > > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org > > > Subject: [PATCH v2] net/ixgbe: 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 eth_ixgbevf_dev_init( ). > > > In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in > > > eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling > > > rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO > > > vectors. This patch clears the VFIO interrupt mappings before > > > setting both miscellaneous and Rx queue interrupt mappings again to > > > avoid > > failure. > > > > > > Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for > > > link > > > up/down") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Wei Dai <wei.dai@intel.com> Tested-by: Jianwei Ma <Jianwei.ma@intel.com> > > > --- > > > drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > > index 9ca5cbc..f49c616 100644 > > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > > @@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) > > > } > > > ixgbevf_configure_msix(dev); > > > > > > + /* When a VF port is bound to VFIO-PCI, only miscellaneous > interrupt > > > + * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). > > > + * If previous VFIO interrupt mapping setting in > eth_ixgbevf_dev_init( ) > > > + * is not cleared, it will fail when following rte_intr_enable( ) tries > > > + * to map Rx queue interrupt to other VFIO vectors. > > > + * So clear uio/vfio intr/evevnfd first to avoid failure. > > > + */ > > > + rte_intr_disable(intr_handle); > > > + > > > rte_intr_enable(intr_handle); > > > > > > /* Re-enable interrupt for VF */ > > > -- > > > 2.7.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF 2017-09-28 2:28 ` [dpdk-dev] [PATCH v2] " Wei Dai 2017-10-10 3:29 ` Dai, Wei @ 2017-10-11 3:16 ` Lu, Wenzhuo 2017-10-11 18:24 ` Ferruh Yigit 1 sibling, 1 reply; 7+ messages in thread From: Lu, Wenzhuo @ 2017-10-11 3:16 UTC (permalink / raw) To: Dai, Wei, Ananyev, Konstantin, Liang, Cunming, Ma, Jianwei; +Cc: dev, stable Hi, > -----Original Message----- > From: Dai, Wei > Sent: Thursday, September 28, 2017 10:29 AM > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org > Subject: [PATCH v2] net/ixgbe: 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 eth_ixgbevf_dev_init( ). > In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in > eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling rte_intr_enable( ) > tries to map Rx queue interrupt to other VFIO vectors. This patch clears the > VFIO interrupt mappings before setting both miscellaneous and Rx queue > interrupt mappings again to avoid failure. > > Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link > up/down") > Cc: stable@dpdk.org > > Signed-off-by: Wei Dai <wei.dai@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VF 2017-10-11 3:16 ` Lu, Wenzhuo @ 2017-10-11 18:24 ` Ferruh Yigit 0 siblings, 0 replies; 7+ messages in thread From: Ferruh Yigit @ 2017-10-11 18:24 UTC (permalink / raw) To: Lu, Wenzhuo, Dai, Wei, Ananyev, Konstantin, Liang, Cunming, Ma, Jianwei Cc: dev, stable On 10/11/2017 4:16 AM, Lu, Wenzhuo wrote: > Hi, > >> -----Original Message----- >> From: Dai, Wei >> Sent: Thursday, September 28, 2017 10:29 AM >> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin >> <konstantin.ananyev@intel.com>; Liang, Cunming >> <cunming.liang@intel.com>; Ma, Jianwei <jianwei.ma@intel.com> >> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org >> Subject: [PATCH v2] net/ixgbe: 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 eth_ixgbevf_dev_init( ). >> In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in >> eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling rte_intr_enable( ) >> tries to map Rx queue interrupt to other VFIO vectors. This patch clears the >> VFIO interrupt mappings before setting both miscellaneous and Rx queue >> interrupt mappings again to avoid failure. >> >> Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link >> up/down") >> Cc: stable@dpdk.org >> >> Signed-off-by: Wei Dai <wei.dai@intel.com> > Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Applied to dpdk-next-net/master, thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-11 18:24 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-09-20 10:09 [dpdk-dev] [PATCH] net/ixgbe: fix VFIO interrupt mapping in VF Wei Dai 2017-09-28 2:28 ` [dpdk-dev] [PATCH v2] " Wei Dai 2017-10-10 3:29 ` Dai, Wei [not found] ` <B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com> 2017-10-11 7:07 ` Dai, Wei 2017-10-11 7:22 ` Dai, Wei 2017-10-11 3:16 ` Lu, Wenzhuo 2017-10-11 18:24 ` Ferruh Yigit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).