Skip to contentSkip to conversation

net/iavf: set interrupt throttling register

PATCH In review Bruce Richardson 3 participants 6 messages Oct 5 – Oct 15 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: set interrupt throttling register

The interrupt throttling register(ITR) bank 0 value is set to 2, but to ensure best performance across all systems also set the bank 1 value to match.

---
 drivers/net/intel/iavf/iavf_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/intel/iavf/iavf_ethdev.c +1 -4
index a8abe0154c..dc3cea0b95 100644
@@ -899,10 +899,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				       (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
 				       IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
 				       (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
-			/* debug - check for success! the return value
-			 * should be 2, offset is 0x2800
-			 */
-			/* IAVF_READ_REG(hw, IAVF_VFINT_ITRN1(0, 0)); */
+			IAVF_WRITE_REG(hw, IAVF_VFINT_ITRN1(1, vf->msix_base - 1), 2);
 		} else {
 			/* If no WB_ON_ITR offload flags, need to set
 			 * interrupt for descriptor write back.
Signature · 1 line
2.53.0
#2 lore raw
In reply to Bruce Richardson
Quoted 9 lines · Bruce Richardson

The interrupt throttling register(ITR) bank 0 value is set to 2, but to ensure best performance across all systems also set the bank 1 value to match.

---
 drivers/net/intel/iavf/iavf_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Further testing has indicated that this patch is simply working around a config issue on kernel driver side[1] and should not be necessary in DPDK.

Dropping as rejected in patchwork.

/Bruce

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb096882095e5a8d6b5159e43793d4a38a0c5b1f

Quoted 19 lines
drivers/net/intel/iavf/iavf_ethdev.c +1 -4
index a8abe0154c..dc3cea0b95 100644
@@ -899,10 +899,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
 				       (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
 				       IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
 				       (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
-			/* debug - check for success! the return value
-			 * should be 2, offset is 0x2800
-			 */
-			/* IAVF_READ_REG(hw, IAVF_VFINT_ITRN1(0, 0)); */
+			IAVF_WRITE_REG(hw, IAVF_VFINT_ITRN1(1, vf->msix_base - 1), 2);
 		} else {
 			/* If no WB_ON_ITR offload flags, need to set
 			 * interrupt for descriptor write back.
Signature · 1 line
2.53.0
#3 lore raw
Quoted 21 lines · Bruce Richardson
Quoted 9 lines · Bruce Richardson

The interrupt throttling register(ITR) bank 0 value is set to 2, but to ensure best performance across all systems also set the bank 1 value to match.

---
 drivers/net/intel/iavf/iavf_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Further testing has indicated that this patch is simply working around a config issue on kernel driver side[1] and should not be necessary in DPDK.

Dropping as rejected in patchwork.

/Bruce

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb096882095e5a8d6b5159e43793d4a38a0c5b1f

Quoted 16 lines
Quoted 6 lines
drivers/net/intel/iavf/iavf_ethdev.c +0 -0
index a8abe0154c..dc3cea0b95 100644
@@ -899,10 +899,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
                                     (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |

drivers/net/intel/iavf/iavf_ethdev.c static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev, · line 905

Quoted 10 lines
drivers/net/intel/iavf/iavf_ethdev.c +1 -4
                                     IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
                                     (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
-                     /* debug - check for success! the return value
-                      * should be 2, offset is 0x2800
-                      */
-                     /* IAVF_READ_REG(hw, IAVF_VFINT_ITRN1(0, 0)); */
+                     IAVF_WRITE_REG(hw, IAVF_VFINT_ITRN1(1, vf->msix_base - 1), 2);
              } else {
                      /* If no WB_ON_ITR offload flags, need to set
                       * interrupt for descriptor write back.

Why keep this dead code then?

Signature · 1 line
David Marchand
#4 lore raw
Quoted 33 lines · David Marchand
Quoted 31 lines · Bruce Richardson
Quoted 9 lines · Bruce Richardson

The interrupt throttling register(ITR) bank 0 value is set to 2, but to ensure best performance across all systems also set the bank 1 value to match.

---
 drivers/net/intel/iavf/iavf_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Further testing has indicated that this patch is simply working around a config issue on kernel driver side[1] and should not be necessary in DPDK.

Dropping as rejected in patchwork.

/Bruce

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb096882095e5a8d6b5159e43793d4a38a0c5b1f

Quoted 10 lines
drivers/net/intel/iavf/iavf_ethdev.c +0 -2
index a8abe0154c..dc3cea0b95 100644
@@ -899,10 +899,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
                                     (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
                                     IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
                                     (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
-                     /* debug - check for success! the return value
-                      * should be 2, offset is 0x2800
Quoted 9 lines
Quoted 6 lines

drivers/net/intel/iavf/iavf_ethdev.c static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev, · line 905

Quoted 6 lines
drivers/net/intel/iavf/iavf_ethdev.c +1 -2
-                      */
-                     /* IAVF_READ_REG(hw, IAVF_VFINT_ITRN1(0, 0)); */
+                     IAVF_WRITE_REG(hw, IAVF_VFINT_ITRN1(1, vf->msix_base - 1), 2);
              } else {
                      /* If no WB_ON_ITR offload flags, need to set
                       * interrupt for descriptor write back.

Why keep this dead code then?

No reason. Just haven't got the time right now to do up a replacement patch to delete the old dead code.

/Bruce

#5 lore raw
Quoted 43 lines · Bruce Richardson
Quoted 33 lines · David Marchand
Quoted 31 lines · Bruce Richardson
Quoted 9 lines · Bruce Richardson

The interrupt throttling register(ITR) bank 0 value is set to 2, but to ensure best performance across all systems also set the bank 1 value to match.

---
  drivers/net/intel/iavf/iavf_ethdev.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)

Further testing has indicated that this patch is simply working around a config issue on kernel driver side[1] and should not be necessary in DPDK.

Dropping as rejected in patchwork.

/Bruce

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb096882095e5a8d6b5159e43793d4a38a0c5b1f

Quoted 10 lines
drivers/net/intel/iavf/iavf_ethdev.c +0 -2
index a8abe0154c..dc3cea0b95 100644
@@ -899,10 +899,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
                                      (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
                                      IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
                                      (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
-                     /* debug - check for success! the return value
-                      * should be 2, offset is 0x2800
Quoted 9 lines
Quoted 6 lines

drivers/net/intel/iavf/iavf_ethdev.c static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev, · line 905

Quoted 6 lines
drivers/net/intel/iavf/iavf_ethdev.c +1 -2
-                      */
-                     /* IAVF_READ_REG(hw, IAVF_VFINT_ITRN1(0, 0)); */
+                     IAVF_WRITE_REG(hw, IAVF_VFINT_ITRN1(1, vf->msix_base - 1), 2);
               } else {
                       /* If no WB_ON_ITR offload flags, need to set
                        * interrupt for descriptor write back.

Why keep this dead code then?

Quoted 4 lines

No reason. Just haven't got the time right now to do up a replacement patch to delete the old dead code.

/Bruce

I submitted the dead code removal.

https://patches.dpdk.org/project/dpdk/patch/000a4926363e5be631db4f8209bed02d11369912.1792075372.git.anatoly.burakov@intel.com/

Signature · 2 lines
Thanks,
Anatoly