From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 57A0EA05D3 for ; Fri, 24 May 2019 05:07:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25B302C2F; Fri, 24 May 2019 05:07:38 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 31D51A49; Fri, 24 May 2019 05:07:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2019 20:07:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,505,1549958400"; d="scan'208";a="176590324" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 23 May 2019 20:07:32 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 23 May 2019 20:07:32 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 23 May 2019 20:07:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.18]) with mapi id 14.03.0415.000; Fri, 24 May 2019 11:07:30 +0800 From: "Xu, Rosen" To: "Wei, Dan" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Chen, Santos" , "stable@dpdk.org" Thread-Topic: [DPDK] net/ipn3ke: modifications on AFU configurations Thread-Index: AQHVEdXINT/eZHMk9keptDcoLfm4SaZ5l1SQ Date: Fri, 24 May 2019 03:07:29 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73A778684@SHSMSX104.ccr.corp.intel.com> References: <1558710030-46746-1-git-send-email-dan.wei@intel.com> In-Reply-To: <1558710030-46746-1-git-send-email-dan.wei@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmNjN2ZiYzUtZjc1My00NjVmLTgyMDctMDlhNGEyOWIzODFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibTQzSFRiT3ZRbnhDYkJ1dTNieHUxOGJYZityY01TdzZnWWRCVjJlXC93UXJcL1VybzhJcmJPdnJneVl6TjBTeVVcLyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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-stable] [DPDK] net/ipn3ke: modifications on AFU configurations X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, > -----Original Message----- > From: Wei, Dan > Sent: Friday, May 24, 2019 23:01 > To: dev@dpdk.org > Cc: Yigit, Ferruh ; Chen, Santos > ; Wei, Dan ; Xu, Rosen > ; stable@dpdk.org > Subject: [DPDK] net/ipn3ke: modifications on AFU configurations Pls figure out exact modification in title. My understanding this patch is for AFU register access, is it so? > Modify AFU configurations for new Blue Bitstream of A10 on N3000 card: > - AFU register access > - AFU configuration should wait until the HW set the INIT_DONE flag > - Refine log for debug Could you take more description about this modification? =20 > Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver") > Cc: rosen.xu@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Dan Wei > --- > drivers/net/ipn3ke/ipn3ke_ethdev.c | 8 ++++++-- > drivers/net/ipn3ke/ipn3ke_ethdev.h | 9 +++++---- > drivers/net/ipn3ke/ipn3ke_flow.c | 1 + > 3 files changed, 12 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c > b/drivers/net/ipn3ke/ipn3ke_ethdev.c > index 9079b57..cadfadd 100644 > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c > @@ -223,11 +223,15 @@ > "LineSideMACType", &mac_type); > hw->retimer.mac_type =3D (int)mac_type; >=20 > + /* Wait until init done */ > + while (IPN3KE_READ_REG(hw, IPN3KE_INIT_DONE) !=3D 0x3) > + ; > + > + IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x\n", > IPN3KE_READ_REG(hw, 0)); > + > if (afu_dev->id.uuid.uuid_low =3D=3D IPN3KE_UUID_VBNG_LOW && > afu_dev->id.uuid.uuid_high =3D=3D IPN3KE_UUID_VBNG_HIGH) { > ipn3ke_hw_cap_init(hw); > - IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x\n", > - IPN3KE_READ_REG(hw, 0)); Why remove this debug output? > /* Reset FPGA IP */ > IPN3KE_WRITE_REG(hw, IPN3KE_CTRL_RESET, 1); diff --git > a/drivers/net/ipn3ke/ipn3ke_ethdev.h > b/drivers/net/ipn3ke/ipn3ke_ethdev.h > index bfda9d5..686c12f 100644 > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.h > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h > @@ -344,7 +344,6 @@ static inline uint32_t ipn3ke_read_addr(volatile void > *addr) >=20 > #define WCMD 0x8000000000000000 > #define RCMD 0x4000000000000000 > -#define UPL_BASE 0x10000 > static inline uint32_t _ipn3ke_indrct_read(struct ipn3ke_hw *hw, > uint32_t addr) > { > @@ -355,13 +354,13 @@ static inline uint32_t _ipn3ke_indrct_read(struct > ipn3ke_hw *hw, >=20 > word_offset =3D (addr & 0x1FFFFFF) >> 2; > indirect_value =3D RCMD | word_offset << 32; > - indirect_addrs =3D hw->hw_addr + (uint32_t)(UPL_BASE | 0x10); > + indirect_addrs =3D hw->hw_addr + (uint32_t)(0x30); >=20 > rte_delay_us(10); >=20 > rte_write64((rte_cpu_to_le_64(indirect_value)), indirect_addrs); >=20 > - indirect_addrs =3D hw->hw_addr + (uint32_t)(UPL_BASE | 0x18); > + indirect_addrs =3D hw->hw_addr + (uint32_t)(0x38); > while ((read_data >> 32) !=3D 1) > read_data =3D rte_read64(indirect_addrs); >=20 > @@ -377,7 +376,7 @@ static inline void _ipn3ke_indrct_write(struct > ipn3ke_hw *hw, >=20 > word_offset =3D (addr & 0x1FFFFFF) >> 2; > indirect_value =3D WCMD | word_offset << 32 | value; > - indirect_addrs =3D hw->hw_addr + (uint32_t)(UPL_BASE | 0x10); > + indirect_addrs =3D hw->hw_addr + (uint32_t)(0x30); >=20 > rte_write64((rte_cpu_to_le_64(indirect_value)), indirect_addrs); > rte_delay_us(10); > @@ -411,6 +410,7 @@ static inline void _ipn3ke_indrct_write(struct > ipn3ke_hw *hw, > (&(((struct ipn3ke_rpst *)(dev)->data->dev_private)->tm)) >=20 > /* Byte address of IPN3KE internal module */ > +#define IPN3KE_INIT_DONE (0x204) > #define IPN3KE_TM_VERSION (IPN3KE_QM_OFFSET + 0x0000= ) > #define IPN3KE_TM_SCRATCH (IPN3KE_QM_OFFSET + 0x0004= ) > #define IPN3KE_TM_STATUS (IPN3KE_QM_OFFSET + 0x0008= ) > @@ -500,6 +500,7 @@ static inline void _ipn3ke_indrct_write(struct > ipn3ke_hw *hw, > #define IPN3KE_CLF_RX_TEST (IPN3KE_CLASSIFY_OFFSET + = 0x0400) >=20 > #define IPN3KE_CLF_EM_VERSION (IPN3KE_CLASSIFY_OFFSET + 0x40000 > + 0x0000) > +#define IPN3KE_CLF_EM_SCRATCH (IPN3KE_CLASSIFY_OFFSET + 0x40000 > + 0x0004) > #define IPN3KE_CLF_EM_NUM (IPN3KE_CLASSIFY_OFFSET + 0x40000 + > 0x0008) > #define IPN3KE_CLF_EM_KEY_WDTH (IPN3KE_CLASSIFY_OFFSET + > 0x40000 + 0x000C) > #define IPN3KE_CLF_EM_RES_WDTH (IPN3KE_CLASSIFY_OFFSET + > 0x40000 + 0x0010) > diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c > b/drivers/net/ipn3ke/ipn3ke_flow.c > index e5937df..ff9f064 100644 > --- a/drivers/net/ipn3ke/ipn3ke_flow.c > +++ b/drivers/net/ipn3ke/ipn3ke_flow.c > @@ -1360,6 +1360,7 @@ int ipn3ke_flow_init(void *dev) > IPN3KE_CLF_EM_NUM, > 0, > 0xFFFFFFFF); > + IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_EN_NUM: %x\n", hw- > >flow_max_entries); > hw->flow_num_entries =3D 0; >=20 > return 0; > -- > 1.8.3.1