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 5537EA04FD; Fri, 8 Apr 2022 17:17:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3882D4067E; Fri, 8 Apr 2022 17:17:55 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 734A34003F for ; Fri, 8 Apr 2022 17:17:53 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id n8so8150343plh.1 for ; Fri, 08 Apr 2022 08:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1WEwG1pxphJEtrLy3nbFN9tNdEgY9LkjYTQd1wmtswk=; b=EEqQVylVlAr0YIMmgBn5QZ1hEOlKqG+xr62qkm2ydLhoViIyvEdybwQCJD7hbWylwH uTzuT36e75hvUA4cY9ThnEJV47xxQqBB+NFX1drBwoqvHicEhoB6S9z4kcje0jwb4fwU 6IWOwoZP1LcGC9csJk5lRL5e7tyZzgUpd3XbBE1Pn9Hcoc5kFYaAmafp6io/17KpZhnW kDN3LJMGsyCwMdo/7dXQGGpkG6Kw1LHlZi3DmwX7Qi5sVh6CSkINkWAvsfxlkZuphjnF jBDP2cUbhG76GLgOuICBhq2bfM0b2FZnhgHTsIqoqPHZDWY6R5jvRcPIKvO63qbrxR2R Lpmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1WEwG1pxphJEtrLy3nbFN9tNdEgY9LkjYTQd1wmtswk=; b=8Q39+PH204CJ+lcz8f4YgqX7K5QwaeRDFnMYtjVS7qaxcsUuc5GldAY1pP2EsQzW/x 8yvTWNC8qbD7K+1IRn8C06Gl5d2B8ogMSkWinVFaaiSnCfzee+Fb++/FOt2N3S/Qk8bp WwM09ZmoXiMicWj2Btf1FP662TV2ak4Rks5jepeRRcEN1gPiYqSzjZNdsYvX7owXYidD Rnaaine61mkCfJSLUwkDFLtjbHZVDFDwW04Txgl3O21fQW739osjqWim/m54WmwXIwiy uf+sD5mM/Z918og0o6/hLByiqX87Kf7H+gbqYv4g9Djww+YfMpKrjRi8eYJcoLR/hOev Uk/Q== X-Gm-Message-State: AOAM533Mo5BBBE/izd1VYU9r0P9sTsCsNoCg8OHqebbLNlWuq8HOVerq QhMxMog7Cy4Z3bMk6Vcb04KgJA== X-Google-Smtp-Source: ABdhPJzT60ObsZMPCJE3CFE5Z668n67VBMN36RIktn7XTAmc1p6ChpGYyaRZF8CT2s07PTmE3WB0Uw== X-Received: by 2002:a17:90b:1e43:b0:1c7:46bf:ba29 with SMTP id pi3-20020a17090b1e4300b001c746bfba29mr22356907pjb.100.1649431072620; Fri, 08 Apr 2022 08:17:52 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id x38-20020a056a0018a600b004fafd05ac3fsm27089000pfh.37.2022.04.08.08.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 08:17:52 -0700 (PDT) Date: Fri, 8 Apr 2022 08:17:48 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , Thomas Monjalon , David Marchand , , , , , , , Ola Liljedahl Subject: Re: [PATCH v4] eal: add seqlock Message-ID: <20220408081748.119b3455@hermes.local> In-Reply-To: <20220408142442.157192-1-mattias.ronnblom@ericsson.com> References: <20220408142442.157192-1-mattias.ronnblom@ericsson.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 Fri, 8 Apr 2022 16:24:42 +0200 Mattias R=C3=B6nnblom wrote: > +++ b/lib/eal/common/rte_seqlock.c > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2022 Ericsson AB > + */ > + > +#include > + > +void > +rte_seqlock_init(rte_seqlock_t *seqlock) > +{ > + seqlock->sn =3D 0; > + rte_spinlock_init(&seqlock->lock); > +} Why not put init in rte_seqlock.h (like other locks) and not need a .c at all?