* [dpdk-dev] [PATCH] net/i40e: fix vsi removing from tailq when release
@ 2016-07-25 3:22 Jingjing Wu
2016-07-25 5:36 ` [dpdk-dev] [PATCH v2] " Jingjing Wu
0 siblings, 1 reply; 5+ messages in thread
From: Jingjing Wu @ 2016-07-25 3:22 UTC (permalink / raw)
To: helin.zhang; +Cc: dev, jingjing.wu, beilei.xing, qian.q.xu
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")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 11a5804..97f9d49 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, &vsi->veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->veb->head, vsi_list, list);
}
i40e_veb_release(vsi->veb);
}
--
2.4.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release
2016-07-25 3:22 [dpdk-dev] [PATCH] net/i40e: fix vsi removing from tailq when release Jingjing Wu
@ 2016-07-25 5:36 ` Jingjing Wu
2016-07-25 12:51 ` Zhang, Helin
2016-07-26 2:27 ` Peng, Yuan
0 siblings, 2 replies; 5+ messages in thread
From: Jingjing Wu @ 2016-07-25 5:36 UTC (permalink / raw)
To: helin.zhang; +Cc: dev, jingjing.wu, beilei.xing, yuan.peng
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 <jingjing.wu@intel.com>
---
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, &vsi->veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->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, &vsi->floating_veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->floating_veb->head, vsi_list, list);
}
}
--
2.4.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release
2016-07-25 5:36 ` [dpdk-dev] [PATCH v2] " Jingjing Wu
@ 2016-07-25 12:51 ` Zhang, Helin
2016-07-25 14:57 ` Thomas Monjalon
2016-07-26 2:27 ` Peng, Yuan
1 sibling, 1 reply; 5+ messages in thread
From: Zhang, Helin @ 2016-07-25 12:51 UTC (permalink / raw)
To: Wu, Jingjing; +Cc: dev, Xing, Beilei, Peng, Yuan
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Monday, July 25, 2016 1:36 PM
> To: Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Peng, Yuan <yuan.peng@intel.com>
> 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 <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release
2016-07-25 12:51 ` Zhang, Helin
@ 2016-07-25 14:57 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-07-25 14:57 UTC (permalink / raw)
To: Wu, Jingjing; +Cc: dev, Zhang, Helin, Xing, Beilei, Peng, Yuan
> > 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 <jingjing.wu@intel.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release
2016-07-25 5:36 ` [dpdk-dev] [PATCH v2] " Jingjing Wu
2016-07-25 12:51 ` Zhang, Helin
@ 2016-07-26 2:27 ` Peng, Yuan
1 sibling, 0 replies; 5+ messages in thread
From: Peng, Yuan @ 2016-07-26 2:27 UTC (permalink / raw)
To: Wu, Jingjing, Zhang, Helin; +Cc: dev, Xing, Beilei
Tested-by: Peng Yuan <yuan.peng@intel.com>
- 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 <helin.zhang@intel.com>
Cc: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Peng, Yuan <yuan.peng@intel.com>
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 <jingjing.wu@intel.com>
---
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, &vsi->veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->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, &vsi->floating_veb->head, list, temp) {
if (i40e_vsi_release(vsi_list->vsi) != I40E_SUCCESS)
return -1;
- TAILQ_REMOVE(&vsi->floating_veb->head, vsi_list, list);
}
}
--
2.4.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-26 2:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 3:22 [dpdk-dev] [PATCH] net/i40e: fix vsi removing from tailq when release Jingjing Wu
2016-07-25 5:36 ` [dpdk-dev] [PATCH v2] " Jingjing Wu
2016-07-25 12:51 ` Zhang, Helin
2016-07-25 14:57 ` Thomas Monjalon
2016-07-26 2:27 ` Peng, Yuan
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).