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 E32A5A0C4C; Thu, 2 Sep 2021 02:39:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 718C440142; Thu, 2 Sep 2021 02:39:12 +0200 (CEST) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) by mails.dpdk.org (Postfix) with ESMTP id 2EE2B40140 for ; Thu, 2 Sep 2021 02:39:11 +0200 (CEST) Received: by mail-io1-f52.google.com with SMTP id m11so324001ioo.6 for ; Wed, 01 Sep 2021 17:39:11 -0700 (PDT) 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=KbesjOmUgbTD9zn819dVMu+G19G19oxDgyfwNOyto3s=; b=K3YHT+/3i8Tu8oW9gigFEbCQSMdrBhtoKIevfuF3thE5K4QXoYnnHU2vvoYcKAm6EH V8vq2ejXyckPzqdD2/HdE81MNQV4lf+ELfQCcATqfQ7CQA+GcVhkp6gjVap86qPZgm/I 42vf63mSkiXJ5iKyR3Qd3sa4v+Vx4KLSUJad0= 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=KbesjOmUgbTD9zn819dVMu+G19G19oxDgyfwNOyto3s=; b=oXdOW0brLhC0hLtAPYyxoywpob5Ied4cPh1roxuFWfIzFZfFwOf5MKA5eYbdu6HuKe 0fN/UCBm3XiN1lUXxfFd4TblkumpKKrSgTy/ykrP/gFLInTxAi5S6vAPTqIKIMIr0FJp BupWW2yVawGJ1RRaXU4s5KlUF1/RBDY+Ltkj7t/edmaoy+xkld66KewiHAriRtXIn8t0 QkYJbjKnzn0V+bfaZFoNJV0ADwG1NiXbvfj3XEeEc1A496nAYNmQ3YQMfEi6EY+yxu/D HpN8aEZL2tX20dIKSlVv2S4RRNQSCTN2tv6ctOxNxj8HDqWkQWAOw3KYT5nogm0u+j9w +eHQ== X-Gm-Message-State: AOAM533s38JAcNtqn7SwaGvh6vcHFwA1lXjEv7F1MIVhPfEmL73MfQ6y tuiDEo4TDvWxk5MWCuctxq+xoJEkDLx+i6r3OHxOjQ== X-Google-Smtp-Source: ABdhPJw3AxmdpFf2axqAKenIVsA2WddNeo+wBuc67HFxXSfAY1ru+LzDJOZR/DM21Zmx5sNeQKQpP9ZvXkbS/OYEluQ= X-Received: by 2002:a6b:b512:: with SMTP id e18mr502385iof.98.1630543150083; Wed, 01 Sep 2021 17:39:10 -0700 (PDT) MIME-Version: 1.0 References: <20210830035811.24206-1-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20210830035811.24206-1-kalesh-anakkur.purayil@broadcom.com> From: Ajit Khaparde Date: Wed, 1 Sep 2021 17:38:54 -0700 Message-ID: To: Kalesh A P Cc: dpdk-dev , Ferruh Yigit Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000049904e05caf86973" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix ring group free 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" --00000000000049904e05caf86973 Content-Type: text/plain; charset="UTF-8" On Sun, Aug 29, 2021 at 8:37 PM Kalesh A P wrote: > > From: Kalesh AP > > Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free(). > This will prevent invalid fw_grp_id to be passed to the FW which can > result in an error. > This fixes the following failure in the "port stop" -> "port start" > sequence: > > bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204 > bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204 > > Fixes: 5803d86b87df ("net/bnxt: update ring group after ring stop start") > Cc: stable@dpdk.org > > Signed-off-by: Kalesh AP > Reviewed-by: Ajit Khaparde > Reviewed-by: Lance Richardson > Reviewed-by: Somnath Kotur Patch applied to dpdk-next-net-brcm. > --- > drivers/net/bnxt/bnxt_hwrm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c > index f29d574..d092fdc 100644 > --- a/drivers/net/bnxt/bnxt_hwrm.c > +++ b/drivers/net/bnxt/bnxt_hwrm.c > @@ -1888,6 +1888,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx) > struct hwrm_ring_grp_free_input req = {.req_type = 0 }; > struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr; > > + if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID) > + return 0; > + > HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB); > > req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id); > -- > 2.10.1 > --00000000000049904e05caf86973--