From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E03E7A04AB; Fri, 8 Nov 2019 07:38:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA9501BEF4; Fri, 8 Nov 2019 07:38:02 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150077.outbound.protection.outlook.com [40.107.15.77]) by dpdk.org (Postfix) with ESMTP id 71D301BEEA for ; Fri, 8 Nov 2019 07:38:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6PvE8ANFiG0hkXa/c98WITeqQFH6C8M3gxUf+Z+FnBAPkNz55+s1E377KS74RDIawtXYTWyZviYBePXHwcADNW0hpQNVEAhC5t5ZlF6o+xZTQnLuhNZrduyAtgojhcrUJ/0lzDm4j0ywSQKzMU/RjNBktTJdhr8IsvHPLHc9sm0z3sBvzjfkoGDENWv7TdsiBmUkEz2wFSYTP2FpFwhK6nS3BAPYMUkFnRt62qAWtKUPnn5IkvsZID/gB9tDKmGS5atsbiw1RSWsNvZtjhYOC0obfcT1aPfS2dqUchS+sBe6x1rnHIy7V+psm0SnitBR5+FF+ZFZNFOe45oD+XAug== 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=GOqt31iZBgHu9nY8SVk68YNutWo6zb+Emumotp57y78=; b=DhOWEBTaZ1pUHE/cUq/gAOt0lgZmsDCl+qnC2d3FUQFGpB5JvbKCZ2eZW/Iqr5dgaR/VjydTNynE5u9k1JJ6yu0RPot4tgnRZKNKeIFanZEHY/ZwOLIpsN6CQ/vXEEwC+d6nnrigYBRVZiQHerCzsp9YbZo1NjVhOVn3fX8hVhlySNaNz6iEsDo7KUTxSDxuzJWicbkXVh2UZDRQchzF0nKennmhkHAS3x2mbfKJK8v9U6v9dl3d0NVmTFhNxDgBG6SJRbPQKwPjDxaK5NpTJxMwXTWbGqfAh2/pmguGKgX8Q2RSD+Vj/HEL0/ZB1caiG9Rz33KbIhdeRjJAq8JaLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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:X-MS-Exchange-SenderADCheck; bh=GOqt31iZBgHu9nY8SVk68YNutWo6zb+Emumotp57y78=; b=hg3nkrE38Jh4m25E1LA5ZmR32M/YXaT3DbX6E4ccQ8pgScm4mXvurATGVzVYz7bVdodI4nfZTpNOADWTMhypcRrsBWKzNSNcC/u8vF43GkRXY8/x1qqDd864qEH2wDTxWj36M53UA8o355kJmoo4PK3juV+1iU5XhUsWxTvknyY= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3460.eurprd05.prod.outlook.com (10.171.187.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 8 Nov 2019 06:37:54 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::9940:94f2:db23:aa2c]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::9940:94f2:db23:aa2c%4]) with mapi id 15.20.2430.023; Fri, 8 Nov 2019 06:37:54 +0000 From: Slava Ovsiienko To: Bing Zhao CC: Ori Kam , Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [PATCH 0/3] Reorganize resources of flow tables Thread-Index: AQHVle9PCyy0x0NFiEyMZMQS3JNuIaeA0ijw Date: Fri, 8 Nov 2019 06:37:53 +0000 Message-ID: References: <1573188297-51428-1-git-send-email-bingz@mellanox.com> In-Reply-To: <1573188297-51428-1-git-send-email-bingz@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=viacheslavo@mellanox.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f917069c-6f97-46ae-0c30-08d764162f50 x-ms-traffictypediagnostic: AM4PR05MB3460:|AM4PR05MB3460: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0215D7173F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(396003)(136003)(346002)(366004)(13464003)(199004)(189003)(31014005)(76176011)(71200400001)(71190400001)(8676002)(2906002)(256004)(6246003)(25786009)(6862004)(486006)(4326008)(6436002)(229853002)(33656002)(66066001)(476003)(9686003)(446003)(26005)(102836004)(6506007)(64756008)(7696005)(66446008)(66556008)(66946007)(53546011)(316002)(76116006)(6636002)(8936002)(11346002)(54906003)(86362001)(99286004)(55016002)(74316002)(305945005)(14444005)(81166006)(66476007)(186003)(7736002)(81156014)(3846002)(52536014)(6116002)(14454004)(5660300002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3460; H:AM4PR05MB3265.eurprd05.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: naZsGISA6u7aVsI5Rxkcjsp/GZTep2Op0DYTfv4JzzuFBKuTUdx3OJMLeIWKieiLHHj7MzxxKk/ivNfRbcOV9XD2rf9+M5ZamDjdN04PWK1ICLJr6Hrp5Wy3tJwYlhi3tXCxQFtH4voLkteasiFfD9bLfF5f+ZHnJOKmGvx1N6dYMWtUwnfbnslbyYrn15FQYj7ri9TFy//JZP2fpc9ARmwYiInfU8VIlnwvJu+DBGobEwCDKTp7w40PrS94MDmkxyT9/nM5MUxhdt2V2Y8gO6tgyDTLxKjiDX5M+wcCsD06+5GgCeUOAzkIwjF8yeF6BfonNRk9bILTdaUilVyG7inlAvLXKQ2zze789aopQkxy3nR2BZT3yTVAIVd3JOE7v+R85eDu/uiXcxySbbJjR4b74oEUuW4kbujVPIwO7xbZcgWwf6MA4TcuQiHilbMq Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f917069c-6f97-46ae-0c30-08d764162f50 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 06:37:53.9829 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OBir5hJJzutoyAqr0+xGpqlxojlhfoEUOeDfzz3KMdEzMOH7FArmqmNxrKuHN43Hf2AugxquwNVzxkfEkZ4JeZtlJC5k+tRnkajF2QXCNLQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3460 Subject: Re: [dpdk-dev] [PATCH 0/3] Reorganize resources of flow tables 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Bing Zhao > Sent: Friday, November 8, 2019 6:45 > To: Slava Ovsiienko > Cc: Ori Kam ; Raslan Darawsheh > ; dev@dpdk.org > Subject: [PATCH 0/3] Reorganize resources of flow tables >=20 > Number of flow tables is limited by the memory resource, and the index > could be to as large as 2^^32 - 1. In the past, the flow tables are organ= ized > by arrays, and this organization has some advantages and disadvantages. > The lookup for the table resource from a linear array is quite fast, the = ID > could be used as the index in the array. But it will cost some extra memo= ry > resource after system bring up and if only a small number of tables are > created. In the meanwhile, since we could not create the array with a hug= e > number, so the maximal index of the table is limited and it is unreasona= ble. > If we change the array into some other tables, like some open addressing > hash table, the static memory cost is still to huge. But the index of the= table > limitation could be get rid of. But in the meanwhile, it will introduce s= ome > new issue that two tables with different ID may generate the same address > index in the table. Then it will degrade the performance of the lookup, > creating and deleting. Moreover, sometimes it will cause a failure if the > collisions rate are too heavy. > Then the simple hash list is used as the first step to get rid of this li= mitations. > The only static memory over head is array of the LIST HEADs. In the next > step, we could use some extendable hash tables for this. This will of cou= rse > introduce some performance degradation when lookup, creating and > removing tables in the lists if there are a lot of tables created in the = system. > We need to trade off among the functionality, memory and performance. > Some other resources are associated with each flow tables and not global, > like flow matchers and jump table object used by driver. They could also = be > reorganized and put into the flow table resources structure. Then the loo= kup > process of these resources will be speeded up significantly. >=20 > Bing Zhao (3): > net/mlx5: reorganize flow tables with hash list > net/mlx5: reorganize jump table resources > net/mlx5: reorganize flow matcher resources >=20 > drivers/net/mlx5/mlx5.c | 16 +++ > drivers/net/mlx5/mlx5.h | 25 ++-- > drivers/net/mlx5/mlx5_flow.h | 24 ++-- > drivers/net/mlx5/mlx5_flow_dv.c | 307 +++++++++++++++++++++++---------- > ------- > 4 files changed, 224 insertions(+), 148 deletions(-) >=20 > -- > 1.8.3.1 Acked-by: Viacheslav Ovsiienko