From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 665AA43F76; Sat, 4 May 2024 00:00:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 072284025D; Sat, 4 May 2024 00:00:17 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id EE44B40150 for ; Sat, 4 May 2024 00:00:14 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1ed835f3c3cso1195425ad.3 for ; Fri, 03 May 2024 15:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714773614; x=1715378414; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=DdQBIfcTVkz63XfMABHULNrPE/E6D6h2uwHwSGNLbk4=; b=s3vnWPV3i2Btk9i6mhlc/fV8ulv2DBzoDEyEa9+rtvqeWorFa7sVf0ZG2XzspLmsiP C+Bz7ck7Cy4OMP34S/qsYaB7keQZs0sUFaVf4MiElk8hU2je52hp2MhoYGMrpuMEl0RA WF6GmCwamMiRSwjAIRdxLvXax/WoTcr5Afbygr4Av/s+69Go5RVrDRcycAK9Sj0jcOnm twmzejJFiiw+M8QC7NVs2SwXuHrCk3M/qPPhecrBjLEBYIPoGQzdDs0Grd0juQun1Isg n+iKvFitIKSQvlJMkQsyuCIQ3I+JYrPCDhhm00GNAMD9Xc7cKJwl9DxwPG5zWTnxmuXV xM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714773614; x=1715378414; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DdQBIfcTVkz63XfMABHULNrPE/E6D6h2uwHwSGNLbk4=; b=NLXG1RnZxly5TkQsL3MnAxH4h3rr2q3vTDcjprz6YG5bCF8eH0+5CFBOABj9tO+C2z LnUj9vA3zzdGdK5PdWxq5f2mratnTlxd021AwVIj6crnEJKqtXmVplorouYI4NPxt6nJ Mjbtpuj8Yq+4DWrVqZZ1N9ukdoPDyfOPaQr0EoYgWFisv6KDkgBCIDINvo0+4P/tiLbH OvZnp95Qu8KZH+ZEfgGqjie387QbDGhAIjCINkhDLU7oGdwN/2j8I7uz/PI9B59hzAJw wn1VTUdy/V5Kc9jYpNv/7wCFlDw5umjLWYBVcKV1geuMXpgGQofYI2tfXgzRYBaH2P2Q diCg== X-Forwarded-Encrypted: i=1; AJvYcCUM5LtHEx/9TzdVfx3hbG5P7r9hVDKyNqwnyFeWUJfk7u2P7nh0snQKSG5FniqjGpz8pEYS9W0wMUCC7+Y= X-Gm-Message-State: AOJu0YxH9flzLGEfWvensYAgQvQQ3/83n36TEQBLlzI7I2iAFT0Pfaz1 jMpd3mhXFWowy3ioZbyVZQg7frX4TswzLy1JxNZmAEy3NJfEB+I219AS7o7iAH0= X-Google-Smtp-Source: AGHT+IH77pZn3v4YQd6Jz73BggapP35NywhBgF/RQSa+RvMFjntea99EiBerLF9xdkf8RCb9pcjUnw== X-Received: by 2002:a17:902:b7c7:b0:1e4:6232:367a with SMTP id v7-20020a170902b7c700b001e46232367amr3653346plz.22.1714773613758; Fri, 03 May 2024 15:00:13 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id n2-20020a170902d2c200b001e0bae4490fsm3750923plc.154.2024.05.03.15.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 15:00:13 -0700 (PDT) Date: Fri, 3 May 2024 15:00:11 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: "John W. Linville" , Thomas Monjalon , , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [RFC v3] net/af_packet: make stats reset reliable Message-ID: <20240503150011.55681b97@hermes.local> In-Reply-To: <20240503154547.392069-1-ferruh.yigit@amd.com> References: <20240425174617.2126159-1-ferruh.yigit@amd.com> <20240503154547.392069-1-ferruh.yigit@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 3 May 2024 16:45:47 +0100 Ferruh Yigit wrote: > For stats reset, use an offset instead of zeroing out actual stats values, > get_stats() displays diff between stats and offset. > This way stats only updated in datapath and offset only updated in stats > reset function. This makes stats reset function more reliable. >=20 > As stats only written by single thread, we can remove 'volatile' qualifier > which should improve the performance in datapath. >=20 > While updating around, 'igb_stats' parameter renamed as 'stats'. >=20 > Signed-off-by: Ferruh Yigit > --- > Cc: Mattias R=C3=B6nnblom > Cc: Stephen Hemminger > Cc: Morten Br=C3=B8rup >=20 > This update triggered by mail list discussion [1]. >=20 > [1] > https://inbox.dpdk.org/dev/3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.l= iu.se/ NAK I did not hear a good argument why atomic or volatile was necessary in the = first place. Why? Why is this driver special (a snowflake) compared to all the other drivers = doing software statistics (tap, virtio, xdp, ring, memif, netvsc, vmware)?