From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= Subject: Ring PMD: why are stats counters atomic? Date: Tue, 10 May 2016 11:13:08 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: Bruce Richardson , dev@dpdk.org Return-path: Received: from compass.polito.it (compass.polito.it [130.192.55.110]) by dpdk.org (Postfix) with ESMTP id 7CC219604 for ; Tue, 10 May 2016 11:13:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id 4941A100158 for ; Tue, 10 May 2016 11:13:10 +0200 (CEST) Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dYkWgvzRljXs for ; Tue, 10 May 2016 11:13:09 +0200 (CEST) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id 3A3B910012D for ; Tue, 10 May 2016 11:13:09 +0200 (CEST) Received: by mail-lf0-f42.google.com with SMTP id u64so7523399lff.3 for ; Tue, 10 May 2016 02:13:09 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello, Per-queue stats counters are defined as rte_atomic64_t, in the tx/rx functions, they are atomically increased if the rings have the multiple consumers/producer flag enabled. According to the design principles, the application should not invoke those functions on the same queue on different cores, then I think that atomic increasing is not necessary. Is there something wrong with my reasoning?, If not, I am willing to send a patch. Thank you very much, Mauricio V,