From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00103a01.pphosted.com (mx0a-00103a01.pphosted.com [67.231.144.234]) by dpdk.org (Postfix) with ESMTP id D2D428D8D for ; Tue, 22 Sep 2015 00:34:11 +0200 (CEST) Received: from pps.filterd (m0000419.ppops.net [127.0.0.1]) by mx0a-00103a01.pphosted.com (8.14.5/8.14.5) with SMTP id t8LMUcBc002195 for ; Mon, 21 Sep 2015 18:34:10 -0400 Received: from vawvcgsie2k1302.ciena.com (LIN1-118-36-36.ciena.com [63.118.36.36]) by mx0a-00103a01.pphosted.com with ESMTP id 1x2mn71d1c-3 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 21 Sep 2015 18:34:10 -0400 Received: from MDWEXCHCGSIHT01.ciena.com (10.4.140.106) by VAWVCGSIE2K1302.ciena.com (10.4.62.16) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Mon, 21 Sep 2015 18:34:08 -0400 Received: from ONWVEXCHHT02.ciena.com (10.128.6.17) by MDWEXCHCGSIHT01.ciena.com (10.4.140.106) with Microsoft SMTP Server (TLS) id 8.3.389.2; Mon, 21 Sep 2015 18:34:07 -0400 Received: from ONWVEXCHMB01.ciena.com ([10.128.6.18]) by ONWVEXCHHT02.ciena.com ([::1]) with mapi; Mon, 21 Sep 2015 18:34:07 -0400 From: "Yeddula, Avinash" To: "dev@dpdk.org" , "Bly, Mike" Date: Mon, 21 Sep 2015 18:34:05 -0400 Thread-Topic: DPDK hash function related question Thread-Index: AdD0vV0EWrwqSA3rT+Ksi8qmzYCTyw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.000.1202-21828.005 X-TM-AS-Result: No--9.833800-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-09-21_08:2015-09-21,2015-09-21,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1508030000 definitions=main-1509210318 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] DPDK hash function related question X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 22:34:12 -0000 Hello All, I'm DPDK extensible bucket hash in the rte_table library of packet framewor= k. My question is related to the actual hash function that computes the has= h signature. All the available examples have initialized it to test_hash. I do not see= any hash function available in rte_table library , that computes the actua= l signature struct rte_table_hash_ext_params hash_table_params =3D { .key_size =3D TABLE_ENTRY_KEY_SIZE, .n_keys =3D TABLE_MAX_SIZE, .n_buckets =3D TABLE_MAX_BUCKET_COUNT, .n_buckets_ext =3D TABLE_MAX_EXT_BUCKET_COUNT, .f_hash =3D test_hash, .seed =3D 0, .signature_offset =3D 0; .key_offset =3D __builtin_offsetof(struct metadata_t, tbl_key), }; So, I wanted to use hash functions from DPDK rte_hash library. This is what= I'm doing and looking at the code this looks ok to me. I'm at least a week or 2 away from testing this part of the code. I wanted = to confirm that, there is no fundamental flaw in using the DPDK rte_hash li= brary and rte_table library like this. Could someone confirm this please ? #define DEFAULT_HASH_FUNC rte_hash_crc struct rte_table_hash_ext_params hash_table_params =3D { .key_size =3D TABLE_ENTRY_KEY_SIZE, .n_keys =3D TABLE_MAX_SIZE, .n_buckets =3D TABLE_MAX_BUCKET_COUNT, .n_buckets_ext =3D TABLE_MAX_EXT_BUCKET_COUNT, .f_hash =3D DEFAULT_HASH_FUNC , .seed =3D 0, .signature_offset =3D 0; .key_offset =3D __builtin_offsetof(struct metadata_t, tbl_key), }; Thanks -Avinash