[v2,00/22] net/mlx5: insertion rate optimization
Message ID | 20210630124609.8711-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 4AF51A0A0F; Wed, 30 Jun 2021 14:46:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C265741221; Wed, 30 Jun 2021 14:46:32 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2084.outbound.protection.outlook.com [40.107.244.84]) by mails.dpdk.org (Postfix) with ESMTP id CAED340040 for <dev@dpdk.org>; Wed, 30 Jun 2021 14:46:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eSzfpYko0teEObXtdHRxrDkSB/DvhzjgjV48k9uPs7+GfSTbzmYKMnQP5cffv/E5qyvV+8Hjh6ltiNQrCyHtcqbs6R0KZNSirFiExjZNxtmXCndFqSsFNmXjLj5mNGGK6K9vTAT/FOG9Un9HKXE+rc1hlmye1rTp2xicgG3Mi+MPKHuN6W4drF2oc4iX+0AorjqPuacjuHGaqb3RpMf3P1fDCHilhyuZOGV32OEo7ZS7IDHGOEcmgWC5256sPfKTOb117p0qfQfqgm3PZM1ucVAyhNVxO4a4ujS/RbDwTwCdx62sGf4x3icbguqInQ6h4Z08D29nV7/mm0GpntCPnw== 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=OIHpFt00LfHdA/RpwFz8OiiXeruQdy2BCRTSGDV8Shs=; b=eLvJPUbdWbr78zB5uNb400iiwWhtlvDNH5LF5Eo+xPeZBCiaL+tD9sPH9v8k9BHV5Zxg5N+utXlYtwnEOM+hHAdRUDEYynNm6okJmS6aWvYg8sPV+V5gRmHibiXdI+eJCirK1RUritCJrEz7hi04kf8BFVIoPF52z9MY+3vZh/Rlpqf6e/iFQ4PBy/Dz+Ok1U93S/hJ6Aw1Ik6JrL3GFboHbX8Wmde8FYBPS+BGk7ojMecDKG4HUbfc50VeJrKGNMPoT8+zD5KdAoSpa24vQXRkJwVqa/pyX9P+30/uPhrXcMm/5VoUaHmwzr7EwlmOcqfndvMbzjqjgSHtTzGiP4g== 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=OIHpFt00LfHdA/RpwFz8OiiXeruQdy2BCRTSGDV8Shs=; b=ZNRcko4kAp3iC6XAzbh+Mts7mkMXPTjZOY1AmpqMEdnkmB/w2YoRmkb2qWGv0q2qR9EFL3NnkxNDIHfXzbMJMsYQPmYxE1UMwmEp+r/sBE7SRQmhBNE5xGDgGc+P+6F2HcQM0/zAKxg4YNKmVppRcKJDZw85VkL6Zftu9A8672tD8kp4afrAblVAKJ4HQEK7S5LanTncWnmX12FuX59rJyirHCHXeyf9y7TuM/kEDvVt07bLcnu5SctPZfKNevq8ov4E4DCWvtEL9yHYTcnUdN2NcgHI3tHRviXYePf8i+NZEdY39yCd4944EtZRvdj1akUphW96K1zOjg+UISLoCw== Received: from BN6PR20CA0054.namprd20.prod.outlook.com (2603:10b6:404:151::16) by BN8PR12MB3217.namprd12.prod.outlook.com (2603:10b6:408:6e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Wed, 30 Jun 2021 12:46:28 +0000 Received: from BN8NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:404:151:cafe::2b) by BN6PR20CA0054.outlook.office365.com (2603:10b6:404:151::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 12:46:28 +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 BN8NAM11FT042.mail.protection.outlook.com (10.13.177.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 12:46:28 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Jun 2021 12:46:25 +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: Wed, 30 Jun 2021 15:45:47 +0300 Message-ID: <20210630124609.8711-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.6] 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: 214e671d-14ab-4360-dd60-08d93bc51429 X-MS-TrafficTypeDiagnostic: BN8PR12MB3217: X-Microsoft-Antispam-PRVS: <BN8PR12MB3217184380F87059A0F33A16C1019@BN8PR12MB3217.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +BHPzbY+DFyqXxgOIWO3plq4j25226lrjkaRIn/xbbCr9mRyzhD2tTqYaCISl9qgmVfvd/gaeRt+E3BkZRHLeitz8zVAhKwmO02jkWMULEK4K285EIgo7t5AaEW4VuKWuvrzn1P05aZwkc1uakkP/P7gIXO3Nd26AxVETr5L4x1pxLoe7k64K1utO0z+fwQAVWBOX+JX3LIPvbza7lle/CK5KWTg9DS5EkwOaRlOYrkei/hZAndHPS1qlKAFdvJW8mqSg8bj2GqyhCDGy2jfyeweH96ZfRxu7ZYTQn5qpqopBp+wMqUGXXTvy35PLf3p4Q5wBVS15MGXgFHUpq8rrpiSPIqyzNuVdEJLvvN+uKivCFMF+wE9utyRAW9ELAtbQfeY8po7x9Zz2SpBOPysqgv/B4dUaEiUkxYLLB6c0inP4EbQk1isF0pa/6NWSRyurhAMusu7SLdNKqNdz7ZdXV81myyTH0JakKkmMzwK/LxNb8/RfryjtCoBPXOqyZwWjsbf9REotZ2tpTV4xNVzLJGQwne+JeTAorMswukXSAeiAA5LDk8Z0IABz08+hTmw1kQdvyT8fPXHZOeYjpff9kYp2rTCMBHLzxsJ2EzIVQaabzon9bYH/NUWujGiI1KlN2wHfJkFcL3AkX21uI90h/qo4lk8GcaHu5EGyM+42zIChSQpQemcyW0CuiyD8Pk0C/D5b3w7r4ohNYNRntYaSA== 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)(346002)(376002)(396003)(39860400002)(136003)(36840700001)(46966006)(186003)(7696005)(426003)(82310400003)(4326008)(336012)(6286002)(16526019)(5660300002)(36756003)(2906002)(70206006)(55016002)(478600001)(26005)(70586007)(2616005)(6666004)(8936002)(356005)(54906003)(86362001)(110136005)(83380400001)(36860700001)(316002)(8676002)(6636002)(1076003)(7636003)(47076005)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 12:46:28.0830 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 214e671d-14ab-4360-dd60-08d93bc51429 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: BN8NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3217 Subject: [dpdk-dev] [PATCH v2 00/22] 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
June 30, 2021, 12:45 p.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. --- 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 (13): 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: replace flow list with index pool net/mlx5: adjust the hash bucket size common/mlx5: allocate cache list memory individually net/mlx5: enable index pool per-core cache net/mlx5: optimize hash list table allocate on demand common/mlx5: optimize cache list object memory net/mlx5: change memory release configuration net/mlx5: support index pool none local core operations net/mlx5: support list none local core operations net/mlx5: optimize Rx queue match doc/guides/nics/mlx5.rst | 5 + doc/guides/rel_notes/release_21_08.rst | 6 + 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 | 283 ++++-- 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 | 305 +++--- drivers/net/mlx5/mlx5_flow.h | 210 ++-- drivers/net/mlx5/mlx5_flow_dv.c | 1203 +++++++++++++++-------- 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 | 617 ++++++++---- drivers/net/mlx5/mlx5_utils.h | 255 ++--- drivers/net/mlx5/windows/mlx5_os.c | 11 +- 20 files changed, 2518 insertions(+), 1411 deletions(-)