From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from MX1.argela.com.tr (mail.argela.com.tr [95.0.156.7]) by dpdk.org (Postfix) with ESMTP id 4FCA74CB3 for ; Tue, 2 Oct 2018 21:20:42 +0200 (CEST) Received: from MX1.argela.com.tr (192.168.0.25) by MX1.argela.com.tr (192.168.0.25) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 2 Oct 2018 22:20:40 +0300 Received: from MX1.argela.com.tr ([fe80::4c2:c7b4:5114:a25d]) by MX1.argela.com.tr ([fe80::4c2:c7b4:5114:a25d%12]) with mapi id 15.00.1347.000; Tue, 2 Oct 2018 22:20:40 +0300 From: Ali Volkan Atli To: Pavel Chuprikov CC: "users@dpdk.org" Thread-Topic: [dpdk-users] How to find an IPv4 and IPv6 hash function Thread-Index: AQHUWYN03cpAYpBZ8U61f6Qg4JJCt6UMBnYAgABPl0E= Date: Tue, 2 Oct 2018 19:20:39 +0000 Message-ID: <16bf9ae8c8b34297b76018c92f910c29@MX1.argela.com.tr> References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [176.40.255.168] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] How to find an IPv4 and IPv6 hash function X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2018 19:20:42 -0000 First of all, thanks you Pavel Actually I didn't ask the question properly. I have already used the l3fwd = application as basis for 5-tuple "flows" in my application. Now I just need= a data structure to keep 32-bit IPv4 address or 128-bit IPv6 address, just= one IP address. I can use jenkins hash, murmurhash, fast fibonacci etc.. A= lso I have just found out that DPDK has the jenkins hash functions. Before = asking the question to this e-mail group, I was thinking of why I did not u= se a dynamic array for 32-bit IPv4 address instead of hash table. Thus I co= uld fetch the data in one shot. It still makes sense but of course it doesn= 't work for IPv6. Anyway I asked the question here because DPDK library des= igned for network and maybe someone could suggest a paper, blog, a DPDK API= for just one IP-based data-structure.=20 I apologize if the e-mail group is the wrong place. Best regards - Volkan ________________________________________ From: Pavel Chuprikov [pschuprikov@gmail.com] Sent: Tuesday, October 2, 2018 8:32 PM To: Ali Volkan Atli Cc: users@dpdk.org Subject: Re: [dpdk-users] How to find an IPv4 and IPv6 hash function Hi, The l3fwd application [1] might serve as a starting point and in particular= l3fwd_em.c [2]. [1]: http://doc.dpdk.org/guides/sample_app_ug/l3_forward.html [2]: http://doc.dpdk.org/api/examples_2l3fwd_2l3fwd_em_8c-example.html Hope it helps, Pavel =D0=CE, 1 =CF=CB=D4. 2018 =C7. =D7 14:37, Ali Volkan Atli >: Dear DPDK users I am trying to write a code to monitor user data traffic by using DPDK. Eac= h user has one IP address which can be IPv4 or IPv6. Therefore I'm thinking= of creating two hash tables for IPv4 and IPv6. The key of these hash table= s will be an IPv4 or IPv6 address and the data of these hash tables will be= user traffic (uplink and downlink) First, is there any API, example etc.. to calculate IPv4 hash and IPv6 hash= on DPDK library? If not, does anyone know where I might find any paper or = writing how I can calculate IPv4 and IPv6 hash? Also is there a more approp= riate data structure than the hash table for the problem? Thanks in advance. - Volkan