DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] i40e: fix of configuring inside NIC RX interrupt
Date: Wed, 29 Oct 2014 11:42:48 +0800	[thread overview]
Message-ID: <1414554168-5117-3-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1414554168-5117-1-git-send-email-helin.zhang@intel.com>

Inside NIC RX interrupt is needed for single RX descriptor
write back. The fix is to correct the wrong configuration
of register 'I40E_QINT_RQCTL'.
Note that interrupt will be inside NIC only, that means it
will never be reported outside NIC hardware.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 20c99a4..4614c3d 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -580,8 +580,6 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
 	uint32_t val;
 	struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
 	uint16_t msix_vect = vsi->msix_intr;
-	uint16_t interval =
-		i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTERVAL);
 	int i;
 
 	for (i = 0; i < vsi->nb_qps; i++)
@@ -590,7 +588,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
 	/* Bind all RX queues to allocated MSIX interrupt */
 	for (i = 0; i < vsi->nb_qps; i++) {
 		val = (msix_vect << I40E_QINT_RQCTL_MSIX_INDX_SHIFT) |
-			(interval << I40E_QINT_RQCTL_ITR_INDX_SHIFT) |
+			I40E_QINT_RQCTL_ITR_INDX_MASK |
 			((vsi->base_queue + i + 1) <<
 			I40E_QINT_RQCTL_NEXTQ_INDX_SHIFT) |
 			(0 << I40E_QINT_RQCTL_NEXTQ_TYPE_SHIFT) |
@@ -603,6 +601,9 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
 
 	/* Write first RX queue to Link list register as the head element */
 	if (vsi->type != I40E_VSI_SRIOV) {
+		uint16_t interval =
+			i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTERVAL);
+
 		I40E_WRITE_REG(hw, I40E_PFINT_LNKLSTN(msix_vect - 1),
 						(vsi->base_queue <<
 				I40E_PFINT_LNKLSTN_FIRSTQ_INDX_SHIFT) |
-- 
1.8.1.4

  parent reply	other threads:[~2014-10-29  3:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  3:42 [dpdk-dev] [PATCH 0/2] " Helin Zhang
2014-10-29  3:42 ` [dpdk-dev] [PATCH 1/2] i40e: code style fix Helin Zhang
2014-10-29  6:11   ` Qiu, Michael
2014-10-29  6:26     ` Zhang, Helin
2014-10-29  8:06       ` Qiu, Michael
2014-10-29  3:42 ` Helin Zhang [this message]
2014-10-29  5:00 ` [dpdk-dev] [PATCH 0/2] fix of configuring inside NIC RX interrupt Chen, Jing D
2014-10-29 22:44   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414554168-5117-3-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).