From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 726A4F965 for ; Mon, 19 Dec 2016 16:05:56 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 19 Dec 2016 07:05:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,374,1477983600"; d="scan'208";a="800054552" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by FMSMGA003.fm.intel.com with ESMTP; 19 Dec 2016 07:05:54 -0800 To: Alejandro Lucero References: <1482149104-40805-1-git-send-email-alejandro.lucero@netronome.com> Cc: dev From: Ferruh Yigit Message-ID: <3dd84942-5c7b-5f3f-2760-a71f97dfcd6a@intel.com> Date: Mon, 19 Dec 2016 15:05:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] nfp: extend speed capabilities advertised X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 15:05:56 -0000 On 12/19/2016 3:02 PM, Alejandro Lucero wrote: > > > On Mon, Dec 19, 2016 at 2:36 PM, Ferruh Yigit > wrote: > > Hi Alejandro, > > > Hi, > > > On 12/19/2016 12:05 PM, Alejandro Lucero wrote: > > NFP supports more speeds than just 40 and 100GB, which were > > what was advertised before. > > > > Signed-off-by: Alejandro Lucero > > > --- > > drivers/net/nfp/nfp_net.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c > > index 27afbfd..77015c4 100644 > > --- a/drivers/net/nfp/nfp_net.c > > +++ b/drivers/net/nfp/nfp_net.c > > @@ -1077,7 +1077,9 @@ static void nfp_net_read_mac(struct nfp_net_hw *hw) > > dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ; > > dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ; > > > > - dev_info->speed_capa = ETH_LINK_SPEED_40G | ETH_LINK_SPEED_100G; > > + dev_info->speed_capa = ETH_SPEED_NUM_1G | ETH_LINK_SPEED_10G | > > + ETH_SPEED_NUM_25G | ETH_SPEED_NUM_40G | > > + ETH_SPEED_NUM_50G | ETH_LINK_SPEED_100G; > > Does all devices driver by this driver supports all these speeds? > > I am aware of at least one exception to this, from previous patch [1], > should we take that into account? > > > So we have different NFP devices and different firmwares. > NFP by design support all those speeds, but the PMD relies on the > firmware for being able to know which is the current configured speed > after link negotiation. PMD development was done with a specific > firmware, and I was told to just report such speed by default. Last > firmware versions give that speed info, but old firmware versions do not. > > So, all devices support such a speed range, indeed PMD works with any of > them, but reported speed is always 40G with old firmware. This is a > firmware limitation but we have to support old and new firmware. But this information to the application will be wrong for some (old) FW. What do you think checking the FW version here and report capability based on what FW supports? > > > > Also other than that exception, can you please confirm all other devices > support all above speeds? > > [1] > + if ((NFD_CFG_MAJOR_VERSION_of(hw->ver) < 4) || > + ((NFD_CFG_MINOR_VERSION_of(hw->ver) == 4) && > + (NFD_CFG_MINOR_VERSION_of(hw->ver) == 0))) > + link.link_speed = ETH_SPEED_NUM_40G; > > > > } > > > > static const uint32_t * > > > >