From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02A5BA052A; Tue, 2 Feb 2021 18:51:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD6E824038A; Tue, 2 Feb 2021 18:51:59 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id E4693240380 for ; Tue, 2 Feb 2021 18:51:57 +0100 (CET) IronPort-SDR: M3UqXaZz+bWQfUhsUB4wMu7Q+Ohg52TG2uU1ez5G1zfsoBKBm06zzE7dCiGVYMyjIuLOhnXrwF PJi30CxdedKw== X-IronPort-AV: E=McAfee;i="6000,8403,9883"; a="265731035" X-IronPort-AV: E=Sophos;i="5.79,396,1602572400"; d="scan'208";a="265731035" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 09:51:56 -0800 IronPort-SDR: KjCsX9+L8okYwqhzDS7jmLUcsRP3g9h6CfFnuVsnUUxsLIYQUwwgPu1egnu86iZvUIjZIU0d2S pxEMVOeGoLMg== X-IronPort-AV: E=Sophos;i="5.79,396,1602572400"; d="scan'208";a="391596576" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.226.112]) ([10.213.226.112]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 09:51:49 -0800 To: Jiawen Wu , dev@dpdk.org References: <20210122094800.197748-1-jiawenwu@trustnetic.com> <20210122094800.197748-3-jiawenwu@trustnetic.com> From: Ferruh Yigit Message-ID: <22f7ec91-8ca4-0464-ba33-17f9f02fa6b0@intel.com> Date: Tue, 2 Feb 2021 17:51:48 +0000 MIME-Version: 1.0 In-Reply-To: <20210122094800.197748-3-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v1 02/20] net/txgbe: add base code for VF driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 1/22/2021 9:47 AM, Jiawen Wu wrote: > Implement VF device init and uninit function with hardware operations, > and negotiate with PF in mailbox. > > Signed-off-by: Jiawen Wu <...> > +int txgbevf_get_queues(struct txgbe_hw *hw, unsigned int *num_tcs, > + unsigned int *default_tc) > +{ > + int err, i; > + u32 msg[5]; > + > + /* do nothing if API doesn't support txgbevf_get_queues */ > + switch (hw->api_version) { > + case txgbe_mbox_api_11: > + case txgbe_mbox_api_12: > + case txgbe_mbox_api_13: > + break; > + default: > + return 0; > + } > + > + /* Fetch queue configuration from the PF */ > + msg[0] = TXGBE_VF_GET_QUEUES; > + for (i = 1; i < 5; i++) > + msg[i] = 0; > + > + err = txgbevf_write_msg_read_ack(hw, msg, msg, 5); > + if (!err) { > + msg[0] &= ~TXGBE_VT_MSGTYPE_CTS; > + > + /* > + * if we we didn't get an ACK there must have been typo on 'we', it is dublicated.