From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 1EE9D58F3 for ; Fri, 18 Mar 2016 10:28:38 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id l124so23406645wmf.1 for ; Fri, 18 Mar 2016 02:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=eiqXVkqY2cxI/6ZO2iXtKTXBygOk29lvaLxwnWXt2nE=; b=sH7hCr8AWvYYe7cOdt8CxoQKIrfd7p72EOk4tOX++SLK6CUTI2EkPOxsdzM8gfs+Hk 0b2yFmNk1v8xSXKp/mAn/sX+bO1cd1FEHLKkdBNvnSg4lAdhqlOaPfOGvashHXsXd3Xh 7BVuyiLx653R+kasz6m3RljxyzyBHTS3DRHRtT1/WJWk/5A0bhjmeaCbYldogf9iYoJZ M22qWuOMYAtaZZ9s5EiU07PJO+5n3L+BTys3yObsiXFDZz7xwkZL6NIrVOL+Xls/yipV O8VzX/WCnqH7HJunum+pB1o5seiPh+Meaay35Kvuass+JPyfDP+J4BrBN7w/6c0MiAGX 5O5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=eiqXVkqY2cxI/6ZO2iXtKTXBygOk29lvaLxwnWXt2nE=; b=Bmk1aHSd9HqK/qpA5PwiEFwJ+mV9mkD/JyfA5HiT66gOeVXvBqdWOvuvuelyDnk4ha hmjIlpRpJ0ARmq2PpOpThDk3a1rZdKfbhZkiB1Vldan4RH/lQAvt645rgHJJT4BYk802 7GuUqI+/1wj/7crf0lENcVZF2tHhqTjNqk4yuP+UMryPt6kaqsMbgLqFNcyqqmqDJcGa uWJhwpSg9/L/AjObfkbdhl8rMcD3sD0MUISi04I69NL0i0bV7fFXekuIvkmmJFI/YbO2 YIuNj1kAzlJZuz6XfCYjKNXKCel32JRo+XZuz9HcYqb86iA2sQUYtd1Z+whzfQiEYVBh v4qQ== X-Gm-Message-State: AD7BkJJ/+jlLfgGzGFMt58l9mShpgWnzpiNGspEQ9sdWdxX41OigJYi1hzkKhNnCnxYVkQ+x X-Received: by 10.28.131.141 with SMTP id f135mr40646469wmd.33.1458293317974; Fri, 18 Mar 2016 02:28:37 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id ux5sm11359962wjc.17.2016.03.18.02.28.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2016 02:28:37 -0700 (PDT) Date: Fri, 18 Mar 2016 10:28:23 +0100 From: Adrien Mazarguil To: Thomas Monjalon Cc: marcdevel@gmail.com, bruce.richardson@intel.com, declan.doherty@intel.com, konstantin.ananyev@intel.com, wenzhuo.lu@intel.com, helin.zhang@intel.com, jing.d.chen@intel.com, harish.patil@qlogic.com, rahul.lakkireddy@chelsio.com, johndale@cisco.com, vido@cesnet.cz, alejandro.lucero@netronome.com, dev@dpdk.org Message-ID: <20160318092823.GJ27079@6wind.com> Mail-Followup-To: Thomas Monjalon , marcdevel@gmail.com, bruce.richardson@intel.com, declan.doherty@intel.com, konstantin.ananyev@intel.com, wenzhuo.lu@intel.com, helin.zhang@intel.com, jing.d.chen@intel.com, harish.patil@qlogic.com, rahul.lakkireddy@chelsio.com, johndale@cisco.com, vido@cesnet.cz, alejandro.lucero@netronome.com, dev@dpdk.org References: <1457992546-32230-1-git-send-email-thomas.monjalon@6wind.com> <1458238145-7496-1-git-send-email-thomas.monjalon@6wind.com> <1458238145-7496-6-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458238145-7496-6-git-send-email-thomas.monjalon@6wind.com> Subject: Re: [dpdk-dev] [PATCH v11 5/8] ethdev: add speed capabilities X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 09:28:38 -0000 On Thu, Mar 17, 2016 at 07:09:02PM +0100, Thomas Monjalon wrote: > From: Marc Sune > > The speed capabilities of a device can be retrieved with > rte_eth_dev_info_get(). > > The new field speed_capa is initialized in the drivers without > taking care of device characteristics in this patch. > When the capabilities of a driver are accurate, the table in > overview.rst must be filled. > > Signed-off-by: Marc Sune > --- > doc/guides/nics/overview.rst | 1 + > doc/guides/rel_notes/release_16_04.rst | 8 ++++++++ > drivers/net/bnx2x/bnx2x_ethdev.c | 1 + > drivers/net/cxgbe/cxgbe_ethdev.c | 1 + > drivers/net/e1000/em_ethdev.c | 4 ++++ > drivers/net/e1000/igb_ethdev.c | 4 ++++ > drivers/net/fm10k/fm10k_ethdev.c | 4 ++++ > drivers/net/i40e/i40e_ethdev.c | 8 ++++++++ > drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ > drivers/net/mlx4/mlx4.c | 2 ++ > drivers/net/mlx5/mlx5_ethdev.c | 3 +++ > drivers/net/nfp/nfp_net.c | 2 ++ > lib/librte_ether/rte_ethdev.h | 21 +++++++++++++++++++++ > 13 files changed, 67 insertions(+) [...] > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c > index cc4e9aa..3a4a989 100644 > --- a/drivers/net/mlx4/mlx4.c > +++ b/drivers/net/mlx4/mlx4.c > @@ -4301,6 +4301,8 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) > 0); > if (priv_get_ifname(priv, &ifname) == 0) > info->if_index = if_nametoindex(ifname); > + info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G | > + ETH_LINK_SPEED_56G; > priv_unlock(priv); > } Missing: ETH_LINK_SPEED_100M (not sure if we care), ETH_LINK_SPEED_1G and the nonstandard ETH_LINK_SPEED_20G with some adapters. In the future we should provide a more accurate speed_capa depending on actual port capabilities, several mlx4 adapters cannot handle them all. > diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c > index 6704382..3487538 100644 > --- a/drivers/net/mlx5/mlx5_ethdev.c > +++ b/drivers/net/mlx5/mlx5_ethdev.c > @@ -522,6 +522,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) > * size if it is not fixed. > * The API should be updated to solve this problem. */ > info->reta_size = priv->ind_table_max_size; > + info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G | > + ETH_LINK_SPEED_25G | ETH_LINK_SPEED_40G | > + ETH_LINK_SPEED_50G; > priv_unlock(priv); > } Missing: ETH_LINK_SPEED_100G, ETH_LINK_SPEED_20G and ETH_LINK_SPEED_56G. Same as above, these capabilities actually depend on the adapter type and should be probed. I think ETH_LINK_SPEED_100M should work as well but I can't find it mentioned anywhere, let's leave it out for now. -- Adrien Mazarguil 6WIND