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 3899BA0A0E for ; Mon, 10 May 2021 18:04:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32B774003E; Mon, 10 May 2021 18:04:07 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) by mails.dpdk.org (Postfix) with ESMTP id 1796A4003E for ; Mon, 10 May 2021 18:04:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZkqWi7SFhkcQ9oHjZ/1o9skLPIVOuL/i2ldPIYnDxE7wfHtFQtN0vHuOh77t6B8s9DAKXImC1eV9eAcL2I7Oyn0ysG7fuzv2M7JO8s/veapCc1SCnjrqJTY5BXJqg9AUfN8AX5Rcy/yp/fbToOUBuUy2OAzSkjBrNIl9EVysGDiiIFDYlGuHK0jVEOAkbRGJVI6fppMjnUMCxPT0HyXeitizuy8Bh8PVyEo5sBbQhbkRfQVSmPqYQPvR8Hpg9HSXyjQJfwoSPpFTTmPwG/hWjtZM/7dm45TKccLZiB1QdyDhqUI0sVPfutwZMuld8X6jG/v8ZFxJ5CmpZoCqjBc8tg== 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-SenderADCheck; bh=t7+6+ZI7qN72wqGaY8ICt782lbENYORpJWNkyzlvqzI=; b=QvKjI+xiwms0fDvtQ1zB88NJCAeksiE2i0HbD9y05/VyU+Dc4C08nM3AZTIyajIcm69SiZL/CJ83zJMhRCGB0gMgrPnJAGFAaf2PC+ZUjVtHEwax6dDRphkehOQevsiXkz6o6CNTTPpZHT+HFAm9j/L76KC84WCKB0l4uFzMTjcInj/NHKIzMPjJ/FntZMVsitB+qm+TEFcrfR961xgyV2a6xkzFePJHwI1kJmDRIlPPnS5Mo67QRwejn8Ox53vAP0eKA4jJMSEyVC9KTosWS7dSdD6T7BBGYD+kYtl+c9osnp2GBtytWhZHzlBTlncy30qDghNIwNjCJdGuO2kp6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=t7+6+ZI7qN72wqGaY8ICt782lbENYORpJWNkyzlvqzI=; b=t5uahiPKGgSkw147y2N5G8m4wymdzlLA2OdMNCLgc5Ph+WmRhmwFhegFQH9jXJUSloJ2rfezqcC9QWxdpUddk0Lxg0+uEpMJBPn3swCZzRu0LvTulHPxO8OjfGlmnQgu2ptMy4gsXTYfKG0y9M81fGHvuFPkRX/spxx740FYYQTNi6GxPEvISa+wfmY6jm8nJbTawwmhBGgkwGlZylfi15/z4dqFf/ICDD3FHGvL4wW66a+jq02AFwoXxhjDQlWKjB6MENkK+06nsVWBQBIRE5Z6zYqhldtzaA0eUGUla8DHD7DpIZdkbIE6auiQjhegP74J/cE/30p+yWzcn11mFg== Received: from BN6PR1201CA0017.namprd12.prod.outlook.com (2603:10b6:405:4c::27) by BY5PR12MB4834.namprd12.prod.outlook.com (2603:10b6:a03:1b2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:04:04 +0000 Received: from BN8NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:405:4c:cafe::ca) by BN6PR1201CA0017.outlook.office365.com (2603:10b6:405:4c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Mon, 10 May 2021 16:04:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT031.mail.protection.outlook.com (10.13.177.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:04:04 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:04:01 +0000 From: Xueming Li To: Viacheslav Ovsiienko CC: Luca Boccassi , Matan Azrad , "dpdk stable" Date: Mon, 10 May 2021 23:59:17 +0800 Message-ID: <20210510160258.30982-8-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d3b50920-647d-4cba-c8d2-08d913cd3bcf X-MS-TrafficTypeDiagnostic: BY5PR12MB4834: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: USCtZaXoP/+6NocS4+kF09k16KIvpzhPAGrnPcJgsl3b8/tF0OA5AFMpgNQppnP83sWrIDQbAtUQqCi8kUvbchxMU/WEMI6A7TI4l2ssqxjNEwJkINw4NnsNFkNM80FfB16DcqnbHBkxQ+Om42NnfwA9VHPvQs96jckG607hSCqPVcYB7uVBxcV21KCjfplFCSA1wIpXW16j9jLv5GENjCCFcEaD0KZ37l039WlsEpoT8viZ9NpR5+CQlc9voB+eDs5Fnh3baxhIFPZEJUtX4EROH5UfQLkw3JnnIlMpV3cI9Qn7sONu3/zodCrpBZ/GAP1wjL+a0a4yhkKvckdkvrxgGJ78nR5SMh2x9kfcwxHSdLJFT7jIHI28g3jbpo5RQk1Oc4M07cjnwnJL9kZV+6+wE3SKTJpl/lRrU0ecO5rbbH4qPAVmM5xEq+x2tu9kDP6c7pDouwZTBBGvch0uAni2Cdx+qgSHLq2VTZHOAD0TVI87yvT495/8WEsPU3T5SCUz1vPc0lPzd/QziG/ged+/SAVh6WNRqLUrHlSSSjmYtOu6mZAbGEN+eFcvzvKHjW+H3PAzw0LP6LiB7i6AHHGNXtrYoZVtp22S+8bS+BwJRjzKW0AVNI+GNN7HdrbTJOAPGq4GgoB78hYbqqt8mo46M5hIW5UXx6XFDfsCnY93+i1qG5b7yND6yy1Yf1v50CUBG4CHztd/1CS6yMpOS2tIMN7dNBxtdYXb7ss4elqtd/qgHuqPcCbtyJxw1TiFQza2HZ4++pynsPOBhjLlDA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(39860400002)(136003)(396003)(346002)(376002)(36840700001)(46966006)(6666004)(83380400001)(6862004)(2906002)(4326008)(8936002)(82740400003)(37006003)(478600001)(316002)(426003)(2616005)(16526019)(5660300002)(82310400003)(36906005)(186003)(7636003)(8676002)(336012)(70586007)(54906003)(6636002)(70206006)(356005)(86362001)(966005)(36860700001)(26005)(53546011)(1076003)(6286002)(7696005)(36756003)(55016002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:04:04.0413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3b50920-647d-4cba-c8d2-08d913cd3bcf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4834 Subject: [dpdk-stable] patch 'net/mlx5: fix external buffer pool registration for Rx queue' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/23b584d6cc854fad62237b03899e494adc6526d5 Thanks. Xueming Li --- >From 23b584d6cc854fad62237b03899e494adc6526d5 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Fri, 12 Feb 2021 13:06:30 +0200 Subject: [PATCH] net/mlx5: fix external buffer pool registration for Rx queue Cc: Luca Boccassi [ upstream commit a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 ] On Rx queue creation the mlx5 PMD registers the data buffers of the specified pools for DMA operations. It scans the mem_list of the pools and creates the MRs (DMA related NIC objects) for the chunks found. If the pool is created with rte_pktmbuf_pool_create_extbuf() and refers to the external attached buffers (whose are in the area of application responsibility and it should explicitly register the data buffer memory for DMA with rte_dev_dma_map() call) the chunks contain the mbuf structures only, w/o any built-in data buffers. Hence, DMA with mlx5 NIC never happens to this area and there is no need to create MRs for these ones. The extra not needed MRs were created for the pools with external buffers causing MR cache load and performance was slightly affected. The patch checks the mbuf pool type and skips MR creation for the pools with external buffers. Fixes: bdb8e5b1ea7b ("net/mlx5: allow allocated mbuf with external buffer") Signed-off-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_mr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index 8b20ee3f83..da4e91fc24 100644 --- a/drivers/net/mlx5/mlx5_mr.c +++ b/drivers/net/mlx5/mlx5_mr.c @@ -535,7 +535,18 @@ mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl, .mr_ctrl = mr_ctrl, .ret = 0, }; + uint32_t flags = rte_pktmbuf_priv_flags(mp); + if (flags & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF) { + /* + * The pinned external buffer should be registered for DMA + * operations by application. The mem_list of the pool contains + * the list of chunks with mbuf structures w/o built-in data + * buffers and DMA actually does not happen there, no need + * to create MR for these chunks. + */ + return 0; + } DRV_LOG(DEBUG, "Port %u Rx queue registering mp %s " "having %u chunks.", dev->data->port_id, mp->name, mp->nb_mem_chunks); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:26.943978500 +0800 +++ 0009-net-mlx5-fix-external-buffer-pool-registration-for-R.patch 2021-05-10 23:59:26.310000000 +0800 @@ -1 +1 @@ -From a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 Mon Sep 17 00:00:00 2001 +From 23b584d6cc854fad62237b03899e494adc6526d5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 ] @@ -23 +25,0 @@ -Cc: stable@dpdk.org