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 0917FA056D; Tue, 3 Mar 2020 04:57:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38F6D1BFF3; Tue, 3 Mar 2020 04:57:21 +0100 (CET) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by dpdk.org (Postfix) with ESMTP id 8CFC63B5 for ; Tue, 3 Mar 2020 04:57:19 +0100 (CET) Received: by mail-oi1-f196.google.com with SMTP id c1so192198oiy.2 for ; Mon, 02 Mar 2020 19:57:19 -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=bC5uSbHEuipabfAViSz8R1spcUU1hmmBBRIQQf54KMw=; b=A5CDJh/ZRX/636QAieYmlu/YRIb0UkqO4Z6s5zFvvK4biC6DkV/l2HU7Jw73mSaxwv YOrmHb/Fb3CdMW2DAAJbyXgtTBnyFXpBv5IJlfbaJLVVzxy7e6nTwrKZM5VkpBCTIwoY 4cfSpcreFpq2+zmvpankExWohA8YfFijZEIDM= 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=bC5uSbHEuipabfAViSz8R1spcUU1hmmBBRIQQf54KMw=; b=rhGS+N1SKCZzS+jIP1yYY26iIpHBKLUb+VCNj0af+x32dvAq7muNXjUmbFBp8S9/np r+ROZZY2j3tMVxBPuLRhRCmwHIyr1Ya3MObgJjUzsOM5xVriXxZLCRPiCYMemlaNlq9B BhOnArtH0XzYa3/5VrpkgPWA8+JYLQr1zOqhLLj14WsnMk+9weXVFBBvDA7tUPvugGgT QW8HGE1EHmHzlVEhilOpMIu8mAvXICkSPeZ+WblQTwKia4pjCUqtWSY/zuT+beD6u1nT G/vylZpBOf5+7iE6w8ctl168WSIqAMcWKJqrKFye3DLmNFPloXhcELepMa3VRTEbH5Ib WBrw== X-Gm-Message-State: ANhLgQ109d/z8iAu3sNaf/W/jsONZTHi8o7e2l9B3w8n5eoX2kquWViU 8ceZo5swJVO6dEC+CJE0tRnF9jcsXm7aDZ0Du8ed4Q== X-Google-Smtp-Source: ADFU+vsq4vE8aKNMy5ZTSw6Hf3qa8DtMAIISbrAunAO2Ta07h3nOcTTGBjR9ry6JzB15yYKf2EdJk5ZXH1oWOBH5g7o= X-Received: by 2002:aca:cdd1:: with SMTP id d200mr1094826oig.153.1583207838536; Mon, 02 Mar 2020 19:57:18 -0800 (PST) MIME-Version: 1.0 References: <20200228102131.7941-1-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20200228102131.7941-1-kalesh-anakkur.purayil@broadcom.com> From: Ajit Khaparde Date: Mon, 2 Mar 2020 19:57:02 -0800 Message-ID: To: Kalesh A P Cc: dpdk-dev , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] net/bnxt: fix to cancel recovery alarm in port 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" On Fri, Feb 28, 2020 at 2:04 AM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP > > There is a race condition when port is closed while error recovery > is happening in driver. Fixed this by canceling the recovery threads > during port close. > > Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") > Cc: stable@dpdk.org > > Signed-off-by: Kalesh AP > Reviewed-by: Somnath Kotur > Reviewed-by: Santoshkumar Karanappa Rastapur < > santosh.rastapur@broadcom.com> > Applied to dpdk-next-net-brcm > --- > v1->v2: fixed the "Fixes" tagline as pointed by Kevin Traynor > > 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 18aa313..b8b30ed 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -133,6 +133,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool > reconfig_dev); > static int bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev); > static void bnxt_cancel_fw_health_check(struct bnxt *bp); > static int bnxt_restore_vlan_filters(struct bnxt *bp); > +static void bnxt_dev_recover(void *arg); > > int is_bnxt_in_error(struct bnxt *bp) > { > @@ -980,6 +981,10 @@ static void bnxt_dev_close_op(struct rte_eth_dev > *eth_dev) > { > struct bnxt *bp = eth_dev->data->dev_private; > > + /* cancel the recovery handler before remove dev */ > + rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp); > + rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp); > + > if (eth_dev->data->dev_started) > bnxt_dev_stop_op(eth_dev); > > -- > 2.10.1 > >