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 42FACA0C46; Wed, 18 Aug 2021 09:08:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC8414014D; Wed, 18 Aug 2021 09:08:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id E9FCD40042 for ; Wed, 18 Aug 2021 09:08:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629270490; 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=p1ia+L2DYiWUa+ZL/80JtPiYHRO0pLB5h1a4ajk2fyI=; b=Z7Br9suEhjWLl/xwZh62sbi61Yh265Tbh2gTW92ioFd13nluuwZ3vlLqzqRzB/tngvLeWN n0V/5pMQn/CR1dyhsNdZWdEA6XN8U4VrBdic/pyys69Zuf8U//l4CwN2/eigEaW0TmH+ps IdIvld7Xiyh/12nyZhe2LNa2cJ3gMY4= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-252-_KkTVmdzODWk6HJYT21ejw-1; Wed, 18 Aug 2021 03:08:09 -0400 X-MC-Unique: _KkTVmdzODWk6HJYT21ejw-1 Received: by mail-ua1-f69.google.com with SMTP id b24-20020ab02398000000b002abb9087041so407096uan.11 for ; Wed, 18 Aug 2021 00:08:09 -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=p1ia+L2DYiWUa+ZL/80JtPiYHRO0pLB5h1a4ajk2fyI=; b=cXbsVnOYG3UNh1awfQ65Dgy3cD+hgvZWAuZz9/VNQaIboZ2W2HaqinAnMD3KEIArcv 2nLI+M8L8Tb9G0YDhmpcub6WyH+QGVyg/zaVWb1o9fBwOieQUt3zEFxwCSPBxZXsuSfr kfUNMo2SW5ZW72EdMkRQoLQw4Ip9+Qce7Ssn0yVLy8ijXpXOLzo1Awb9vaQk8H12j3ky O6OWH7XyAC9blBMb+9cBKsd6R2Z+j8LvJHERFBf8aWzv6rscAhabSEmGnI66Ady4CEAD OntZonkSa8dyqNjXaKSFJqmDk4nj8ITD6U2SeI5TQ1yU31mxEFRl6EO26a1AHb4AUo57 NqkA== X-Gm-Message-State: AOAM530ou0LN5e9oCNEIFlZlhQdBg++I9zXsUzB/jEVzkgoxyaHZie/V w9BHWyqSyERSpd3e1MJg2eD/V0tY7s1oZb/3HVokDvKzZvlSVmQAkDtyxnCKhpNLKuNQD2vjO5z zz5xIh9cGB4+ks1CXNAc= X-Received: by 2002:ab0:608e:: with SMTP id i14mr5499428ual.126.1629270488765; Wed, 18 Aug 2021 00:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHrdf/Oc3DPnSM5W0JFvBmTWVDgfuJzOrFpwPWtZAiXQgKjX6n9/hUM7g+nJlqByVI2YKYnrx2fFtUJcq74Yo= X-Received: by 2002:ab0:608e:: with SMTP id i14mr5499415ual.126.1629270488559; Wed, 18 Aug 2021 00:08:08 -0700 (PDT) MIME-Version: 1.0 References: <20210813062154.62985-1-haiyue.wang@intel.com> In-Reply-To: From: David Marchand Date: Wed, 18 Aug 2021 09:07:57 +0200 Message-ID: To: "Wang, Haiyue" Cc: dev , "Zhang, Qi Z" , dpdk stable , "Yang, Qiming" , Xiaolong Ye , "Xing, Beilei" , "Wang, Ying A" 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-dev] [PATCH v1] net/ice: fix memzone leak when device init failed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Aug 18, 2021 at 2:46 AM Wang, Haiyue wrote: > > > -----Original Message----- > > From: David Marchand > > Sent: Tuesday, August 17, 2021 17:19 > > To: Wang, Haiyue > > Cc: dev ; Zhang, Qi Z ; dpdk stable ; Yang, > > Qiming ; Xiaolong Ye ; Xing, Beilei > > ; Wang, Ying A > > Subject: Re: [PATCH v1] net/ice: fix memzone leak when device init failed > > > > 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? > > If each engine->init/uninit handles its internal setting correctly, yes, > it's safe, if not, this single engine has BUG, let's fix it. ;-) That was my understanding, but I preferred to ask. Then, patch lgtm, thanks Haiyue. -- David Marchand