Skip to contentSkip to conversation

net/ipn3ke: fix thread exit issue

PATCH Applied Wei Huang 3 participants 3 messages Mar 17, 2023 – Mar 20, 2023 Network drivers

lore
Share & tools
lore

Wei Huang

author
#0 lore raw

PATCH 1/1 net/ipn3ke: fix thread exit issue

Thread does not exit after driver is removed. When there is no more representor exist, the variable 'num' will be 0 and thread can exit safely at this time.

Fixes 70d6b7f550f4 ("net/ipn3ke: add representor")
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_representor.c +1 -1
index 2ef96a9..e50fc73 100644
@@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
 		}
 		rte_delay_us(50 * MS);
 
-		if (num == 0xffffff)
+		if (num == 0 || num == 0xffffff)
 			return NULL;
 	}
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 36 lines

-----Original Message-----
From: Huang, Wei <[email protected]>
Sent: Friday, March 17, 2023 4:45 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Xu, Rosen <[email protected]>; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>; Huang, Wei <[email protected]>
Subject: [PATCH v1] net/ipn3ke: fix thread exit issue

Thread does not exit after driver is removed. When there is no more representor exist, the variable 'num' will be 0 and thread can exit safely at this time.

Fixes 70d6b7f550f4 ("net/ipn3ke: add representor")
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_representor.c +1 -2
index 2ef96a9..e50fc73 100644
@@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
 		}
 		rte_delay_us(50 * MS);
 
-		if (num == 0xffffff)
+		if (num == 0 || num == 0xffffff)
 			return NULL;
 	}
 
--
Quoted 1 line

1.8.3.1

Applied
#2 lore raw
Quoted 48 lines

-----Original Message-----
From: Xu, Rosen <[email protected]>
Sent: Monday, March 20, 2023 2:54 PM
To: Huang, Wei <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [PATCH v1] net/ipn3ke: fix thread exit issue

Hi,

Quoted 35 lines

-----Original Message-----
From: Huang, Wei <[email protected]>
Sent: Friday, March 17, 2023 4:45 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Xu, Rosen <[email protected]>; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>; Huang, Wei <[email protected]>
Subject: [PATCH v1] net/ipn3ke: fix thread exit issue

Thread does not exit after driver is removed. When there is no more representor exist, the variable 'num' will be 0 and thread can exit safely at this time.

Fixes 70d6b7f550f4 ("net/ipn3ke: add representor")
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_representor.c +1 -1
index 2ef96a9..e50fc73 100644
@@ -2579,7 +2579,7 @@ struct rte_eth_xstat_name *xstats_names,
 		}
 		rte_delay_us(50 * MS);
 
-		if (num == 0xffffff)
+		if (num == 0 || num == 0xffffff)
 			return NULL;
 	}
 
Quoted 4 lines
Quoted 2 lines

--
1.8.3.1

Applied to dpdk-next-net-intel.

Thanks
Qi