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 0FEC045AB0 for ; Sat, 5 Oct 2024 00:27:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06A214028B; Sat, 5 Oct 2024 00:27:58 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 372A4402ED for ; Sat, 5 Oct 2024 00:27:57 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20bc2970df5so20636605ad.3 for ; Fri, 04 Oct 2024 15:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728080876; x=1728685676; 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=009671oSyt19lg+6ENGMdkkTrfwfCaUn55QTMDH6FYA=; b=lc55kIugqTY87N+9+34ArqG+DaVCZRTUENKcPCTp5QMO//osUdeCSoDXani9Z83Rr+ Yw4r0K0fIAsbR3UOKejPJnbnoQCDT7NZntZM4S0JmAKBFKFLfmM2AIjuPp0I6UMoZmVA F4yOEHksU+z2ntqgUW8PpKvw9CsIBHV07OZe9n1RiIDy8RA9O27pYHsPMRi7NZ8c2aUa Q0gSf79K89ADyzeEjzBe78g9D6Iw0igvJbcdQrXg5JC7ZqWGnG9Euvf9LQg6TrZ3xmFs Axy+hf04ja4xNY95AqrS4ucCRrSshNVg+DhKhSgpEW3s9Bow29SwnXLNJ18x+z4z/7RT lGbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728080876; x=1728685676; 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=009671oSyt19lg+6ENGMdkkTrfwfCaUn55QTMDH6FYA=; b=uunOYQPwdB50eaLzQuWZzcUTEypznhNEVmUcmE3fjfdNthA1kG8CotQ8Xg0AZuPyZP 20r90R1MpFSkjoAelIJ+dTlOSzFBkZ9RBvjiO0uVJtscKHwQj+MEFsKYn/q0H3yvqiIT iXWPb5hHBPX/jdKIkYtgRv4sPbxVkWoMDG5x/4nAgo9UqDvCjWBcXxlQ7QXqkhWRhhDs ZXIEnsCBdITGHx6/KFjbJNiJiUV/d6CD7crIZL95UbDTpZ6ffPavt5OJT5pjN0XH+xty VBC9PnQfKZ7hZsCQ4HfL62tnrZR2EME207sTQnMW1jWerfFdbO/PRL4e89lv0F97g+/r gd/Q== X-Forwarded-Encrypted: i=1; AJvYcCXXyyy44vSStC9guXbJBXMtK0DrsQK4n0EHl9E+bYTSO2UOPFgw/QzNr3+IIaPVAZZBR3EFyRU=@dpdk.org X-Gm-Message-State: AOJu0Yyl5oYewzJdyaVwtX962LutdQrgRqloC1kfG6CtXPXhd765Yj5c Cy3RhOOoIZ+/v4yMkS0/u92r4bwJuYixDigTNfbT27YUbJlMK78JzBGJbYPK7yg= X-Google-Smtp-Source: AGHT+IGZRF8ELdNad6XvS8rabAkHx/FgT7E4Xb5u8sGiCq571XzyJQ/mQyUPWiksGpTWh4NOgouUiQ== X-Received: by 2002:a17:902:d2cf:b0:20b:502f:8c2e with SMTP id d9443c01a7336-20bfee333acmr61972415ad.51.1728080876348; Fri, 04 Oct 2024 15:27:56 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c13939e08sm3261025ad.146.2024.10.04.15.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 15:27:56 -0700 (PDT) Date: Fri, 4 Oct 2024 15:27:54 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: Thomas Monjalon , Andrew Rybchenko , , , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [PATCH] ethdev: document that stats reset APIs are not thread-safe Message-ID: <20241004152754.10e35605@hermes.local> In-Reply-To: <20240425165308.1078454-1-ferruh.yigit@amd.com> References: <20240425165308.1078454-1-ferruh.yigit@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, 25 Apr 2024 17:53:08 +0100 Ferruh Yigit wrote: > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 548fada1c7ad..40f04c0e191b 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -3136,6 +3136,9 @@ int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats); > /** > * Reset the general I/O statistics of an Ethernet device. > * > + * API is not multi-thread safe. > + * Application should stop forwarding before calling this API. > + * > * @param port_id > * The port identifier of the Ethernet device. > * @return Putting a note in the documentation is good, but it would be better to be more explicit about what happens if used unsafely. Something like adding a not to stats_reset like. * Resetting the statistics while device is active is not an atomic operation; * doing a reset while forwarding may lead to inconsistent counter values.