From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 877A5C4EE for ; Fri, 29 Jan 2016 01:42:35 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id 128so4734065wmz.3 for ; Thu, 28 Jan 2016 16:42:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZBq34m4MVpw/HtQyH1zxCNU5ayOa4xlfYJFxPvPYtSQ=; b=lwXC5GbPo+sFNlYkDNFK4/JVswSHqvp745ZYe1ReDfmdgjTEeK4pP6RcQEqqF5PE4U nDEOoPjdWHmqyidMMeywAfdgAfzoOB4C31YsQEFiK3zTepdX7qGAhHLIgXcWzBzb0GM9 xUNGss/FnLaR0Za3aw9LCDhv9vD608XSAD0KsZ0Mc7KXlZY3lVYLwpf88pCrQfIhBz2Y +1rxRe1WQmDWem0V73JIAmvEOgtxjWnovdJsXZTjn1cM0m+uUNM6QYajrLvjbNnuuo0P OiYsTxC52SzqC2sXG0+XE8HFAkmeDQ2p5q7XF+8C9pYay6lFtpjj6vtvj3061EbgGNQi jNCA== 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:in-reply-to :references; bh=ZBq34m4MVpw/HtQyH1zxCNU5ayOa4xlfYJFxPvPYtSQ=; b=Hov5wJTurpECgXxtWO4ql2aPSIoHEJE4O4xO/oODancfa7fcLN/CTthqK7E9y+WJvT H0CSVi+Rg5AkxqnSAo8uFbTS+xTUgPZonf3AZurrI3zGwRrx3hhG3MN0jcgWiRu53pbV y12ojMCv0kKXO8D0Xqh54dFJvBZIb2v+MSs3S5nkMsS3BL6rjGKYkVI5eQRpM9ZOmTU5 6Y9m2jp5w70pWk1OyIN6qVTsLcW2xhygveG6zs1Xf3mUJb9J6BzMJjbVDTX35UUt/Dy3 2jPH38wdSvcEEJQR0ypl0yC2KYbRG4EcKas/kqxlHh8xl9RD2HdCOyMk5iJyvmUQ2KId GwTQ== X-Gm-Message-State: AG10YOSSY+3eD5mdOBMpyUuzSIO/7MHCvRh0YcI9Lv7F3l2vE4ET0SLWVG1QFZfcHOGz4w== X-Received: by 10.28.129.202 with SMTP id c193mr5673886wmd.35.1454028155445; Thu, 28 Jan 2016 16:42:35 -0800 (PST) Received: from localhost.localdomain (251.Red-79-159-160.dynamicIP.rima-tde.net. [79.159.160.251]) by smtp.gmail.com with ESMTPSA id c26sm4078518wmi.24.2016.01.28.16.42.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jan 2016 16:42:34 -0800 (PST) From: Marc Sune To: dev@dpdk.org, Wenzhuo Lu , Helin Zhang , Harish Patil , Jing Chen Date: Fri, 29 Jan 2016 01:42:04 +0100 Message-Id: <1454028127-10401-3-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1454028127-10401-1-git-send-email-marcdevel@gmail.com> References: <1445810400-8978-1-git-send-email-marcdevel@gmail.com> <1454028127-10401-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v7 2/5] ethdev: Fill speed capability bitmaps in the PMDs 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, 29 Jan 2016 00:42:35 -0000 Added speed capabilities to all pmds supporting physical NICs: * e1000 * ixgbe * i40 * mlx4 * fm10k Signed-off-by: Marc Sune --- drivers/net/e1000/em_ethdev.c | 6 ++++++ drivers/net/e1000/igb_ethdev.c | 6 ++++++ drivers/net/fm10k/fm10k_ethdev.c | 4 ++++ drivers/net/i40e/i40e_ethdev.c | 9 +++++++++ drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++++++++ drivers/net/mlx4/mlx4.c | 4 ++++ 6 files changed, 39 insertions(+) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 66e8993..fd48bbf 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1023,6 +1023,12 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) .nb_min = E1000_MIN_RING_DESC, .nb_align = EM_TXD_ALIGN, }; + + dev_info->speed_capa = ETH_SPEED_CAP_10M_HD | + ETH_SPEED_CAP_10M_FD | + ETH_SPEED_CAP_100M_HD | + ETH_SPEED_CAP_100M_FD | + ETH_SPEED_CAP_1G; } /* return 0 means link status changed, -1 means not changed */ diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index d1bbcda..9c8dffa 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1908,6 +1908,12 @@ eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->rx_desc_lim = rx_desc_lim; dev_info->tx_desc_lim = tx_desc_lim; + + dev_info->speed_capa = ETH_SPEED_CAP_10M_HD | + ETH_SPEED_CAP_10M_FD | + ETH_SPEED_CAP_100M_HD | + ETH_SPEED_CAP_100M_FD | + ETH_SPEED_CAP_1G; } static void diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index e4aed94..aeb2962 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1333,6 +1333,10 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev, .nb_min = FM10K_MIN_TX_DESC, .nb_align = FM10K_MULT_TX_DESC, }; + + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_2_5G | + ETH_SPEED_CAP_10G | ETH_SPEED_CAP_25G | + ETH_SPEED_CAP_40G | ETH_SPEED_CAP_100G; } static int diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bf6220d..d242973 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2233,6 +2233,7 @@ static void i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) { struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct i40e_vsi *vsi = pf->main_vsi; dev_info->max_rx_queues = vsi->nb_qps; @@ -2304,6 +2305,14 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues += dev_info->vmdq_queue_num; dev_info->max_tx_queues += dev_info->vmdq_queue_num; } + + if (i40e_is_40G_device(hw->device_id)) + /* For XL710 */ + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_10G; + else + /* For X710 */ + dev_info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_40G; + } static int diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 4c4c6df..4e3ab3d 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2827,6 +2827,16 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t); dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type); dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; + + dev_info->speed_capa = ETH_SPEED_CAP_1G | ETH_SPEED_CAP_10G; + + if (hw->mac.type == ixgbe_mac_X540 || + hw->mac.type == ixgbe_mac_X540_vf || + hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550_vf) + + dev_info->speed_capa |= ETH_SPEED_CAP_100M_FD /*| + ETH_SPEED_CAP_100M_HD*/; } static void diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 207bfe2..1f3ed59 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -4265,6 +4265,10 @@ 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_SPEED_CAP_10G |ETH_SPEED_CAP_40G | + ETH_SPEED_CAP_56G; + priv_unlock(priv); } -- 2.1.4