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 0A42C43F17; Fri, 26 Apr 2024 17:13:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C45C743EC8; Fri, 26 Apr 2024 17:13:41 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id CA0B543D7A for ; Fri, 26 Apr 2024 17:13:39 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1e2c725e234so26826815ad.1 for ; Fri, 26 Apr 2024 08:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714144419; x=1714749219; 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=UwpAHNJybDFvIiCmRu+DqekWNYwORbOHAcCZSxU0HM8=; b=O/BDvlb4bZflr3b0pVcuL+133pW2Hx1LG/Q16ot2wozo5cAehnrSsD8eOSp3BouZfp bHBYoC08oDTlgE7WVkEJ5UUjlbtq/qkXpgN4W6fFJexI6fuDjg3OPUDkQoRBRQthqJDX Kf+bWnmBh4Qb2wN2/opxJO23X88IRmaxvQXNyIOunMj9ju7EKmNjEYZsvrB/vYgGa2mm Ng878xw3m/H7gHYscINp1O2QSk71hAhsWmBhwA7PRq+Htku4j7ZOYAT/cw6HiZuzFtyj IH5LhL0hOm94Ti2P41PGmdsc1p9QPAm2I1Rw8L2LPRUnzHCpmpUoG9AH+K45VW/aodpO 0Qaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714144419; x=1714749219; 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=UwpAHNJybDFvIiCmRu+DqekWNYwORbOHAcCZSxU0HM8=; b=gYC1K4f6LLOBPTtOXmKwM5Dcgr6bzm2yVMSaw3vmTXgWF59een5ryv7pdHVlbzpSCn D9xP0bpu+ejxlmqnB3hD3O96nZpyFCNbrCVCFvb4CJ3QeBNRYDewGcTFHq5u0smcBbLp k/fZ+JPBmNq8uJtWxSO0rRLUumjpwmDgWgeks9GdVU4R2jZExp7cujyfvCBNVi4J65Mc 9qvxBDFvSkmXkpeKNYroU68+UFVxTnhbS9XtHWs522yQcJ/kGOAJk1LShRUL+7KLcH0T dPeu4reTdA6gxdAQcV816K9Nr2bLVK8w3uoNnAovp027E8gDtzgii8UXHpXSEgT5JyWR 0RyA== X-Forwarded-Encrypted: i=1; AJvYcCVfo7n9Bezmbhuy76qhFaxg5Imt00m9jEqo8d6eckxlL+3aTfC/S4tdlZdEkjrEiGScjgEWiYtNuKi7aC0= X-Gm-Message-State: AOJu0Yz950d7dFb5IXlQwiyk6h4KjtDwvymck45CYkuWZsWWe1JmppBK luQuGg1EWkugnRLO1vE9ZMaaLfFioWGHQctdywwvjmeqATXPeBw3unxFpLjMWhw= X-Google-Smtp-Source: AGHT+IEX9GhhWSZcIcEgQRUsSFLj/di0om21024favKzA2LdJ9RiyexuhTnKj45RNU5vVLsIT4AbAA== X-Received: by 2002:a17:903:2452:b0:1e4:61b:98c6 with SMTP id l18-20020a170903245200b001e4061b98c6mr4453686pls.4.1714144418997; Fri, 26 Apr 2024 08:13:38 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id f1-20020a170902ab8100b001e4881fbec8sm15550061plr.36.2024.04.26.08.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:13:36 -0700 (PDT) Date: Fri, 26 Apr 2024 08:13:34 -0700 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Ferruh Yigit" , "Thomas Monjalon" , "Andrew Rybchenko" , , , Mattias =?UTF-8?B?UsO2bm5ibG9t?= Subject: Re: [PATCH] ethdev: document that stats reset APIs are not thread-safe Message-ID: <20240426081334.1a24577d@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F3F7@smartserver.smartshare.dk> References: <20240425165308.1078454-1-ferruh.yigit@amd.com> <98CBD80474FA8B44BF855DF32C47DC35E9F3F7@smartserver.smartshare.dk> 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, 26 Apr 2024 14:20:01 +0200 Morten Br=C3=B8rup wrote: > > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > > Sent: Thursday, 25 April 2024 18.53 > >=20 > > Making 'rte_eth_stats_reset()' and 'rte_eth_xstats_reset()' APIs thread > > safe has performance impact on datapath. > >=20 > > Instead document APIs as not thread safe and add condition for reliable > > stats reset functionality, forwarding should be stopped. =20 >=20 > I'm not sure stopping forwarding suffices. > NIC hardware counters will keep progressing unless RX and TX is stopped a= t NIC level. >=20 > I don't have any suggestions for a better wording, though. :-( >=20 > Anyway, better with the patch than without... > Acked-by: Morten Br=C3=B8rup >=20 The safest option would be: rte_eth_dev_stop rte_eth_stats_reset rte_eth_dev_start