From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1A98A0562; Sat, 4 Apr 2020 18:39:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43E82FFA; Sat, 4 Apr 2020 18:39:19 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id D97ACF04 for ; Sat, 4 Apr 2020 18:39:17 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id t6so10485806ilj.8 for ; Sat, 04 Apr 2020 09:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m4Dd2MmwcxoVfPBRBAjkEo+Kg81e2HtvzdleDMaM2Sk=; b=AXNORgTLT5aoxXtGP7ycag5h5ATZbatrcA1zUWguXRZQ8R0+1JlRKbA+pyeV5MjvSP Th9UhLEjkkgXRecnnuyPc1q10/xo60s5WpV8E5or+VKPkhtGqioNWItCeUkX9JSAoBsa ta7Fu7xVMxRHW5Zw4/TCUJrGg5yfZIdsRu4pS4lfpmgqd/ZzT9NnVsu1WF1+OFf+WtPX /cQoIJ032UeiVrsadHSXsIMr0jbyv0B3jRDQx3Sf8Dz6ylGYtdTAm4MTRFOL/xlDzzBe SS3YALlBePsId3VRw7VRzcB2N5YOJN7PQ0ZXSrKvCngleJpoLITMzQxt61saFS5quk+m l8pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m4Dd2MmwcxoVfPBRBAjkEo+Kg81e2HtvzdleDMaM2Sk=; b=ltGZirA2KlbNNN7sYdUQKXm/WuxYTL/y6RJsflONfYMYCIgRvLdd467w2Mprm9awCJ 2PEgMXQQqvOBvLZ+64OEZ/u5nUNVnuKyEUnYIiOYv4YT+LDm1U4CnzqOClZ/KEBGDiGN UCql0cwN6sK8Q7tns5mogLNpsK4uIJt5Ip7OdOySXs78a9X7qKwc64k2nb+OjWebE4iW JSto345wbdB4yT5fQF9oEbSJ7brRT5BzSLd6mqQcqTqqDouz22R7WujPrUCnu2OcfFfF ZDywNMV0uGp8oZGmZCukvhhKgMirASXOlEkunpP9+qz8BfA8fxd17oQtNQKOY4VqUeI7 mvbw== X-Gm-Message-State: AGi0PubPW7HxY0JWOGl/x42fs3Oe7hz/Q3xGQ40u2fvtBGem5MQJo3I4 5ksLXn01cbsARNTiHrbqyqBba1kslfF0/0mkaoU= X-Google-Smtp-Source: APiQypI7a0Oh7cbABMJoV7QUbV0hc2g62Kp3gyrKDKee5HIQxFf4p7XsxI9sopjMHyMxwgPwOtbqCzEyCAArNPz7x9Q= X-Received: by 2002:a92:cbc6:: with SMTP id s6mr14091087ilq.271.1586018357174; Sat, 04 Apr 2020 09:39:17 -0700 (PDT) MIME-Version: 1.0 References: <20200327085558.1136-1-pbhagavatula@marvell.com> In-Reply-To: From: Jerin Jacob Date: Sat, 4 Apr 2020 22:09:01 +0530 Message-ID: To: Phil Yang Cc: "pbhagavatula@marvell.com" , "jerinj@marvell.com" , Honnappa Nagarahalli , "dev@dpdk.org" , nd Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] event/octeontx2: use c11 atomics for statistics 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 30, 2020 at 11:56 AM Phil Yang wrote: > > if (flags & OTX2_TIM_ENA_STATS) > > - rte_atomic64_add(&tim_ring->arm_cnt, index); > > + __atomic_fetch_add(&tim_ring->arm_cnt, index, > > __ATOMIC_RELAXED); > > > > return index; > > } > > @@ -130,7 +130,8 @@ tim_timer_arm_tmo_brst(const struct > > rte_event_timer_adapter *adptr, > > break; > > } > > if (flags & OTX2_TIM_ENA_STATS) > > - rte_atomic64_add(&tim_ring->arm_cnt, set_timers); > > + __atomic_fetch_add(&tim_ring->arm_cnt, set_timers, > > + __ATOMIC_RELAXED); > > > > return set_timers; > > } > > -- > > 2.17.1 > > It goods good to me. > > Reviewed-by: Phil Yang Applied to dpdk-next-eventdev/master. Thanks. > > Thanks, > Phil