[v5,00/26] net/mlx5: insertion rate optimization
Message ID | 20210712014654.32428-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 C8905A0C4B; Mon, 12 Jul 2021 03:47:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C91741169; Mon, 12 Jul 2021 03:47:30 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2065.outbound.protection.outlook.com [40.107.95.65]) by mails.dpdk.org (Postfix) with ESMTP id 0684640685 for <dev@dpdk.org>; Mon, 12 Jul 2021 03:47:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DWVWR/wzBnbxPbXyMGNc5KaPl1auFJOZ5222EE00lb8Z5Y+/CGH0iV0lfD8I5dNx3Z19mTiW2aTuIcQrRYcMaI5u7JWIv6Ccs3/VnVIHzvaAQgqgk/sCybWEjCV1UcssXOmpjz/l0MOUOj3p+MFYdU1GQUiHPdLTjXKDSkfqegbOKXvwQX35KSLErG1bonnw7P+ytOA51E01AXFUvpECNylixr+fKFKX/XlcbdisKM17I8PJ+Yz1Q6EBLcq8S2xqnhURRyuNbHwCW7sBKpfL7Mu0yWcIkha2n7F18qFvLyMwMs1v0Kc8j5mBZGd4keJqLtk2FKVjuaihyaRarWutKw== 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=i2DhfqGIvXEiLMPRxxINAi1aU+WLYTZBSNnxPu9PuKA=; b=OBOmUi3Yw6PJgOIbQiuC+1LROuAQJQfFVEhudiWiOGaI8IYDiWmulsGEh8zLHw4OJiqj+alt3qBWLcmhVSsKixinKrXqG6sKS1Z++OIySnUD8RDnp0urctTfu6yTtf9rTORZwSo3D0GSmm3mQfgkGolYgruREC0Zfp8NoEJ6B9NaVPpUPhLrlKD/N3x+J/yI1/8AcLnvPgJzYVBIPk5vSIJQAg/w6TOCq+qW3vHUgo5PpZAGNVMDLAUExi93iCDTC2La04Fs1AdrPTTxNNQZatYGMmm8SMKZFpf1d6zpnTCh0RCP4Tdh6pp18Qz6R3hIyHLXbuWqnf8Moa1AFnThdg== 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=i2DhfqGIvXEiLMPRxxINAi1aU+WLYTZBSNnxPu9PuKA=; b=E711F0WhavqKMo9lXNC/skUQg1l1tysQs5+AWr76pNYofkZZ/Edwrfh+246jeN9KsZaPlLq/RkQWYtyoe/z6LCjpToWMcEqnvnYMbJCULlQEFtoNGnSTMhHkpCFibZOCmvB99ItKGjXtNMGneOUmLklEnw/i9jf7qKtBataVWiLp5tE6XVhk0ci6Flg4pXHGgL/FPhQANQ0t4rFigs4Way2eWcaTsoh2rAvEr8ej3oDHW+fV00KK8K1uCVe93dbBNkj22DD5oMc6A4yDQzeUJHjNYoFDh3noL0qi3QUVwLHgur0rYf5EYnBq92ZEenPk8FLQRyGnX1APC3N1Ne/+Bw== Received: from BN0PR02CA0022.namprd02.prod.outlook.com (2603:10b6:408:e4::27) by BN6PR12MB1250.namprd12.prod.outlook.com (2603:10b6:404:17::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20; Mon, 12 Jul 2021 01:47:25 +0000 Received: from BN8NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e4:cafe::45) by BN0PR02CA0022.outlook.office365.com (2603:10b6:408:e4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 01:47:25 +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 BN8NAM11FT009.mail.protection.outlook.com (10.13.176.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 01:47:25 +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; Mon, 12 Jul 2021 01:47:10 +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: Mon, 12 Jul 2021 04:46:28 +0300 Message-ID: <20210712014654.32428-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: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e5629bff-71a1-4a45-7202-08d944d6fffb X-MS-TrafficTypeDiagnostic: BN6PR12MB1250: X-Microsoft-Antispam-PRVS: <BN6PR12MB12501DCD7DCB9521B6271222C1159@BN6PR12MB1250.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +wPNzcmaIlVwzA7B/FpXxSMWIKRionQcNaG+OroYtBWnRF+B9wDod68ZGPzXCtvsZq9phi6IDafDIoDZ26LpGGpP672o+Nb5NsahQyFQFbt7sf1sgb7oNjaZRtSzEThKQlzjKwNNzdldvDZkO7DVKsaw7kRka9oRKbmA7TOLUVViscSH+l/pfDNTRcjiOgHjRsBhrRekgfc4CbZG3zf96AelgL1Xk00ppvNFER0msYkuqvXrB6oLJ12tKXXAdmzos/kaDPbt39JYdjBAnXUVjnTA7kMZ6smQ6FBgNZf7gU2OhLVVriAGVwiquP+es0L12YArf5WMiteeFpbmIzGA/ABnCQQurWe4ZC7W23FA/eeI0z1CqDVSgjEjC2QVopg1Q1BxwTHID8udIQcE+2Cr6BLa2KMHrpcDNfGat6dUxfwo8sujBmsz5bpRnKoeBvzZlB+0GgTKvzJivr4WUPD3EGeP3kbFRvD0r1rPVAMAfxj8x5FWvHJGf1ENvwkgzOPXY977XiRU5yuB2jgA8U32vdYsrYgqtp1KKX5Fsjw2EQD4DDJrfboeI+PMmqoJn26PSG/g3HWwU3OZCpmZatmUcpKsZzU8ItOVDFDSirjelqIgAK+VzfeJrBT3ON9Jp4XPTypcW+bTGoVC2795XDDdFRYgQo345SFw6R0neIQSy2/PnpOffvbuBQG+W+LGOOEZW4Lu64H38trTxdT13ta9D/dLp60zgXMyAn1RO+ei0g0= 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)(136003)(376002)(39860400002)(346002)(396003)(46966006)(36840700001)(1076003)(8676002)(16526019)(356005)(86362001)(70586007)(2906002)(82310400003)(5660300002)(6636002)(6666004)(70206006)(8936002)(36756003)(336012)(26005)(36860700001)(7636003)(6286002)(47076005)(83380400001)(186003)(110136005)(4326008)(7696005)(478600001)(55016002)(426003)(2616005)(36906005)(54906003)(82740400003)(34020700004)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 01:47:25.5865 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5629bff-71a1-4a45-7202-08d944d6fffb 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: BN8NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1250 Subject: [dpdk-dev] [PATCH v5 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 12, 2021, 1:46 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. --- 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(-)