From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] drivers/net: document missing speed capabilities feature Date: Fri, 12 May 2017 17:48:00 +0200 Message-ID: <17406199.hqjMraK9H2@xps> References: <20170510131053.75843-1-ferruh.yigit@intel.com> <16254100.QC6ztoDaX8@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Shepard Siegel , Ed Czeck , John Miller , John McNamara , Harish Patil , Rasesh Mody , Rahul Lakkireddy , Hemant Agrawal , Shreyansh Jain , Wenzhuo Lu , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Jing Chen , Helin Zhang , Jingjing Wu , Konstantin Ananyev , Adrien Mazarguil , Nelio Laranjeiro , Matej Vido , Pascal Mazon Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 39803567F for ; Fri, 12 May 2017 17:48:01 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 12/05/2017 12:49, Ferruh Yigit: > On 5/10/2017 2:51 PM, Thomas Monjalon wrote: > > 10/05/2017 15:10, Ferruh Yigit: > >> --- a/doc/guides/nics/features/bnx2x.ini > >> +++ b/doc/guides/nics/features/bnx2x.ini > >> @@ -4,6 +4,7 @@ > >> ; Refer to default.ini for the full list of available PMD features. > >> ; > >> [Features] > >> +Speed capabilities = Y > > > > We should validate this feature only if the driver advertise the > > right speeds for the device. > > Hi Thomas, > > Can you please clarify more, what is expected implementation in PMD? It is expected to advertise only the speeds that the device is capable to offer. > And perhaps a good and a bad sample can be helpful. Good example: drivers/net/i40e/i40e_ethdev.c if (I40E_PHY_TYPE_SUPPORT_40G(hw->phy.phy_types)) /* For XL710 */ dev_info->speed_capa = ETH_LINK_SPEED_40G; else if (I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types)) /* For XXV710 */ dev_info->speed_capa = ETH_LINK_SPEED_25G; else /* For X710 */ dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G; Bad example: drivers/net/bnx2x/bnx2x_ethdev.c dev_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_20G; Looking at qlogic.com, only some 57840 adapters are capable of 20G.