From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id 9D33F5F36; Mon, 6 Aug 2018 18:49:21 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Mon, 06 Aug 2018 16:49:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: doc X-Bugzilla-Version: 18.05 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: t-pehous@microsoft.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 78] Mismatch between return value and documentation for `rte_hash_lookup_data` (cuckoo hashing implementation) 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: , X-List-Received-Date: Mon, 06 Aug 2018 16:49:21 -0000 https://bugs.dpdk.org/show_bug.cgi?id=3D78 Bug ID: 78 Summary: Mismatch between return value and documentation for `rte_hash_lookup_data` (cuckoo hashing implementation) Product: DPDK Version: 18.05 Hardware: All OS: All Status: CONFIRMED Severity: minor Priority: Normal Component: doc Assignee: dev@dpdk.org Reporter: t-pehous@microsoft.com Target Milestone: --- Documentation for `rte_hash_lookup_data` specifies that this method returns= 0 on successful data lookup or positive error code on not-found / wrong parameters. In reality it returns positive index of found data on success = and negative error on error, in essence it behaves the same as (i.e. the same = as=20 rte_hash_lookup while also (correctly) populating the data pointer). rte_cuckoo_hash.c: 733 ```c int rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data= ) { RETURN_IF_TRUE(((h =3D=3D NULL) || (key =3D=3D NULL)), -EIN= VAL); return __rte_hash_lookup_with_hash(h, key, rte_hash_hash(h, key), data); } ``` Rte_cuckoo_hash.c: 693 ```c static inline int32_t __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key, =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 hash_sig_t sig, void **data) { ... /* * Return in= dex where key is stored, * subtracti= ng the first dummy index */ return bkt->key_idx[i] - 1; ``` DPDK version 18.05 release. --=20 You are receiving this mail because: You are the assignee for the bug.=