* [dpdk-dev] [PATCH v2 1/2] net/i40e: fix VFIO interrupt mapping in VF
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Wei Dai
@ 2017-11-03 7:14 ` Wei Dai
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 2/2] net/i40e: fix Rx queue " Wei Dai
` (2 subsequent siblings)
3 siblings, 0 replies; 18+ messages in thread
From: Wei Dai @ 2017-11-03 7:14 UTC (permalink / raw)
To: jingjing.wu, beilei.xing, cunming.liang; +Cc: dev, Wei Dai, stable
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_handle( ) and i40evf_dev_rx_queue_intr_enable( )
as VFIO interrupt mapping can only be set in i40e_dev_start( ) and it
is not necessary to be set in above 2 functions repeatedly.
Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 3b76c9e..46dac86 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1433,7 +1433,6 @@ i40evf_dev_interrupt_handler(void *param)
done:
i40evf_enable_irq0(hw);
- rte_intr_enable(dev->intr_handle);
}
static int
@@ -1888,8 +1887,6 @@ i40evf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
I40EVF_WRITE_FLUSH(hw);
- rte_intr_enable(&pci_dev->intr_handle);
-
return 0;
}
@@ -2041,7 +2038,20 @@ i40evf_dev_start(struct rte_eth_dev *dev)
goto err_mac;
}
+ /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt
+ * is mapped to VFIO vector 0 in i40evf_dev_init( ).
+ * If previous VFIO interrupt mapping set in i40evf_dev_init( ) is
+ * not cleared, it will fail when rte_intr_enable( ) tries to map Rx
+ * queue interrupt to other VFIO vectors.
+ * So clear uio/vfio intr/evevnfd first to avoid failure.
+ */
+ if (dev->data->dev_conf.intr_conf.rxq != 0) {
+ rte_intr_disable(intr_handle);
+ rte_intr_enable(intr_handle);
+ }
+
i40evf_enable_queues_intr(dev);
+
return 0;
err_mac:
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] net/i40e: fix Rx queue interrupt mapping in VF
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Wei Dai
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
@ 2017-11-03 7:14 ` Wei Dai
2017-11-03 8:31 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Yao, Lei A
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
3 siblings, 0 replies; 18+ messages in thread
From: Wei Dai @ 2017-11-03 7:14 UTC (permalink / raw)
To: jingjing.wu, beilei.xing, cunming.liang; +Cc: dev, Wei Dai, stable
When a VF port is bound to VFIO-PCI, miscellaneous interrupt is
mapped to MSI-X vector 0 and Rx queues interrupt are mapped to
other vectors in vfio_enable_msix( ). To simplify implementation,
all VFIO-PCI bound i40e VF Rx queue interrupts can be mapped in
vector 1. And as current igb_uio only support only one vector,
i40e VF PMD should use vector 0 for igb_uio and vector 1 for
VFIO-PCI. Without this patch, VF Rx queue interrupt is mapped
to vector 0 in register settings and mapped to VFIO vector 1
in vfio_enable_msix( ), and then all Rx queue interrupts will
be missed.
Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
Fixes: 975ffea6f671 ("net/i40e: remove DPDK PF version specific code")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 46dac86..70ff3fd 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -654,7 +654,7 @@ i40evf_config_irq_map(struct rte_eth_dev *dev)
int i, err;
if (rte_intr_allow_others(intr_handle))
- vector_id = I40EVF_VSI_DEFAULT_MSIX_INTR_LNX;
+ vector_id = I40E_RX_VEC_START;
else
vector_id = I40E_MISC_VEC_ID;
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Wei Dai
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 2/2] net/i40e: fix Rx queue " Wei Dai
@ 2017-11-03 8:31 ` Yao, Lei A
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
3 siblings, 0 replies; 18+ messages in thread
From: Yao, Lei A @ 2017-11-03 8:31 UTC (permalink / raw)
To: Dai, Wei, Wu, Jingjing, Xing, Beilei, Liang, Cunming; +Cc: dev, Dai, Wei
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai
> Sent: Friday, November 3, 2017 3:14 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Liang, Cunming <cunming.liang@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in
> l3fwd-power
>
> These 2 bugs can be observed from example/l3fwd-power run with i40e VF
> bound to VFIO-PCI. The test steps are as follows:
> 1. Disable LSC interrupt by clearing port_conf.intr_conf.lsc=0, as i40e
> VF doesn't support LSC interrupt to avoid rte_eth_dev_configure() failure.
> 2. Create a VF from i40e host PF. Let PF run with kernel driver and bind
> its VF to VFIO-PCI
> 3. Run l3fwd-power like: l3fwd-power -l 18-19 -- -p 0x1 --config='(0,0,19)'
>
> Then, the following error message appears like:
> EAL: Error enabling MSI-X interrupts for fd 18
> This error is from rte_intr_enable( )/vfio_enable_msix( ) when enabling
> Rx queue interrupt.
> Same as the patch 06938770186a ("net/ixgbe: fix VFIO interrupt mapping in
> VF"),
> to change VFIO MSI-X interrupts mapping, previous mapping should be
> cleared
> first to avoid above error.
>
> After fixing above VFIO-PCI MSI-X interrupt mapping. There is still the
> following
> 2nd bug: l3fwd-power still can not be waked up by incoming packets.
>
> Same as the patch ca9d6597184b ("net/ixgbe: fix Rx queue interrupt mapping
> in VF"),
> the interrupt vector of Rx queues should be mapped to vector 1 to fix above
> 2nd bug.
>
> These patches have passed test with l3fwd-power using i40e VF bound to
> VFIO-PCI.
> They also passed the test with testpmd rxonly and txonly mode with igb_uio
> and VFIO-PCI.
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao<lei.a.yao@intel.com>
>
> ---
> v2: only remap VFIO interrupt in i40evf_dev_start( )
>
>
> Wei Dai (2):
> net/i40e: fix VFIO interrupt mapping in VF
> net/i40e: fix Rx queue interrupt mapping in VF
>
> drivers/net/i40e/i40e_ethdev_vf.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> --
> 2.7.4
Following test case is tested and passed with this patch.
L3fwd-power with 1 i40e PF (vfio-pci) can receive interrupt
L3fwd-power with 1 i40e VF (vfio-pci) can receive interrupt
L3fwd-power with 2 i40e VF (vfio-pci) can receive interrupt
OS: Ubuntu 16.04
CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
NIC: Ethernet Controller X710
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power
2017-11-03 7:14 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Wei Dai
` (2 preceding siblings ...)
2017-11-03 8:31 ` [dpdk-dev] [PATCH v2 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Yao, Lei A
@ 2017-11-03 8:47 ` Wei Dai
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
` (3 more replies)
3 siblings, 4 replies; 18+ messages in thread
From: Wei Dai @ 2017-11-03 8:47 UTC (permalink / raw)
To: jingjing.wu, beilei.xing; +Cc: dev, Wei Dai
These 2 bugs can be observed from example/l3fwd-power run with i40e VF
bound to VFIO-PCI. The test steps are as follows:
1. Disable LSC interrupt by clearing port_conf.intr_conf.lsc=0, as i40e
VF doesn't support LSC interrupt to avoid rte_eth_dev_configure() failure.
2. Create a VF from i40e host PF. Let PF run with kernel driver and bind
its VF to VFIO-PCI
3. Run l3fwd-power like: l3fwd-power -l 18-19 -- -p 0x1 --config='(0,0,19)'
Then, the following error message appears like:
EAL: Error enabling MSI-X interrupts for fd 18
This error is from rte_intr_enable( )/vfio_enable_msix( ) when enabling
Rx queue interrupt.
Same as the patch 06938770186a ("net/ixgbe: fix VFIO interrupt mapping in VF"),
to change VFIO MSI-X interrupts mapping, previous mapping should be cleared
first to avoid above error.
After fixing above VFIO-PCI MSI-X interrupt mapping. There is still the following
2nd bug: l3fwd-power still can not be waked up by incoming packets.
Same as the patch ca9d6597184b ("net/ixgbe: fix Rx queue interrupt mapping in VF"),
the interrupt vector of Rx queues should be mapped to vector 1 to fix above 2nd bug.
These patches have passed test with l3fwd-power using i40e VF bound to VFIO-PCI.
They also passed the test with testpmd rxonly and txonly mode with igb_uio and VFIO-PCI.
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
---
v3:
keep rte_intr_enable( ) for safety and align the style with other PMD.
remove 2 unsed macros.
v2:
only remap VFIO interrupt in i40evf_dev_start( )
Wei Dai (2):
net/i40e: fix VFIO interrupt mapping in VF
net/i40e: fix Rx queue interrupt mapping in VF
drivers/net/i40e/i40e_ethdev_vf.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
@ 2017-11-03 8:47 ` Wei Dai
2017-11-03 10:36 ` Wu, Jingjing
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 2/2] net/i40e: fix Rx queue " Wei Dai
` (2 subsequent siblings)
3 siblings, 1 reply; 18+ messages in thread
From: Wei Dai @ 2017-11-03 8:47 UTC (permalink / raw)
To: jingjing.wu, beilei.xing; +Cc: dev, Wei Dai, stable
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>
---
drivers/net/i40e/i40e_ethdev_vf.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 3b76c9e..f2af022 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1433,7 +1433,6 @@ i40evf_dev_interrupt_handler(void *param)
done:
i40evf_enable_irq0(hw);
- rte_intr_enable(dev->intr_handle);
}
static int
@@ -2041,7 +2040,20 @@ i40evf_dev_start(struct rte_eth_dev *dev)
goto err_mac;
}
+ /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt
+ * is mapped to VFIO vector 0 in i40evf_dev_init( ).
+ * If previous VFIO interrupt mapping set in i40evf_dev_init( ) is
+ * not cleared, it will fail when rte_intr_enable( ) tries to map Rx
+ * queue interrupt to other VFIO vectors.
+ * So clear uio/vfio intr/evevnfd first to avoid failure.
+ */
+ if (dev->data->dev_conf.intr_conf.rxq != 0) {
+ rte_intr_disable(intr_handle);
+ rte_intr_enable(intr_handle);
+ }
+
i40evf_enable_queues_intr(dev);
+
return 0;
err_mac:
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
@ 2017-11-03 10:36 ` Wu, Jingjing
0 siblings, 0 replies; 18+ messages in thread
From: Wu, Jingjing @ 2017-11-03 10:36 UTC (permalink / raw)
To: Dai, Wei, Xing, Beilei; +Cc: dev, stable
> -----Original Message-----
> From: Dai, Wei
> Sent: Friday, November 3, 2017 4:47 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> Subject: [PATCH v3 1/2] 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>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] net/i40e: fix Rx queue interrupt mapping in VF
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
@ 2017-11-03 8:47 ` Wei Dai
2017-11-03 10:37 ` Wu, Jingjing
2017-11-03 9:22 ` [dpdk-dev] [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Dai, Wei
2017-11-03 19:19 ` Ferruh Yigit
3 siblings, 1 reply; 18+ messages in thread
From: Wei Dai @ 2017-11-03 8:47 UTC (permalink / raw)
To: jingjing.wu, beilei.xing; +Cc: dev, Wei Dai, stable
When a VF port is bound to VFIO-PCI, miscellaneous interrupt is
mapped to MSI-X vector 0 and Rx queues interrupt are mapped to
other vectors in vfio_enable_msix( ). To simplify implementation,
all VFIO-PCI bound i40e VF Rx queue interrupts can be mapped in
vector 1. And as current igb_uio only support only one vector,
i40e VF PMD should use vector 0 for igb_uio and vector 1 for
VFIO-PCI. Without this patch, VF Rx queue interrupt is mapped
to vector 0 in register settings and mapped to VFIO vector 1
in vfio_enable_msix( ), and then all Rx queue interrupts will
be missed.
Also remove 2 unsed macro definitions.
Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
Fixes: 975ffea6f671 ("net/i40e: remove DPDK PF version specific code")
Cc: stable@dpdk.org
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f2af022..1118c74 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -68,8 +68,6 @@
#include "i40e_rxtx.h"
#include "i40e_ethdev.h"
#include "i40e_pf.h"
-#define I40EVF_VSI_DEFAULT_MSIX_INTR 1
-#define I40EVF_VSI_DEFAULT_MSIX_INTR_LNX 0
/* busy wait delay in msec */
#define I40EVF_BUSY_WAIT_DELAY 10
@@ -654,7 +652,7 @@ i40evf_config_irq_map(struct rte_eth_dev *dev)
int i, err;
if (rte_intr_allow_others(intr_handle))
- vector_id = I40EVF_VSI_DEFAULT_MSIX_INTR_LNX;
+ vector_id = I40E_RX_VEC_START;
else
vector_id = I40E_MISC_VEC_ID;
--
2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] net/i40e: fix Rx queue interrupt mapping in VF
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 2/2] net/i40e: fix Rx queue " Wei Dai
@ 2017-11-03 10:37 ` Wu, Jingjing
0 siblings, 0 replies; 18+ messages in thread
From: Wu, Jingjing @ 2017-11-03 10:37 UTC (permalink / raw)
To: Dai, Wei, Xing, Beilei; +Cc: dev, stable
> -----Original Message-----
> From: Dai, Wei
> Sent: Friday, November 3, 2017 4:48 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>; stable@dpdk.org
> Subject: [PATCH v3 2/2] net/i40e: fix Rx queue interrupt mapping in VF
>
> When a VF port is bound to VFIO-PCI, miscellaneous interrupt is
> mapped to MSI-X vector 0 and Rx queues interrupt are mapped to
> other vectors in vfio_enable_msix( ). To simplify implementation,
> all VFIO-PCI bound i40e VF Rx queue interrupts can be mapped in
> vector 1. And as current igb_uio only support only one vector,
> i40e VF PMD should use vector 0 for igb_uio and vector 1 for
> VFIO-PCI. Without this patch, VF Rx queue interrupt is mapped
> to vector 0 in register settings and mapped to VFIO vector 1
> in vfio_enable_msix( ), and then all Rx queue interrupts will
> be missed.
> Also remove 2 unsed macro definitions.
>
> Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
> Fixes: 975ffea6f671 ("net/i40e: remove DPDK PF version specific code")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 1/2] net/i40e: fix VFIO interrupt mapping in VF Wei Dai
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 2/2] net/i40e: fix Rx queue " Wei Dai
@ 2017-11-03 9:22 ` Dai, Wei
2017-11-03 19:19 ` Ferruh Yigit
3 siblings, 0 replies; 18+ messages in thread
From: Dai, Wei @ 2017-11-03 9:22 UTC (permalink / raw)
To: Wu, Jingjing, Xing, Beilei; +Cc: dev
> -----Original Message-----
> From: Dai, Wei
> Sent: Friday, November 3, 2017 4:47 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> Subject: [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power
>
> These 2 bugs can be observed from example/l3fwd-power run with i40e VF
> bound to VFIO-PCI. The test steps are as follows:
> 1. Disable LSC interrupt by clearing port_conf.intr_conf.lsc=0, as i40e
> VF doesn't support LSC interrupt to avoid rte_eth_dev_configure()
> failure.
> 2. Create a VF from i40e host PF. Let PF run with kernel driver and bind
> its VF to VFIO-PCI
> 3. Run l3fwd-power like: l3fwd-power -l 18-19 -- -p 0x1 --config='(0,0,19)'
>
> Then, the following error message appears like:
> EAL: Error enabling MSI-X interrupts for fd 18 This error is from
> rte_intr_enable( )/vfio_enable_msix( ) when enabling Rx queue interrupt.
> Same as the patch 06938770186a ("net/ixgbe: fix VFIO interrupt mapping in
> VF"), to change VFIO MSI-X interrupts mapping, previous mapping should be
> cleared first to avoid above error.
>
> After fixing above VFIO-PCI MSI-X interrupt mapping. There is still the
> following 2nd bug: l3fwd-power still can not be waked up by incoming
> packets.
>
> Same as the patch ca9d6597184b ("net/ixgbe: fix Rx queue interrupt
> mapping in VF"), the interrupt vector of Rx queues should be mapped to
> vector 1 to fix above 2nd bug.
>
> These patches have passed test with l3fwd-power using i40e VF bound to
> VFIO-PCI.
> They also passed the test with testpmd rxonly and txonly mode with igb_uio
> and VFIO-PCI.
>
> Signed-off-by: Wei Dai <wei.dai@intel.com>
> Tested-by: Lei Yao <lei.a.yao@intel.com>
>
> ---
> v3:
> keep rte_intr_enable( ) for safety and align the style with other PMD.
Keep rte_intr_enable( ) in i40evf_dev_rx_queue_intr_enable( ) for safety
And align the style with other PMD.
> remove 2 unsed macros.
>
> v2:
> only remap VFIO interrupt in i40evf_dev_start( )
>
> Wei Dai (2):
> net/i40e: fix VFIO interrupt mapping in VF
> net/i40e: fix Rx queue interrupt mapping in VF
>
> drivers/net/i40e/i40e_ethdev_vf.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> --
> 2.7.4
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power
2017-11-03 8:47 ` [dpdk-dev] [PATCH v3 " Wei Dai
` (2 preceding siblings ...)
2017-11-03 9:22 ` [dpdk-dev] [PATCH v3 0/2] Fix 2 bugs of i40e VF interrupt found in l3fwd-power Dai, Wei
@ 2017-11-03 19:19 ` Ferruh Yigit
3 siblings, 0 replies; 18+ messages in thread
From: Ferruh Yigit @ 2017-11-03 19:19 UTC (permalink / raw)
To: Wei Dai, jingjing.wu, beilei.xing; +Cc: dev
On 11/3/2017 1:47 AM, Wei Dai wrote:
> These 2 bugs can be observed from example/l3fwd-power run with i40e VF
> bound to VFIO-PCI. The test steps are as follows:
> 1. Disable LSC interrupt by clearing port_conf.intr_conf.lsc=0, as i40e
> VF doesn't support LSC interrupt to avoid rte_eth_dev_configure() failure.
> 2. Create a VF from i40e host PF. Let PF run with kernel driver and bind
> its VF to VFIO-PCI
> 3. Run l3fwd-power like: l3fwd-power -l 18-19 -- -p 0x1 --config='(0,0,19)'
>
> Then, the following error message appears like:
> EAL: Error enabling MSI-X interrupts for fd 18
> This error is from rte_intr_enable( )/vfio_enable_msix( ) when enabling
> Rx queue interrupt.
> Same as the patch 06938770186a ("net/ixgbe: fix VFIO interrupt mapping in VF"),
> to change VFIO MSI-X interrupts mapping, previous mapping should be cleared
> first to avoid above error.
>
> After fixing above VFIO-PCI MSI-X interrupt mapping. There is still the following
> 2nd bug: l3fwd-power still can not be waked up by incoming packets.
>
> Same as the patch ca9d6597184b ("net/ixgbe: fix Rx queue interrupt mapping in VF"),
> the interrupt vector of Rx queues should be mapped to vector 1 to fix above 2nd bug.
>
> These patches have passed test with l3fwd-power using i40e VF bound to VFIO-PCI.
> They also passed the test with testpmd rxonly and txonly mode with igb_uio and VFIO-PCI.
>
> 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>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread