From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id E82008E79 for ; Sun, 4 Oct 2015 23:13:54 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so95140617wic.0 for ; Sun, 04 Oct 2015 14:13:54 -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=zsbbM+qSAFWT68fJtlx5L9x1DtAU4XTkgSYZaylhCk0=; b=Lxh8B46Iab5qK3HKai/M51gwUMJ7kar7bLkL8+FWKuSrTZsI4/U+9xJ/8Sjs+5RtOE yDjMfWN3qPp+MYNCz4u5z0dY2fdTAqgDO6ESU7Aay3aMNeYvN19d2Mwiem81295qFhfC jJf1TvEHaUYU+eqxQlwUBNvXtlz0SMxmS7HJky3PkgPhBoR6XvRY9NcwJDN9ndRR1Lz4 Yy8DJd8Pm5IDlyvylbE9B/wsmlPZ/U5vblQSHJLlTeYRtckxgGvvuIZ6ZagAEv+poCnC WQh0Uhha6ueLX8sF/a0jBWueYLKzouT4TEbUfxOGy0aNTUbHWamrEd4KknISE4ys62qs xWUw== X-Received: by 10.180.39.193 with SMTP id r1mr7454100wik.57.1443993234782; Sun, 04 Oct 2015 14:13:54 -0700 (PDT) Received: from localhost.localdomain (22.Red-83-53-192.dynamicIP.rima-tde.net. [83.53.192.22]) by smtp.gmail.com with ESMTPSA id uq5sm23401596wjc.3.2015.10.04.14.13.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Oct 2015 14:13:54 -0700 (PDT) From: Marc Sune To: dev@dpdk.org Date: Sun, 4 Oct 2015 23:12:45 +0200 Message-Id: <1443993167-1150-3-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443993167-1150-1-git-send-email-marcdevel@gmail.com> References: <1440807373-24770-1-git-send-email-marc.sune@bisdn.de> <1443993167-1150-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v5 2/4] 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: Sun, 04 Oct 2015 21:13:55 -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 | 4 ++++ 6 files changed, 38 insertions(+) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 912f5dd..72f792c 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -933,6 +933,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 848ef6e..927f5d9 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1570,6 +1570,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 a69c990..ca6357c 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -964,6 +964,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 2dd9fdc..8a5dfbf 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1624,6 +1624,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; @@ -1683,6 +1684,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 ec2918c..053c77e 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2399,6 +2399,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 = 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 2f49ed5..88f95e5 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -3847,6 +3847,10 @@ mlx4_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM) : 0); + + info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_40G | + ETH_SPEED_CAP_56G; + priv_unlock(priv); } -- 2.1.4