[dpdk-dev,v2] nfp: extend speed capabilities advertised

Message ID 1482238365-28082-1-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation fail Compilation issues

Commit Message

Alejandro Lucero Dec. 20, 2016, 12:52 p.m. UTC
  NFP supports more speeds than just 40 and 100GB, which were
what was advertised before.

v2: add feature to nfp.ini

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 doc/guides/nics/features/nfp.ini | 1 +
 drivers/net/nfp/nfp_net.c        | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit Dec. 20, 2016, 1:44 p.m. UTC | #1
On 12/20/2016 12:52 PM, Alejandro Lucero wrote:
> NFP supports more speeds than just 40 and 100GB, which were
> what was advertised before.
> 
> v2: add feature to nfp.ini
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> ---

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini
index 476ed31..25a4e18 100644
--- a/doc/guides/nics/features/nfp.ini
+++ b/doc/guides/nics/features/nfp.ini
@@ -6,6 +6,7 @@ 
 [Features]
 Link status          = Y
 Link status event    = Y
+Speed capabilities   = Y
 Queue start/stop     = Y
 MTU update           = Y
 Jumbo frame          = Y
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index b001a46..7a636fb 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1078,7 +1078,9 @@  static void nfp_net_read_mac(struct nfp_net_hw *hw)
 	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_LINK_SPEED_40G | ETH_LINK_SPEED_100G;
+	dev_info->speed_capa = ETH_SPEED_NUM_1G | ETH_LINK_SPEED_10G |
+			       ETH_SPEED_NUM_25G | ETH_SPEED_NUM_40G |
+			       ETH_SPEED_NUM_50G | ETH_LINK_SPEED_100G;
 }
 
 static const uint32_t *