From patchwork Sun Jun 6 16:49:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 455068 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp2114078jae; Sun, 6 Jun 2021 09:50:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8iC9IDHCvV6BZevRPWx/OPy4N1PH34Gih6M+TLFRhZnWeZBxjCBIyZEWp+R2aUa1rNjWb X-Received: by 2002:a17:906:3845:: with SMTP id w5mr14031823ejc.466.1622998214322; Sun, 06 Jun 2021 09:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622998214; cv=none; d=google.com; s=arc-20160816; b=N3pp/Il+3KDxUfmIeVsiOem94EIT3dvIZS27jLAKVSJG/4gucGKSoZkiS5CiheRTn/ ZwoKnvOuAEEm3y2CEv/mISYo31ArUUS7AHggyYEzJheY8Yjw+Prv4ItGYGeU9MxiEDVg fX3JlzObp3hZsf8bYTTPYzfck9qK3+NwYSRS5Rngp16FY9flhEmAWMusdpKzTbOtXGwe /iHdeQmQVE/uNxDvDwzOX+skPJt+/9jI5nY+8NNzHrmOM+7DWtbKyxgF77RYL42a+gCc iqJXSG9Tqep+7qbfJdqmMrezK9LnXNPnf5IASA+52rADf20upqFrcDicUBX4lJRPKJRn n6fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=HJ4YTYMDy+5jDB8l3VzniqHYaInYMGgug7gFxtrbUaw=; b=LUC87iqKqpUVh/rJ/Sk402XEXKYLBT7jImozY3lomBBBwmfJe4sFWwqMM759CKGj2G zs4yuRuZtFYA2NrNPnBffavgG7jCabaiure8mNAfw5F+Er53XVNpSpnRLAyloaxCwkoH /0fwy/qJdMuvMWsHlUerbh+Ddpj53xPPAe1SU+aPksNqI+fTtR187PhiEMTZKz1DCdaN PyacFr9/Fzb8ahsZyWRE4qDhD7tc6GThjyn7efUCpf1HW7bn7H6FXSQouwCwjZ4lW/0I DNYlIOsVQpb24eNEHzLx+WNjk6nowllFM3LqzMA3P7FB199Ppboee3ZLzC32WeBCKqXU Blkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id f12si10371535edw.443.2021.06.06.09.50.14; Sun, 06 Jun 2021 09:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82FDF40040; Sun, 6 Jun 2021 18:50:13 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id E2A764003F; Sun, 6 Jun 2021 18:50:11 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0754B31B; Sun, 6 Jun 2021 09:50:11 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F111D3F694; Sun, 6 Jun 2021 09:50:10 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, matan@nvidia.com, shahafs@nvidia.com, viacheslavo@nvidia.com Cc: ruifeng.wang@arm.com, matan@mellanox.com, stable@dpdk.org Date: Sun, 6 Jun 2021 11:49:48 -0500 Message-Id: <20210606164948.35997-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/mlx5: remove unwanted barrier 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" The IO barrier is not required as cqe->op_own is read once. The checks done on the local variable and the memory is not read again. Fixes: 88c0733535d6 ("net/mlx5: extend Rx completion with error handling") Cc: matan@mellanox.com Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang --- drivers/common/mlx5/mlx5_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h index 5028a05b49..a4c29f51f1 100644 --- a/drivers/common/mlx5/mlx5_common.h +++ b/drivers/common/mlx5/mlx5_common.h @@ -195,7 +195,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n, if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID))) return MLX5_CQE_STATUS_HW_OWN; - rte_io_rmb(); + if (unlikely(op_code == MLX5_CQE_RESP_ERR || op_code == MLX5_CQE_REQ_ERR)) return MLX5_CQE_STATUS_ERR;