From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id 148655A71 for ; Sun, 25 Oct 2015 23:00:32 +0100 (CET) Received: by wicll6 with SMTP id ll6so90827875wic.1 for ; Sun, 25 Oct 2015 15:00:32 -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=SFLCMBdLnJH+JX43DMjSJTF5xoGpXffgIbFGrMMfNjM=; b=ltBf28dIynoy3q4niDB4DYmD6EitvtozVIqi539Puug4u8idD26o05yqMBcmhlZry2 BVtStrcY9BtWF0Nge1rChYVXz5UugBoA7/k/1he5qN+IsMJJZn/2QCbMKKR+SnVLN9Jh u1nNMEAcmg4tRtA6o+zyO5woLWFUKdlNTlzJgA8nzIry8j7cP1OwsjhldRIxls//cM/w M3APqakESqtYGmSkgFEKI7PdP87SSPetbzgg7IKlqhNnmh5z/ERhiZYAKu9aAFnsEBo0 v0QfV/e2JaZOXN7miaSBEbY6x/avY7/Mu3wzipdoMmgLwE7fnsh4K2P003kee4/OiFWJ lqJQ== X-Received: by 10.194.243.3 with SMTP id wu3mr20014229wjc.85.1445810431968; Sun, 25 Oct 2015 15:00:31 -0700 (PDT) Received: from localhost.localdomain (189.Red-83-47-134.dynamicIP.rima-tde.net. [83.47.134.189]) by smtp.gmail.com with ESMTPSA id ev1sm8733669wic.21.2015.10.25.15.00.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Oct 2015 15:00:31 -0700 (PDT) From: Marc Sune To: dev@dpdk.org Date: Sun, 25 Oct 2015 22:59:57 +0100 Message-Id: <1445810400-8978-3-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445810400-8978-1-git-send-email-marcdevel@gmail.com> References: <1443993003-1059-1-git-send-email-marcdevel@gmail.com> <1445810400-8978-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v6 2/5] 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, 25 Oct 2015 22:00:32 -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..3be84aa 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..b45e21a 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