DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jingjing Wu <jingjing.wu@intel.com>
To: helin.zhang@intel.com
Cc: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com,
	yuan.peng@intel.com
Subject: [dpdk-dev] [PATCH v2] net/i40e: fix vsi removing from tailq when release
Date: Mon, 25 Jul 2016 13:36:09 +0800	[thread overview]
Message-ID: <1469424969-32205-1-git-send-email-jingjing.wu@intel.com> (raw)
In-Reply-To: <1469416948-13073-1-git-send-email-jingjing.wu@intel.com>

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

  reply	other threads:[~2016-07-25  5:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25  3:22 [dpdk-dev] [PATCH] " Jingjing Wu
2016-07-25  5:36 ` Jingjing Wu [this message]
2016-07-25 12:51   ` [dpdk-dev] [PATCH v2] " Zhang, Helin
2016-07-25 14:57     ` Thomas Monjalon
2016-07-26  2:27   ` Peng, Yuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469424969-32205-1-git-send-email-jingjing.wu@intel.com \
    --to=jingjing.wu@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=yuan.peng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).