From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx.bisdn.de (mx.bisdn.de [185.27.182.31]) by dpdk.org (Postfix) with ESMTP id 915ED11C5 for ; Tue, 26 May 2015 21:51:17 +0200 (CEST) Received: from localhost.localdomain (f052081021.adsl.alicedsl.de [78.52.81.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mx.bisdn.de (Postfix) with ESMTPSA id 2D678A3A3C; Tue, 26 May 2015 21:51:17 +0200 (CEST) From: Marc Sune To: dev@dpdk.org Date: Tue, 26 May 2015 21:50:43 +0200 Message-Id: <1432669843-15672-3-git-send-email-marc.sune@bisdn.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1432669843-15672-1-git-send-email-marc.sune@bisdn.de> References: <1431387946-29950-1-git-send-email-marc.sune@bisdn.de> <1432669843-15672-1-git-send-email-marc.sune@bisdn.de> Subject: [dpdk-dev] [PATCH v2 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: Tue, 26 May 2015 19:51:17 -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 d28030e..8e25cfa 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -883,6 +883,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_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 e4b370d..424ad6f 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1398,6 +1398,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_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 275c19c..e97b857 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_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 fb64027..5e9db6b 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_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 0d9f9b2..78b13a8 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2054,6 +2054,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_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 f915bc1..d4442fb 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -3482,6 +3482,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_CAP_10G | ETH_SPEED_CAP_20G | + ETH_SPEED_CAP_25G | ETH_SPEED_CAP_40G | + ETH_SPEED_CAP_50G | ETH_SPEED_CAP_56G | + ETH_SPEED_CAP_100G; + priv_unlock(priv); } -- 2.1.4