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 47E6343EEE; Tue, 23 Apr 2024 23:24:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B802A402AC; Tue, 23 Apr 2024 23:24:37 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 9A6F340272 for ; Tue, 23 Apr 2024 23:24:36 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e4bf0b3e06so58223475ad.1 for ; Tue, 23 Apr 2024 14:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713907475; x=1714512275; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=dPGRrQYIiYwvOR+wocvQLPHVmBw9R/e22GB6O5l9pHk=; b=Lu1db7POzc9KZId3LYHKBbbnikXwouRatAsAezgkmrRzjF3uT7PQ8lIv/eFqgPe3mk OiSgYkyIR8xGalSpp5BgIZ3zwWTTMpe229TdHIKnJnBnfN66lqKtV5TFZcGrFXvaRbxs SMKsggCoUtw0GrjkqADZ6AJYWLYbWA054sFP8qpi1ftFgPEF7SN5NZhmM9gEJKbrrXAm erPiFeEfZ8mQl9R/ic9b7MR2Cgoqk62FuxygOZCQBtjkqoVrcAQBK0eEOynAN1e5Fnt4 0rl2oNAVA5Fd7GJZD/hbmbcfMpjpq1W1FLVdPX3Ja1oBfqzYMcNnYLjnCu07JWZevl4O WxNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713907475; x=1714512275; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dPGRrQYIiYwvOR+wocvQLPHVmBw9R/e22GB6O5l9pHk=; b=qIT98u9xnXORF9omgI6waroHcsdB/T5M5wZvDE8TGvTgpNsr6NNouraqZUVAyHThv2 rtlcGQRjD1n6U7fcovNUlJx2Pp0Xy8B6/rg/bKSgtV4CALBRE8YWiSdskSgHoViQkBDi jhM642B3S9fFbSzGBKWWgaoeFFjIf9Rpt0V7lCIJ7AoHlfCkuC4TjaKP18ik0FpKQfUt y30wAuOivZVHaRgwOEEmJ0ovHG2s/T251SFZmbXtWYg25C1Ff6ggWhEZdLQjWUW2Nbez ygcY2oTF0yCRW3y6G0X3aGtjvdc2JmnhrlPTB100z6mrWRuWm64zP2k0DIFEWDFJV7qF UMjg== X-Gm-Message-State: AOJu0Yxzhedw9S7S5ADZj1LAp/IW5vwWIoKDSo68dLf9L1BUbNAaSOlC rlScdWpZGIC2lpdnMnbeAvy6H2biuGRK8JoLbt6CH6ihZuVqcnCwl/K2SAPp2Ms= X-Google-Smtp-Source: AGHT+IF6FYg9BRiEbIFmqwypes4ue5uxsAtjuRdag+1qu2wtIC3cs8LU1lHrB9BaX6NnIgvbNPbsqQ== X-Received: by 2002:a17:902:f688:b0:1e4:2b90:7282 with SMTP id l8-20020a170902f68800b001e42b907282mr868525plg.14.1713907475557; Tue, 23 Apr 2024 14:24:35 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id w5-20020a1709029a8500b001e435350a7bsm10469287plp.259.2024.04.23.14.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 14:24:34 -0700 (PDT) Date: Tue, 23 Apr 2024 14:24:32 -0700 From: Stephen Hemminger To: Abdullah =?UTF-8?B?w5ZtZXIgWWFtYcOn?= Cc: dev@dpdk.org Subject: Re: [PATCH v4] lib/hash: add defer queue reclaim API Message-ID: <20240423142432.0fcedf20@hermes.local> In-Reply-To: <20240415112602.690972-1-aomeryamac@gmail.com> References: <20240415112602.690972-1-aomeryamac@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Mon, 15 Apr 2024 11:26:02 +0000 Abdullah =C3=96mer Yama=C3=A7 wrote: > + ret =3D rte_rcu_qsbr_dq_reclaim(h->dq, h->hash_rcu_cfg->max_reclaim_siz= e, > + freed, pending, available); Indention here is odd. I would expect "freed," to line up right under h->dq. Since rte_rcu_qsbrs_dq_reclaim logs error on invalid parameters, this funct= ion should as well. Total indent fixes: diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 4a44aadd9a..e1ea810024 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -1590,21 +1590,20 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rt= e_hash_rcu_config *cfg) =20 int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int *freed, - unsigned int *pending, unsigned int *available) + unsigned int *pending, unsigned int *available) { int ret; =20 if (h =3D=3D NULL || h->hash_rcu_cfg =3D=3D NULL) { + HASH_LOG(ERR, "Invalid input parameter"); rte_errno =3D EINVAL; return 1; } =20 ret =3D rte_rcu_qsbr_dq_reclaim(h->dq, h->hash_rcu_cfg->max_reclaim_size, - freed, pending, available); + freed, pending, available); if (ret !=3D 0) { - HASH_LOG(ERR, - "%s: could not reclaim the defer queue in hash table", - __func__); + HASH_LOG(ERR, "%s: could not reclaim the defer queue in hash table", __f= unc__); return 1; } =20