[dpdk-dev] net/nfp: fix link speed capabilities reported

Message ID 1519300640-23138-1-git-send-email-alejandro.lucero@netronome.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

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

Commit Message

Alejandro Lucero Feb. 22, 2018, 11:57 a.m.
Mixing numeric macros with bit shifts macros is not a good idea.

Fixes: 011411586e03 ("net/nfp: extend speed capabilities advertised")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ferruh Yigit March 7, 2018, 11:59 a.m. | #1
On 2/22/2018 11:57 AM, Alejandro Lucero wrote:
> Mixing numeric macros with bit shifts macros is not a good idea.
> 
> Fixes: 011411586e03 ("net/nfp: extend speed capabilities advertised")
Cc: stable@dpdk.org

> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

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

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index fc501d6..6f795e9 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1268,9 +1268,9 @@  enum nfp_qcp_ptr {
 	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_NUM_1G | ETH_LINK_SPEED_10G |
-			       ETH_SPEED_NUM_25G | ETH_SPEED_NUM_40G |
-			       ETH_SPEED_NUM_50G | ETH_LINK_SPEED_100G;
+	dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G |
+			       ETH_LINK_SPEED_25G | ETH_LINK_SPEED_40G |
+			       ETH_LINK_SPEED_50G | ETH_LINK_SPEED_100G;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_LSO)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;