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 22651A0A03; Mon, 18 Jan 2021 12:24:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B40B8140DBD; Mon, 18 Jan 2021 12:24:02 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3384B140DBC for ; Mon, 18 Jan 2021 12:24:01 +0100 (CET) IronPort-SDR: jpyY61KQLSemLLZlkSpzh8zhbTnVhy8NRqwrWE5FTB0h46He1XQNK0FqSHo01vwBvYKKw9t0Qx IzUxzKawrVvw== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="240332550" X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="240332550" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 03:23:59 -0800 IronPort-SDR: cblQMXPWc8AGTqkzOmOeoNxkWYyVLpeBQRsjvkxt8sFaCVhBtOkCo36DwvdoTS4kxK+m7BJ5FU OacHy/wTk1tQ== X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="383532776" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.241.24]) ([10.213.241.24]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 03:23:57 -0800 To: oulijun , dev Cc: linuxarm@openeuler.org, "lihuisong (C)" References: <63bca434-ae3a-8dac-4d9d-fac0ade7be25@huawei.com> From: Ferruh Yigit Message-ID: <1cc591cf-4217-7830-b496-934d0c0c8695@intel.com> Date: Mon, 18 Jan 2021 11:23:52 +0000 MIME-Version: 1.0 In-Reply-To: <63bca434-ae3a-8dac-4d9d-fac0ade7be25@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [RFC] some questions for speed_capa usage 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/18/2021 10:27 AM, oulijun wrote: > Hi, > > > The 'speed_capa' will be reported in rte_eth_dev_info_get API. How should users > use the field? > > 1) The driver reports only the capabilities supported by the NIC, and users only > obtain the capabilities. > Maybe, there is a case that a rate bit in 'speed_capa' is not supported by the > current transmission medium, > such as, copper cable optical modules and optical interface modules. > > 2) The field is used only to inform users of the speed_capa supported by the > current transmission medium. > And users set the fixed speed or auto-negotiation by using 'link_speeds' > according to the field. > > According to the existing implementations of all drivers, it seems that both of > the above behaviors exist. > > How should we report and use it? > Hi Lijun, When the driver reports the capabilities supported by the NIC, we tend to mark this feature as partially supported. The expectation is the driver report the capability for the current configuration, the PHY/FW/transmission medium, whatever it is. Driver should return the current supported values so that application can select one, as you said. Regards, ferruh