From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D38EAA0352; Thu, 16 Jan 2020 12:30:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2122F1C227; Thu, 16 Jan 2020 12:30:40 +0100 (CET) Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id 7387C1C225 for ; Thu, 16 Jan 2020 12:30:38 +0100 (CET) Received: by mail-vs1-f66.google.com with SMTP id s16so12431322vsc.10 for ; Thu, 16 Jan 2020 03:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1SDFOkc8U58+/du/GUcej4P8Z+vRu0xhCYXsZxxR2cE=; b=G27jHwoKEydWdEc48SQHYeSh5cAx6OOtFsLmEZqvyxaeummJmHLdLnpjKmycyvlcMy ZVQubdjHgvU9r4KK//hsmMDbEYnhWdheHwT2XsS9srMFqYqrs6nM+tyo+sRJErwo5F8w K0m0o4lT/QmyK15+DC2cdr8jLl/ukSB6BxDlw= 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=1SDFOkc8U58+/du/GUcej4P8Z+vRu0xhCYXsZxxR2cE=; b=F1r66xtBb0SkTzfx42MMxoklMqXNafFvsNhkAyX0xeFP63v26j4SDSqxEL+yon1GKs 7QjrJWy4VJB9wKGNG16JcRGTjyl1DQ2ermg3X8ClbjKDzhRfuf9prxxVEIykaM8WKCSt xFctbuRgnKugkuvGzkLpvuDb4K3zWhOzR0zIQxayGZw4HIhKLnop3sINerHUBr/6ltLm Yt/jhlDxS2gC1noUgwcsD4pqe5dIHve0nHa8Ja0dj7smHjX866rE+P7IDVd4A3ibntSr 9ozXkAT47bNCT7BVESvIm84G9Pj/PI18RGKKaPJ1BkEY0kGYCnouZwu84wQUuQt2REip QqRQ== X-Gm-Message-State: APjAAAVWQU4v9s7Mx3pwueCXqpmX483BCR/wA5/DSDPKEB2AE8nN99Yv HsP3n2lncltrcfCvbzh5PJGRj1nd1L1OxR8qGKruag== X-Google-Smtp-Source: APXvYqza1NODKrz8MT0g1XT4nU3T9vWGdRzyz+thvmjZMmpMmzF5FOT3oASUv8JjrkQNmhO+lpc0sgzbGFVGLQ2QwL4= X-Received: by 2002:a05:6102:2327:: with SMTP id b7mr1091779vsa.48.1579174237618; Thu, 16 Jan 2020 03:30:37 -0800 (PST) MIME-Version: 1.0 References: <20200113050118.28719-1-kalesh-anakkur.purayil@broadcom.com> <20200114051435.46093-1-ajit.khaparde@broadcom.com> <20200114051435.46093-10-ajit.khaparde@broadcom.com> <724362fa-c88f-262b-055c-d117a6aebac6@intel.com> In-Reply-To: From: Somnath Kotur Date: Thu, 16 Jan 2020 17:00:24 +0530 Message-ID: To: Ferruh Yigit Cc: Ajit Khaparde , dev , Kalesh Anakkur Purayil Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 09/10] net/bnxt: release port upon close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Ferruh, On Thu, 16 Jan 2020, 16:50 Ferruh Yigit, wrote: > On 1/14/2020 2:49 PM, Somnath Kotur wrote: > > Ferruh, > > Will recheck and revert on > > Hi Ajit, > > this is blocking the next-net-brcm tree to be pulled. Would you want to > drop > this patch from your tree and continue with merge and deal with this patch > later? > Or if this patch is the critical for the series I can keep waiting. > Kalesh will be sending v4 of the this patch set addressing this patch as well shortly ..few hours full now Thanks Som > > Thanks, > ferruh > > > > > Thanks > > Som > > > > On Tue, 14 Jan 2020, 18:26 Ferruh Yigit, > > wrote: > > > > On 1/14/2020 5:14 AM, Ajit Khaparde wrote: > > > From: Somnath Kotur > > > > > > > > Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private > resources > > > for the port can be freed by rte_eth_dev_close(). > > > > > > Signed-off-by: Somnath Kotur > > > > > Reviewed-by: Kalesh Anakkur Purayil < > kalesh-anakkur.purayil@broadcom.com > > > > > > Reviewed-by: Ajit Khaparde > > > > > --- > > > drivers/net/bnxt/bnxt_ethdev.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c > b/drivers/net/bnxt/bnxt_ethdev.c > > > index ba3f0a7d9..8acfade5f 100644 > > > --- a/drivers/net/bnxt/bnxt_ethdev.c > > > +++ b/drivers/net/bnxt/bnxt_ethdev.c > > > @@ -4856,6 +4856,11 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) > > > if (rc) > > > goto error_free; > > > > > > + /* Pass the information to the rte_eth_dev_close() that it > should also > > > + * release the private port resources. > > > + */ > > > + eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE; > > > + > > > > When you give this flag, 'rte_eth_dev_close()' will release port > resources, it > > will memset the 'eth_dev->data'. > > > > In case user first closed the port, later removed it, remove path > should be safe > > for it. I can see 'bnxt_dev_uninit()' operates on the values of > 'eth_dev->data' > > which should crash in this case. > > > > Can you please double check the return path, all following should be > safe: > > - close the port > > - remove the port > > - close and remove the port > > > >