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 C8F95A0093; Thu, 13 Jan 2022 15:37:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF9564273D; Thu, 13 Jan 2022 15:37:33 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by mails.dpdk.org (Postfix) with ESMTP id A6E3840150 for ; Thu, 13 Jan 2022 15:37:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HezvOCG7bZ6JLGpBpKKKKhOPbIJEMckCfA7A/hoMefZnh/fNEiQLa7Cckg3rKE2NI4nV/vNf1v93AldZ/ysaXPa+bpS7tylwzeuSF95/a5PQIM6DjIWMGAx/+8hVJzPlPcGsPJleIDVCu6VlEEc7V8Jb6JIONLELqe1ZTbQWE1k/t4goroku0t4m/EQIX9lFrpUPfiwu9qkRfV98EPGeooJ59REYvtbKkrfYHzwiGdI1OtDgYWJjHPfMd1BAIoqHMm7fwYpvtuAXT/JRYZ4LQ5Fn6P5UXEdE0734OOW5WyUU552MizaQg+nP4bsNWKHdT1BFxm206d0JP8/sGDSapA== 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=U8WntwT0rjVpN9Mds+03Ri63DeIK8q7JC2xM2NAM724=; b=d23pkISTuQpGvyHB1nFDUcJV4SVRTix498VV9goVILMFC75/GG1Bf95D2uj399f1dWvt8hDbezB8siYzUSZinzlASsqPYXy9qDu2CC7S26VfPERl5g9GfKppJZyStS0c6Wse5os1dblSsquGncnTKrtupOMgMBhcZkTQpA/xIqv1uOO2YvsBkL0bk6sunSYw00Nz189Nh7pbh0wP7lDgbDpqhm28gsrb9/bwu0lG4HrKQ4b0SmPPOv6WnUKqLDPsBM+W1Xf+IU0ram+af8UV5BOdM41q+5fxXQZnECHgENT0pN7zpCFD4BYtgaHLPQ1uotsAlzyDxDzbc284QPVYxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=U8WntwT0rjVpN9Mds+03Ri63DeIK8q7JC2xM2NAM724=; b=ebQeYWhIP83Trnkd1HCdj44ZAKW/miF4/S7QeSwtoSWM0f4w1a/Qv/WCml8QV8a4xkShg8p85+o2D3o5WwWtAo68bXYuMLnZH/48YNgZqCggc7NP4hC9xsCwIdwpiIxRpPbSMPAUFHjNjM+2w6uD6miAwFfM5xkGeOch1oJ41kcbPdbY+1lzuETPWWViLDDod965H3+rAeKNshDRTq0tfiw2C6drx0M9Mt5DwsINLhxDj5hSVJt2NSSm4R1bPVLc2JgwhM4JCdFqM5fQDd91q6tfFJXbY1/hHaDEuKTQQ7AiqD1MPIFx1568EbdvhvyOx06B1hNiNxD6yE/7bA09DA== Received: from DM5PR06CA0091.namprd06.prod.outlook.com (2603:10b6:3:4::29) by DM6PR12MB3161.namprd12.prod.outlook.com (2603:10b6:5:182::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 14:37:31 +0000 Received: from DM6NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:3:4:cafe::c6) by DM5PR06CA0091.outlook.office365.com (2603:10b6:3:4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9 via Frontend Transport; Thu, 13 Jan 2022 14:37:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by DM6NAM11FT014.mail.protection.outlook.com (10.13.173.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4888.9 via Frontend Transport; Thu, 13 Jan 2022 14:37:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 13 Jan 2022 14:37:30 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Thu, 13 Jan 2022 06:37:28 -0800 From: Alexander Kozyrev To: CC: , , , Subject: [PATCH] net/mlx5: fix wrong MPRQ WQE size assertion Date: Thu, 13 Jan 2022 16:36:09 +0200 Message-ID: <20220113143609.3531344-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 504fa9e5-3f79-40e5-ebc8-08d9d6a23b14 X-MS-TrafficTypeDiagnostic: DM6PR12MB3161:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BdAmj5JzVEnt5NC/ThsolPdT3R97W9G3Vd1iGtvU+5P/RujaMMRM+PSvwwU4NUfUE/nATasEpPLDrutyAr7353dqouXG+rgowkGuEKdjKExY3BLNErBLNJVQdhwDhE6BggMmi+KvkQ20DNz4hxCcOvwElHwyYExjDSjDVF0udkVO0tLf0mRytfOGM6on+G3DJd6N7qNZBLYvUPC8MFopiTD2xFfOVEO1Xdq65Vg0dJgjPApMdU3tBMZWcGruC3+6vr6BtawZlM27o9uEZe+df8MSUiqWee32jtUtaiwlIOnlQz/CsvpY3dA4KCCoSftfaQ8rfzNTGr6FgJUC2SDw+PiliXWi8isz14MTNP7Mf7Q32jNPSDbEk/RYuQCsTBGqmDIiPPhLx65bKThx6Cwo2JtEmnE+3uwZvEjnK4AgvjW9C3+RhWrQYylrZXiTMrA2B7tpllla4nEkhTOcJ0b8jiq5zktJ48JEPMEO7VYbiKqAV9g9/ZWCirYGS4yiqBtZgc+1LpwWonRUJi3LOpfi5I/jR80DpBmrCaCVkSE0qIhnmqebWJt6lWoHQcxJR9+EuV5HU+6b0ADo42x3R66N5HyqEof2j2OcfsCB5Bx/4GisUMocIXjAKWxgFZ7eJJUqxelccklrdEOoPLdDDcWWor5x4t6RjL97d7gS0p5ZpwEZR6r12w9J1jxl36XOOqOOj/sjZjru5NWIglmOjqkrVVWE5H5GPXtGmntdnSrpO5sES5T/P1YgSmqMrrUFydw6wzo04mkVjoGH1lnJ/5tkOCpfjWhVdoBFCst/dIgi/c0= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(46966006)(40470700002)(36840700001)(356005)(2906002)(81166007)(4326008)(5660300002)(36860700001)(54906003)(1076003)(508600001)(107886003)(47076005)(316002)(70206006)(70586007)(8676002)(6916009)(82310400004)(7696005)(55016003)(186003)(2616005)(16526019)(336012)(26005)(8936002)(6286002)(83380400001)(86362001)(426003)(40460700001)(6666004)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 14:37:31.2502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 504fa9e5-3f79-40e5-ebc8-08d9d6a23b14 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3161 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 Preparation of the stride size and the number of strides for Multi-Packet RQ was updated recently to accommodate the hardware limitation about minimum WQE size. The wrong assertion was introduced to ensure this limitation is met. Assert that the configured WQE size is not less than the minimum supported size. Fixes: 219f08a ("net/mlx5: fix missing adjustment MPRQ stride devargs") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index ed21fbba1e..105e094fdf 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1619,7 +1619,7 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, RTE_BIT32(log_def_stride_size)); log_stride_wqe_size = log_def_stride_num + log_def_stride_size; } - MLX5_ASSERT(log_stride_wqe_size < config->mprq.log_min_stride_wqe_size); + MLX5_ASSERT(log_stride_wqe_size >= config->mprq.log_min_stride_wqe_size); if (desc <= RTE_BIT32(*actual_log_stride_num)) goto unsupport; if (min_mbuf_size > RTE_BIT32(log_stride_wqe_size)) { -- 2.18.2