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 CB15541CFA; Tue, 21 Feb 2023 08:50:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA9E243189; Tue, 21 Feb 2023 08:50:33 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2052.outbound.protection.outlook.com [40.107.93.52]) by mails.dpdk.org (Postfix) with ESMTP id E179E40E5A; Tue, 21 Feb 2023 08:50:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N80oETksTwfcKSdYkXTb2ryJ/lOJmV5AguBAAFDZoaA0jAATufvplb+eUMb1py8OiYR+913W1s9Rfxwm7X4kSlYkazM/Od0DgdlNpiKBrv0TKdmd/X/I3FV5xkT3hzvxwwP+Fd9Pc4OyZ4ay7GpigHydjjkbRHW75xXaNjt5Wh6AVI8XXUJOPQ23HOyHLSIMEyolLAbOBw22SsrVCWzFnV1dSU7si4KQZwUkAZMHl9dl9Krrvt25zKLVaWD+Ibzh0ZvV1mueuBSFnjhMUootsfpEzE8lQKgow+Ze+KO6OeiZUEpfkFUY/2Ciek+gdrY49Ny9sMSCOCdHssn3ac2pIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tE5pgxrbCNAwJGW5HUnxLbcS3o+ATdRVp+EIQ3KO1iE=; b=gyhoU3KmolSBFZgFzXQBW8Fhcky9O1SBktxrMw6W2ihnJY9kfvBarMqCbG99Besj/pICFy7aXI2rjTMAo/HrvmmLZRNoNJxlTkn1JG6M4i0if5gn11Ud81EvukSElF8PIUFBUH6OKhdqYi/yLqGCcPJ51Nqzwlwf8JPOr76hApXu7vTf1c2gLsRF6XndUKFmvoVXCnyCwN9UJ4yzO6HCQcRPEn8yc9PRScrWr6xlTc2cpYCsJ8YbL/Sv4iC3zy1r0xjq2kdT1Gd3MQXeeEA0ciBxPm/UkyCWnhvPBRna3sthANWZaa+G1Li58isIJOQOYNmc2VdNqKiIQxxFLC4zNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tE5pgxrbCNAwJGW5HUnxLbcS3o+ATdRVp+EIQ3KO1iE=; b=Jp4EPHTl4KmvhQDX3eB4boOo1soWN3QOufdfhEOHrQtsGbq1Dp9/fUtvJvfNNKbeeHgq2qHhGLBWbk4HAoapUWWsHXPemiR7nt6u2FCBy2y6Aj0pUC6ed/X5ulEa1IMSP1t+l1gMvGKWAD6sn3gE8tSwoBuAQbK5Jp6PJNx9Jxyw6TAurJC/ik4bZaspAR0+At+NyLfdl6r4zHzKBQTjSPbyTIlSbjmJjuhdRU2T5EVxdZofUUTHp934LwSrcklV9xVqa/Hs5PYCWCykIWwmGlYhrrf/AMAgKgI06kUEv0418AAA2N5LYHdabPltygsi9M806W2zbI5AmIAEyltyyg== Received: from BN8PR16CA0030.namprd16.prod.outlook.com (2603:10b6:408:4c::43) by CY5PR12MB6597.namprd12.prod.outlook.com (2603:10b6:930:43::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.19; Tue, 21 Feb 2023 07:50:30 +0000 Received: from BN8NAM11FT111.eop-nam11.prod.protection.outlook.com (2603:10b6:408:4c:cafe::57) by BN8PR16CA0030.outlook.office365.com (2603:10b6:408:4c::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.21 via Frontend Transport; Tue, 21 Feb 2023 07:50:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT111.mail.protection.outlook.com (10.13.177.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.20 via Frontend Transport; Tue, 21 Feb 2023 07:50:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 20 Feb 2023 23:50:16 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 20 Feb 2023 23:50:14 -0800 From: Gerry Gribbon To: CC: , Ori Kam Subject: [PATCH] regex/mlx5: correct value written to doorbell db rec Date: Tue, 21 Feb 2023 07:49:57 +0000 Message-ID: <20230221074958.1486157-1-ggribbon@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT111:EE_|CY5PR12MB6597:EE_ X-MS-Office365-Filtering-Correlation-Id: c935a621-ad59-422c-61fc-08db13e04df9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IEOuUNyMe4i1ZoMG75R7UT8WMImiYTzYGyDuL5LY80NqLKzCrlxe2/uDCUCH6p108NX3iJjZdQAxOxL1PYKLeOQr8IxJa5+Ravz2G2Jtu5BOORt0+yUyIJX9t8BjwcP29kUCHz6kjdfpvdeIt1UU0KTgt7fZdeoQbJ61Fg54nJYxTdRa+4o0UMj/MUWMv70//BMqkhdhC+wc4Y8Q4ogJW8KqnATsvGrA1PUPm7CytkLu7mYWD83difIynGPbEjRfL7qq2zpll1rk7ReQsA8IrlJzNSnVLEk5Nl4VELrwLG7gVmg0ySrXG7g845O0oB0Espa01Luv7eGgpdxoCgcI4gSW/sE09d4j3+IRlo2cxBd8DzyMlz50XfYtXgFRcVMrcHTg8vSP4rj+cZEFK+7VnBPzIIqCgCx9rSZ9RBKxIWhiKAerOol/G5DtaNY90HOVpCbhswN7IbduskbP6DOKMmWBMhb2DriNRaFRAl9soQ6wHy4eIrLnBbYUMYYnmK0IXMHft8ZhEi9GgHRT7CN75yCQSqLl5G0ZXcc4U+TO6sM4DQ0/U5F8dR43w6u+A2TjB1zh1SUibuaSHXWz/OL73wVEXs+DRkuWP1/FyTxA39RAiKCcHnEnFnYGpNhkPn+xB4idGb6OswwMj1isJeuht+c39DkOAT9lsbL9JC9ODquLN6c/39QoUhnouqSVnkiZyA25uFNwaACJKgVz1iXvJA== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(396003)(136003)(346002)(376002)(451199018)(46966006)(40470700004)(36840700001)(36756003)(356005)(7636003)(5660300002)(36860700001)(86362001)(82740400003)(450100002)(55016003)(41300700001)(8676002)(4326008)(8936002)(40480700001)(70586007)(6916009)(70206006)(2906002)(82310400005)(16526019)(26005)(186003)(6286002)(83380400001)(2616005)(47076005)(40460700003)(336012)(426003)(316002)(54906003)(6666004)(1076003)(107886003)(7696005)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2023 07:50:30.2817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c935a621-ad59-422c-61fc-08db13e04df9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT111.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6597 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 We were writing a value that should represent the number of items to be processed by hardware. The value being written was off by 1 (N*4)+3; The value should be (N*4) + 4 simplified to (N+1)*4 Fixes: 5dfa003db53f ("common/mlx5: fix post doorbell barrier") Cc: stable@dpdk.org Signed-off-by: Gerry Gribbon --- drivers/regex/mlx5/mlx5_regex_fastpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c index 143c7d7cdf..822370be83 100644 --- a/drivers/regex/mlx5/mlx5_regex_fastpath.c +++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c @@ -211,8 +211,8 @@ send_doorbell(struct mlx5_regex_priv *priv, struct mlx5_regex_hw_qp *qp) (MLX5_SEND_WQE_BB << (priv->has_umr ? 2 : 0)) + (priv->has_umr ? MLX5_REGEX_UMR_WQE_SIZE : 0); uint8_t *wqe = (uint8_t *)(uintptr_t)qp->qp_obj.wqes + wqe_offset; - uint32_t actual_pi = (priv->has_umr ? (qp->db_pi * 4 + 3) : qp->db_pi) & - MLX5_REGEX_MAX_WQE_INDEX; + uint32_t actual_pi = (priv->has_umr ? ((1 + qp->db_pi) * 4) : qp->db_pi) + & MLX5_REGEX_MAX_WQE_INDEX; /* Or the fm_ce_se instead of set, avoid the fence be cleared. */ ((struct mlx5_wqe_ctrl_seg *)wqe)->fm_ce_se |= MLX5_WQE_CTRL_CQ_UPDATE; -- 2.25.1