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 5BC7943F17 for ; Fri, 26 Apr 2024 17:13:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A8FF43ED3; Fri, 26 Apr 2024 17:13:43 +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 D52DC43EC8 for ; Fri, 26 Apr 2024 17:13:39 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1e5aa82d1f6so22266635ad.0 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=JMCU72leduF+Mbt+NhYa+66zY4WkIk9cPXXhJlJxgAyf/a0C5I6syO4BK6WO5qhm/M Hl6kPnLI0gvUZ7ioqkyeUsrU8UuqMjAZH/SPTjTjuxhqsvIAH7Jntyq3eeKgsFM0cjWE ui9Eucur2XyuIVVgxWDu4wmeicY80qosxFHqm+qDZybcXRlyEztwBJKJx8jfhUt6wEhE 4YNeh8O/XDazYUBR1+PxvO4RXwN6o8ILVfN8zk/cHHc9OLr7kEK152lnYGhB7q8v+8wS lYetvqGYxPUAeNn4BGNtQ5a8po/QSHJXaKfxTtRD4AwmWg5bo5NPNFIrqxhY0nGbfpjq AX3A== X-Forwarded-Encrypted: i=1; AJvYcCXIVX5hO2bA9cpngRcxVJWQkKOKnWv35SM0fWXEZjeHWu1LxExtREF9tzRZjEWrnCKXGnzuYJSneq4t+Nx++0o= X-Gm-Message-State: AOJu0YyWfgFEnZIDYDuecqGc0iTiC2JY3DL5fzWcrt3uShbLnXKrpoS2 KzXEX7uDpyautL0DijJ4oaqHuRGDpLWxGjVCOD8roQAfnBAJvJlYkOK0MQBRnJ0= 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: 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 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