[0/4] net/mlx5: add indexed pool local cache
Message ID | 20210527093403.1153127-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 A851FA0548; Thu, 27 May 2021 11:34:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AF2C40150; Thu, 27 May 2021 11:34:25 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2074.outbound.protection.outlook.com [40.107.243.74]) by mails.dpdk.org (Postfix) with ESMTP id BC95740143 for <dev@dpdk.org>; Thu, 27 May 2021 11:34:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m/WCrAvy0IoqJ76jmdzvP5ATP+up1vpA0855YrVnAyPfXRrAQn+/AXARe2INTjvI3MaFKVbShp7jmNDlpOD59Ijz3S8MTHTI/bbhE1D51ILM5LsSU72iQhYiDKhSUexBXp/+kHirtxKVF1LyrklcflPbHzKNn1d6uzO6196dY9QmSvb75PbXT8ihZYCCekR7FfFkuM6oaCNL50gDX/H1ocr/K/+QReWTLengEDp4xkgSz82x9xgqz5x/Pfzqf2zYSMb6Z54fXB935B9YO4Bbz0uRkB+ciKwqToYsWzUOF1aDa6KaOFmfP2QE5C3fKDelW99OLygJvOkyBA3xdathfw== 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=u8gIasZQ6DybUvTa8CVRitoEp1jPZv6GikEVlBeGNqY=; b=IW+nPNhJo+QDBUyTdXgbuMm0Q8KGHmEekFGN3+Bq4I5YV+h64VVgJ6XSoM+XddHmRZH6DTa9+OHFXwk4hdVjg7iBwAknQqbgU9ceUk4TcRmquq90RvRosWTMfyw62DvmmDEOqiQsr/Ji8f+ZoRMcWcCUb2HMgMoAGUeIW1LKDKWlHVw8VUdZqeHX9cJyuX6Inz0aWRcFxSq0FOnU4h3oqc7RzheND0ru9UfqUnsVus1ov3xKiPqUpNSGjmVyp5ov6iXU3E7QYEv2KwiFgLk6wSZ+yUDISWrfkuv2iyOxFOOWiIb+9gaLKGtmPBqT1rMKlIMmb7mopIpJhuz4qHFKAA== 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=u8gIasZQ6DybUvTa8CVRitoEp1jPZv6GikEVlBeGNqY=; b=tQQlzbKxNpolPBmW4QmNM6l/EPUNyvCIu9Gz6FjhNukOaWu6jBsbvZk/EcMC/ZyA2fpn98SFiwXhGvoyt7vTi15GoURBFyPPkabwihhGYGRigM4AkJaVhtNjoHP98fJMLzF7kJdIOBCeMlU5cOxRjN4TuHAKTbo3r5luwBobbHgpp7y9mEmFev5UzAFo2m2cPGw/7WSa45pELA7KsVGfrG7lQ98+mRgYKbGr86yz0FSvi6NZnlw7ZkGCWfFo0kHalRMMFHnCXue9/99ZvO8vznHr+7ZSh4tyIyHl92maJymnh2u5SBddA8vpZ/uZ73Gj1Kuw+ivIgS660NoMRFKJNA== Received: from MW2PR16CA0002.namprd16.prod.outlook.com (2603:10b6:907::15) by BL0PR12MB4995.namprd12.prod.outlook.com (2603:10b6:208:1c7::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Thu, 27 May 2021 09:34:22 +0000 Received: from CO1NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::7d) by MW2PR16CA0002.outlook.office365.com (2603:10b6:907::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20 via Frontend Transport; Thu, 27 May 2021 09:34:22 +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 CO1NAM11FT059.mail.protection.outlook.com (10.13.174.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Thu, 27 May 2021 09:34:22 +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; Thu, 27 May 2021 09:34:20 +0000 From: Suanming Mou <suanmingm@nvidia.com> To: <viacheslavo@nvidia.com>, <matan@nvidia.com> CC: <rasland@nvidia.com>, <dev@dpdk.org> Date: Thu, 27 May 2021 12:33:59 +0300 Message-ID: <20210527093403.1153127-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] 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: 99756c10-7a2a-484e-7ced-08d920f29c14 X-MS-TrafficTypeDiagnostic: BL0PR12MB4995: X-Microsoft-Antispam-PRVS: <BL0PR12MB49957FE5D056AEAB99585F71C1239@BL0PR12MB4995.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: AtGRLsXeLOQm+1KFQNvv95+voDyx0aaRNTYc3u3wNPFiRvRaks5nyN1bGlyRKiaNFmfWq0ztIc9xDeLIfIL5MpkOezCSDUpBMcdc+jyrT+i7ckTmM7eObJWDmHbIzq9GMMa145QBx6najKJbWV3swJz/GtqY2M33SSihuH4TDfpLsezq0Ht/ujAZVn/4WZTJ71ifjgZDp0nVTO+Cc9o7otwb0jNX4vZwumAErcUh4rHTYhLH3AcuDa32LbbZhRFAGISIlPvpyAs8hQq6njHi0J3DE2yvidchBb8uNl71W5wgfad0Iz8GXkdo+HufyjVjxAniaKBFa31RZxCsnYmASSTBbMkBJ60HTwZjbSPcem5sXgK2oFnEybprjZITkO4pnhX60W2TwM03Q9wMAN0u79GWFW+IstoSh2MJJZSXt09j3UsXW4GbbBPJn9dw0XnqbHbIGyU5LwvlORfwWXKgEIFahOKGGK62/94ODR/o6axWY/Ri2cPA5y/ZLdy4P5tNGqcIERmzjpoD3+XKIJie7jFIA8wW09Op5M9z14IUoXTcu8HSd8SL2dCTF+5tISer53ejINrPKe5W5Zv7431aTvp4TmKBxL7YXoLvCiFAaeY03wA/40lr/z2MSZmnOJRFTdw7a1pH8IBlklk3AzDfn3bWBwYL7FASeOZ9T6vzc9M= 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)(376002)(136003)(39860400002)(346002)(396003)(46966006)(36840700001)(8936002)(6636002)(8676002)(26005)(55016002)(4326008)(70206006)(47076005)(6286002)(316002)(36906005)(478600001)(2906002)(83380400001)(36756003)(186003)(1076003)(6666004)(70586007)(82310400003)(336012)(86362001)(2616005)(82740400003)(16526019)(426003)(5660300002)(54906003)(36860700001)(356005)(7696005)(110136005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2021 09:34:22.1229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99756c10-7a2a-484e-7ced-08d920f29c14 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: CO1NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4995 Subject: [dpdk-dev] [PATCH 0/4] net/mlx5: add indexed pool local cache 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
May 27, 2021, 9:33 a.m. UTC
For object which wants efficient index allocate and free, local cache will be very helpful. 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. Suanming Mou (4): net/mlx5: add index allocate with up limit net/mlx5: add indexed pool local cache net/mlx5: add index pool cache flush net/mlx5: replace flow list with index pool drivers/net/mlx5/linux/mlx5_os.c | 11 + drivers/net/mlx5/mlx5.c | 3 +- drivers/net/mlx5/mlx5.h | 4 +- drivers/net/mlx5/mlx5_flow.c | 111 ++++------ drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_flow_dv.c | 5 + drivers/net/mlx5/mlx5_trigger.c | 8 +- drivers/net/mlx5/mlx5_utils.c | 337 ++++++++++++++++++++++++++++++- drivers/net/mlx5/mlx5_utils.h | 69 ++++++- 9 files changed, 463 insertions(+), 86 deletions(-)