* [Intel-wired-lan] [PATCH] iavf: initialize ITRN registers with correct values
@ 2019-11-05 12:22 Alice Michael
2019-11-07 18:48 ` Bowers, AndrewX
0 siblings, 1 reply; 2+ messages in thread
From: Alice Michael @ 2019-11-05 12:22 UTC (permalink / raw)
To: intel-wired-lan
From: Nicholas Nunley <nicholas.d.nunley@intel.com>
Since commit 92418fb14750 ("i40e/i40evf: Use usec value instead of reg
value for ITR defines") the driver tracks the interrupt throttling
intervals in single usec units, although the actual ITRN registers are
programmed in 2 usec units. Most register programming flows in the driver
correctly handle the conversion, although it is currently not applied when
the registers are initialized to their default values. Most of the time
this doesn't present a problem since the default values are usually
immediately overwritten through the standard adaptive throttling mechanism,
or updated manually by the user, but if adaptive throttling is disabled and
the interval values are left alone then the incorrect value will persist.
Since the intended default interval of 50 usecs (vs. 100 usecs as
programmed) performs better for most traffic workloads, this can lead to
performance regressions.
This patch adds the correct conversion when writing the initial values to
the ITRN registers.
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 8f310e520b06..821987da5698 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -314,7 +314,7 @@ iavf_map_vector_to_rxq(struct iavf_adapter *adapter, int v_idx, int r_idx)
q_vector->rx.target_itr = ITR_TO_REG(rx_ring->itr_setting);
q_vector->ring_mask |= BIT(r_idx);
wr32(hw, IAVF_VFINT_ITRN1(IAVF_RX_ITR, q_vector->reg_idx),
- q_vector->rx.current_itr);
+ q_vector->rx.current_itr >> 1);
q_vector->rx.current_itr = q_vector->rx.target_itr;
}
@@ -340,7 +340,7 @@ iavf_map_vector_to_txq(struct iavf_adapter *adapter, int v_idx, int t_idx)
q_vector->tx.target_itr = ITR_TO_REG(tx_ring->itr_setting);
q_vector->num_ringpairs++;
wr32(hw, IAVF_VFINT_ITRN1(IAVF_TX_ITR, q_vector->reg_idx),
- q_vector->tx.target_itr);
+ q_vector->tx.target_itr >> 1);
q_vector->tx.current_itr = q_vector->tx.target_itr;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [Intel-wired-lan] [PATCH] iavf: initialize ITRN registers with correct values
2019-11-05 12:22 [Intel-wired-lan] [PATCH] iavf: initialize ITRN registers with correct values Alice Michael
@ 2019-11-07 18:48 ` Bowers, AndrewX
0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2019-11-07 18:48 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, November 5, 2019 4:22 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] iavf: initialize ITRN registers with correct
> values
>
> From: Nicholas Nunley <nicholas.d.nunley@intel.com>
>
> Since commit 92418fb14750 ("i40e/i40evf: Use usec value instead of reg value
> for ITR defines") the driver tracks the interrupt throttling intervals in single
> usec units, although the actual ITRN registers are programmed in 2 usec
> units. Most register programming flows in the driver correctly handle the
> conversion, although it is currently not applied when the registers are
> initialized to their default values. Most of the time this doesn't present a
> problem since the default values are usually immediately overwritten
> through the standard adaptive throttling mechanism, or updated manually by
> the user, but if adaptive throttling is disabled and the interval values are left
> alone then the incorrect value will persist.
>
> Since the intended default interval of 50 usecs (vs. 100 usecs as
> programmed) performs better for most traffic workloads, this can lead to
> performance regressions.
>
> This patch adds the correct conversion when writing the initial values to the
> ITRN registers.
>
> Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-07 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-05 12:22 [Intel-wired-lan] [PATCH] iavf: initialize ITRN registers with correct values Alice Michael
2019-11-07 18:48 ` Bowers, AndrewX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox