Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp314312lqg; Fri, 1 Mar 2024 06:10:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWtzFTds/Aid/N3a1wc/TbW7SjlwkcQrKnagu8UAilsAeLSVEDxRQ6HSDZTSFgSNbQwxX/NKO+Y2weNtu1GUfMdG2WghKYipDelgOzvSw== X-Google-Smtp-Source: AGHT+IGlNWkb6wi2U09sLXjja4G8CJoZRyjh8b9BGiJnjTM+lrLWBxKGwE+n+kt5bG5SPpX4/AoG X-Received: by 2002:a17:906:1185:b0:a3e:da6:85f8 with SMTP id n5-20020a170906118500b00a3e0da685f8mr1267534eja.30.1709302225731; Fri, 01 Mar 2024 06:10:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709302225; cv=pass; d=google.com; s=arc-20160816; b=Qg+cvKO+9/iPkMdX7WQhk0Gilqn3Maz231XF/0N05IPf9X8dnBUSsc9ZCf0h0qu5jB 9kPyKN3pP+RYvWW7AI6U6muZpCQLn4jr2jU6NZ4I9NgT/iUYGDwGw7VF5uKhXSsEHf8I Hn+LzUEDQP8Zuc+r6HbfhVyD9Ay+GFymOKcrJ54k0o8i2ZK4ObKRHaG9laj/AocnanIc bWaSv/WMP8W88D2zsxGayuct3EJLsCwP5B1JTtm+eFvcsrT6pD8Qy98zapzE3sCGEowo CPsOY8WQiz0m8ie4EBwPaUNuGwtokdY6t5EfCYbPrJ4NNvCwCrbiZb2cyK9vbo2hqMpd Z1Mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=cNKCv7n4aGUPwLauAKt9/n/pHUv3rMRFBlgrU2nAOu0=; fh=A67XvxBY5Xlgwz0U81qe7UVCyusZT65LdQ1AlPX26mc=; b=F26e6bCMGCR+bHVVhWCJg1A6dim6ZC+5ro5Dv4Y5fu1U+VFiaeSIuAcJx3OHavXPs2 EjB3MKrWFSukKvPERGePpxWR5hOKgBWy0MSJWpQASqh/d1+DQkW4NUzGp7oVpd0He8Kj evEo5rmMTll078nR4KxH4fX8Ng/Dyic2Iq4gdAyZY3R801ewvA7PVtsncA/An8nNi5Ff F92N79bRCsN2eMBxAEROce7g0q1NE2n59OO9LjzWS/b8ms7zreXVmPMRcW7ytDgWLXok MJVH6OId5Mp6bHDLE2uuRUaqXkWPTg3kD6Fgty3FkOiXcjk/JbYRHsSPbEJZ+iKUP0wE iZyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iogearbox.net header.s=default2302 header.b=Yn0vncsx; arc=pass (i=1 spf=pass spfdomain=iogearbox.net dkim=pass dkdomain=iogearbox.net dmarc=pass fromdomain=iogearbox.net); spf=pass (google.com: domain of linux-kernel+bounces-88536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=iogearbox.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j13-20020a1709062a0d00b00a43692740c7si1455705eje.1030.2024.03.01.06.10.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 06:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@iogearbox.net header.s=default2302 header.b=Yn0vncsx; arc=pass (i=1 spf=pass spfdomain=iogearbox.net dkim=pass dkdomain=iogearbox.net dmarc=pass fromdomain=iogearbox.net); spf=pass (google.com: domain of linux-kernel+bounces-88536-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88536-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=iogearbox.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 177F91F231DD for ; Fri, 1 Mar 2024 14:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECCF76F50A; Fri, 1 Mar 2024 14:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=iogearbox.net header.i=@iogearbox.net header.b="Yn0vncsx" Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C40306EB65; Fri, 1 Mar 2024 14:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.133.104.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709302208; cv=none; b=AhEH3EAO66zZbA5mRlvMtqyKwAZ4v1Zojj160lbYr8rWWVMoMUnxisYYn46BGXIsieJ85OAMD0C/LCQ+ofZEzFpzvQk9n3zYcLyDElNWp+qNJPGyQ6onyBgB1ztVK1LOY/yMVqa7+osRr1h1AUKfIfIJp1YyqFHZYDgwp7a6nww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709302208; c=relaxed/simple; bh=Yn8PAVQZDEahDI1C6nYRu+1FfTfzyoG3NcBHlImQJyE=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=WOlbCPXNOIq7t3S/M5TThkF5Yv4eAwTsjbhZyehYjaVXzJUF9L39wnr5hvspMKLzzhwJxZY8rZestHHuN/jkTjANU6PTZBTRp5bbDrYgzxJx40l77XRkjgq1MHC/sHOBXj1joEatfr3lQwXifvnPJJ/xIAN8J+9BlYLWGpSnArU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=iogearbox.net; spf=pass smtp.mailfrom=iogearbox.net; dkim=pass (2048-bit key) header.d=iogearbox.net header.i=@iogearbox.net header.b=Yn0vncsx; arc=none smtp.client-ip=213.133.104.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=iogearbox.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iogearbox.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=iogearbox.net; s=default2302; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=cNKCv7n4aGUPwLauAKt9/n/pHUv3rMRFBlgrU2nAOu0=; b=Yn0vncsxVYYZlrt6tekcx9JowO D8kGNVctfs1NZQbNncdP/xdlGllhL+aO+f/+ghO+GHS7cL1OmfcIqFrHgR80cnubm+9NLsugfs5uo 8qKX0s5kpY7R2w5X65HRAfPMEwy/9h5Q/XNPlR/B8k8VkruUNgY8FGEv+DLe+tGDm+fLgQ1xIr6JR BTyx1zm50pH4Ltw+792bUpE59l2/sTCT96tJTNeeCUaCk8vucSre6FjkM6+H0rNWVqPVtP5QuBgc7 YaFOj+C2k3Txgm4S4pVE2l/GmzStmFB9I7ZKP2PPXXrVADA6F2DjmXICNpwAPm0jbWQbpLLnasmcd ARs4J9TA==; Received: from sslproxy01.your-server.de ([78.46.139.224]) by www62.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rg3aE-000BB0-NS; Fri, 01 Mar 2024 15:09:54 +0100 Received: from [178.197.248.31] (helo=linux.home) by sslproxy01.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rg3aE-000DLL-2o; Fri, 01 Mar 2024 15:09:54 +0100 Subject: Re: [PATCH net-next 2/2] net: nlmon: Simplify nlmon_get_stats64 To: Breno Leitao , kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org, dsahern@kernel.org References: <20240301134215.1264416-1-leitao@debian.org> <20240301134215.1264416-2-leitao@debian.org> From: Daniel Borkmann Message-ID: Date: Fri, 1 Mar 2024 15:09:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240301134215.1264416-2-leitao@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.10/27201/Fri Mar 1 10:25:20 2024) On 3/1/24 2:42 PM, Breno Leitao wrote: > Do not set rtnl_link_stats64 fields to zero, since they are zeroed > before ops->ndo_get_stats64 is called in core dev_get_stats() function. > > Also, simplify the data collection by removing the temporary variable. > > Signed-off-by: Breno Leitao Acked-by: Daniel Borkmann