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: code style fix
Date: Thu, 23 Oct 2014 14:01:19 +0800
Message-ID: <1414044079-10006-3-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1414044079-10006-1-git-send-email-helin.zhang@intel.com>

Some code style fixes are added.

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

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 30efbb0..29b17e3 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -572,7 +572,8 @@ 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);
+	uint16_t interval =
+		i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTERVAL);
 	int i;
 
 	for (i = 0; i < vsi->nb_qps; i++)
@@ -595,21 +596,22 @@ 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) {
 		I40E_WRITE_REG(hw, I40E_PFINT_LNKLSTN(msix_vect - 1),
-			(vsi->base_queue << I40E_PFINT_LNKLSTN_FIRSTQ_INDX_SHIFT) |
+						(vsi->base_queue <<
+				I40E_PFINT_LNKLSTN_FIRSTQ_INDX_SHIFT) |
 			(0x0 << I40E_PFINT_LNKLSTN_FIRSTQ_TYPE_SHIFT));
 
 		I40E_WRITE_REG(hw, I40E_PFINT_ITRN(I40E_ITR_INDEX_DEFAULT,
-				msix_vect - 1), interval);
-	}
-	else {
+						msix_vect - 1), interval);
+	} else {
 		uint32_t reg;
+
 		/* num_msix_vectors_vf needs to minus irq0 */
 		reg = (hw->func_caps.num_msix_vectors_vf - 1) *
-			vsi->user_param + (msix_vect - 1);
+				vsi->user_param + (msix_vect - 1);
 
-		I40E_WRITE_REG(hw, I40E_VPINT_LNKLSTN(reg),
-			(vsi->base_queue << I40E_VPINT_LNKLSTN_FIRSTQ_INDX_SHIFT) |
-			(0x0 << I40E_VPINT_LNKLSTN_FIRSTQ_TYPE_SHIFT));
+		I40E_WRITE_REG(hw, I40E_VPINT_LNKLSTN(reg), (vsi->base_queue <<
+				I40E_VPINT_LNKLSTN_FIRSTQ_INDX_SHIFT) |
+				(0x0 << I40E_VPINT_LNKLSTN_FIRSTQ_TYPE_SHIFT));
 	}
 
 	I40E_WRITE_FLUSH(hw);
-- 
1.8.1.4

  parent reply	other threads:[~2014-10-23  5:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  6:01 [dpdk-dev] [PATCH 0/2] remove registers for early hardware only Helin Zhang
2014-10-23  6:01 ` [dpdk-dev] [PATCH 1/2] i40e: " Helin Zhang
2014-10-23  6:01 ` Helin Zhang [this message]
2014-10-23  7:21 ` [dpdk-dev] [PATCH 0/2] " Thomas Monjalon
2014-10-23  7:24   ` Thomas Monjalon
2014-10-23  7:27     ` Zhang, Helin
2014-10-23  7:31       ` Thomas Monjalon
2014-10-29  7:09 ` [dpdk-dev] [PATCH v2 " Helin Zhang
2014-10-29  7:09   ` [dpdk-dev] [PATCH v2 1/2] i40e: do not use macros defined in i40e_register_x710_int.h Helin Zhang
2014-10-29  7:09   ` [dpdk-dev] [PATCH v2 2/2] i40e: remove i40e_register_x710_int.h Helin Zhang
2014-10-29  8:53   ` [dpdk-dev] [PATCH v2 0/2] remove registers for early hardware only Wu, Jingjing
2014-10-29 22:59     ` 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=1414044079-10006-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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git