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 511E9A034F; Wed, 24 Feb 2021 12:41:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A59D4069B; Wed, 24 Feb 2021 12:41:15 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id C57F140042 for ; Wed, 24 Feb 2021 12:41:13 +0100 (CET) IronPort-SDR: 6ct6JmzY8KOOCCeYJMQiNL7qKep1E2yepY+UYS+s9GOo7VIhtL/MkGjynPeIuUZIKX3KO4VYOS uup/GG1NiCtA== X-IronPort-AV: E=McAfee;i="6000,8403,9904"; a="164999900" X-IronPort-AV: E=Sophos;i="5.81,202,1610438400"; d="scan'208";a="164999900" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2021 03:41:12 -0800 IronPort-SDR: IBXvddqo2OWTiAz8mNmnW3SKAMPUMZ7tmGtJcPkXPJtSp+CLsNFwg0AwgBiFtWUIQeEX/+ADqF 5kzkU39McTsA== X-IronPort-AV: E=Sophos;i="5.81,202,1610438400"; d="scan'208";a="442041182" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.253.18]) ([10.213.253.18]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2021 03:40:56 -0800 To: Jiawen Wu , dev@dpdk.org References: <20210205033449.3813939-1-jiawenwu@trustnetic.com> <20210205033449.3813939-7-jiawenwu@trustnetic.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <945e697d-dfa9-798e-5c37-960042faa87c@intel.com> Date: Wed, 24 Feb 2021 11:40:48 +0000 MIME-Version: 1.0 In-Reply-To: <20210205033449.3813939-7-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 v2 06/17] net/txgbe: get link status of VF device 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 2/5/2021 3:34 AM, Jiawen Wu wrote: > Add support to get link speed, duplex mode and state of VF device. > > Signed-off-by: Jiawen Wu <...> > +/** > + * txgbe_check_mac_link_vf - Get link/speed status > + * @hw: pointer to hardware structure > + * @speed: pointer to link speed > + * @link_up: true is link is up, false otherwise > + * @autoneg_wait_to_complete: true when waiting for completion is needed > + * > + * Reads the links register to determine if link is up and the current speed > + **/ > +s32 txgbe_check_mac_link_vf(struct txgbe_hw *hw, u32 *speed, > + bool *link_up, bool wait_to_complete) > +{ > + /** > + * for a quick link status checking, wait_to_compelet == 0, > + * skip PF link status checking > + */ > + bool no_pflink_check = wait_to_complete == 0; > + struct txgbe_mbx_info *mbx = &hw->mbx; > + struct txgbe_mac_info *mac = &hw->mac; > + s32 ret_val = 0; > + u32 links_reg; > + u32 in_msg = 0; > + UNREFERENCED_PARAMETER(wait_to_complete); 'wait_to_complete' is used.