[v6,00/26] net/mlx5: insertion rate optimization
Message ID | 20210713084500.19964-1-suanmingm@nvidia.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A31F6A0C48; Tue, 13 Jul 2021 10:45:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D719411CF; Tue, 13 Jul 2021 10:45:22 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2068.outbound.protection.outlook.com [40.107.223.68]) by mails.dpdk.org (Postfix) with ESMTP id 1CD564069E for <dev@dpdk.org>; Tue, 13 Jul 2021 10:45:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OEvFOLWDmWqR8VF+aMWp9HJMgkhvS7Sa69UenvJACWGfvBezzIc/+IcIyaJ4C+FJDg5jaBq9y9KmxRk4h+0mhgiPfR9okuEcMx4U3hubtFCShUUKInNOMpZUMux52rF7Okb0ajvtWHLVMkP22mm/OTpC12j6iH575MfL7sDIf2Uoerkf31OSTCSs1++0ofhCpRu0cPUhmgrU74lfvSHV7xZKDEa2tMZ+ERF+AgQXDGaqmKU89Yj6gs0i6WHnyiaeoTLopebU5pPesTS7a/vAEO1xY2XN+4YuM02bP42Wt2UVzXOG/x3x6aqlAot1x0lw56QHeMuCuMaxtktZ2hE04w== 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=apo2NAmRTVnjxdmTh9wv6xh+HyAcMpFhTpQU+lCnZcM=; b=oDQzf1SvtEoCitqqwL1Wo9x7LbGc+ZcVRMGipV9eib/kA/s5Tf/SF37pqk0cg86njxvfihKbAq7ACcy+wKLgldaHCck6r2sQwlydBDerSoQ5R0UJyIqZZuQY2sJP9zzAMSr9LY2Ighmvpse01hWtLKDhYiXcN3WwaicIKKFW9C0QWpRpr1roSYQgCSFqyodn0fLkOijaeNCUWacnOBKn8kqCs4Rs3rgLzXrL6pZdftecvQtxp+ze1UhGD03C4wEPVwewxESWJVS9kdQJk0ROCtt/ickci50LUzCPdPiF1lrT9ZXcjM+Mlvxu95nl5N0qa5N0cykZ2dGFKwv645xHmg== 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=apo2NAmRTVnjxdmTh9wv6xh+HyAcMpFhTpQU+lCnZcM=; b=sqbVQMTObaB4vk7eUP8BaEJ+3YrIEgrRas/39jL02T+DE09ds8Tylll3QOM9gbswvn7hUXTgFeZfN++0mOiRS20tqBLqRXSwBWmPK4esKWVxgCjFFqrIwHbVUTVbzs3Mgv7cih33g+KHUNBppwzJCgVsTTAt3JsvEOLbYdp183MVarxnvyx8RViMzufOAgE+OQCSxkLviL+kFMinxLZZyGnpVUtXwyTLumeXxfEnBmgjVLlqAqJAusLSf1o2POuOBxWrlBP8Gdb9hTIXLztIozvNR5+tnOaIeoIytGSAEHhhNsSLpzyBqayVJ3fCr/+lmsFhwjNqMLUeaQj83rumGw== Received: from DM6PR07CA0100.namprd07.prod.outlook.com (2603:10b6:5:337::33) by CY4PR12MB1798.namprd12.prod.outlook.com (2603:10b6:903:11a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Tue, 13 Jul 2021 08:45:19 +0000 Received: from DM6NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:5:337:cafe::ae) by DM6PR07CA0100.outlook.office365.com (2603:10b6:5:337::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 08:45:19 +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 DM6NAM11FT004.mail.protection.outlook.com (10.13.172.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 08:45:19 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Jul 2021 08:45:17 +0000 From: Suanming Mou <suanmingm@nvidia.com> To: <viacheslavo@nvidia.com>, <matan@nvidia.com> CC: <rasland@nvidia.com>, <orika@nvidia.com>, <dev@dpdk.org> Date: Tue, 13 Jul 2021 11:44:34 +0300 Message-ID: <20210713084500.19964-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20210527093403.1153127-1-suanmingm@nvidia.com> References: <20210527093403.1153127-1-suanmingm@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb528beb-3325-4908-e2c5-08d945da8b89 X-MS-TrafficTypeDiagnostic: CY4PR12MB1798: X-Microsoft-Antispam-PRVS: <CY4PR12MB17985F20472ED4E4C553037FC1149@CY4PR12MB1798.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AvHn8tsWhH3S5MtjufdMqRrawonpW2H8cWhCrMACIwRse7NKYHH1/UWvKSSSAjnWJHSQBAWdhbguXItp+/2gHj/fcPFRC8Ss7VBmU3AUd/YkHDuwEiuJknvOe0WM0mD/EcWvPily3V8mgjXZ65p69zSx0NfWrFfM6eLdw6a/S79/FiAQPEMfAbNC0No02awukq+RYdi5IjfSyUOf3mU84iUsjkkfDeifBGEXdzBfPBjE29qyGArlC8zwVsyVWFroGXEaKAkGqkbkKQPx97Qph6hRtd/WnI0VAo7vBFYdMXiBjinjX28t1VkXybFpgVhKd+9/TLwCkLW1i5v7kXVuipgMlFaK76Tn3eoLNDqABhieFAMC/xh4haykUccScBhjSWR8i6IxYWM1Uqp6J4fwTczlAgxkFgmAvN2VOYetcY5w7kDw41iGrQ1NjZPelcpCGwdv5i60i6XbgSyrNgVGEQSM5w75773ipDydng69taSk9iwhH2V0VJLQm9uVo36Dw78UnD6vvgP9/jQaibt04jZEo42hupJLwQPPengGZKEVTgHtc7/IMCY+EUBGxCYnfdCt9jtVKbd0feM7CIs8Sxt2T01mg9YQnnGPnYGskJQGdh9yfcFAVj28oU+Y36kJa5DYsRHNvRt6sOt6UbeiOoUC5UuoVdscFFFtiiomZJstHdFGKIlImEQLd4vm+ODY9oni15SZ4UTzHRcFrctkddzxb/ipB9xB53KIigetCFM= 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)(396003)(39860400002)(376002)(346002)(136003)(36840700001)(46966006)(7696005)(316002)(36906005)(82310400003)(110136005)(26005)(54906003)(86362001)(55016002)(6666004)(186003)(82740400003)(6636002)(6286002)(8936002)(8676002)(34020700004)(2906002)(16526019)(336012)(426003)(356005)(2616005)(36756003)(83380400001)(70586007)(478600001)(70206006)(1076003)(4326008)(36860700001)(7636003)(5660300002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 08:45:19.4583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb528beb-3325-4908-e2c5-08d945da8b89 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: DM6NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1798 Subject: [dpdk-dev] [PATCH v6 00/26] net/mlx5: insertion rate optimization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Suanming Mou
July 13, 2021, 8:44 a.m. UTC
This patch series optimize the flow insertion rate with adding local cache to index pool and list. For object which wants efficient index allocate and free, local cache will be very helpful. For index pool, two level cache is added, one as local and another as global. The global cache is able to save all the allocated index. That means all the allocated index will not be freed. Once the local cache is full, the extra index will be flushed to the global cache. Once local cache is empty, first try to fetch more index from global, if global is still empty, allocate new trunk and more index. For list, sub local core list is introduced. The allocated objects will be added and released only from local list without any locks. Only the objects need to be shared will be synced from global list. --- v6: fix compilation issue in "common/mlx5: add list lcore share" patch. v5: code rebase to the latest version. v4: - split the list utility to commom patch - fix one ipool crash issue in mlx5_ipool_get_cache() function. - reorganize the common and mlx5 patches. - split the doc update to an individual patch. - update and rebase to the latest version. v3: fix Windows compilation issue v2: add the list per-lcore cache optimization --- Matan Azrad (9): net/mlx5: optimize modify header action memory net/mlx5: remove cache term from the list utility net/mlx5: add per lcore cache to the list utility net/mlx5: minimize list critical sections net/mlx5: manage list cache entries release net/mlx5: relax the list utility atomic operations net/mlx5: allocate list memory by the create API common/mlx5: add per-lcore cache to hash list utility net/mlx5: move modify header allocator to ipool Suanming Mou (17): net/mlx5: allow limiting the index pool maximum index net/mlx5: add indexed pool local cache net/mlx5: add index pool foreach define net/mlx5: support index pool non-lcore operations net/mlx5: replace flow list with index pool common/mlx5: move list utility to common common/mlx5: add list lcore share common/mlx5: call list callbacks with context common/mlx5: allocate cache list memory individually common/mlx5: optimize cache list object memory common/mlx5: support list non-lcore operations net/mlx5: adjust the hash bucket size net/mlx5: enable index pool per-core cache net/mlx5: optimize hash list table allocate on demand net/mlx5: change memory release configuration net/mlx5: optimize Rx queue match doc: add mlx5 multiple-thread flow insertion optimization doc/guides/nics/mlx5.rst | 5 + doc/guides/rel_notes/release_21_08.rst | 1 + drivers/common/mlx5/linux/mlx5_glue.h | 1 + drivers/common/mlx5/mlx5_common.h | 2 + drivers/common/mlx5/mlx5_common_utils.c | 569 ++++++++--- drivers/common/mlx5/mlx5_common_utils.h | 294 ++++-- drivers/common/mlx5/version.map | 7 + drivers/net/mlx5/linux/mlx5_flow_os.h | 3 +- drivers/net/mlx5/linux/mlx5_os.c | 209 ++-- drivers/net/mlx5/mlx5.c | 34 +- drivers/net/mlx5/mlx5.h | 46 +- drivers/net/mlx5/mlx5_defs.h | 12 +- drivers/net/mlx5/mlx5_flow.c | 308 +++--- drivers/net/mlx5/mlx5_flow.h | 209 ++-- drivers/net/mlx5/mlx5_flow_dv.c | 1206 +++++++++++++++-------- drivers/net/mlx5/mlx5_rx.h | 14 +- drivers/net/mlx5/mlx5_rxq.c | 136 ++- drivers/net/mlx5/mlx5_trigger.c | 8 +- drivers/net/mlx5/mlx5_utils.c | 627 ++++++++---- drivers/net/mlx5/mlx5_utils.h | 255 ++--- drivers/net/mlx5/windows/mlx5_os.c | 11 +- 21 files changed, 2543 insertions(+), 1414 deletions(-)