From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com
 [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 39803567F
 for <dev@dpdk.org>; Fri, 12 May 2017 17:48:01 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 82C1020B2D;
 Fri, 12 May 2017 11:48:01 -0400 (EDT)
Received: from frontend2 ([10.202.2.161])
 by compute1.internal (MEProxy); Fri, 12 May 2017 11:48:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=QMAkgZqtlgIP/94
 4o5g2DvciqzzqPzgxWvHl32QwWLc=; b=bT8W8HJqxaBY9Rx5bksTNysoxbeMbbt
 WDjiNXGhaj/rJEcDWGWs2YRECEL9NG1+zoL19ekyojLKoWqux9//irBaDNrczKEa
 P8qnn5eknqWhBy7CeYJKFVwp/Cjzr5FfXIhqwl5Rw+vBdTKUHhrIJr0hNf7ObVEU
 FhaJHOry5xOg=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=
 fm1; bh=QMAkgZqtlgIP/944o5g2DvciqzzqPzgxWvHl32QwWLc=; b=Ml4e4RD1
 t/ja87+YCtQGtwsc1qKkK1g4nxTBYH3q+7qA8uJ92mIhX2mdE0JnzJGOA307nJQS
 c3esPLgaruVX/mnSo2nIEDqdsajmBbHq5UPZj4Ywbo7cBykXnnhuwtZ2StX7vASl
 BoYpybCY/CeXWxsxjS6t4kKhNCDrxsHx6rT5WqdpixkZ/kuLpZ5h+KFnvTVU92Oy
 PImcYBZPxMNWF8CFID+w3rlJX/V8YupVVGRLRpelHMkK3tltuef/E7y0RnbVnVw5
 uyv9kJUWt0zHQiCvNe+OVsFZZu6x9/bvLwk/4eG81jJNJmi/aw0MHSYmk/dA+hOJ
 jEG5BvDq23jlPw==
X-ME-Sender: <xms:MdkVWZoYp2UD6XXfGHNyZha9dMEsqLrqcG0N5dQMKf4OLPuEfqM_aw>
X-Sasl-enc: KscuPFgXkVAws6rOSpvKZLgl7S1OeXL1YBlvUiM+R4Ye 1494604081
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 2BD4D245D2;
 Fri, 12 May 2017 11:48:01 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Shepard Siegel <shepard.siegel@atomicrules.com>,
 Ed Czeck <ed.czeck@atomicrules.com>,
 John Miller <john.miller@atomicrules.com>,
 John McNamara <john.mcnamara@intel.com>,
 Harish Patil <harish.patil@cavium.com>,
 Rasesh Mody <rasesh.mody@cavium.com>,
 Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
 Hemant Agrawal <hemant.agrawal@nxp.com>,
 Shreyansh Jain <shreyansh.jain@nxp.com>,
 Wenzhuo Lu <wenzhuo.lu@intel.com>, Marcin Wojtas <mw@semihalf.com>,
 Michal Krawczyk <mk@semihalf.com>, Guy Tzalik <gtzalik@amazon.com>,
 Evgeny Schemeilin <evgenys@amazon.com>,
 Jing Chen <jing.d.chen@intel.com>, Helin Zhang <helin.zhang@intel.com>,
 Jingjing Wu <jingjing.wu@intel.com>,
 Konstantin Ananyev <konstantin.ananyev@intel.com>,
 Adrien Mazarguil <adrien.mazarguil@6wind.com>,
 Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,
 Matej Vido <vido@cesnet.cz>, Pascal Mazon <pascal.mazon@6wind.com>,
 Yuanhan Liu <yuanhan.liu@linux.intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Shrikrishna Khare <skhare@vmware.com>
Date: Fri, 12 May 2017 17:48:00 +0200
Message-ID: <17406199.hqjMraK9H2@xps>
In-Reply-To: <f4aa5d75-6a50-d39d-b367-98e5e924f4dc@intel.com>
References: <20170510131053.75843-1-ferruh.yigit@intel.com>
 <16254100.QC6ztoDaX8@xps> <f4aa5d75-6a50-d39d-b367-98e5e924f4dc@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH] drivers/net: document missing speed
	capabilities feature
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 12 May 2017 15:48:02 -0000

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.