[dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' has been queued to LTS release 16.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Jul 24 18:07:31 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a898a787de86541b1cfc96a2fbde09c4c7d9ec65 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing at intel.com>
Date: Wed, 23 May 2018 15:46:46 +0800
Subject: [PATCH] net/i40e: fix shifts of 32-bit value

[ upstream commit bc98bf3a2d0301a17707bc04e95fc32746a397c4 ]

Cppcheck reports following error,
(error) Shifting 32-bit value by 36 bits is undefined behaviour

According to datasheet, there's PHY type and PHY type extension
in setting PHY config command, should exclude PHY type extension
when setting PHY type.

Fixes: 1bb8f661168d ("net/i40e: fix link down and negotiation")

Signed-off-by: Beilei Xing <beilei.xing at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7e93c3e1a..d9fff5c4d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1747,8 +1747,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 
 
 
-	/* To enable link, phy_type mask needs to include each type */
-	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_MAX; cnt++)
+	/* PHY type mask needs to include each type except PHY type extension */
+	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_25GBASE_KR; cnt++)
 		phy_type_mask |= 1 << cnt;
 
 	/* use get_phy_abilities_resp value for the rest */
-- 
2.18.0



More information about the stable mailing list