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 E095EA00BE; Tue, 7 Jul 2020 19:13:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E77B41DE6F; Tue, 7 Jul 2020 19:13:23 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 23FBC1DE05 for ; Tue, 7 Jul 2020 19:13:23 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id z3so9407661pfn.12 for ; Tue, 07 Jul 2020 10:13:23 -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=SjRL2x7gtaSGkxSKay+w+Yo7X/cTpWn4PTNQYAre77M=; b=C/4daNkQr5BbX4JPnM2zXbtENumD56OKzllzosFtaPnoV/q3qneHcbFq/c03I4ATDx VZZLPUHhHSlbNWPt3azDJLoHydjfkDtstuhFjCEWX9TM5iCSutKuo7aFu7TNOs93B56Q uBhEoyEx/iterOUbqWIWJlMQiGtoZckhLMO7/T/Vzw7s48p1QH523SMc8nJ7iCHHAVGn brgB0CHtfQ5egdlIyhpOEceJzibEF6E7l8PoE+0RStJbYnxJrF25JE+w6BDe/mOC2tkd WTAo7WwrFapIMUxJC9k0VgS1lcsAH2DXVBmvpgxV9DMhwSD8f1SWrSHpmlgnHxOTHrM+ 92hg== 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=SjRL2x7gtaSGkxSKay+w+Yo7X/cTpWn4PTNQYAre77M=; b=YusrtMYA4paOIWIrAIBra74chSbXcI9fWPaIZHHg6gR57EPoo7Pb4IN93yTw3ReDXS zdpKpSUZT+3h2Ky3SWbdkHKWqOpCWMuITdOk5vvRUWULYYDdV+K9QOGk2GGihhauOa6d Z/qfPSQRTQ90ELXlroxvZO0v3yqNWLBba2vWXTYEpBNuSqK0cOhT5jWaxTJbtjlwUV5n v3kyzM7mpMF6+Pewy7e3TFfaAWhFsAq3qkGo7WrW7Jr76/q2djC5dK4y+mCzJOI+rHit o3Z/MtsdEyTeeyNnRJkzK67o9cdF/LQ7EY7KX13PlwedpUMm73eCjwKGGFBZ0LnuVcK0 ZpqA== X-Gm-Message-State: AOAM533AZi1Jq1cx3h7eJ+TiWq7b2Bz64rFqVBIGB2D8YaQtrc8LpZfi 1wd9NfNgQw1bT/myCJp0k3B5mg== X-Google-Smtp-Source: ABdhPJyWM+qscgsvHp3np8sffkDsMugV9159DnCnyTI0MjRd+QFjtRZls6IR+gC9IWaVxlwLXAzizQ== X-Received: by 2002:a63:475c:: with SMTP id w28mr47154138pgk.222.1594142002306; Tue, 07 Jul 2020 10:13:22 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h23sm8145635pfo.166.2020.07.07.10.13.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 10:13:22 -0700 (PDT) Date: Tue, 7 Jul 2020 10:13:14 -0700 From: Stephen Hemminger To: Phil Yang Cc: david.marchand@redhat.com, dev@dpdk.org, drc@linux.vnet.ibm.com, Honnappa.Nagarahalli@arm.com, olivier.matz@6wind.com, ruifeng.wang@arm.com, nd@arm.com Message-ID: <20200707101314.42df824c@hermes.lan> In-Reply-To: <1594116633-14554-1-git-send-email-phil.yang@arm.com> References: <1591871178-12542-1-git-send-email-phil.yang@arm.com> <1594116633-14554-1-git-send-email-phil.yang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations 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 Tue, 7 Jul 2020 18:10:33 +0800 Phil Yang wrote: > + return (uint16_t)(__atomic_add_fetch((int16_t *)&shinfo->refcnt_atomic, > + Why do you need so many casts here? The type of refcnt_atomic is now uint16 after your patch.