From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id 2A18A1B03E for ; Fri, 8 Dec 2017 17:37:04 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id m26so7625515pfj.11 for ; Fri, 08 Dec 2017 08:37:04 -0800 (PST) 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=GBcd3vXrq3TDNzfizLB5fC+gkM9PMouYhUV71Rn2wVY=; b=Q3Aj6rXHYHVKnEwBQgYeLUFPO9KrJaAwE6cCyXGRFKVQBanmv00Vxv07ZrqXM7WY9v x5yrX7ScG3wChHVh67/ngpD8iRE9CQpVbbp/4euOZ2ZD45nXLkF7v/1mHpSQFF8t7G0+ MoW044Zb5Dpag8V3M7+tL8mder0oSHg8uB8jzV1lvto9Qm+JxZ/q4a8vQQWwesmW42qC kMrNyUxvPW95c9k/BjnUDQVhKM+zCx1yIVFUGwtgk6A8VsJAj1xCxvZQk8v2thaWzYpp GT7GJCuffe/+AWyG02HcN+4CJG8c/GXMgO/Alstz4mu0nhV0Kax7Yt+VsZhjrn/Tfkwg wNZg== 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=GBcd3vXrq3TDNzfizLB5fC+gkM9PMouYhUV71Rn2wVY=; b=csDgWw4CpVGhCod5lLgKKCvLsyI/gNmMzBJlriesPylNfY8PK9G8eIBoVU3LFkRdXR roWhQ5hhJcAPDX51aU55wtGMjGBOCfrCqQn00hr7z5SVNR8RmcrZnixH5mucYj7cvk3q Et4tMqvl4khz+KRtybu+NGBz4s4DDdqN1S++gzz1leUUhlwk9hPnwcpBuT6o6eJQNtjz rb1cLaHA2WXETk8EjGFpdgrzxuBbAOkI/gEZRZlrGy1bALBLEZouWIf4MP9qdwn//W69 wl3bOW2dd1MwK3We1hRywWoXRvzBhpcafRcA5l8vQjuXG61TmLdilCDSWWASjJQ4V/5y Wf6g== X-Gm-Message-State: AKGB3mINpboIIXicW0qpAoomUsSktEZvrMFCPwMBOwdY3BVahcHMqS4p ggKOHutIAPeqiB/FPadWK23KxA== X-Google-Smtp-Source: AGs4zMbSS3vEdTEWwRjUPo1A0djCVyptwV6xZ+VkKohYdsCYVRsng0tJHWj1tFF+3WFRAiIzXmaEaQ== X-Received: by 10.159.245.145 with SMTP id a17mr18432464pls.276.1512751024095; Fri, 08 Dec 2017 08:37:04 -0800 (PST) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id z22sm15523362pfl.135.2017.12.08.08.37.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Dec 2017 08:37:04 -0800 (PST) Date: Fri, 8 Dec 2017 08:37:02 -0800 From: Stephen Hemminger To: Olivier Matz Cc: dev@dpdk.org, hhaim@cisco.com, matvejchikov@gmail.com, konstantin.ananyev@intel.com Message-ID: <20171208083702.556655e0@xeon-e3> In-Reply-To: <20171208154651.16546-1-olivier.matz@6wind.com> References: <20171115091413.27119-1-hhaim@cisco.com> <20171208154651.16546-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] mbuf: fix mbuf free performance with non atomic refcnt 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, 08 Dec 2017 16:37:05 -0000 On Fri, 8 Dec 2017 16:46:51 +0100 Olivier Matz wrote: > +/* internal */ > +static inline uint16_t > +__rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) > +{ > + return (uint16_t)(rte_atomic16_add_return(&m->refcnt_atomic, value)); > +} You don't need the cast (or paren's around rte_atomic16_addr_return) because C has implicit cast to return value.