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 0CF50DE6 for ; Wed, 27 May 2015 10:59:50 +0200 (CEST) Received: from [172.16.250.156] (unknown [172.16.250.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.bisdn.de (Postfix) with ESMTPSA id CA41EA23F3; Wed, 27 May 2015 10:59:49 +0200 (CEST) Message-ID: <55658785.4030302@bisdn.de> Date: Wed, 27 May 2015 10:59:49 +0200 From: Marc Sune User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Igor Ryzhov References: <1431387946-29950-1-git-send-email-marc.sune@bisdn.de> <1432669843-15672-1-git-send-email-marc.sune@bisdn.de> <1432669843-15672-3-git-send-email-marc.sune@bisdn.de> <1D59D5EC-7003-43BE-86FC-5EE293F6992B@arccn.ru> In-Reply-To: <1D59D5EC-7003-43BE-86FC-5EE293F6992B@arccn.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org Subject: Re: [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: Wed, 27 May 2015 08:59:50 -0000 On 26/05/15 23:20, Igor Ryzhov wrote: > Hello, Marc! > > You swapped values for X710 and XL710 - you use 1G and 10G for XL710, 10G and 40G for X710. Thanks, I will fix that in v3. This is why I was saying in the RFC patch that it needed to be carefully reviewed. marc > > Best regards, > Igor > >> 26 мая 2015 г., в 22:50, Marc Sune написал(а): >> >> 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 >>