From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 20E7B2661 for ; Fri, 10 Aug 2018 11:07:08 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id o11-v6so1104523wmh.2 for ; Fri, 10 Aug 2018 02:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eErD+Q9ZsRM3yA7TjjxbED688cQ/+uRVx9MWjsH7XxQ=; b=rFAmi+03lRE+BGMuEru2FyMV4BbQAOEV5raU/K/jcQqlc2Qj8nkCrPPo4OcmUWhZLi 2rECytFG32Ktm3YtYq8SE8y+uuw8XDxPuRoBe6ywITkk/baeSl+pkF1nGRL5xL2MhGry 165IeRWZ+G96tpB0sDY9h23keRuD/Zizl+7qAPzdgxSVLC3icffo7VP8iLsKKNP6v4Ge qj4KHfZASvcQkmdhWzytewPHrq7OdIfBxENqM86GecAp98TpB5EyAI9Vm+saefCBdeDm nYvNsbGch6UH8LBSpua3Tk0l0a8lR4GXXAiberZct8I0oDRbRyo3hc8PEnLHuh5gKww5 bcQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eErD+Q9ZsRM3yA7TjjxbED688cQ/+uRVx9MWjsH7XxQ=; b=Q+sNqcp1ekfnz3xwI3mPE7RsqQOLt3O3uqfgMsyVtG6sV32BYXuLsha4llYNqoCPl9 WZPp49H75y/fPC5cp/J6qZn1DwpY7ApzMPeHRe8RLYYW0fr02oGt1U3fT3fVeB1+Kmh+ D1zxrIh0MLdyxhOmQyYpEI8D/ytdhWYMbijv0Tiw8W05OT+ALMXYz+gvUTCpDshqsSMV Io9cnOiEv8O4umE3o/TtJ8+WKZ9nE6gGhB2XMhgbSubO0IcAiBzYPCASjUiMrgxbxjuP QLgWt4pvQnQePQ/Jk2b/kUe9hAg6B/ZAvt+WSWe9+vEKJDF7iAR9ri96+RortsTANCZx 0ljA== X-Gm-Message-State: AOUpUlEVwyBpXudO2C0k/qh8/reb1oNsDIp8KBlpF2XN7csymA1qofX7 ZEMGj8jkiX8ic4WEn6L0kJo= X-Google-Smtp-Source: AA+uWPw96RiJBpTmkFDu47AigQeTPfsRhx8O0QAU+WRCYhT0nb1Ip/aVCm+jnAwE9r4cZ8yu1vlWdw== X-Received: by 2002:a1c:7d47:: with SMTP id y68-v6mr875293wmc.62.1533892027823; Fri, 10 Aug 2018 02:07:07 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id d18-v6sm670510wmb.33.2018.08.10.02.07.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Aug 2018 02:07:06 -0700 (PDT) From: luca.boccassi@gmail.com To: Pablo de Lara Cc: Petr Houska , dpdk stable Date: Fri, 10 Aug 2018 10:06:22 +0100 Message-Id: <20180810090627.28295-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180806105619.24253-1-luca.boccassi@gmail.com> References: <20180806105619.24253-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'hash: fix doxygen of return values' has been queued to LTS release 16.11.8 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 09:07:08 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From b785d6d5d2448c0f91ec489c34df1a440166d1fc Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Tue, 7 Aug 2018 03:00:04 +0100 Subject: [PATCH] hash: fix doxygen of return values [ upstream commit f9975d333a8d51e4c15961f56a554914288768aa ] rte_hash_lookup_data() and rte_hash_lookup_with_hash_data() functions return the index of the table where the key is stored when this is found, and not 0 as the Doxygen currently states. Also, these functions, and rte_hash_get_key_with_position() return negative values when keys are not found (-EINVAL and -ENOENT), where the minus sign was missing. Bugzilla ID: 78 Fixes: 473d1bebce43 ("hash: allow to store data in hash table") Fixes: 6dc34e0afe7a ("hash: retrieve a key given its position") Reported-by: Petr Houska Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_hash.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index f29de81aec..8da2afa3f5 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -283,8 +283,8 @@ rte_hash_del_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t * Output containing a pointer to the key * @return * - 0 if retrieved successfully - * - EINVAL if the parameters are invalid. - * - ENOENT if no valid key is found in the given position. + * - -EINVAL if the parameters are invalid. + * - -ENOENT if no valid key is found in the given position. */ int rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position, @@ -301,9 +301,11 @@ rte_hash_get_key_with_position(const struct rte_hash *h, const int32_t position, * @param data * Output with pointer to data returned from the hash table. * @return - * 0 if successful lookup - * - 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 + * 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. + * - -ENOENT if the key is not found. */ int rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data); @@ -322,9 +324,11 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data); * @param data * Output with pointer to data returned from the hash table. * @return - * 0 if successful lookup - * - 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 + * 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. + * - -ENOENT if the key is not found. */ int rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key, -- 2.18.0