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 993A89655 for ; Sun, 14 Feb 2016 23:18:06 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id a4so7658142wme.3 for ; Sun, 14 Feb 2016 14:18:06 -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=Om44nLcwwYpupnw0nXTMhSsM6Pul0u2misf6RTGPqqs=; b=HkSvuQFTvRHPc7RxESixzJ0Pf9dfjTuEsRwLkV2lrxVFM8HeifP+YDXzp2SRt1fBG4 Zsgw1XXNnA0q9LLGP7YKsP1D220u9AH1Fd5GvfQ8V7vUS96arvSpBTLUBIQ/tsduITT2 /EqefZ+3fPQtgKf/LqFlVmqYMODhItVpUSEjmyWZ6GmPqit8Wi3tWf4teK2el1XDRGoe DMSpY3JuW9OhTFhi1CRUSHNyNmXmV5XeXxvRO3DcpF3alWvOCm2h6jVc4/xv2+dFvRXD cIzkmNI1H4db2+md+m7hfZPU50Gx6dsp3eTDOt2tx97BS7q50bFw2D7xcvDdlArSSMz6 GoJA== 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=Om44nLcwwYpupnw0nXTMhSsM6Pul0u2misf6RTGPqqs=; b=ik4TZ10CJKQf5xIoncKyq8B889Nv66zWxT/PtieI868xN8bWTCru6AzIMiHbV2YJB8 4kLn7zSjuLfDSl2GTAJxkENz8GTV8JnRuSjGK+z/l5WFsPX+O4iv9A0KSPYpUPiHpoW+ WcSIcgk8Bl0d/8u/cr5S7LDTIc4T5LQ4v7UADHcjYOFU1fhB2CiBYoSoltmlbttZ1ahD cvpM3Qwza9BAFOxSBDoguAzroBwoSWQvbtKuVvBXQGuEA9yg8z5ZfA4RiLHfmk3abSm/ Lkul3TI4u6terHAssKqUcobstj9Zr8QHnKdCYudRnulIAV25Qx9MqwCtLt6CaHJ4W4qP P4CA== X-Gm-Message-State: AG10YOQVydyAUWPY0oJycUiaWUupQ8XpRmrzajXn8YTj+Kfgta8aWLV/DXzYYuIJwKMlKQ== X-Received: by 10.28.19.204 with SMTP id 195mr10018090wmt.1.1455488286534; Sun, 14 Feb 2016 14:18:06 -0800 (PST) Received: from localhost.localdomain (215.Red-79-147-159.dynamicIP.rima-tde.net. [79.147.159.215]) by smtp.gmail.com with ESMTPSA id 198sm12771024wml.22.2016.02.14.14.18.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Feb 2016 14:18:05 -0800 (PST) From: Marc Sune To: dev@dpdk.org, Wenzhuo Lu , Helin Zhang , Harish Patil , Jing Chen Date: Sun, 14 Feb 2016 23:17:37 +0100 Message-Id: <1455488259-1000-3-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455488259-1000-1-git-send-email-marcdevel@gmail.com> References: <1454028127-10401-1-git-send-email-marcdevel@gmail.com> <1455488259-1000-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v8 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, 14 Feb 2016 22:18:06 -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 | 5 +++++ drivers/net/nfp/nfp_net.c | 2 ++ 10 files changed, 48 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..99dac09 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -523,6 +523,11 @@ 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_10G | ETH_SPEED_CAP_40G | + ETH_SPEED_CAP_56G; + 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