From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30083.outbound.protection.outlook.com [40.107.3.83]) by dpdk.org (Postfix) with ESMTP id CA9B844C3 for ; Mon, 13 Aug 2018 22:43:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZrKmrHYr1wIOeXDG27JYjpJvPYdkXYE5OclPhqi6yrw=; b=bj4PlX/b3ocpj5V6rOGfhL2Y+eXr6Yh+djFunLRatjrbrMBlmOS17FoGHrWN16AOnpPsaLxQiPZwwU07gBjG1fDqLIxA8Hm9rXo7mhYI5lAYtdNmnJwjgBl1HJQGHwnVgiv2Gac1iJwG1Hp7nxgP4+OZmlsFAWYYrApyeiJk8Pc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by AM6PR0502MB3975.eurprd05.prod.outlook.com (2603:10a6:209:1c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Mon, 13 Aug 2018 20:43:18 +0000 From: Yongseok Koh To: Pablo de Lara Cc: Petr Houska , dpdk stable Date: Mon, 13 Aug 2018 13:42:54 -0700 Message-Id: <20180813204300.25514-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CY4PR13CA0017.namprd13.prod.outlook.com (2603:10b6:903:32::27) To AM6PR0502MB3975.eurprd05.prod.outlook.com (2603:10a6:209:1c::30) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ffa83ec-deeb-41c6-ce9c-08d6015d6720 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR0502MB3975; X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3975; 3:U7Fx/SgQUXJIcEtVhIBz57qy9Gdl4dpzg8/vTEIwXqG3dUwMOf/3nyYWrM2huZ6L8XQPeF5aaJuqRWauZs6oTfvlE/fa70iIgXMwMbtiXhYwL0B3coRHOLqtiYQQYAFVDo6bu29i/avDESUg1zuDw2Q76xdoNj7z/2XaAwB+RVcpVHA3MBwAzhB9wGJLz/sjvRec4Y2EBYwuRcGBK4jnU5l3OAFPdktAisQk3MieP+tM+LgQiCUedk4HDx/C7c3C; 25:2JnB/h3MbCy5ZAxUvLIFQfCQk43WZLDGDWvbMJtlDtZJ/jLkJDonB3/fDrF/d9Lsrt0XpWIOEhOkzqbsAWoXD7btYoedhPKig1j2JKZH9Nj52fHf7KsuXbnMvDjlrRNHf64aS/a0+PP4YaX4EWVVkRGOL9ZhU7tDqoxR5BiMAlPvijUmNtGHz3otppRD/z+RmxEVjPgY1vPs2Icrx5SVI+YztlHmUQqdCBXYqjyOQntYH8UThPUqc9ZjFLHKQV6ZkGECnnYdCLnXNhWsGIGbvJPmrVgoUQyzxql+ap1mOQEXGh+xsmdQyRYFpl4QKNqsHi9ncD3d70yJsVtVg6+4Eg==; 31:FdGd3q61NHeH9DG7DbcuY8+hcJUmDtHDe5NRsA8pr1AzFT3IvTAzJlk8PeRJJ380a//5DIIVyMgaGfQdqa2VODpj+LOSFw7MnB5yfB1sF26H8JWJ78ZVGGdohMnJCKwDWvCaVL/x0KniCb5u2ohCzZ9JZTVNJmRqRrqlUNw1AbAf24yRtNFX5QFZeXXCnrhVjJTZOX/oIKaGFSEQU7kYY9tIXdW1ovJEqH6o+wLp2SM= X-MS-TrafficTypeDiagnostic: AM6PR0502MB3975: X-Microsoft-Exchange-Diagnostics: 1; AM6PR0502MB3975; 20:/xuJt0Tg0i1SXmZUbp44MwYhe3Nxg7yCFhUhbPWMDMfT+D/n5e/WQR1SOxCjS+fIlCLsrSwHNi8bOLajsZrQmyyY/t1HyC8JZWC/1Rgtm0ODWei/taebjvoecYVvtyIo0e5yhMQYjhdaHaW9o45x544qq7/1zbiLyCwEkjhgdnMStSaRWAQSpEeLXLbGNlBCzZlp5jBpt4xfWJ9d4X2AV4Ssncj5FwaBvwcvyzCL6FsjBqrbQlNT0h4gzLi52WsUYWaqzor/Idz8xWP0yu7eiPKbPqEije0Vp2O+XbFpCBdGvsMePQVaCM4fArHUNI5lQ96OXZDB0zVtNhhwIcu3lQlkCaNaPJ5MD/QZmrGM1J7JtANMCdKyBCjH1uLhM5esXyUy6i6V4jmM9KtueGBiglLabngHFAWtHsjoGOxW2N9sCR+U/BkmTiPwN8u+FVc7junitl/ST8sDiE0PvBNQ80QfAdvXLuhQuw/N+qi8jVAgnfodemtHJ0UFtTmcblsd; 4:ebWvyqP26/9WgLPNI8wojmbv5Qc2599Uj69+4tzKQVI/Qf6UBS6X/3Hc4NtEqlGsAwx2yTRZDzzjKn0k20G/Bm/8pbzHgVUNKiE/2EAoqHXKrKj5Qj7gUwyEQGugaIF++OyuDiMmzVOtv1zrHlFJ9ms8NuXII/hhsZ/ZyThncV8CzXu8z4GWODc/Ast+kT+99qz0qojJi9btMb/1TWZLmzl3cp+qJBA7+BHn8um40bo3SZ9Q4r7IauNeWmY5rFWVP2mlZnvIA+FRXVcKafQ3mpQYEwbca+WJ+7E5RexVZozSWsY9/xOk8Joi4//wHDUCOI/Ci3ri5V4ICMdXxlmapyQxWPAl+1rj05n120znAB5LFPLq1h3S8iRiGMORCvig X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(28532068793085)(89211679590171)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM6PR0502MB3975; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0502MB3975; X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(346002)(396003)(376002)(366004)(69234005)(199004)(189003)(28163001)(1720100001)(2906002)(7696005)(52116002)(5660300001)(21086003)(51416003)(48376002)(106356001)(97736004)(105586002)(50466002)(50226002)(478600001)(68736007)(966005)(45080400002)(54906003)(316002)(81156014)(16586007)(8676002)(81166006)(8936002)(186003)(53936002)(16526019)(1076002)(305945005)(69596002)(7736002)(4326008)(6666003)(486006)(3846002)(956004)(55016002)(53376002)(6306002)(25786009)(6116002)(6916009)(47776003)(53546011)(386003)(26005)(86362001)(575784001)(36756003)(2616005)(476003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3975; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR0502MB3975; 23:xZVUhOxeHUDwky7Ui3u9xAPXo/cW3D+ljqB/Jiz?= =?us-ascii?Q?SoighqG872jTqUpTnWZILLJjEvyNJAguP3gfXW5WGuxrKWh/xZT+NztrkU4z?= =?us-ascii?Q?w02qdPDoK7ZJyQXTFcSYgm3ifYBZmj1/GiuGw7TxwvI5EQGbcEYbBJ+TY5Mt?= =?us-ascii?Q?ULEtMEzqNdZfrIp14nD0XjhlqWSWNspL60tlvqlO6aXj63e8425sB5PpL6qy?= =?us-ascii?Q?4IlzSD0Bjw21Brw7Cz0zblhSdcTXIxbeWVh0PR5Gr5Tf5XI+G/P1NXAwbxNP?=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04QI1nsAZw2mEHnsuhZCb+BWNhEQiehlzSefZk/vHdVfjCDVo1X/DAaGaxXF8MTmSbHgINGmiqmXu0xDf0BaNVPfH4vSmo8BD1fAdAwAc+sHTSf8XHD79JH1HMETtyKj2sng==; 5:YnLLLv60/ZvRiXvaVDpkOgXlN9Z5ptmQQqTlWo42qiuHlYj7jw75Dug5A882EbFylwy7PGXQV+QEfGo8Ff3aW/7doozhQZxSEffKouHX4KvWVsOlW+o6cgKm22R8w7NlSYmHKl8pI0ILvSgYj8wgnUUAsvMBeeNBY9n9uWaHkvg=; 7:xujCKtphVP6K4t4ROW4OUcqNzSnn99VJJeZPJkw8vn8WIW6QpbwVD+EK2twHTcd7InYXFxgMKVDNE2XBcOYG0UyVBW7k9FroYOk66ER/CUycR8M2srLu/BFmkVWsvV42EC8YFXoEzEOxqHueq5gvSv7WzkKCWmh3/b1fnVH7GJKo10hogJne02FdabaAE/umFJvpklhusiB37K0ZYTI+QA7qlV5npMSshTC3U6q9Z2aeGna1b83SHwHqpNYTzbXB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2018 20:43:18.3456 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ffa83ec-deeb-41c6-ce9c-08d6015d6720 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3975 Subject: [dpdk-stable] patch 'hash: fix doxygen of return values' has been queued to LTS release 17.11.4 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: Mon, 13 Aug 2018 20:43:26 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.4 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/15/18. So please shout if anyone has objections. Thanks. Yongseok --- >>From 235464fa81fb61d23a052deecfb15e3bb89710cb 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 622c18009..5539e3389 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.11.0