From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) by dpdk.org (Postfix) with ESMTP id 4BE9DF921 for ; Mon, 19 Dec 2016 18:58:12 +0100 (CET) Received: by mail-vk0-f51.google.com with SMTP id w194so123305914vkw.2 for ; Mon, 19 Dec 2016 09:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=f2qkyXC/3skr+wO+sUWnpzEPO8NRJfFwlxpvvUEDt+M=; b=snytNNz1QpI/eyWKU/RehlXg6ReuTsWWP5w4BX4byleRx6+BV33J+edLXD4mZwzHiF GtQU+uL1f2jkToOjXVsCggybdabLpb9x2VH7sr0li7jQ4kzW0J7I3wacJyq/5ZgWXIbi cGVXzPkxLhGpusV3FnGerVFOXoHu8AcmAZoL9PNWblTCFICrSbb4FMp4IMzYoVVxKRQG 9eEqqHnKT1iMfZQ+e0+RQiNAN8bx6vWb7lLgNHzo3VkQ+WdgbXV8bzBOH+iW+wbPdxnj 8/Vy42F9WeYP6n9QKE9/TejI7dpueLNxcSklYMbDhLocQj/tJkgotyY9DOBGITT7Wd88 C6yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=f2qkyXC/3skr+wO+sUWnpzEPO8NRJfFwlxpvvUEDt+M=; b=pfqXwurxVHlDuuUC9WuNNAkvOkx7qpeS+d4wFY9YikbFEX8+8hkzsANGCGuDlpTCEV 0dbifn70k9TDT3ETS4w/n+wgHPsEY2mgSbsSRS+QDmDtL9wPN3SOpzlHQgi6XWs+kJoN XVvi08O2h6MBRAhbl8bNNhDspESUmDiJGIjakYrT5nVW5G/hDF5H5pH9bEfQtTn5CG6K BGJH9VpCD2dS8u6+602OX6DUvBa3/HCKTQfbWOXBmpvLgMwmfOHFLnHqKuv1H8YU5Ngx 4PCeI+JjnJEQ1D9WthPAhdh4Tzi234+ViRvZbVeZgfTZXR7lMy0PBHvDv5LELcsIh9kr 9Lsg== X-Gm-Message-State: AIkVDXLB6toXwJDm1DWTI28zG21pLpoppzLcAwIIBLvXvsSnUuV4EhPs1TQLVpOs41UE2LWqTV/KYtDsnWWLQutv X-Received: by 10.31.99.193 with SMTP id x184mr6498280vkb.161.1482170291775; Mon, 19 Dec 2016 09:58:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.46.3 with HTTP; Mon, 19 Dec 2016 09:58:11 -0800 (PST) In-Reply-To: References: <1482149104-40805-1-git-send-email-alejandro.lucero@netronome.com> <3dd84942-5c7b-5f3f-2760-a71f97dfcd6a@intel.com> From: Alejandro Lucero Date: Mon, 19 Dec 2016 17:58:11 +0000 Message-ID: To: Marc Cc: Ferruh Yigit , dev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 17:58:12 -0000 On Mon, Dec 19, 2016 at 4:35 PM, Marc wrote: > > > On 19 December 2016 at 17:18, Alejandro Lucero < > alejandro.lucero@netronome.com> wrote: > >> On Mon, Dec 19, 2016 at 3:05 PM, Ferruh Yigit >> wrote: >> >> > 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? >> > >> > >> The driver advertises the right speed range supported. The problem is with >> the report about the current link speed configured. >> Maybe, is the right thing to do here to not report the current link speed >> because the driver really does not know about it? >> >> If you agree with this, I'm afraid the just accepted patch about the link >> report needs to be modified. >> > > Alejandro, > > If negociated link state has to be changed, then struct rte_eth_dev_data > dev_link field is where to do it. > > Yes. The driver is already doing that. > As Ferruh was saying, dev_info->speed_capa contains the speed capabilties > of the particular NIC in use, not the driver (detecting firmware version > would be the best here). > > The NIC supports all the range. The problem is the driver does not really knows the speed with old firmware. > marc > > >> >> >> >> > > >> > > >> > > >> > > 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 * >> > > > >> > > >> > > >> > >> > >> > >