From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6 2/5] hash: support do not free on delete Date: Fri, 26 Oct 2018 00:55:01 +0200 Message-ID: <2691977.lcrpPM4Irn@xps> References: <1540344746-29045-1-git-send-email-honnappa.nagarahalli@arm.com> <1540344746-29045-3-git-send-email-honnappa.nagarahalli@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, yipeng1.wang@intel.com, dharmik.thakkar@arm.com, gavin.hu@arm.com, nd@arm.com To: Honnappa Nagarahalli Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 9D2D65F13 for ; Fri, 26 Oct 2018 00:55:00 +0200 (CEST) In-Reply-To: <1540344746-29045-3-git-send-email-honnappa.nagarahalli@arm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 24/10/2018 03:32, Honnappa Nagarahalli: > /** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Free a hash key in the hash table given the position > + * of the key. This operation is not multi-thread safe and should > + * only be called from one thread by default. Thread safety > + * can be enabled by setting flag during table creation. > + * If RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL is enabled, > + * this API must be called, with the key index returned by rte_hash_add_key_xxx > + * APIs, after the key is deleted using rte_hash_del_key_xxx APIs. > + * This API does not validate if the key is already freed. > + * > + * @param h > + * Hash table to free the key from. > + * @param position > + * Position returned when the key was deleted. > + * @return > + * - 0 if freed successfully > + * - -EINVAL if the parameters are invalid. > + */ > +int __rte_experimental > +rte_hash_free_key_with_position(const struct rte_hash *h, > + const int32_t position); You need to add this new function to the map file, otherwise linking of shared library will fail.