net/ixgbe: fix VFIO interrupt mapping in VF
PATCH 1/1 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 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.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +9 -0
@@ -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 */
Signature · 1 line
2.7.5
PATCH v2 1/1 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.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +9 -0
@@ -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 */
Signature · 1 line
2.7.5
Hi, Jianwei
How about your test result ?
Hi Wenzhuo
Would you please review this patch ?
Thanks a lot !
Quoted 49 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, September 28, 2017 10:29 AM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFWhen a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in
eth_ixgbevf_dev_init( ).
Inixgbevf_dev_start(), if previous VFIO interrupt mapping set ineth_ixgbevf_dev_init( )is not cleard, it will fail when callingrte_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 linkup/down")
Cc: [email protected]Signed-off-by Wei Dai <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +9
-1@@ -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
A message that is not in the archive (sent off-list or not yet received): B90411854DEF0649BE56FC396188B4FC3B930AFE@SHSMSX104.ccr.corp.intel.com
I look through from web browser and not find following mail from Jianwei Ma <[email protected]> Hope this can add his test result in the mail list to community.
Quoted 81 lines
-----Original Message-----
From: Ma, Jianwei
Sent: Tuesday, October 10, 2017 4:47 PM
To: Dai, Wei <[email protected]>; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFVerified 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 <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFHi, Jianwei
How about your test result ?Hi Wenzhuo
Would you please review this patch ?Thanks a lot !
Quoted 9 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, September 28, 2017 10:29 AM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFQuoted 7 lines
When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in
eth_ixgbevf_dev_init( ).
Inixgbevf_dev_start(), if previous VFIO interrupt mapping set ineth_ixgbevf_dev_init( )is not cleard, it will fail when callingrte_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 avoidfailure.
Quoted 6 lines
Fixes 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for linkup/down")
Cc: [email protected]Signed-off-by Wei Dai <[email protected]>Tested-by Jianwei Ma <[email protected]>Quoted 27 lines
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +9
-1@@ -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
Dai, Wei
Tested-by Jianwei MaReply for correct mail format.
Quoted 14 lines
-----Original Message-----
From: Dai, Wei
Sent: Wednesday, October 11, 2017 3:07 PM
To: Ma, Jianwei <[email protected]>; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFI look through from web browser and not find following mail from Jianwei Ma <[email protected]> Hope this can add his test result in the mail list to community.
Quoted 56 lines
Quoted 4 lines
-----Original Message-----
From: Ma, Jianwei
Sent: Tuesday, October 10, 2017 4:47 PM
To: Dai, Wei <[email protected]>; Lu, WenzhuoQuoted 51 lines
Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFVerified 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 <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFHi, Jianwei
How about your test result ?Hi Wenzhuo
Would you please review this patch ?Thanks a lot !
Quoted 9 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, September 28, 2017 10:29 AM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFQuoted 8 lines
When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in
eth_ixgbevf_dev_init( ).
Inixgbevf_dev_start(), if previous VFIO interrupt mapping set ineth_ixgbevf_dev_init( )is not cleard, it will fail when callingrte_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 avoidfailure.
Quoted 7 lines
Fixes 77234603fba0 ("net/ixgbe: support VF mailbox interrupt forlink
up/down")
Cc: [email protected]Signed-off-by Wei Dai <[email protected]>
Quoted 29 lines
Quoted 13 lines
Quoted 13 lines
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -5046,6 +5046,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) }ixgbevf_configure_msix (dev);Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c ixgbevf_dev_start(struct rte_eth_dev *dev) · line 5049
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+/* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt
Quoted 2 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbevf_dev_start(struct rte_eth_dev *dev) · line 5051
Quoted 2 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0+* is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). +* If previous VFIO interrupt mapping setting in
eth_ixgbevf_dev_init( )Quoted 11 lines
Quoted 11 lines
drivers/net/ixgbe/ixgbe_ethdev.c +6
-1+* 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
Hi,
Quoted 17 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, September 28, 2017 10:29 AM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFWhen a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in
eth_ixgbevf_dev_init( ).
Inixgbevf_dev_start(), if previous VFIO interrupt mapping set ineth_ixgbevf_dev_init( )is not cleard, it will fail when callingrte_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.
Quoted 5 lines
Fixes 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for linkup/down")
Cc: [email protected]Signed-off-by Wei Dai <[email protected]>
Ferruh Yigit
AppliedQuoted 19 lines · Wenzhuo
Hi,
Quoted 17 lines
-----Original Message-----
From: Dai, Wei
Sent: Thursday, September 28, 2017 10:29 AM
To: Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>; Liang, Cunming <[email protected]>; Ma, Jianwei <[email protected]>
Cc: [email protected]; Dai, Wei <[email protected]>; [email protected]
Subject: [PATCH v2] net/ixgbe: fix VFIO interrupt mapping in VFWhen a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in
eth_ixgbevf_dev_init( ).
Inixgbevf_dev_start(), if previous VFIO interrupt mapping set ineth_ixgbevf_dev_init( )is not cleard, it will fail when callingrte_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.
Quoted 6 lines
Quoted 5 lines
Fixes 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for linkup/down")
Cc: [email protected]Signed-off-by Wei Dai <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Applied to dpdk-next-net/master, thanks.