+
+ q_vector = vsi->rx_rings[queue]->q_vector;
+ vector = vsi->base_vector + q_vector->v_idx;
+ ec->rx_coalesce_usecs = ITR_REG_TO_USEC(rd32(hw, I40E_PFINT_ITRN(0, vector - 1)));
Use I40E_RX_ITR rather than the hardcoded 0
+
+ q_vector = vsi->tx_rings[queue]->q_vector;
+ vector = vsi->base_vector + q_vector->v_idx;
+ ec->tx_coalesce_usecs = ITR_REG_TO_USEC(rd32(hw, I40E_PFINT_ITRN(1, vector - 1)));
Use I40E_TX_ITR rather than the hardcoded 1
Other than that, yes, this looks like the right translation to get to the itr register you want.
sln