From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 114F8C433DF for ; Tue, 19 May 2020 15:27:38 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id C0F0E2075F for ; Tue, 19 May 2020 15:27:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0F0E2075F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=smartsharesystems.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FA361D68E; Tue, 19 May 2020 17:27:37 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by dpdk.org (Postfix) with ESMTP id 7D0D21D623 for ; Tue, 19 May 2020 17:27:36 +0200 (CEST) Received: from dkrd2.smartsharesys.local ([192.168.4.12]) by smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 19 May 2020 17:27:35 +0200 From: =?UTF-8?q?Morten=20Br=C3=B8rup?= To: olivier.matz@6wind.com, konstantin.ananyev@intel.com, Honnappa.Nagarahalli@arm.com, nd@arm.com Cc: dev@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= Date: Tue, 19 May 2020 15:27:23 +0000 Message-Id: <20200519152725.63486-1-mb@smartsharesystems.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200513153111.37063-1-mb@smartsharesystems.com> References: <20200513153111.37063-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 19 May 2020 15:27:35.0285 (UTC) FILETIME=[0592CA50:01D62DF2] Subject: [dpdk-dev] [PATCH 0/2] ring: empty optimization 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" Testing if the ring is empty is as simple as comparing the producer and consumer pointers. Checkpatch complains about existing coding style violations, so the first part of the patch fixes those, and contains no functional changes. Morten Brørup (2): ring: coding style cleanup ring: empty optimization lib/librte_ring/rte_ring.c | 4 +-- lib/librte_ring/rte_ring.h | 46 +++++++++++++++++---------------- lib/librte_ring/rte_ring_elem.h | 10 +++---- lib/librte_ring/rte_ring_hts.h | 8 +++--- lib/librte_ring/rte_ring_rts.h | 8 +++--- 5 files changed, 39 insertions(+), 37 deletions(-) -- 2.17.1