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 702A7A0567; Fri, 13 Mar 2020 07:19:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C67001C011; Fri, 13 Mar 2020 07:19:26 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 3A8B31BFC9 for ; Fri, 13 Mar 2020 07:19:25 +0100 (CET) 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; 12 Mar 2020 23:19:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,547,1574150400"; d="scan'208";a="278109145" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 12 Mar 2020 23:19:23 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:19:23 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 13 Mar 2020 14:19:20 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Fri, 13 Mar 2020 14:19:20 +0800 From: "Wang, Haiyue" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Zhang, Qi Z" , "Yang, Qiming" , "Xing, Beilei" , "Zhao1, Wei" Thread-Topic: [PATCH v2 3/7] net/ice: initiate to acquire the DCF capability Thread-Index: AQHV9qlNdKvRJl681UGprlfjcB8ndqhFg30AgACNnEA= Date: Fri, 13 Mar 2020 06:19:20 +0000 Message-ID: <706f984ba67f480e8a10007fa2a8ef59@intel.com> References: <20200309141437.11800-1-haiyue.wang@intel.com> <20200310065029.40966-1-haiyue.wang@intel.com> <20200310065029.40966-4-haiyue.wang@intel.com> <20200313055138.GD44839@intel.com> In-Reply-To: <20200313055138.GD44839@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/7] net/ice: initiate to acquire the DCF capability 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: Ye, Xiaolong > Sent: Friday, March 13, 2020 13:52 > To: Wang, Haiyue > Cc: dev@dpdk.org; Zhang, Qi Z ; Yang, Qiming ; Xing, > Beilei ; Zhao1, Wei > Subject: Re: [PATCH v2 3/7] net/ice: initiate to acquire the DCF capabili= ty >=20 > For the subject, since this patch is about acquire + disable, how about >=20 > net/ice: support DCF capability acquire/disable Make sense, will improve the title. >=20 > On 03/10, Haiyue Wang wrote: > >Since the DCF (Device Config Function) controls the flow setting of > >other VFs by the mailbox with PF, for security, it needs to acquire > >the DCF capability from PF when starts, and exits to disable it. >=20 > s/exits to disable it/disable it when exits >=20 OK. > > > >Signed-off-by: Haiyue Wang > >--- > > drivers/net/ice/ice_dcf.c | 28 +++++++++++++++++++++++++++- > > 1 file changed, 27 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c > >index efb258a5a..7a3626939 100644 > >--- a/drivers/net/ice/ice_dcf.c > >+++ b/drivers/net/ice/ice_dcf.c > >@@ -227,7 +227,7 @@ ice_dcf_get_vf_resource(struct ice_dcf_hw *hw) > > int err, i; > > > > caps =3D VIRTCHNL_VF_OFFLOAD_WB_ON_ITR | VIRTCHNL_VF_OFFLOAD_RX_POLLIN= G | > >- VIRTCHNL_VF_CAP_ADV_LINK_SPEED | > >+ VIRTCHNL_VF_CAP_ADV_LINK_SPEED | VIRTCHNL_VF_CAP_DCF | > > VF_BASE_MODE_OFFLOADS; > > > > err =3D ice_dcf_send_cmd_req_no_irq(hw, VIRTCHNL_OP_GET_VF_RESOURCES, > >@@ -264,6 +264,31 @@ ice_dcf_get_vf_resource(struct ice_dcf_hw *hw) > > return 0; > > } > > > >+static int > >+ice_dcf_mode_disable(struct ice_dcf_hw *hw) > >+{ > >+ int err; > >+ > >+ err =3D ice_dcf_send_cmd_req_no_irq(hw, VIRTCHNL_OP_DCF_DISABLE, > >+ NULL, 0); > >+ if (err) { > >+ PMD_DRV_LOG(ERR, "Fail to send msg OP_DCF_DISABLE"); > >+ return err; > >+ } > >+ > >+ err =3D ice_dcf_recv_cmd_rsp_no_irq(hw, VIRTCHNL_OP_DCF_DISABLE, > >+ (uint8_t *)hw->arq_buf, > >+ ICE_DCF_AQ_BUF_SZ, NULL); > >+ if (err) { > >+ PMD_DRV_LOG(ERR, > >+ "Fail to get response of OP_DCF_DISABLE %d", > >+ err); > >+ return -1; > >+ } > >+ > >+ return 0; > >+} > >+ > > static int > > ice_dcf_check_reset_done(struct ice_dcf_hw *hw) > > { > >@@ -467,6 +492,7 @@ ice_dcf_uninit_hw(struct rte_eth_dev *eth_dev, struc= t ice_dcf_hw *hw) > > rte_intr_callback_unregister(intr_handle, > > ice_dcf_dev_interrupt_handler, hw); > > > >+ ice_dcf_mode_disable(hw); > > iavf_shutdown_adminq(&hw->avf); > > > > rte_free(hw->arq_buf); > >-- > >2.25.1 > > >=20 > For the patch, >=20 > Reviewed-by: Xiaolong Ye