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 4E0B7A04B4; Fri, 8 Nov 2019 16:56:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D38F31C1D5; Fri, 8 Nov 2019 16:56:49 +0100 (CET) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00084.outbound.protection.outlook.com [40.107.0.84]) by dpdk.org (Postfix) with ESMTP id 0405F1C1BA for ; Fri, 8 Nov 2019 16:56:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6vAONmTF5tQxSLXbvAuseLGRPmm1FYW/cpP9rywgDUv5k3oClW2sIaDkUOBiZye6EO77jq7HUixf8n2p0m1sPO3NoYCXjQkV9jetjgSiyBui9MofG+BCB2tQYmo+9VZ/GhkRrYEuPA9mJXmftlZxS/qA3cqz4/2QTHq+pz22sSiMockg1lNzH79hA9rOhaRK79LKolKF5hmIdqWZlCVKrgqPorkbK4v76cLKmEYE1M0A2BkHBqWVp/KNM8Fw7jcyDYHgXGN9YfrAbV19t+urSJ0Tp+SVIPLpxW4jSspJlQqH5xrFwS3Yw0QnZiTP4yml+eGG8f8d4Lmh9QLW+96Vw== 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=EY3qESr1pyCviVVeDJg4y8KXTYpblsgEocAC2ntvMGM=; b=ofCQqOo4gSvSA05ByuHe2K2U8Pds+5+fKNjXO1EKW+EUKIjSaEfQa3vBmAIeiovStVopJUpnOXuyDmYj+8s6wWQIyP2LWykRnGFcfNXDs+Jx11Bq6a74Nir3kxSbyUoM2cjC/zLn6Axg7DiNOMw7qG2Wuewpl/JoLVFm8ZFPyLzz0VP8pMrSRSdKtsJAQ4G/+wz4s8KAn08GLuAChVMgxkSxnIf1TttNwqv0QFef0V/K9apC7tq1QUlP2I5dk37DR07EaUT9lYIZiMdX7ejj2Exqglvgv2N4I4RfxnLucubjvifLsszC+9kbrYxghSSaB7ZDuKt3DJytvNntsQYg9w== 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=EY3qESr1pyCviVVeDJg4y8KXTYpblsgEocAC2ntvMGM=; b=Z40gtR7UGs6Og3J/+hIi02ECn8dQkLJP+vcabMNqx5aKZMdbRGYBUGsIRiwEMOVjU4AlMI4ideeV6E5tQacnNdcZbiKqIGsTfq2TeDCyCrFuxV+VCP7g+KXF/D2nfUgNmIXR+rvX9MNGUpn/S6UKZZiWSugUWpTb7MtMdRbf8Ns= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4041.eurprd05.prod.outlook.com (52.134.66.31) 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 15:56:47 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::a850:bac9:c90f:f2f5%6]) with mapi id 15.20.2408.028; Fri, 8 Nov 2019 15:56:47 +0000 From: Raslan Darawsheh To: Bing Zhao , Slava Ovsiienko CC: Bing Zhao , Ori Kam , "dev@dpdk.org" Thread-Topic: [PATCH v2 0/3] Reorganize resources of flow tables Thread-Index: AQHVlkhxhA5cx006ukKEtPYEoCHexaeBbUuQ Date: Fri, 8 Nov 2019 15:56:47 +0000 Message-ID: References: <1573188297-51428-2-git-send-email-bingz@mellanox.com> <1573226590-69757-1-git-send-email-bingz@pegasus02.mtr.labs.mlnx> In-Reply-To: <1573226590-69757-1-git-send-email-bingz@pegasus02.mtr.labs.mlnx> 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=rasland@mellanox.com; x-originating-ip: [188.161.230.21] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 94871bed-8f69-4b76-621d-08d7646442e0 x-ms-traffictypediagnostic: DB3PR0502MB4041:|DB3PR0502MB4041: 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)(346002)(39860400002)(366004)(136003)(376002)(396003)(31014005)(13464003)(189003)(199004)(9686003)(316002)(76116006)(11346002)(66946007)(55016002)(71190400001)(71200400001)(6436002)(486006)(66556008)(3846002)(4326008)(52536014)(229853002)(6506007)(33656002)(26005)(8936002)(66446008)(186003)(86362001)(64756008)(6116002)(478600001)(476003)(53546011)(446003)(66476007)(5660300002)(256004)(305945005)(2906002)(66066001)(74316002)(6636002)(102836004)(99286004)(7696005)(14444005)(110136005)(54906003)(25786009)(8676002)(76176011)(7736002)(6246003)(14454004)(81166006)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4041; H:DB3PR0502MB3964.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: ZazFXIl6I+Fz0YSiat8SgxTKquZuJOCLz55rz81SSpNkie3mEZiJb6nd3cJkQbUABzKsyS+VoZDLAF/030xLoX7bD+u+iN35agWoytQD0HMxMqlzYBUNEXV6hKTq1S1/LDKMy/iFtQQlMOEAE8aazcnWsSR9jov3HuyKYEzFzTv/WNSUJl8umXHV3h6q7QHfQ9Ta8/tLoIjxDt9gmHkb/Hu/+x5Tu3CPkqhcUQpu8DIF1v4xclN361cBcmLqVK0U3iX41i/lguSL+wudKwKIBgEwFmNYV5+m5PhUmIC0s8EBBGmL7CeLRgMLn43ZOnK25J24oFEbghdGp2Er04M/lQ3e2c6zfWd3f/rl37XAsT5xGCH+yiR/BBLXXX0HZsCsZkSPh3Mnk8QIoD5X5HOAW58mEZSwCy55wvX3iGJb0ZGgSkppemchF+JPuR87vz5N 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: 94871bed-8f69-4b76-621d-08d7646442e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 15:56:47.6483 (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: N+4B+kVvuFwQ7u6IHR2SYfSUFhxFVj5D5Pa6+gc4c1/ZA2mihX8RKK1kxCUhNkUU/768MFzAdwPpfTiTW1zo3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4041 Subject: Re: [dpdk-dev] [PATCH v2 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" Hi, > -----Original Message----- > From: Bing Zhao > Sent: Friday, November 8, 2019 5:23 PM > To: Slava Ovsiienko > Cc: Bing Zhao ; Ori Kam > ; Raslan Darawsheh ; > dev@dpdk.org > Subject: [PATCH v2 0/3] Reorganize resources of flow tables >=20 > From: Bing Zhao >=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 c= ould be > used as the index in the array. But it will cost some extra memory resour= ce > after system bring up and if only a small number of tables are created. I= n the > meanwhile, since we could not create the array with a huge number, so the > maximal index of the table is limited and it is unreasonable. > 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 | 316 +++++++++++++++++++++++------- > ---------- > 4 files changed, 230 insertions(+), 151 deletions(-) >=20 > -- > 1.8.3.1 Added missing: Acked-by: Viacheslav Ovsiienko Removed wrong Signed-of-by signature. Series applied to next-net-mlx, Kindest regards, Raslan Darawsheh