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 B505FA04A3; Tue, 5 Nov 2019 19:49:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0C031BF68; Tue, 5 Nov 2019 19:49:31 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30054.outbound.protection.outlook.com [40.107.3.54]) by dpdk.org (Postfix) with ESMTP id 40D891BF51 for ; Tue, 5 Nov 2019 19:49:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DZbMoCuj2cLMG2ArMEnJDXKXzMwR40WDi0v4cSLvRw9smkzJqBu61+xEvAsb6IZv4VncgAJi/BeAbkTpb1Wno5hBpRvYn8NlRycY9nXGZAxcJdoUp4FugROkZ+ebt3bcka+4PS5wlkmHndhphaA7k8mIwjjoS6il3057qKgU4uGs8UNOXQC9Kl3n+br/UMWUVtSs6AFTAdOOku0rvVWaNqkjiezl+VikmtNL3UBpd6wX88tdWh9bg8segnHEaoygKEJOvzxX1WUCnrJVcQJSL/NU1RmkfrLlpt8NihZZ+77IDQkZXztVOL/ejnqn1qc5Nrqrls03DSKOb21OaUoLXQ== 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=U7ZaJxcIUJUaHJDJq1sa/KJIr3Il5UZRo31xzDQjQKI=; b=YIVZAIHYWM0MLQtdh+No6WUtwCB1WP6K9Y9k8xEdCB0I7pHNwq1L7pMsJJFmZen62jTChSpqzL8ZQIBFrwhEopTdQj3G5RK6m5HmTooLlqGii7Kdc2tXiJKoORbA8TDDGUSB7ExEaT2ft8+FmphjrnDs4Coj9MIivx/QKvNhU0V46A4Oc0dHL/f9UmJch5RNvQnsZvr1l2wgpwbiIGlAvi7ccvyFVm8YHzHiHzp/SQB/kKcxQ2j3mErXkHuYPkIf/mKi57IOIXpzAQ/CKu5fs/rT0TDUGvzU7Z36dSn/odUVC0I7FAXy36FFrHL2lPhCCWZteEvx0cDD8xLg19tO3w== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U7ZaJxcIUJUaHJDJq1sa/KJIr3Il5UZRo31xzDQjQKI=; b=BGQDPbSsGxxEBvThM2TtD2I1bx526qci8gp5FwRwG5HOnai4r7YqzX/ynlm7yKcG+hJmxiBTllRc75E5QvUxxsJVGH2j6DpIWakPNuvNr63zV3dicabfeALHZ3Vvu0fYJ+ad46b79447B7WR9re47bUGjdMUKouvsGRcRf9lWP4= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3185.eurprd05.prod.outlook.com (10.171.188.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Tue, 5 Nov 2019 18:49:29 +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.2408.024; Tue, 5 Nov 2019 18:49:29 +0000 From: Slava Ovsiienko To: Stephen Hemminger , Bing Zhao CC: Ori Kam , Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: introduce mlx5 hash list Thread-Index: AQHVk+2hhBHtZYKbK0qrE1Jzz4dDFKd80uyAgAAWlEA= Date: Tue, 5 Nov 2019 18:49:29 +0000 Message-ID: References: <1572967680-93338-1-git-send-email-bingz@mellanox.com> <20191105092059.25770f57@hermes.lan> In-Reply-To: <20191105092059.25770f57@hermes.lan> 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: 158cba61-2061-4573-3f7b-08d76220e3dd x-ms-traffictypediagnostic: AM4PR05MB3185:|AM4PR05MB3185: 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:8273; x-forefront-prvs: 0212BDE3BE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(136003)(39860400002)(346002)(396003)(189003)(199004)(13464003)(66066001)(71200400001)(66446008)(476003)(66476007)(478600001)(7696005)(99286004)(74316002)(316002)(7736002)(305945005)(4326008)(6246003)(25786009)(8676002)(54906003)(81166006)(81156014)(110136005)(5660300002)(76176011)(66946007)(52536014)(71190400001)(9686003)(86362001)(14454004)(55016002)(33656002)(486006)(8936002)(6116002)(6506007)(446003)(11346002)(2906002)(66556008)(14444005)(256004)(64756008)(53546011)(102836004)(26005)(6436002)(229853002)(3846002)(76116006)(186003)(6636002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3185; H:AM4PR05MB3265.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: r7+F2DrtzYPEF3OtFOvziBZf8KEfZYvuz+/eRZOWfUo4KRrrNDPhHQCtQsTfwN+JOFnmfO9Av47m/bVrRM/sAIsEoEsEkbeci53WXM6RAidLWu9xGV/XytXz/mVT+r1Piei9Wk1B22pVvjChd3wIorJ6C6+a77h4gUQSTNJwlETKuL+siMNcmvpRh8eXZfc7nfN4P2pKx6c0ZVhBScr8GpJatL05JBf3uFTMBSQrthhyG59B+Z+7C2qYfSkZZDatrQ28WjmisttiAwuyo95jzm3pzMk3S7HO+nIYmVf3siKoUr0yUqf20ovb2nDyU4huO2hbPftuR+v6PGQKfNIYX3b3vd8p74U8Ow8jb92GQibKiCKNmkuH+DLP5x5qn8CN+ZYsKlwUXxy8Y8JlJFPZMhatbjnedO0pPPy/rf9MJpyVEo6JwiQm9oTDk6wOjnjS 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: 158cba61-2061-4573-3f7b-08d76220e3dd X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2019 18:49:29.6608 (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: wVwCtywrA5MuQf6ekB/vtv9bP9qzD3S2VMrOIyojE+WqRnztQi406GpK2bch5S7/hzL4idEJQl8ULGmakhLrmMNziMzD3CEyhHoxWHvX6B0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3185 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: introduce mlx5 hash list 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: Stephen Hemminger > Sent: Tuesday, November 5, 2019 19:21 > To: Bing Zhao > Cc: Ori Kam ; Slava Ovsiienko > ; Raslan Darawsheh > ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/mlx5: introduce mlx5 hash list >=20 > On Tue, 5 Nov 2019 17:28:00 +0200 > Bing Zhao wrote: >=20 > > Introduce simple hash list to the mlx5 utilities. User can define its > > own data structure containing the mlx5_hlist_entry and create the hash > > list table via the creation interface. Then the entry will be inserted > > into the table and linked to the corresponding list head. User should > > guarantee there is no collision of the key and provide a callback > > function to handle all the remaining entries in the table when > > destroying the hash list. User should define a proper number of the > > list heads in the table in order to get a better performance. The LSB > > of the 'key' is used to calculate the index of the head in the list > > heads array. > > This implementation is not multi-threads safe right now. > > > > Signed-off-by: Bing Zhao >=20 > There is already a plethora of hash routines in DPDK, why introduce a > chained hash list like Linux kernel? We have multiple features in mlx5 requiring the run-time extendable storage= . For example, application/user might not know how many Flows are going to co= me into play, it is not nice to allocate gigabytes at startup, assuming some f= ixed upper limit (10M+). Simple lists (used before) are too slow, update the DPDK Cuckoo to be scale= d is not trivial and requires some time, so - simple hashed list seems to be acceptable pal= liative for now. With best regards, Slava