From patchwork Mon May 13 10:00:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= X-Patchwork-Id: 140028 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24E9F44019; Mon, 13 May 2024 12:00:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03835402EC; Mon, 13 May 2024 12:00:37 +0200 (CEST) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mails.dpdk.org (Postfix) with ESMTP id 97FDF4028A; Mon, 13 May 2024 12:00:35 +0200 (CEST) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a599eedc8eeso1000944366b.1; Mon, 13 May 2024 03:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715594435; x=1716199235; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lt5NkyVzWewUGACZPqjkyYH/G96Y5i34KdhyOkz11Ls=; b=ZQoQGrQrF7J59j2TK6yHgWmVIsHnqnQdfJNs3wpEOKJfgqc1PFN7MdhnnnrXwOW+VG 4jXvQhjj3Sjsic/6bggegDKvSVsXDndvjqetG1z0dc9rBu9T9y+DkArvGdq0KzYgrlhD dp+73+bdOlWeOHkQklvmEstA7uKEpCu6cPPjbQawXA6dPGC3yYl4Wj/nYI6TLs/LPMjA 6hOrJ5z4kajixNrK4tSZ8gvnIN7dQq0IG+cXNYiPgZuZfbKva/3iLdKws3W30KzCFCjp Z7EoBrqX/I6vWGyu8a+Nc1dG1l1Bh9dboQZyuTFdhePq2TuUTeejYYGuh1pTNSMIQYw7 BvKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715594435; x=1716199235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lt5NkyVzWewUGACZPqjkyYH/G96Y5i34KdhyOkz11Ls=; b=YBBq4QfN2uRJzw22fiSsndPYtdtkXnQHuJq2vjGkyh6CgPAPNRH7PUt2cOc8kzyc+B CDuP9Ib3C8Aah8dksGNkzrc+Zoz+9ewVVb/uHWBLqg9XgZCRa6sM2hQijinpMMhqTa8s woRwOMsaoqlvpYVfWMPuHmPe6i/qhZycGa5kgqYmqUYWLIAbBzGydchggvHfFRRfuB5M Q9/nIc2sRe7vuleifhjG7Rt+JHVP+OJ3+6XQdzh8hT8kTM7zHNrQ3rDhXqSm0moZHEGD MHmJJdhN/R+6BogPE5BGYF0ld8z1qzuga/g7gNllAUfq0QDCAegq8PW0+mmCG4pSrWyT D4rw== X-Gm-Message-State: AOJu0Yx9SbvR5MqWRMW+Cg76dOdRP66puPhSGRTLbAbFTGwemGPf329J tOSbE9ZTBNKC3mbqNClSkAfRYg6Q8fjiTYCXwRYdenvASyrdwnM3jIJ1vcoW X-Google-Smtp-Source: AGHT+IGU0bJrdtzL7yQyJcfw/NkDBeDtYjN9ilKg7sCGD6fIxaCu0VlDkUaFJgGjhAgDB2++7wZXmg== X-Received: by 2002:a17:906:bc56:b0:a59:cfab:504 with SMTP id a640c23a62f3a-a5a2d66a31cmr620908866b.48.1715594434672; Mon, 13 May 2024 03:00:34 -0700 (PDT) Received: from dcu.otaknetworks.com ([212.156.37.190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1792228csm576885366b.92.2024.05.13.03.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 03:00:34 -0700 (PDT) From: =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= To: dev@dpdk.org Cc: stable@dpdk.org, =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= , dharmik.thakkar@arm.com, Honnappa Nagarahalli , Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin Subject: [PATCH v2] lib/hash: Set the maximum reclamation size to user provided value Date: Mon, 13 May 2024 10:00:31 +0000 Message-Id: <20240513100031.1156529-1-aomeryamac@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <396BD6B3-B936-42F3-9FA9-B07578786FE5@arm.com> References: <396BD6B3-B936-42F3-9FA9-B07578786FE5@arm.com> MIME-Version: 1.0 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 In the previous implementation, the maximum reclamation size was set to RTE_HASH_RCU_DQ_RECLAIM_MAX and it was not configurable. This patch uses the configuration argument to set the maximum reclamation size. Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation") Cc: dharmik.thakkar@arm.com Cc: Honnappa Nagarahalli Cc: Yipeng Wang Cc: Sameh Gobriel Cc: Bruce Richardson Cc: Vladimir Medvedkin Signed-off-by: Abdullah Ömer Yamaç --- lib/hash/rte_cuckoo_hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 9cf94645f6..f7f0fdfd21 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg) if (params.size == 0) params.size = total_entries; params.trigger_reclaim_limit = cfg->trigger_reclaim_limit; + params.max_reclaim_size = cfg->max_reclaim_size; if (params.max_reclaim_size == 0) params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX; params.esize = sizeof(struct __rte_hash_rcu_dq_entry);