From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0078.outbound.protection.outlook.com [104.47.0.78]) by dpdk.org (Postfix) with ESMTP id A7EC71B015 for ; Wed, 9 May 2018 13:09:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZB9y848zQyMBgycoE366V1r1PZ4zIdwA9mcDiX94hEg=; b=tvLNCMZfX2hUAiDZtQGNvKy63tqatWGMPcCpLScsy6Ru0bPab2Y/VsJ1AHHBKJUOx63muztBagubh0lXa/Xa7JwpQGbAx0mO40ulppuTT9TbmEvOHVjcnRWXUhiKPsrf0hkti1qcyJxL+yLBXMxL3Z7MBSKV70uZ4+YovZTK+98= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2034.eurprd05.prod.outlook.com (2603:10a6:203:1a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Wed, 9 May 2018 11:09:21 +0000 From: Yongseok Koh To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: dev@dpdk.org, Yongseok Koh Date: Wed, 9 May 2018 04:09:02 -0700 Message-Id: <20180509110906.19462-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180502231654.7596-1-yskoh@mellanox.com> References: <20180502231654.7596-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO2PR04CA0070.namprd04.prod.outlook.com (2603:10b6:102:1::38) To AM5PR0501MB2034.eurprd05.prod.outlook.com (2603:10a6:203:1a::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2034; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 3:HtBQz+ezK/YxfMkt68I8HYz2u1vfaTv6HqLiNpZozYhmIKrZ17QuduB+GlciIrBzktq+ztaMo9HhJCa5Wtg+/VGhYjuycyJVBYVdsQDNSnIbNTSnOqIIqsF4N6Cy6Yi1KadKsIndq3MQ0F9HhPM2Ehm0/xOYh8TwJJiH2qachUjAPG1v4GFIfMGpvKJLQi8MsiqHcf+f7Gg4ngLA2/cDXtFqgG9o4XQU8oy6RWAB9BONpsG2HTtyAckxoc3HiWTD; 25:qpq8eUMrQA0z5s5RAyYGvy6gkp7wqlw6lmgBoNYvCNdRcDggo6zn4goSCTNjMssmCuUBTuMAYz+WHmjb7nOFbaUTA4yKUHiWgl8uH7uH2O7GbjcOW1UZGyHlpsdl9gI+oLg3+MYS4pp5eMElwzJvT+90rU11WWzqpB4ck7b2BphDAyE5Tey6hWmW6Y1ViIdFn9AH2ALuwXa8DyUyiCd6GS6bllvp1ip+f5tx2Ez8OV49A0NsfRiK0E6ppd/Lsz4SSw1gPN/Lrgfm/jg3BsfcltgBqPYERnm37YYhmJuczE0e1ONP122gdFV1gLOxOeK3TgH/CYkW0qj8tzmVHnxQHQ==; 31:p9hMRB1URdSB2Z7dIR46HBILE8TE7cdRrnbf3Z4tWyIIaiAsIRbsZig2iGsUzJyHr0PGHazKcEcmnLcWFv02wDxq9kQyZ0Erc/0keEqRm3Q/4VoQdHCDnlhYkEwvucnhtsH1cy+3cEEm7VZTNzuEulXFMQqY29AWhg9AzMNzGm0jpP+rmoPn8v84NtfVnsAg4Z4Alg5+EN79jn0Qe+PvPGTppJw3FLim7/IL0m4Acyg= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2034: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 20:8snjWaagHKLfVJGkjTi0xKg8/gqO8yC2jSQmoIkjbJmTOOidpI0IK5k85oYJKoOpkLVHxFCDfdZwu8NWT0vasK1yIJSi0/2IwIxUIcnvhJVMHJEUtozE2AAtP2Z+LXm7hTlT0gbWX1/wHzk0bpkB36WBN2jcnd6i3+4AE/qQpCWfiNm4ssHHq+SgEZRS8XNWsVNfPLziE/uvgAtzqJy3efPgfZg1MQcji7+NCu2PPMlCikEvjTr3sya7vUpS2qvBuuEqsrFNWJWw+0swIJ3sbuLUt4cJhG5dOWzPlxhJ1/hZMWk1TqBhE9z78tcBNW8M+lTzby2kYNcLcUiPsoQeqgf9HwBj0urDRR+9/0HCygP5GMBMdduVyvmWa9ND86paMhZZda2Xnda/GJyMOecmMPv+E09fMKeWqPlZ4wGGjUHyaR8WrOJdGlrZ3T9jtknJdv59EoRQlY0UIL0cORw59Jc+NpZdqUkiV+Eg+yTSZTkbsjlTGTQQgjLvqGV9cocC; 4:0o33DGjsJMP/HaIm4DR+sbgFIvWBQaBBtWyNHCx86EqsSAMTDC3yzffpERddXTRYXuibhtNAxXi0VpP3kwD4Yisv1c7SsXwoiY8BXQqgek7vzpjDC3BI9ZR09qN7eb0Sa0+3Blu3i1RurqSI1DscB8LMA6mh0sN/Di+oR1gKjmt/k+h754aECVJQZLIEPXIzS4ynGeHcJVjYC55yc7N/jH8oTGFUV6ImRMrfZiEjfuPwA8bVC2eLGnt34zK+5eT4VSFRyZFnwhhJ3t0iOfGQ9SVDRQLJTq6X6yto5e5z8LqOZ7p7Rjjk+siyfcO3LYwu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM5PR0501MB2034; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2034; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(396003)(39380400002)(39860400002)(199004)(189003)(186003)(97736004)(106356001)(53936002)(305945005)(105586002)(7736002)(55016002)(36756003)(21086003)(48376002)(16586007)(52116002)(25786009)(66066001)(26005)(47776003)(316002)(16526019)(51416003)(4326008)(59450400001)(50466002)(6666003)(3846002)(69596002)(2906002)(386003)(6116002)(76176011)(1076002)(5660300001)(8676002)(68736007)(81166006)(478600001)(81156014)(86362001)(7696005)(50226002)(8936002)(956004)(2616005)(486006)(11346002)(107886003)(446003)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2034; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2034; 23:5l/pKdIe2itCdkAx2EfiMt+SfejLCe5jRsQAICe?= =?us-ascii?Q?hF8pIa9bmtCECQOzrCRBkNQeeqV7O1KkrfhBy2yjV8u46tUweor/Iaqp4jEm?= =?us-ascii?Q?iVLCbV3/UjqHHxf14Sg34cva7OpyR4BteL5Q42Y0xyAF2nYdNw8C6RwygFDk?= =?us-ascii?Q?wMN0osxOMuJF2Ct5Q+4nnYg2QNlh/UNm6Cc1qGwRl2XLM/XLF/A2ifMDF9vU?= =?us-ascii?Q?+YvKaWkSdcObqWYYidn4CSohDM9natFgWH2o1bBefkDW58LopIIz2IYwrqwl?= =?us-ascii?Q?Uk3pyiestvlfmVz20EQwmMh3x1AO6r4CU7n9YvNr/qz21If5MA56T73fiVnJ?= =?us-ascii?Q?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WFXWs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2034; 7:vLqBITAvGQKplPFYnbAgrNngUNfbEfksOW94g1XU7Il8G8sIoup7u90juUkWediMO+uLXYLmSxkA0fEU711fyhNIE7zeyMRH28Oz9J9KrH3Bt6bb0BaBSNIxr/8lPU0x4RXmqRNr2MYEDmEWX+v7mYQC+r/BqEkFyZ9rREC0aihXaA2chsWGcDevhBrKexnfRkW71AwT8bNsxTyWS2iJSHSTk/m8ET2h3WNd4gHCU3LfPXIZqvDdksXPpheoH770 X-MS-Office365-Filtering-Correlation-Id: 07d69cd9-6ffe-4458-56df-08d5b59d519e X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 11:09:21.4537 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07d69cd9-6ffe-4458-56df-08d5b59d519e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2034 Subject: [dpdk-dev] [PATCH v2 0/4] net/mlx: add new Memory Region support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 11:09:25 -0000 This is the new design of Memory Region (MR) for mlx PMD, in order to: - Accommodate the new memory hotplug model. - Support non-contiguous Mempool. This patchset should be applied after: net/mlx5: change device reference for secondary process mem: add argument to memory event callback v2: * drop 'net/mlx5: trim debug messages for reference counters'. * remove unused functions - mlx5_mr_free() and mlx4_mr_free(). * add documentation for performance tuning. * replace IS_SINGLE_MR() with mlx5_mr_btree_len(). * fix a typo. Yongseok Koh (4): net/mlx5: remove Memory Region support net/mlx5: add new Memory Region support net/mlx4: remove Memory Region support net/mlx4: add new Memory Region support config/common_base | 2 - doc/guides/nics/mlx4.rst | 14 +- doc/guides/nics/mlx5.rst | 14 +- drivers/net/mlx4/Makefile | 4 - drivers/net/mlx4/mlx4.c | 26 + drivers/net/mlx4/mlx4.h | 45 +- drivers/net/mlx4/mlx4_mr.c | 1236 +++++++++++++++++++++++++++++++----- drivers/net/mlx4/mlx4_mr.h | 122 ++++ drivers/net/mlx4/mlx4_rxq.c | 19 +- drivers/net/mlx4/mlx4_rxtx.c | 35 +- drivers/net/mlx4/mlx4_rxtx.h | 85 ++- drivers/net/mlx4/mlx4_txq.c | 74 +-- drivers/net/mlx5/Makefile | 4 - drivers/net/mlx5/mlx5.c | 49 +- drivers/net/mlx5/mlx5.h | 32 +- drivers/net/mlx5/mlx5_defs.h | 15 +- drivers/net/mlx5/mlx5_ethdev.c | 16 + drivers/net/mlx5/mlx5_mr.c | 1305 +++++++++++++++++++++++++++++++------- drivers/net/mlx5/mlx5_mr.h | 117 ++++ drivers/net/mlx5/mlx5_rxq.c | 27 +- drivers/net/mlx5/mlx5_rxtx.c | 3 + drivers/net/mlx5/mlx5_rxtx.h | 123 ++-- drivers/net/mlx5/mlx5_rxtx_vec.h | 6 +- drivers/net/mlx5/mlx5_trigger.c | 25 +- drivers/net/mlx5/mlx5_txq.c | 28 +- 25 files changed, 2694 insertions(+), 732 deletions(-) create mode 100644 drivers/net/mlx4/mlx4_mr.h create mode 100644 drivers/net/mlx5/mlx5_mr.h -- 2.11.0