From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 035557F5C for ; Wed, 29 Oct 2014 07:21:47 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 28 Oct 2014 23:30:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,808,1406617200"; d="scan'208";a="622568221" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga002.fm.intel.com with ESMTP; 28 Oct 2014 23:30:29 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 14:26:59 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.202]) with mapi id 14.03.0195.001; Wed, 29 Oct 2014 14:26:58 +0800 From: "Zhang, Helin" To: "Qiu, Michael" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] i40e: code style fix Thread-Index: AQHP8yqUc5WzqOcWZE+auUEl+qDtF5xGm0gw Date: Wed, 29 Oct 2014 06:26:57 +0000 Message-ID: References: <1414554168-5117-1-git-send-email-helin.zhang@intel.com> <1414554168-5117-2-git-send-email-helin.zhang@intel.com> <533710CFB86FA344BFBF2D6802E60286C7CB9A@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286C7CB9A@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] i40e: code style fix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 06:21:48 -0000 Hi Michael > -----Original Message----- > From: Qiu, Michael > Sent: Wednesday, October 29, 2014 2:11 PM > To: Zhang, Helin; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/2] i40e: code style fix >=20 > 10/29/2014 11:44 AM, Helin Zhang : > > Add several code style fixes. > > > > Signed-off-by: Helin Zhang > > --- > > 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 e1f581a..20c99a4 100644 > > --- a/lib/librte_pmd_i40e/i40e_ethdev.c > > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c > > @@ -580,7 +580,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi) > > uint32_t val; > > struct i40e_hw *hw =3D I40E_VSI_TO_HW(vsi); > > uint16_t msix_vect =3D vsi->msix_intr; > > - uint16_t interval =3D i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTE= RVAL); > > + uint16_t interval =3D > > + i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTERVAL); > > int i; > > > > for (i =3D 0; i < vsi->nb_qps; i++) > > @@ -603,25 +604,26 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi) > > /* Write first RX queue to Link list register as the head element */ > > if (vsi->type !=3D 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 << >=20 > ^^^^^^^^^^^^^^^^^^ > > + I40E_PFINT_LNKLSTN_FIRSTQ_INDX_SHIFT) | >=20 > Here why so many indentations? or just my mail agent's display issue, if = it does > pls ignor. anyway, it is not a beautiful style in my mind :) I do not know why. The right patch can be downloaded directly from dpdk.org= . The email editor may not show the correct format. >=20 > 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) | >=20 > BTW, for coding style, I think we can follow the linux kernel, for kernel > indentations, it always use the format like: n"Tab"+m"space", 0 <=3D m <= =3D7. > Another example is qemu, it is all "space" without "tab". Yes, we have DPDK style, tab or tab + space. Space only is not allowed. Che= ckpatch.pl can check it for us. >=20 > > (0x0 << I40E_PFINT_LNKLSTN_FIRSTQ_TYPE_SHIFT)); > > > > I40E_WRITE_REG(hw, I40E_PFINT_ITRN(I40E_ITR_INDEX_DEFAULT, > > - msix_vect - 1), interval); > > + msix_vect - 1), interval); > > > > /* Disable auto-mask on enabling of all none-zero interrupt */ > > I40E_WRITE_REG(hw, I40E_GLINT_CTL, > > - I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK); > > - } > > - else { > > + I40E_GLINT_CTL_DIS_AUTOMASK_N_MASK); > > + } else { > > uint32_t reg; > > + > > /* num_msix_vectors_vf needs to minus irq0 */ > > reg =3D (hw->func_caps.num_msix_vectors_vf - 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)); >=20 > Here the same I think. >=20 > Thanks, > Michael > > } > > > > I40E_WRITE_FLUSH(hw); Regards, Helin