From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id 46AA71B5B1 for ; Fri, 3 Aug 2018 17:24:22 +0200 (CEST) Received: by mail-pl0-f68.google.com with SMTP id j8-v6so2683630pll.12 for ; Fri, 03 Aug 2018 08:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pmr6mWFDy/bQnyzYz5BKxP7SP0w3PZaFGAPS/S/IrVU=; b=sPC9AP+Dyu/UDcjmLcLMed1RYONG7yfwbN1qMu5blseAVpwUOiNPBXHtY9cwqJZHLQ 9f4rmUqvrK6FTYG1pbrs+Jduig6Svef7xHoTbMqAOi7BM/HbFzHFbEo031Bqe5t1xbra ZmaycgnykuVkYTtVWx0ZxLMwMHLUH3SsxLukEWUxX+xRp3nMWgM59y4PsU8qPcEuJD+r 4lMu/2o2Naeolwm99KbB+Wl4RFdjCCCxbunLi39DmXbW5LhoFimvqL9UwnOfa8+mfHwJ 3IrWy/MQKq1w4/r7XlVuJtHKUghIBP4Tpgc6euviR45KgV2m42Wmbl2CeTtDe3UZrFgl mdoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pmr6mWFDy/bQnyzYz5BKxP7SP0w3PZaFGAPS/S/IrVU=; b=pnj6D+FmpMx9QlIF6n+hrBgwyUXNR9MJp1hzNWEgc2lKZ8AJYKMUx5hWs8NZ0K8eAy 9STtJZ8zC3xk/tRXzxaypjIiAY3Qe3vSfEEFWxQxMryMBhyRXIfP4bjdMKLRFr1cctyk f3al+H+TBS9S9AxJvhlJMHYFRD5k9jVOxtmV/jVqUDyE24JMLMipWeOHNIp5GUitVUut 7d/X3TD9jUUvXmJ3Zf+oDppEhrCWIqDB1YAHlfra1ELFv6n5aIdXakmIVKD3jIf0vJY/ PRAMwmu3VQMHir7sDlM6VSe7jKI5CJHSFqaDEmDVaaD9fw/IEZ+wZVsBWkejy5rHHL2F 67fQ== X-Gm-Message-State: AOUpUlE5JKOZbC+7kV5QUaAP1ZYJ6DfzGu8/OzwKVi5dGn5oPvz/rBzu xvq91f4VjP/6Cxd2Ep5N1MB6DA== X-Google-Smtp-Source: AAOMgpfSnOuXZIqbtZOKr/Qrigy/d3w0Zl30bCNcpR+r/C3VsmIkj6PYQ8P9PN6Pj2YuoXAzOZywiQ== X-Received: by 2002:a17:902:1d4a:: with SMTP id u10-v6mr4072008plu.267.1533309861331; Fri, 03 Aug 2018 08:24:21 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d12-v6sm7294692pfn.118.2018.08.03.08.24.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 08:24:21 -0700 (PDT) Date: Fri, 3 Aug 2018 08:24:10 -0700 From: Stephen Hemminger To: Michel Machado Cc: "Wang, Yipeng1" , "Wiles, Keith" , "Fu, Qiaobin" , "Richardson, Bruce" , "De Lara Guarch, Pablo" , "dev@dpdk.org" , "Doucette, Cody, Joseph" , "Gobriel, Sameh" , "Tai, Charlie" Message-ID: <20180803082410.53078d0a@xeon-e3> In-Reply-To: <76a8c325-2fc0-b805-015c-97d6cba83a58@digirati.com.br> References: <20180728174851.46422-1-qiaobinf@bu.edu> <5CCC4983-8B4F-480B-B6E1-3A01806BC416@intel.com> <7E249D4F-3CAA-4EDB-936D-4DFAEA55F0D8@bu.edu> <8a2eb96f-bf40-a6af-c22c-072f915e063e@digirati.com.br> <76a8c325-2fc0-b805-015c-97d6cba83a58@digirati.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 15:24:22 -0000 On Wed, 1 Aug 2018 08:57:39 -0400 Michel Machado wrote: > On 07/31/2018 09:40 PM, Wang, Yipeng1 wrote: > > How about an API that is more universal? For example, an API such as "rte_iterate_conflict_entries". After an insertion failure, this function will iterate all entries that may conflict with the newly inserted key and you could decide which entry to evict? > > Fine. We'll rewrite the patch to do so. > > Thank you for the feedback. > > [ ]'s > Michel Machado Often for time based cleanup it is better to have a second linked list that is ordered by time value. Then the cleanup code can start at the oldest stop when it reaches the last item that could expire. That does mean having some form of lock and doing delete/insert on every usage. i.e spinlock(&timer_lock); TAILQ_REMOVE(&timer_list, entry, timer_list); entry->expiration = new time; TAILQ_INSERT_TAIL(&timer_list, entry, timer_list); spinunlock(&timer_unlock);