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 3D310A00E6 for ; Wed, 12 Jun 2019 16:38:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 519DF1D057; Wed, 12 Jun 2019 16:38:40 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 66C161D02D for ; Wed, 12 Jun 2019 16:38:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2019 07:38:37 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 12 Jun 2019 07:38:37 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 12 Jun 2019 07:38:37 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 12 Jun 2019 07:38:37 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.83]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.185]) with mapi id 14.03.0439.000; Wed, 12 Jun 2019 22:38:34 +0800 From: "Rong, Leyi" To: "Stillwell Jr, Paul M" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "Nowlin, Dan" Thread-Topic: [PATCH v2 17/66] net/ice/base: add API to init FW logging Thread-Index: AQHVIG3m5dZ3PQ8+lkqgrGoeZmXfkKaWHSAAgAH4TFA= Date: Wed, 12 Jun 2019 14:38:33 +0000 Message-ID: <47ACC7359E973C41ACB0C2477632BC72518C67E8@SHSMSX103.ccr.corp.intel.com> References: <20190604054248.68510-1-leyi.rong@intel.com> <20190611155221.2703-1-leyi.rong@intel.com> <20190611155221.2703-18-leyi.rong@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzlmOTNkMTUtZDQ0NC00YzBhLTg3YmYtNWY5ODkzMjgwZDQzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidExlUkJwMW90bzZhZXRZbkgwWmhrYllEck50RkcxSFpBXC85MUgrTlExNWhMMDhucGlPeEZSVnVSMHFoQ2Q1TmMifQ== dlp-product: dlpe-windows dlp-version: 11.2.0.6 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-dev] [PATCH v2 17/66] net/ice/base: add API to init FW logging 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" > -----Original Message----- > From: Stillwell Jr, Paul M > Sent: Wednesday, June 12, 2019 12:24 AM > To: Rong, Leyi ; Zhang, Qi Z > Cc: dev@dpdk.org; Nowlin, Dan > Subject: RE: [PATCH v2 17/66] net/ice/base: add API to init FW logging >=20 > > -----Original Message----- > > From: Rong, Leyi > > Sent: Tuesday, June 11, 2019 8:52 AM > > To: Zhang, Qi Z > > Cc: dev@dpdk.org; Rong, Leyi ; Nowlin, Dan > > ; Stillwell Jr, Paul M > > > > Subject: [PATCH v2 17/66] net/ice/base: add API to init FW logging > > > > In order to initialize the current status of the FW logging, the api > > ice_get_fw_log_cfg is added. The function retrieves the current > > setting of the FW logging from HW and updates the ice_hw structure acco= rdingly. > > > > Signed-off-by: Dan Nowlin > > Signed-off-by: Paul M Stillwell Jr > > Signed-off-by: Leyi Rong > > --- > > drivers/net/ice/base/ice_adminq_cmd.h | 1 + > > drivers/net/ice/base/ice_common.c | 48 > > +++++++++++++++++++++++++++ > > 2 files changed, 49 insertions(+) > > > > diff --git a/drivers/net/ice/base/ice_adminq_cmd.h > > b/drivers/net/ice/base/ice_adminq_cmd.h > > index 7b0aa8aaa..739f79e88 100644 > > --- a/drivers/net/ice/base/ice_adminq_cmd.h > > +++ b/drivers/net/ice/base/ice_adminq_cmd.h > > @@ -2196,6 +2196,7 @@ enum ice_aqc_fw_logging_mod { > > ICE_AQC_FW_LOG_ID_WATCHDOG, > > ICE_AQC_FW_LOG_ID_TASK_DISPATCH, > > ICE_AQC_FW_LOG_ID_MNG, > > + ICE_AQC_FW_LOG_ID_SYNCE, > > ICE_AQC_FW_LOG_ID_MAX, > > }; > > > > diff --git a/drivers/net/ice/base/ice_common.c > > b/drivers/net/ice/base/ice_common.c > > index 62c7fad0d..7093ee4f4 100644 > > --- a/drivers/net/ice/base/ice_common.c > > +++ b/drivers/net/ice/base/ice_common.c > > @@ -582,6 +582,49 @@ static void ice_cleanup_fltr_mgmt_struct(struct > > ice_hw *hw) > > #define ICE_FW_LOG_DESC_SIZE_MAX \ > > ICE_FW_LOG_DESC_SIZE(ICE_AQC_FW_LOG_ID_MAX) > > > > +/** > > + * ice_get_fw_log_cfg - get FW logging configuration > > + * @hw: pointer to the HW struct > > + */ > > +static enum ice_status ice_get_fw_log_cfg(struct ice_hw *hw) { > > + struct ice_aqc_fw_logging_data *config; > > + struct ice_aq_desc desc; > > + enum ice_status status; > > + u16 size; > > + > > + size =3D ICE_FW_LOG_DESC_SIZE_MAX; > > + config =3D (struct ice_aqc_fw_logging_data *)ice_malloc(hw, size); > > + if (!config) > > + return ICE_ERR_NO_MEMORY; > > + > > + ice_fill_dflt_direct_cmd_desc(&desc, > > ice_aqc_opc_fw_logging_info); > > + > > + desc.flags |=3D CPU_TO_LE16(ICE_AQ_FLAG_BUF); > > + desc.flags |=3D CPU_TO_LE16(ICE_AQ_FLAG_RD); > > + > > + status =3D ice_aq_send_cmd(hw, &desc, config, size, NULL); > > + if (!status) { > > + u16 i; > > + > > + /* Save fw logging information into the HW structure */ > > + for (i =3D 0; i < ICE_AQC_FW_LOG_ID_MAX; i++) { > > + u16 v, m, flgs; > > + > > + v =3D LE16_TO_CPU(config->entry[i]); > > + m =3D (v & ICE_AQC_FW_LOG_ID_M) >> > > ICE_AQC_FW_LOG_ID_S; > > + flgs =3D (v & ICE_AQC_FW_LOG_EN_M) >> > > ICE_AQC_FW_LOG_EN_S; > > + > > + if (m < ICE_AQC_FW_LOG_ID_MAX) > > + hw->fw_log.evnts[m].cur =3D flgs; > > + } > > + } > > + > > + ice_free(hw, config); > > + > > + return status; > > +} > > + > > /** > > * ice_cfg_fw_log - configure FW logging > > * @hw: pointer to the HW struct > > @@ -636,6 +679,11 @@ static enum ice_status ice_cfg_fw_log(struct > > ice_hw *hw, bool enable) >=20 > Is there code in DPDK that calls ice_cfg_fw_log()? If not then I would dr= op this patch. >=20 Yes, ice_cfg_fw_log() can be called indirectly. ice_dev_init() -> ice_init_hw() -> ice_cfg_fw_log()