[dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release

2016-07-26 Thread Peng, Yuan
Tested-by: Peng Yuan 

- Test Commit: 6baf0eca5cfa068621ee15605159523918109661
- OS/Kernel: 4.5.7-202.fc23.x86_64
- GCC: gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC)

1. Bind 1 pf to igb_uio
2. use the pf to generate 2 VFs
3. rmmod i40evf
4. launch testpmd with PF with or without floating veb parameter, quit the 
testpmd for several times, and never see the core dump So it can fix the "core 
dump" issue.

Thank you.
Yuan.

-Original Message-
From: Wu, Jingjing 
Sent: Monday, July 25, 2016 1:36 PM
To: Zhang, Helin 
Cc: dev at dpdk.org; Wu, Jingjing ; Xing, Beilei 
; Peng, Yuan 
Subject: [PATCH v2] net/i40e: fix vsi removing from tailq when release

VSI structure need to be removed from TAILQ list when releasing.
But for the child VSI it will be removed again after the structure is freed. It 
will cause core dump when the DPDK i40e using as PF host driver.

This patch fixes it to only remove child VSI from TAILQ before send adminq 
command to remove it from hardware.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Fixes: 440499cf5376 ("net/i40e: support floating VEB")
Signed-off-by: Jingjing Wu 
---
v2 change:
 - add fix for floating veb case

 drivers/net/i40e/i40e_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c 
index 11a5804..d0aeb70 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4110,7 +4110,6 @@ i40e_vsi_release(struct i40e_vsi *vsi)
TAILQ_FOREACH_SAFE(vsi_list, >veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
-   TAILQ_REMOVE(>veb->head, vsi_list, list);
}
i40e_veb_release(vsi->veb);
}
@@ -4119,7 +4118,6 @@ i40e_vsi_release(struct i40e_vsi *vsi)
TAILQ_FOREACH_SAFE(vsi_list, >floating_veb->head, list, 
temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
-   TAILQ_REMOVE(>floating_veb->head, vsi_list, list);
}
}

--
2.4.0



[dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release

2016-07-25 Thread Thomas Monjalon
> > VSI structure need to be removed from TAILQ list when releasing.
> > But for the child VSI it will be removed again after the structure is 
> > freed. It will
> > cause core dump when the DPDK i40e using as PF host driver.
> > 
> > This patch fixes it to only remove child VSI from TAILQ before send adminq
> > command to remove it from hardware.
> > 
> > Fixes: 4861cde46116 ("i40e: new poll mode driver")
> > Fixes: 440499cf5376 ("net/i40e: support floating VEB")
> > Signed-off-by: Jingjing Wu 
> Acked-by: Helin Zhang 

Applied, thanks


[dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release

2016-07-25 Thread Jingjing Wu
VSI structure need to be removed from TAILQ list when releasing.
But for the child VSI it will be removed again after the structure
is freed. It will cause core dump when the DPDK i40e using as PF
host driver.

This patch fixes it to only remove child VSI from TAILQ before
send adminq command to remove it from hardware.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Fixes: 440499cf5376 ("net/i40e: support floating VEB")
Signed-off-by: Jingjing Wu 
---
v2 change:
 - add fix for floating veb case

 drivers/net/i40e/i40e_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 11a5804..d0aeb70 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4110,7 +4110,6 @@ i40e_vsi_release(struct i40e_vsi *vsi)
TAILQ_FOREACH_SAFE(vsi_list, >veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
-   TAILQ_REMOVE(>veb->head, vsi_list, list);
}
i40e_veb_release(vsi->veb);
}
@@ -4119,7 +4118,6 @@ i40e_vsi_release(struct i40e_vsi *vsi)
TAILQ_FOREACH_SAFE(vsi_list, >floating_veb->head, list, 
temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
-   TAILQ_REMOVE(>floating_veb->head, vsi_list, list);
}
}

-- 
2.4.0



[dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release

2016-07-25 Thread Zhang, Helin


> -Original Message-
> From: Wu, Jingjing
> Sent: Monday, July 25, 2016 1:36 PM
> To: Zhang, Helin 
> Cc: dev at dpdk.org; Wu, Jingjing ; Xing, Beilei
> ; Peng, Yuan 
> Subject: [PATCH v2] net/i40e: fix vsi removing from tailq when release
> 
> VSI structure need to be removed from TAILQ list when releasing.
> But for the child VSI it will be removed again after the structure is freed. 
> It will
> cause core dump when the DPDK i40e using as PF host driver.
> 
> This patch fixes it to only remove child VSI from TAILQ before send adminq
> command to remove it from hardware.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Fixes: 440499cf5376 ("net/i40e: support floating VEB")
> Signed-off-by: Jingjing Wu 
Acked-by: Helin Zhang