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 54134A09F6 for ; Fri, 18 Dec 2020 00:55:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 384FBCA4C; Fri, 18 Dec 2020 00:55:58 +0100 (CET) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by dpdk.org (Postfix) with ESMTP id 88921CA3E; Fri, 18 Dec 2020 00:55:54 +0100 (CET) Received: by mail-ej1-f41.google.com with SMTP id w1so573785ejf.11; Thu, 17 Dec 2020 15:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yxhFTP/2u64HqGkM5SOjDGBWnaxltMc1G+ZzaIbNrGU=; b=PmQy+rtBsj1hyRvRq81ve231/s22IHgIALY34nItiuAZ7Fe5tVhi3oE2k5/bK9thkT eJ2OfuOebhEF9USMGWWn/x7SDo0kpI/sc+RqFRZUXv3QGYhHIv7LWU7eavR2COKeqpDr 54FKk/LfVhHLsZso4zqKRfpyUSAQuAoT7orud54WA6xNpCPfRkSl2w/XKv13cFTDVavJ g4GnjkJqWSFYTSOTYJ8DnfssViMI/1CTh9PYaEQwlxny/k3/qLVLP9xjKEW8qC/hH/Ua 6/mNy4OlEwIoL5ah1izIUZ0uc2XLeJMjjLfDmDztCEuBP4kCN7ewYjg4ft0+lbUnMooH rfcg== 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=yxhFTP/2u64HqGkM5SOjDGBWnaxltMc1G+ZzaIbNrGU=; b=XGeCZ/GfoOFOV8sdACReHVU+97GGkBEW8XOfmFWBiaLfOwOrfA6ZBvRqbeLhU+lfDi K5ahJgj4/dBBK5G93DjZjGSqlc5tKFjOYKJ+gXofuyZeRsufwCTe9vvVGjtlGnc7ggQf +w6nwYGzJPHmBge1kUYI0q8s41F4sV5fim/GCbeDsRK6nO/mwAWvjNBkUsYtCVWICIe+ 9Z/7+Xi2GtwMQQefsw4jPzHivQvg+yBQZrdv54P4tqgwcvZwg5fZgiJqIlUgqeTw48/H xtTJ2T+B+NpLONwY19DZYnKIGI6OQHWHlswFLHgDCyFuPBZ3AOUolF620AEy/ijEaGeb D7gQ== X-Gm-Message-State: AOAM532pGIquvr4dh7/3fInBSkZCsXJFFFXrB7Zdzq1NA7Qm+lUw05iU iaP422Cso3P9SICvVF7Vo77c3wkLCri14zc/bLw= X-Google-Smtp-Source: ABdhPJzXqEmVpFjGsGsRnqhnWwiY0qEUQqY60dDw8VuLw9SiIXka+JK5Lvram1MmM2xibONByfMvOgV5OctXwXR04ho= X-Received: by 2002:a17:906:5043:: with SMTP id e3mr1498402ejk.260.1608249353237; Thu, 17 Dec 2020 15:55:53 -0800 (PST) MIME-Version: 1.0 References: <20201214185638.252662-1-lance.richardson@broadcom.com> In-Reply-To: <20201214185638.252662-1-lance.richardson@broadcom.com> From: Ajit Khaparde Date: Thu, 17 Dec 2020 15:55:42 -0800 Message-ID: To: Lance Richardson Cc: Ajit Khaparde , Somnath Kotur , dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/bnxt: fix doorbell write ordering X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Mon, Dec 14, 2020 at 10:56 AM Lance Richardson wrote: > > Write completion queue doorbell before receive descriptor > doorbell to avoid possibility of completion queue overflow > when completion queue size is equal to receive descriptor > ring size. Remove unnecessary compiler barriers (db write > functions have the necessary barriers.) > > Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing") > Signed-off-by: Lance Richardson > Reviewed-by: Ajit Kumar Khaparde > Reviewed-by: Somnath Kotur > Cc: stable@dpdk.org Patch applied to dpdk-next-net-brcm. > --- > v2 - Fixed typo in commit log. > > drivers/net/bnxt/bnxt_rxr.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > index e2d388e69f..ffdeeecc3a 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -917,17 +917,17 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, > goto done; > } > > - rte_compiler_barrier(); > + /* Ring the completion queue doorbell. */ > + bnxt_db_cq(cpr); > + > + /* Ring the receive descriptor doorbell. */ > if (rx_raw_prod != rxr->rx_raw_prod) > bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod); > > - rte_compiler_barrier(); > /* Ring the AGG ring DB */ > if (ag_raw_prod != rxr->ag_raw_prod) > bnxt_db_write(&rxr->ag_db, rxr->ag_raw_prod); > > - bnxt_db_cq(cpr); > - > /* Attempt to alloc Rx buf in case of a previous allocation failure. */ > if (rc == -ENOMEM) { > int i = RING_NEXT(rx_raw_prod); > -- > 2.25.1 > > > -- > This electronic communication and the information and any files transmitted > with it, or attached to it, are confidential and are intended solely for > the use of the individual or entity to whom it is addressed and may contain > information that is confidential, legally privileged, protected by privacy > laws, or otherwise restricted from disclosure to anyone else. If you are > not the intended recipient or the person responsible for delivering the > e-mail to the intended recipient, you are hereby notified that any use, > copying, distributing, dissemination, forwarding, printing, or copying of > this e-mail is strictly prohibited. If you received this e-mail in error, > please return the e-mail to the sender, delete it from your computer, and > destroy any printed copy of it. -- Ajit Khaparde