From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39FC5A046B for ; Fri, 28 Jun 2019 03:33:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73B5DF64; Fri, 28 Jun 2019 03:33:45 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 06AEB235 for ; Fri, 28 Jun 2019 03:33:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 18:33:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,425,1557212400"; d="scan'208";a="162826127" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 27 Jun 2019 18:33:42 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 27 Jun 2019 18:33:42 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 27 Jun 2019 18:33:42 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 27 Jun 2019 18:33:42 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.87]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.83]) with mapi id 14.03.0439.000; Fri, 28 Jun 2019 09:33:40 +0800 From: "Li, Xiaoyun" To: "Wu, Jingjing" , "Wiles, Keith" , "Liang, Cunming" , "Maslekar, Omkar" CC: "dev@dpdk.org" Thread-Topic: [PATCH v8 2/6] raw/ntb: add intel ntb support Thread-Index: AQHVK+6oGjMcavkhA0KJG2SmA+fazKavN1oAgAETMlA= Date: Fri, 28 Jun 2019 01:33:39 +0000 Message-ID: References: <20190620102147.41557-1-xiaoyun.li@intel.com> <20190626071224.4819-1-xiaoyun.li@intel.com> <20190626071224.4819-3-xiaoyun.li@intel.com> <9BB6961774997848B5B42BEC655768F81146A3BA@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F81146A3BA@SHSMSX103.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 v8 2/6] raw/ntb: add intel ntb support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, June 28, 2019 01:07 > To: Li, Xiaoyun ; Wiles, Keith ; > Liang, Cunming ; Maslekar, Omkar > > Cc: dev@dpdk.org > Subject: RE: [PATCH v8 2/6] raw/ntb: add intel ntb support >=20 > Few minor comments. >=20 > > + case XEON_PPD_CONN_TRANSPARENT: > > + case XEON_PPD_CONN_RP: > > + NTB_LOG(ERR, "Not supported conn topo. Please use B2B."); > > + return -EINVAL; >=20 > Do We need "default:" ? Yes. Sure. Thx. > > + } > > + > > + /* Reserve the last 2 spad registers for users. */ > > + for (i =3D 0; i < NTB_SPAD_USER_MAX_NUM; i++) > > + hw->spad_user_list[i] =3D hw->spad_cnt; > > + hw->spad_user_list[0] =3D hw->spad_cnt - 2; > > + hw->spad_user_list[1] =3D hw->spad_cnt - 1; >=20 > How about: > hw->spad_user_list[0] =3D hw->spad_cnt - 2; spad_user_list[1] =3D > hw->hw->spad_cnt - 1; > for (i =3D 2; i < NTB_SPAD_USER_MAX_NUM; i++) > hw->spad_user_list[i] =3D hw->spad_cnt; >=20 I think this way is more straightforward in case that reserve more spad reg= isters for users in the future.=20