patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v3 01/10] net/ice/base: fix type conversion
       [not found] <20250527131741.7606-1-dhanya.r.pillai@intel.com>
@ 2025-05-27 13:17 ` Dhanya Pillai
  2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Dhanya Pillai @ 2025-05-27 13:17 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov, Qiming Yang, Qi Zhang,
	Paul M Stillwell Jr, Wenzhuo Lu
  Cc: dev, Waldemar Dworakowski, stable, Dhanya Pillai

From: Waldemar Dworakowski <waldemar.dworakowski@intel.com>

In ice_sched_move_vsi_to_agg() int16 is used to pass 8 bit value
what causes compiler warning:
warning C4244: 'function' : conversion from 'UINT16' to 'UINT8',
possible loss of data
Changed variable type to avoid conversion

Fixes: 29a0c11489ef ("net/ice/base: clean code")
Cc: stable@dpdk.org
Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
---
 drivers/net/intel/ice/base/ice_sched.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/intel/ice/base/ice_sched.c b/drivers/net/intel/ice/base/ice_sched.c
index 1f520bb7c0..a8a149f541 100644
--- a/drivers/net/intel/ice/base/ice_sched.c
+++ b/drivers/net/intel/ice/base/ice_sched.c
@@ -2383,7 +2383,8 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
 	u16 num_nodes_added;
 	u8 aggl, vsil;
 	int status;
-	u16 i;
+	u16 j;
+	u8 i;
 
 	tc_node = ice_sched_get_tc_node(pi, tc);
 	if (!tc_node)
@@ -2409,9 +2410,9 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
 		num_nodes[i] = 1;
 
 	/* Check if the aggregator subtree has any free node to add the VSI */
-	for (i = 0; i < agg_node->num_children; i++) {
+	for (j = 0; j < agg_node->num_children; j++) {
 		parent = ice_sched_get_free_vsi_parent(pi->hw,
-						       agg_node->children[i],
+						       agg_node->children[j],
 						       num_nodes);
 		if (parent)
 			goto move_nodes;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 02/10] net/ice/base: fix typo in media type check
       [not found] <20250527131741.7606-1-dhanya.r.pillai@intel.com>
  2025-05-27 13:17 ` [PATCH v3 01/10] net/ice/base: fix type conversion Dhanya Pillai
@ 2025-05-27 13:17 ` Dhanya Pillai
  2025-06-02  8:44   ` Burakov, Anatoly
  2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
  2025-05-27 13:17 ` [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F Dhanya Pillai
  3 siblings, 1 reply; 6+ messages in thread
From: Dhanya Pillai @ 2025-05-27 13:17 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov, Ian Stokes, Paul Greenwalt,
	Alice Michael
  Cc: dev, stable, Dhanya Pillai

From: Paul Greenwalt <paul.greenwalt@intel.com>

Found a typo in original implementation of ice_set_media_type,
where one of the checks for FIBER checks for C2C media type
instead of C2M. This results in failure of this check for some
AOC devices, consequently setting  the media type as AUI.
Bug was found in ethtool.

Fixes: e7bd7d54a26b ("net/ice/base: improve PHY media capabilities handling")
Cc: stable@dpdk.org
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
---
 drivers/net/intel/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_common.c b/drivers/net/intel/ice/base/ice_common.c
index fce9b070cf..69070b740e 100644
--- a/drivers/net/intel/ice/base/ice_common.c
+++ b/drivers/net/intel/ice/base/ice_common.c
@@ -452,7 +452,7 @@ static void ice_set_media_type(struct ice_port_info *pi)
 		 ((phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M ||
 		   phy_type_high & ICE_MEDIA_OPT_PHY_TYPE_HIGH_M) &&
 		  (phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M ||
-		   phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M)))
+		   phy_type_high & ICE_MEDIA_C2M_PHY_TYPE_HIGH_M)))
 		*media_type = ICE_MEDIA_FIBER;
 	/* else if PHY types are only DA, or DA and C2C, then media type DA */
 	else if (ice_phy_maps_to_media(phy_type_low, phy_type_high,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 03/10] net/ice/base: fix integer overflow issue
       [not found] <20250527131741.7606-1-dhanya.r.pillai@intel.com>
  2025-05-27 13:17 ` [PATCH v3 01/10] net/ice/base: fix type conversion Dhanya Pillai
  2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
@ 2025-05-27 13:17 ` Dhanya Pillai
  2025-06-02  8:55   ` Burakov, Anatoly
  2025-05-27 13:17 ` [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F Dhanya Pillai
  3 siblings, 1 reply; 6+ messages in thread
From: Dhanya Pillai @ 2025-05-27 13:17 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov, Paul M Stillwell Jr,
	Bruce Allan, Qi Zhang, Xiaolong Ye
  Cc: dev, Lukasz Krakowiak, stable, Dhanya Pillai

From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>

Fix issue related to INTEGER_OVERFLOW.

Fixes: f636f2888cec ("net/ice/base: move and add some help function and macros")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
---
 drivers/net/intel/ice/base/ice_type.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
index 297a5ea890..ae3b944d6e 100644
--- a/drivers/net/intel/ice/base/ice_type.h
+++ b/drivers/net/intel/ice/base/ice_type.h
@@ -25,7 +25,7 @@
  */
 static inline bool ice_is_pow2(u64 val)
 {
-	return (val && !(val & (val - 1)));
+	return val != 0 && (val & (val - 1)) == 0;
 }
 
 /**
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F
       [not found] <20250527131741.7606-1-dhanya.r.pillai@intel.com>
                   ` (2 preceding siblings ...)
  2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
@ 2025-05-27 13:17 ` Dhanya Pillai
  3 siblings, 0 replies; 6+ messages in thread
From: Dhanya Pillai @ 2025-05-27 13:17 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov, Robin Zhang, Ferruh Yigit
  Cc: dev, Lukasz Krakowiak, stable, Dhanya Pillai

From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>

Fix typo in desc for dev ID 579F.

Fixes: 6fd3889c1779 ("net/ice/base: support E824S and E825 devices")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
---
 drivers/net/intel/ice/base/ice_devids.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_devids.h b/drivers/net/intel/ice/base/ice_devids.h
index 807b5d0c29..20c6dbd4a5 100644
--- a/drivers/net/intel/ice/base/ice_devids.h
+++ b/drivers/net/intel/ice/base/ice_devids.h
@@ -90,7 +90,7 @@
 #define ICE_DEV_ID_E825C_QSFP		0x579D
 /* Intel(R) Ethernet Connection E825-C for SFP */
 #define ICE_DEV_ID_E825C_SFP		0x579E
-/* Intel(R) Ethernet Connection E825-C 1GbE */
+/* Intel(R) Ethernet Connection E825-C 10GbE */
 #define ICE_DEV_ID_E825C_SGMII		0x579F
 #define ICE_DEV_ID_C825X		0x0DCD
 #endif /* _ICE_DEVIDS_H_ */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 02/10] net/ice/base: fix typo in media type check
  2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
@ 2025-06-02  8:44   ` Burakov, Anatoly
  0 siblings, 0 replies; 6+ messages in thread
From: Burakov, Anatoly @ 2025-06-02  8:44 UTC (permalink / raw)
  To: Dhanya Pillai, Bruce Richardson, Ian Stokes, Paul Greenwalt,
	Alice Michael
  Cc: dev, stable

On 5/27/2025 3:17 PM, Dhanya Pillai wrote:
> From: Paul Greenwalt <paul.greenwalt@intel.com>
> 
> Found a typo in original implementation of ice_set_media_type,
> where one of the checks for FIBER checks for C2C media type
> instead of C2M. This results in failure of this check for some
> AOC devices, consequently setting  the media type as AUI.
> Bug was found in ethtool.

I don't think mentioning ethtool is necessary here, we can leave that 
out of the commit message.

> 
> Fixes: e7bd7d54a26b ("net/ice/base: improve PHY media capabilities handling")
> Cc: stable@dpdk.org
> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
> Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
> ---

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 03/10] net/ice/base: fix integer overflow issue
  2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
@ 2025-06-02  8:55   ` Burakov, Anatoly
  0 siblings, 0 replies; 6+ messages in thread
From: Burakov, Anatoly @ 2025-06-02  8:55 UTC (permalink / raw)
  To: Dhanya Pillai, Bruce Richardson, Paul M Stillwell Jr,
	Bruce Allan, Qi Zhang, Xiaolong Ye
  Cc: dev, Lukasz Krakowiak, stable

On 5/27/2025 3:17 PM, Dhanya Pillai wrote:
> From: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> 
> Fix issue related to INTEGER_OVERFLOW.

I would also suggest rewording the commit message. Even something like 
the following would be better:

Fix integer overflow issue in power of 2 calculation.

> 
> Fixes: f636f2888cec ("net/ice/base: move and add some help function and macros")
> Cc: stable@dpdk.org
> Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
> Signed-off-by: Dhanya Pillai <dhanya.r.pillai@intel.com>
> ---
>   drivers/net/intel/ice/base/ice_type.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
> index 297a5ea890..ae3b944d6e 100644
> --- a/drivers/net/intel/ice/base/ice_type.h
> +++ b/drivers/net/intel/ice/base/ice_type.h
> @@ -25,7 +25,7 @@
>    */
>   static inline bool ice_is_pow2(u64 val)
>   {
> -	return (val && !(val & (val - 1)));
> +	return val != 0 && (val & (val - 1)) == 0;
>   }
>   
>   /**


-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-02  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250527131741.7606-1-dhanya.r.pillai@intel.com>
2025-05-27 13:17 ` [PATCH v3 01/10] net/ice/base: fix type conversion Dhanya Pillai
2025-05-27 13:17 ` [PATCH v3 02/10] net/ice/base: fix typo in media type check Dhanya Pillai
2025-06-02  8:44   ` Burakov, Anatoly
2025-05-27 13:17 ` [PATCH v3 03/10] net/ice/base: fix integer overflow issue Dhanya Pillai
2025-06-02  8:55   ` Burakov, Anatoly
2025-05-27 13:17 ` [PATCH v3 05/10] net/ice/base: fix typo in desc for dev ID 579F Dhanya Pillai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).