From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB6EEA0C43 for ; Tue, 17 Aug 2021 11:19:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96C8241196; Tue, 17 Aug 2021 11:19:17 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 9C4E940DF5 for ; Tue, 17 Aug 2021 11:19:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629191955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n0E+iETpFNM3z1QjBqwxqf32cS4oYnhNmUJIBAe3brw=; b=WaSxbfqxqZLJ/rB8S+RqbsLUbOCUSI55nQA26lZLM7YHjk+z6nwwm9sKwoyjv8ldifmToa RNlWv1PDkm9EqY700k3Yd2Nq71hFe7HsZ7WCDcUVxF74B7Bh7LkkbDFzjyKhiAj1tNxvR1 XRNvUDedvuqB+XvUobTGnSc18yoLVn8= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-rAve8vqNNdWmtO9a-xGqqw-1; Tue, 17 Aug 2021 05:19:13 -0400 X-MC-Unique: rAve8vqNNdWmtO9a-xGqqw-1 Received: by mail-vs1-f71.google.com with SMTP id i186-20020a6722c30000b02902bc73413510so3360434vsi.10 for ; Tue, 17 Aug 2021 02:19:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n0E+iETpFNM3z1QjBqwxqf32cS4oYnhNmUJIBAe3brw=; b=ssDlfzI96/pkzSUYh00mAhSV41buUwRQADlEoobEulpuhxAybXVL8jiolEgy2o826M 7X7JjEHXGxFGOlw0/NLd1BJK2Cb0MtsY5Qq1H8j8s86d+0udlWrCsvWaMU15CXkRHRhK CmFgOi/HwAcoIAe1AZ6aCGdTcn3wIkahVA2El2McPM4mGAOc+Gp0ZX4BhFqqFW/CffzQ ++fm3m95bfSiin5uXHZIFHnHXMf04aOZ8YV7185wdX4apZs9L8ST24VtKjLTRtb2rie5 MK2+7jZVP+hfIFVED/8Au+pEMljaZUoIxxRqxJk1LAwYiQgjOrcspomS6+lRqjqCFWwL dEiA== X-Gm-Message-State: AOAM5300oICh7GQVLNSvQc05ETcaTKPTJP8EMGc+sw48/PKRlERnsOyi 5vWmumGl3UGeBdS8Fvx+4VpL1SdKkax5zipNPNc8IQBmI23zkMyJSuqCSbZfl0ks/ekDWmI0kNY D5elCKVn9OJzzPi7Yqzgnbss= X-Received: by 2002:a67:7206:: with SMTP id n6mr1678778vsc.27.1629191953434; Tue, 17 Aug 2021 02:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJD2OCTDrmmxspQ44WNesCmXkzXxn8Lld3VYWeYSSgsLiGAz63er0FqLRHUCsliA9Rr65fw2U3wQrIgKQB6FY= X-Received: by 2002:a67:7206:: with SMTP id n6mr1678764vsc.27.1629191953232; Tue, 17 Aug 2021 02:19:13 -0700 (PDT) MIME-Version: 1.0 References: <20210813062154.62985-1-haiyue.wang@intel.com> In-Reply-To: <20210813062154.62985-1-haiyue.wang@intel.com> From: David Marchand Date: Tue, 17 Aug 2021 11:19:02 +0200 Message-ID: To: Haiyue Wang Cc: dev , Qi Zhang , dpdk stable , Qiming Yang , Xiaolong Ye , Beilei Xing , Ying A Wang Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH v1] net/ice: fix memzone leak when device init failed X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Fri, Aug 13, 2021 at 8:45 AM Haiyue Wang wrote: > > When flow engine initialization or FXP resource reset failed, it needs > to free the memory zone and unregister the interrupt callback. > > Bugzilla ID: 752 > Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") > Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling") > Fixes: 7edc7158d771 ("net/ice: cleanup RSS/FDIR profile on device init") > Cc: stable@dpdk.org > > Reported-by: David Marchand > Signed-off-by: Haiyue Wang > --- > drivers/net/ice/ice_ethdev.c | 10 ++++++++-- > drivers/net/ice/ice_fdir_filter.c | 2 ++ > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c > index 64ee569525..8d62b84805 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -2139,20 +2139,26 @@ ice_dev_init(struct rte_eth_dev *dev) > ret = ice_flow_init(ad); > if (ret) { > PMD_INIT_LOG(ERR, "Failed to initialize flow"); > - return ret; > + goto err_flow_init; Is it safe to call flow engine uninit callbacks when ice_flow_init() fails? > } > } > > ret = ice_reset_fxp_resource(hw); > if (ret) { > PMD_INIT_LOG(ERR, "Failed to reset fxp resource"); > - return ret; > + goto err_flow_init; > } > > pf->supported_rxdid = ice_get_supported_rxdid(hw); > > return 0; > > +err_flow_init: > + ice_flow_uninit(ad); > + rte_intr_disable(intr_handle); > + ice_pf_disable_irq0(hw); > + rte_intr_callback_unregister(intr_handle, > + ice_interrupt_handler, dev); > err_pf_setup: > ice_res_pool_destroy(&pf->msix_pool); > err_msix_pool_init: -- David Marchand