From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 9CF1E2E8D for ; Fri, 18 Mar 2016 11:13:33 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id p65so29886740wmp.0 for ; Fri, 18 Mar 2016 03:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=/7RLY1BSnVgrgm733gSNeOyJaPusyZW5Wogt/M6TjLU=; b=fYS0GDbebr8o0R95g+Plk4nml4uxemNHRhWAeW4yrThz1sYGPkcNjv6+8TlYG1pac+ A+dcT/Ocl9jk8/ZFnSHKBOxaxH5Gg7+boavUT09uWuicHm9q95ya64BhLB+pGUMslvJm xKJiHSk+j+qBSvHsIuN6xiAxyNfyhtk08QwfSaWbq2Vm4xPCadkMf+ABN+s9g4rgn2YY KUHA6QL8LSy1WYDoy/xc5R6+sE2c8/O+8vA2xYCghOrMdvySm3YVGh7AleXCtExuksq0 6Dqvb0kVJdgZbuT6dDPGRrTFMuIMJe3qm1EGw4+Wm2ofmWNc6C5fVQMD+8tKadyY7Zbq PT+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=/7RLY1BSnVgrgm733gSNeOyJaPusyZW5Wogt/M6TjLU=; b=j0Ia0ZGzXTZjR4eTcznd73ER8GFtCy8ObxQulHe7A+GA1zw6VFhyKF3ffdETmUZBAg 2Bgv2ebJzDTaybc78bQiJaCWM5y7W+fbSzr8GB01/YF4SgBbJ8RY3BtPDIXtZLclHUvC WjFIwNyq4LCVFULC46ERaT5pHjirtuZ2b6PKGiF81X09j+QFJr7/a9OhBbWbrNgqHy8C +Lff5IrDzCXDWd//TGNAB+pxriD1k1ef1jy2ISwfZnX31gy4Ii3NWNSXo2YFjWjC6Mpa Ao7b8HmyeqofwXPJXCLQ5XLwDbJAtN34oJwTMvfjjTY5xhTMGe5aa420Xc5ykuN5nPPj g8Zw== X-Gm-Message-State: AD7BkJIHjeOSpuxi/43qsh32RuFiQcj46aUJqmmhzReQveCxx2Gnca3Bvmjeo0HiJNUtiX+V X-Received: by 10.194.84.2 with SMTP id u2mr15003104wjy.61.1458296013465; Fri, 18 Mar 2016 03:13:33 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id gg7sm11575684wjd.10.2016.03.18.03.13.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2016 03:13:32 -0700 (PDT) From: Thomas Monjalon To: Adrien Mazarguil 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 Date: Fri, 18 Mar 2016 11:12:02 +0100 Message-ID: <12935703.N0x8FXtEJv@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160318092823.GJ27079@6wind.com> References: <1457992546-32230-1-git-send-email-thomas.monjalon@6wind.com> <1458238145-7496-6-git-send-email-thomas.monjalon@6wind.com> <20160318092823.GJ27079@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 10:13:33 -0000 2016-03-18 10:28, Adrien Mazarguil: > On Thu, Mar 17, 2016 at 07:09:02PM +0100, Thomas Monjalon wrote: > > --- 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. For v12: - info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G | + info->speed_capa = + ETH_LINK_SPEED_1G | + ETH_LINK_SPEED_10G | + ETH_LINK_SPEED_20G | + ETH_LINK_SPEED_40G | ETH_LINK_SPEED_56G; > In the future we should provide a more accurate speed_capa depending on > actual port capabilities, several mlx4 adapters cannot handle them all. When doing so, you'll be able to fill the row "speed capability" in overview.rst. > > --- 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. For v12: - info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G | - ETH_LINK_SPEED_25G | ETH_LINK_SPEED_40G | - ETH_LINK_SPEED_50G | ETH_LINK_SPEED_100G; + info->speed_capa = + ETH_LINK_SPEED_1G | + ETH_LINK_SPEED_10G | + ETH_LINK_SPEED_20G | + ETH_LINK_SPEED_25G | + ETH_LINK_SPEED_40G | + ETH_LINK_SPEED_50G | + ETH_LINK_SPEED_56G | + ETH_LINK_SPEED_100G; ETH_LINK_SPEED_100G is added in patch #8. > 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.