From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 80EE68DAB for ; Sat, 29 Aug 2015 01:20:29 +0200 (CEST) Received: by wiyy7 with SMTP id y7so12626316wiy.1 for ; Fri, 28 Aug 2015 16:20:29 -0700 (PDT) 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=hBRDsYAyiPo3fz8VkIGcMused55BbsyFlEGM72mxBMY=; b=MPc8XzmNM0dERmVeB83f5XYsQYuLjGGF+Aa7MbLqOL55a+QQvoc2SLzl3vpXnahukL JQEBx7ZmtB7HfqaOADuYP8L9a/CSr2QYCf4t+ejH96b+wqsab47dhNXnIuiH+1gHg5IH ybOTe2mridmOUFGJuZHLseP2V6qj8YE1h2KG04ZBys4+Tot5Yu1tfGk6LTlaqf+aVty8 UTxqgc0vBD0YGGe73skSN+3UqMUGbCSgoRUOzxrOMF/L1c/GR+093jNYqv2tkuJriBKw 0SDuzVx8AvMobG2oz88luH+I0FnCc+MU/03zKxi0wHXDXFzrgVRzTHeRuN5BhH9c5CWt aG3g== X-Received: by 10.194.95.41 with SMTP id dh9mr13777252wjb.55.1440804029369; Fri, 28 Aug 2015 16:20:29 -0700 (PDT) Received: from localhost.localdomain (103.Red-83-55-239.dynamicIP.rima-tde.net. [83.55.239.103]) by smtp.gmail.com with ESMTPSA id r8sm5868803wik.16.2015.08.28.16.20.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Aug 2015 16:20:28 -0700 (PDT) From: Marc Sune X-Google-Original-From: Marc Sune To: dev@dpdk.org Date: Sat, 29 Aug 2015 01:20:14 +0200 Message-Id: <1440804014-30815-3-git-send-email-marc.sune@bisdn.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440804014-30815-1-git-send-email-marc.sune@bisdn.de> References: <1432669843-15672-1-git-send-email-marc.sune@bisdn.de> <1440804014-30815-1-git-send-email-marc.sune@bisdn.de> Cc: Marc Sune Subject: [dpdk-dev] [PATCH v3 2/2] Filling 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, 28 Aug 2015 23:20:29 -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 | 3 +++ drivers/net/i40e/i40e_ethdev.c | 9 +++++++++ drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++++++++ drivers/net/mlx4/mlx4.c | 6 ++++++ 6 files changed, 40 insertions(+) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 5ca1830..cd64843 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -888,6 +888,12 @@ eth_em_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = 1; dev_info->max_tx_queues = 1; + + dev_info->speed_capa = ETH_SPEED_10M_HD | + ETH_SPEED_10M | + ETH_SPEED_100M_HD | + ETH_SPEED_100M | + ETH_SPEED_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 7c5e952..d511400 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1404,6 +1404,12 @@ eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) }, .txq_flags = 0, }; + + dev_info->speed_capa = ETH_SPEED_10M_HD | + ETH_SPEED_10M | + ETH_SPEED_100M_HD | + ETH_SPEED_100M | + ETH_SPEED_1G; } static void diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 4afd5ab..40b1dd1 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -791,6 +791,9 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev, ETH_TXQ_FLAGS_NOOFFLOADS, }; + dev_info->speed_capa = ETH_SPEED_1G | ETH_SPEED_2_5G | + ETH_SPEED_10G | ETH_SPEED_25G | + ETH_SPEED_40G | ETH_SPEED_100G; } static int diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 056b081..87b1840 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1519,6 +1519,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; @@ -1574,6 +1575,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_10G | ETH_SPEED_40G; + else + /* For X710 */ + dev_info->speed_capa = ETH_SPEED_1G | ETH_SPEED_10G; + } static int diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b2fcffc..2e57a7c 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2060,6 +2060,16 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) }; dev_info->reta_size = ETH_RSS_RETA_SIZE_128; dev_info->flow_type_rss_offloads = IXGBE_RSS_OFFLOAD_ALL; + + dev_info->speed_capa = ETH_SPEED_1G | ETH_SPEED_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_100M | + ETH_SPEED_100M_HD; } static void diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index fde23e1..f3dbe58 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -3487,6 +3487,12 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) info->max_rx_queues = max; info->max_tx_queues = max; info->max_mac_addrs = elemof(priv->mac); + + info->speed_capa = ETH_SPEED_10G | ETH_SPEED_20G | + ETH_SPEED_25G | ETH_SPEED_40G | + ETH_SPEED_50G | ETH_SPEED_56G | + ETH_SPEED_100G; + priv_unlock(priv); } -- 2.1.4