All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Simei Su <simei.su@intel.com>
Cc: qi.z.zhang@intel.com, qiming.yang@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] net/ice: fix segmentation fault with a wrong package
Date: Wed, 13 Nov 2019 10:07:42 +0800	[thread overview]
Message-ID: <20191113020742.GA4784@intel.com> (raw)
In-Reply-To: <1573105623-231389-1-git-send-email-simei.su@intel.com>

On 11/07, Simei Su wrote:
>This patch fixes core dump issue when entering safe mode with a
>wrong ice.pkg. In safe mode, rte_flow is not supported and it
>won't initialize any flow engine.
>
>Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")
>
>Signed-off-by: Simei Su <simei.su@intel.com>
>---
> drivers/net/ice/ice_ethdev.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
>index d81eb5e..2a28d8e 100644
>--- a/drivers/net/ice/ice_ethdev.c
>+++ b/drivers/net/ice/ice_ethdev.c
>@@ -2164,10 +2164,12 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
> 	/* get base queue pairs index  in the device */
> 	ice_base_queue_get(pf);
> 
>-	ret = ice_flow_init(ad);
>-	if (ret) {
>-		PMD_INIT_LOG(ERR, "Failed to initialize flow");
>-		return ret;
>+	if (!ad->is_safe_mode) {
>+		ret = ice_flow_init(ad);
>+		if (ret) {
>+			PMD_INIT_LOG(ERR, "Failed to initialize flow");
>+			return ret;
>+		}
> 	}
> 
> 	ret = ice_reset_fxp_resource(hw);
>@@ -2311,7 +2313,8 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
> 
> 	ice_dev_stop(dev);
> 
>-	ice_flow_uninit(ad);
>+	if (!ad->is_safe_mode)
>+		ice_flow_uninit(ad);
> 
> 	/* release all queue resource */
> 	ice_free_queues(dev);
>-- 
>1.8.3.1
>

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

  parent reply	other threads:[~2019-11-13  2:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  7:08 [dpdk-dev] [PATCH] net/ice: fix segmentation fault for RSS init Simei Su
2019-11-06  8:26 ` [dpdk-dev] [PATCH v2] " Simei Su
2019-11-06 16:10   ` Stillwell Jr, Paul M
2019-11-07  1:06     ` Su, Simei
2019-11-07  5:47   ` [dpdk-dev] [PATCH v3] net/ice: fix segmentation fault with a wrong package Simei Su
2019-11-07  6:14     ` Zhang, Qi Z
2019-11-11  9:06     ` Ye Xiaolong
2019-11-12  4:40       ` Su, Simei
2019-11-13  2:07     ` Ye Xiaolong [this message]
2019-11-06 16:03 ` [dpdk-dev] [PATCH] net/ice: fix segmentation fault for RSS init Stillwell Jr, Paul M

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=20191113020742.GA4784@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=simei.su@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.