From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 445EE95CE for ; Tue, 1 Mar 2016 01:46:08 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id l68so1507904wml.3 for ; Mon, 29 Feb 2016 16:46:08 -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=J89Tz2p/eSalG9Iqw2CiO6/T6REO812pbQVJC2gI3O8=; b=P7n5yY65A7lNInC5ebyctLGs2kswJGQVHk4FjGX1NTgNVYK7U3dd8bdEHymKU1KnFx 8OBkYzayZ9D4xisYasPHD/QpzRtX6nebvaWmZWrd+Y18jeboYP+efhOqvtbELz8ExE17 K3jIt+oIFbAiiPdzs+TNr/qhUwpEEUJMGjLtehjPQITg8mhZ58bqyldGyETMK4WsL7eT mFeTfRaEIyUR06muzZzFAAVwviJIqIiLlFWS5lw1P2OdiaRxeGxW8NuT0/sQpeGPStuS B8sjy3zJ8SuOeEdbf5ZCQ/opOaZeQzMQV+0FMVSyr8MHOIPFZelBmGmQc6PjNhrhUtID 8KkA== 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=J89Tz2p/eSalG9Iqw2CiO6/T6REO812pbQVJC2gI3O8=; b=DQQlExM/q8wlLyX3JU5Fc+Ygl7E6k9CEULXiQU971L8sYtB8A3uHdtIR0kA1C2igdS B3BJhX1oxi4BBZ2/GqB4+8LylLfknQCCWTlczEcUvhA4KcZkMW1xVpsr8xNwctZ/jPDA cYv9XXWLlP1eXJgAS+pd1EfV1Am2X1lyH2qjPC6zjgG4S25P/5XhJGja6WbwJFEdFlCc gCSMKejrNuXyGVz2h1jyLXpLsxD5w8f0pkRiyACkr4G19MLLe4KMAN44GewE1MDlO6E3 oNDUAfNUoqaBXWqqGhEbO7ZYXLtSU9xPXmI0OQ6hfva6WFJmd/yFajUPKwl0Q6FoXGzU DNkA== X-Gm-Message-State: AD7BkJL3Q99rRvXyOryEsRWqXpttNIPOIs+Q0hYuuhnYVI1bHuKdvoN3ERbHQNi7NBaOLg== X-Received: by 10.194.113.38 with SMTP id iv6mr17109293wjb.126.1456793168140; Mon, 29 Feb 2016 16:46:08 -0800 (PST) Received: from localhost.localdomain (84.Red-83-63-204.staticIP.rima-tde.net. [83.63.204.84]) by smtp.gmail.com with ESMTPSA id v66sm18666770wmb.18.2016.02.29.16.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Feb 2016 16:46:07 -0800 (PST) From: Marc Sune To: "dev@dpdk.org" , "Lu, Wenzhuo" , "Zhang, Helin" , "Harish Patil" , "Chen, Jing D" Date: Tue, 1 Mar 2016 01:45:49 +0100 Message-Id: <1456793151-1475-3-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456793151-1475-1-git-send-email-marcdevel@gmail.com> References: <1455488259-1000-1-git-send-email-marcdevel@gmail.com> <1456793151-1475-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v9 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: Tue, 01 Mar 2016 00:46:08 -0000 Added speed capabilities to all pmds supporting physical NICs: * e1000 * ixgbe * i40 * bnx2x * cxgbe * mlx4 * mlx5 * nfp * fm10k Signed-off-by: Marc Sune --- drivers/net/bnx2x/bnx2x_ethdev.c | 1 + drivers/net/cxgbe/cxgbe_ethdev.c | 1 + 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 ++++ drivers/net/mlx5/mlx5_ethdev.c | 7 +++++++ drivers/net/nfp/nfp_net.c | 2 ++ 10 files changed, 50 insertions(+) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 69df02e..b547ac3 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -347,6 +347,7 @@ bnx2x_dev_infos_get(struct rte_eth_dev *dev, __rte_unused struct rte_eth_dev_inf dev_info->min_rx_bufsize = BNX2X_MIN_RX_BUF_SIZE; dev_info->max_rx_pktlen = BNX2X_MAX_RX_PKT_LEN; dev_info->max_mac_addrs = BNX2X_MAX_MAC_ADDRS; + dev_info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_20G; } static void diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 97ef152..203e119 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -171,6 +171,7 @@ static void cxgbe_dev_info_get(struct rte_eth_dev *eth_dev, device_info->rx_desc_lim = cxgbe_desc_lim; device_info->tx_desc_lim = cxgbe_desc_lim; + device_info->speed_capa = ETH_SPEED_CAP_10G | ETH_SPEED_CAP_40G; } static void cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 4a843fe..e40dc37 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 4ed5e95..7eac8ea 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 421266b..2e6ec60 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 ef24122..78a0cbd 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 3e6fe86..7e29c18 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 ee00151..c5688a7 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -4264,6 +4264,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); } diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 1159fa3..9c997c5 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -523,6 +523,13 @@ 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_SPEED_CAP_1G | ETH_SPEED_CAP_10G | + ETH_SPEED_CAP_25G | + ETH_SPEED_CAP_40G | + ETH_SPEED_CAP_50G | + ETH_SPEED_CAP_100G; + priv_unlock(priv); } diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index fd4dd39..98a957a 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1071,6 +1071,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ; dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ; + + dev_info->speed_capa = ETH_SPEED_CAP_50G | ETH_SPEED_CAP_100G; } static uint32_t -- 2.1.4