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 DADA043F69; Thu, 2 May 2024 17:59:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3FDA402B2; Thu, 2 May 2024 17:59:15 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 02E9240299 for ; Thu, 2 May 2024 17:59:13 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1ecd3867556so11324425ad.0 for ; Thu, 02 May 2024 08:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714665553; x=1715270353; 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=F5Dbxp3IzgenFpRK6qJ1fwOPKU/vcfe8ID99Jq74GGU=; b=WP1Ek95QK/NfPVOheQABpty/CSGoVMDFLbJ0dALslwxfSu48OAvOMcy1ii3etwl/X8 VR0E+ybQV2VIS1qTwcuQuRRSnZCclPMtPUZmK9mKGGyDMsYjDzI92r0GkDkE15S6JkLQ XudazfKXPp5LsZSnmu5oMsDVcFdApNUUEzhtdqH0St9nfH39HTyJnQZLkGLSQ7l4Z/hp wkqaRq2TqAE1ipDyoeJlT0gpHA0PEsutdhbVN9tZKtZ1ud70269kErFgngW0NAYNpzdm 7Ow6eNewvwqZ7prVdPF2US3XdAaLa2j+Cj2Kf5TJ2DQ6h2zQ6fv4l4ELch7aOvTCsjdP b5OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665553; x=1715270353; 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=F5Dbxp3IzgenFpRK6qJ1fwOPKU/vcfe8ID99Jq74GGU=; b=iNtFGkzvjkt7pcCN4bVigOEfk2IuMdJmcmurjA8Rjc+rSjzCwxa4K6ON7SBXHhtL5Y A7kvvy0+fSnylTf9bh+qNU6YyCSwXVrM5q0UdcPOLdQPJ4YcGz/vyRKhnypBpBG5PZil +wCmezFT9UxmK0zXVuRn82OlD1fzFsK+L2bEH4p5Z2B+RTvxhKEtufp5Uu+klTMzTrII y4DfdQka8POeQIxtacRdxGq6nGOwCcWmFqIw9MAyRbnRNxzlLiTcpkx6Rah7iumo3jQn DFUhv3pNQBF7mKeKwIkDd9RYZ6y5eYzxRJaNjAng9N+G/2YQVn+DITadb47CAhDIMB3R kgWw== X-Forwarded-Encrypted: i=1; AJvYcCVwojc/g3Uucket32PgTeep6Vzq9aM9YfmotXl6hUXilYU5niVjwl4czRLxbgGce2OwBrmgqK3EuLgmfMc= X-Gm-Message-State: AOJu0Yw4dECOweKw0QnSQvIIzdtu/MnGQJhhYc5C50Lmx8D19GTxTP3D QNQBRYFFHPXcOf3rPIeEc0vtuwjnQsabc2YJu5Z2DedB/mQzkt9XJD+BkeQOZqs= X-Google-Smtp-Source: AGHT+IFBXIwbvC34M+ugEjw3pc9nK/lLcrxLExq/1384h/4L7IZhMD53BfonNl+npwRyIRSOO8opqA== X-Received: by 2002:a17:902:ec86:b0:1e3:d4a2:387e with SMTP id x6-20020a170902ec8600b001e3d4a2387emr83462plg.1.1714665553023; Thu, 02 May 2024 08:59:13 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 21-20020a170902c25500b001eacedac996sm1470848plg.74.2024.05.02.08.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:59:12 -0700 (PDT) Date: Thu, 2 May 2024 08:59:10 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: Mattias =?UTF-8?B?UsO2bm5ibG9t?= , "John W. Linville" , Thomas Monjalon , dev@dpdk.org, Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [RFC v2] net/af_packet: make stats reset reliable Message-ID: <20240502085910.27cf9e94@hermes.local> In-Reply-To: <422dd5a6-4ed6-4ae5-b613-b22a7cf6f77d@amd.com> References: <20240425174617.2126159-1-ferruh.yigit@amd.com> <20240426143848.2280689-1-ferruh.yigit@amd.com> <108e0c40-33e7-4eed-83de-eaedee454480@lysator.liu.se> <7e5dd3cd-ea50-4aea-a350-d88f46854172@amd.com> <422dd5a6-4ed6-4ae5-b613-b22a7cf6f77d@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 2 May 2024 15:22:35 +0100 Ferruh Yigit wrote: > > > > It's not going to be completely MT safe, since you can't have two > > threads calling the reset function in parallel. > > > > This is what I meant with "MT-safe reset", so multiple threads not > allowed to call stats reset in parallel. > > And for multiple concurrent counter-updating threads case, suggestion is > to stop forwarding. > > Above two are the update I added to 'rte_eth_stats_reset()' API, and I can't see the point of full MT-safe reset. No other driver does it. The ethdev control side api's are not MT-safe and making them truly MT-safe would add additional ref count and locking.