patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status
@ 2020-03-16  6:07 Andy Pei
  2020-03-19  5:52 ` Xu, Rosen
  2020-03-19 13:42 ` Ye Xiaolong
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Pei @ 2020-03-16  6:07 UTC (permalink / raw)
  To: dev; +Cc: andy.pei, rosen.xu, stable, david.marchand, xiaolong.ye, ferruh.yigit

ipn3ke driver creates a thread to check link status.

before this patch, pthread_create() is used to create
thread, leaving the new thread unrestrained wrt cpu
affinity.

After this patch, rte_ctrl_thread_create() is used to
create thread. The affinity of the new thread is based
on the CPU affinity retrieved at the time rte_eal_init()
was called, the dataplane and service lcores are then
excluded.

Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
Cc: rosen.xu@intel.com
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
---
Cc: david.marchand@redhat.com
Cc: xiaolong.ye@intel.com
Cc: ferruh.yigit@intel.com

diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 80122e3..b673c49 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2598,7 +2598,8 @@ struct rte_eth_xstat_name *xstats_names,
 	int ret;
 
 	if (ipn3ke_rpst_scan_num == 1) {
-		ret = pthread_create(&ipn3ke_rpst_scan_thread,
+		ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread,
+			"ipn3ke scanner",
 			NULL,
 			ipn3ke_rpst_scan_handle_request, NULL);
 		if (ret) {
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status
  2020-03-16  6:07 [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status Andy Pei
@ 2020-03-19  5:52 ` Xu, Rosen
  2020-03-19 13:42 ` Ye Xiaolong
  1 sibling, 0 replies; 4+ messages in thread
From: Xu, Rosen @ 2020-03-19  5:52 UTC (permalink / raw)
  To: Pei, Andy, dev
  Cc: stable, david.marchand, Ye, Xiaolong, Yigit, Ferruh, David Marchand

Hi,

> -----Original Message-----
> From: Pei, Andy <andy.pei@intel.com>
> Sent: Monday, March 16, 2020 14:07
> To: dev@dpdk.org
> Cc: Pei, Andy <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>;
> stable@dpdk.org; david.marchand@redhat.com; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [PATCH] net/ipn3ke: use ctrl thread to check link status
> 
> ipn3ke driver creates a thread to check link status.
> 
> before this patch, pthread_create() is used to create thread, leaving the new
> thread unrestrained wrt cpu affinity.
> 
> After this patch, rte_ctrl_thread_create() is used to create thread. The
> affinity of the new thread is based on the CPU affinity retrieved at the time
> rte_eal_init() was called, the dataplane and service lcores are then excluded.
> 
> Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
> Cc: rosen.xu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> Cc: david.marchand@redhat.com
> Cc: xiaolong.ye@intel.com
> Cc: ferruh.yigit@intel.com
> 
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index 80122e3..b673c49 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -2598,7 +2598,8 @@ struct rte_eth_xstat_name *xstats_names,
>  	int ret;
> 
>  	if (ipn3ke_rpst_scan_num == 1) {
> -		ret = pthread_create(&ipn3ke_rpst_scan_thread,
> +		ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread,
> +			"ipn3ke scanner",
>  			NULL,
>  			ipn3ke_rpst_scan_handle_request, NULL);
>  		if (ret) {
> --
> 1.8.3.1

Reviewed-by: Rosen Xu <rosen.xu@intel.com>

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

* Re: [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status
  2020-03-16  6:07 [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status Andy Pei
  2020-03-19  5:52 ` Xu, Rosen
@ 2020-03-19 13:42 ` Ye Xiaolong
  2020-03-19 14:13   ` Xu, Rosen
  1 sibling, 1 reply; 4+ messages in thread
From: Ye Xiaolong @ 2020-03-19 13:42 UTC (permalink / raw)
  To: Andy Pei; +Cc: dev, rosen.xu, stable, david.marchand, ferruh.yigit

On 03/16, Andy Pei wrote:
>ipn3ke driver creates a thread to check link status.
>
>before this patch, pthread_create() is used to create
>thread, leaving the new thread unrestrained wrt cpu
>affinity.
>
>After this patch, rte_ctrl_thread_create() is used to
>create thread. The affinity of the new thread is based
>on the CPU affinity retrieved at the time rte_eal_init()
>was called, the dataplane and service lcores are then
>excluded.
>
>Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
>Cc: rosen.xu@intel.com
>Cc: stable@dpdk.org
>
>Signed-off-by: Andy Pei <andy.pei@intel.com>
>---
>Cc: david.marchand@redhat.com
>Cc: xiaolong.ye@intel.com
>Cc: ferruh.yigit@intel.com
>
>diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
>index 80122e3..b673c49 100644
>--- a/drivers/net/ipn3ke/ipn3ke_representor.c
>+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
>@@ -2598,7 +2598,8 @@ struct rte_eth_xstat_name *xstats_names,
> 	int ret;
> 
> 	if (ipn3ke_rpst_scan_num == 1) {
>-		ret = pthread_create(&ipn3ke_rpst_scan_thread,
>+		ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread,
>+			"ipn3ke scanner",
> 			NULL,
> 			ipn3ke_rpst_scan_handle_request, NULL);
> 		if (ret) {
>-- 
>1.8.3.1
>

Applied to dpdk-next-net-intel, Thanks.

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

* Re: [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status
  2020-03-19 13:42 ` Ye Xiaolong
@ 2020-03-19 14:13   ` Xu, Rosen
  0 siblings, 0 replies; 4+ messages in thread
From: Xu, Rosen @ 2020-03-19 14:13 UTC (permalink / raw)
  To: Ye, Xiaolong, Pei, Andy; +Cc: dev, stable, david.marchand, Yigit, Ferruh

Thanks.

> -----Original Message-----
> From: Ye, Xiaolong <xiaolong.ye@intel.com>
> Sent: Thursday, March 19, 2020 21:43
> To: Pei, Andy <andy.pei@intel.com>
> Cc: dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; stable@dpdk.org;
> david.marchand@redhat.com; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [PATCH] net/ipn3ke: use ctrl thread to check link status
> 
> On 03/16, Andy Pei wrote:
> >ipn3ke driver creates a thread to check link status.
> >
> >before this patch, pthread_create() is used to create thread, leaving
> >the new thread unrestrained wrt cpu affinity.
> >
> >After this patch, rte_ctrl_thread_create() is used to create thread.
> >The affinity of the new thread is based on the CPU affinity retrieved
> >at the time rte_eal_init() was called, the dataplane and service lcores
> >are then excluded.
> >
> >Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
> >Cc: rosen.xu@intel.com
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Andy Pei <andy.pei@intel.com>
> >---
> >Cc: david.marchand@redhat.com
> >Cc: xiaolong.ye@intel.com
> >Cc: ferruh.yigit@intel.com
> >
> >diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> >b/drivers/net/ipn3ke/ipn3ke_representor.c
> >index 80122e3..b673c49 100644
> >--- a/drivers/net/ipn3ke/ipn3ke_representor.c
> >+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> >@@ -2598,7 +2598,8 @@ struct rte_eth_xstat_name *xstats_names,
> > 	int ret;
> >
> > 	if (ipn3ke_rpst_scan_num == 1) {
> >-		ret = pthread_create(&ipn3ke_rpst_scan_thread,
> >+		ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread,
> >+			"ipn3ke scanner",
> > 			NULL,
> > 			ipn3ke_rpst_scan_handle_request, NULL);
> > 		if (ret) {
> >--
> >1.8.3.1
> >
> 
> Applied to dpdk-next-net-intel, Thanks.

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16  6:07 [dpdk-stable] [PATCH] net/ipn3ke: use ctrl thread to check link status Andy Pei
2020-03-19  5:52 ` Xu, Rosen
2020-03-19 13:42 ` Ye Xiaolong
2020-03-19 14:13   ` Xu, Rosen

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox