From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 223D2A0552; Mon, 27 Jun 2022 15:13:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9DEA40691; Mon, 27 Jun 2022 15:13:29 +0200 (CEST) Received: from smtpbg.qq.com (smtpbg136.qq.com [106.55.201.188]) by mails.dpdk.org (Postfix) with ESMTP id 824AA40685 for ; Mon, 27 Jun 2022 15:13:27 +0200 (CEST) X-QQ-mid: bizesmtp83t1656335592t94clrga Received: from localhost.localdomain.localdoma ( [119.253.39.22]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 27 Jun 2022 21:12:29 +0800 (CST) X-QQ-SSF: 01300000002000C0Z000B00A0000000 X-QQ-FEAT: hVuyUuf8UtuLko7wufegvgFbuo0HKpsqsfKhxY7hJka0AIexwLrW9esdBNstw icRwlaQY2Z0BIK0PnOg0dFDcUayXQN4SYdpzZqWN+AZiCYQye81OcQGRpqJqGMttroNz8Mc nSZ2ETUN8HwPKG/O/Qlx4ZdQ75d4fRhbONDVyxl07eop1lev7u8PsZImjzFQEQWVX2b4P41 D57QUy86G4nT8M9NWDiVF/9vb2WJxDBCJa2lVSVt0kY4girALG0HPsOk1piwLbuyfHH0Zl1 te1cw0bRxcTQezM/9SchoG4qXQe9q/L1eCIZwGmCnFMkta5XpHLt5Pv1xKcfasIpoI1Q== X-QQ-GoodBg: 0 From: Chenming C To: dev@dpdk.org Cc: yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, vladimir.medvedkin@intel.com Subject: [PATCH] lib/hash: fix the return value description of rte_hash Date: Mon, 27 Jun 2022 21:11:21 +0800 Message-Id: <1656335481-238112-1-git-send-email-ccm@ccm.ink> X-Mailer: git-send-email 1.8.3.1 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:ccm.ink:qybgspam:qybgspam7 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The rte_hash lookup can return ZERO which is not a positive value. Signed-off-by: Chenming C --- lib/hash/rte_hash.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h index 7fa9702..1bf1aac 100644 --- a/lib/hash/rte_hash.h +++ b/lib/hash/rte_hash.h @@ -288,7 +288,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOSPC if there is no space in the hash for this key. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key. This * unique key id may be larger than the user specified entry count * when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set. @@ -312,7 +312,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOSPC if there is no space in the hash for this key. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key. This * unique key ID may be larger than the user specified entry count * when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set. @@ -343,7 +343,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOENT if the key is not found. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. */ @@ -375,7 +375,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOENT if the key is not found. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. */ @@ -442,7 +442,7 @@ struct rte_hash * * @param data * Output with pointer to data returned from the hash table. * @return - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. * - -EINVAL if the parameters are invalid. @@ -467,7 +467,7 @@ struct rte_hash * * @param data * Output with pointer to data returned from the hash table. * @return - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. * - -EINVAL if the parameters are invalid. @@ -490,7 +490,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOENT if the key is not found. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. */ @@ -512,7 +512,7 @@ struct rte_hash * * @return * - -EINVAL if the parameters are invalid. * - -ENOENT if the key is not found. - * - A positive value that can be used by the caller as an offset into an + * - A non-negative value that can be used by the caller as an offset into an * array of user data. This value is unique for this key, and is the same * value that was returned when the key was added. */ -- 1.8.3.1