Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp134382lqq; Wed, 12 Jun 2024 20:18:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhlqj/GS9y512GaaaLLz3cK45DsIeJAE5kchPL0oW+MAwgBSdBzce40pwuNb/bqgiqj0S3dcClV5HQlgkSkJn8wWCfIejc54iLDWQGug== X-Google-Smtp-Source: AGHT+IGyMV5vnQnBRQRu1Oy9f8AfzszRAo4mYvNcvgzTg6nqCYIPSqAIOXbUHyy+SijWpLgfe0oo X-Received: by 2002:a50:ccc1:0:b0:574:f27a:b3ec with SMTP id 4fb4d7f45d1cf-57ca97513acmr2826990a12.16.1718248682403; Wed, 12 Jun 2024 20:18:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718248682; cv=pass; d=google.com; s=arc-20160816; b=UZVyUCe7ySKhQ4r+Qooz/Y96fkKJMOEymIU9aOODHcXG/QaCRmwqrAtfrtbtNkSE+5 JLATzXL+G0ixDxK1XxIe+ARIzrGSZ2E8CcdxuLuVTvw3N9s6z8XyZMKMpJAZATBG46UI 6euHtF7b3fu+r0J1LAneEzjdM2XwyvMGdviijUXKLNYU/jsuunBqpFBGPfHO56DkFxvB PaoqbZ/eCgfatvgXJnTRtnrmF40sJ7+8AMKydiMuE8RLvPXWGLORq9vihDVmTf/FbWWk idhchIGsxM2pZ5OKrGgGPbBjrJunkFPgUQ3pKfYRIGWWdNY+zTHfpaIMhYOU5uUjJIH7 bMUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=5aCFd89OIrIlfsX3+9DTpg+yDaJG2ib0jhNnEE+awAQ=; fh=YVtp9D6eKya2c9nuBpZuEgLsArrtbmBMFW7WxerZLWg=; b=LsqiVnD7/9RjfwdXFLJi2Lkp5sZGdasmaKB2Q0IEZgFsRGdfeiYIwoF6EDGqvL19ds rhI0my2FUuvgtNQsCTCSHcNZTJ7ryOEm02zfwrG2e8xahID5mvm3A76+XPZEsIYIAgFf Tin0UKq0s9RPxzLhN0S35nk2tyetC5VcScUN6e/8jMhom2Ug/1cXNWFrXbq2Cuhu1qKh tbDBL1A7NNugkP4S3+kkDSml78kKgHbmlat+/K3NXqFuD+TDfS4o0M3gHT/Kv/MsMk0r 3pbBC3XhkMGQKi2GcTmXuIGElqmB9PXkK10tQB/RjpMJbkuZgMrrRYbvXFGIVLbJJhmw ZepA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-212516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212516-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb7478de0si243684a12.673.2024.06.12.20.18.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212516-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; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-212516-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212516-linux.lists.archive=gmail.com@vger.kernel.org" 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 20B141F21ECC for ; Thu, 13 Jun 2024 03:18:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73974130E4B; Thu, 13 Jun 2024 03:17:46 +0000 (UTC) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB6A812EBE6; Thu, 13 Jun 2024 03:17:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718248666; cv=none; b=Zc3Z25W58UWD8qTn8+4befa83iPnQX2d4SsOGvTGqCgTjy1f1m8POFmdPn7i4H4lgw/ICKuls6IochyiK7iJQ/llf8ZFF7LjPl6rSBAw0o11Ks8mVU/vusKvGQDhANDl2XGXiXKrLBJAtCOvv2FO2U69Aww7DKi2pxhoBNlR2Ks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718248666; c=relaxed/simple; bh=CyteLJH+68fyXpdPXq9xYXyRtYjEX4sE6Z58tEnCb8A=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=DX6swwTNBCHxDunvPIKkLP4wDW4J+dZps4qlUSe3VpDFGAsWZu1Eyca4uHWEkSt/GFGFIAupYkHJMl3/IS+KSRBZDIS/Hxmf+j06uAC4vsBNLZsWkzT55KyuqdzmKDMbSNNrdY8mB57/PcWBJVutKO7jDsF7msny8M7lhv4kq6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 45D3GXEV02037793, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 45D3GXEV02037793 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jun 2024 11:16:33 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.96) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 13 Jun 2024 11:16:28 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 13 Jun 2024 11:16:27 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7]) by RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7%5]) with mapi id 15.01.2507.035; Thu, 13 Jun 2024 11:16:27 +0800 From: Justin Lai To: Jakub Kicinski CC: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "andrew@lunn.ch" , "jiri@resnulli.us" , "horms@kernel.org" , "rkannoth@marvell.com" , "Ping-Ke Shih" , Larry Chiu Subject: RE: [PATCH net-next v20 08/13] rtase: Implement net_device_ops Thread-Topic: [PATCH net-next v20 08/13] rtase: Implement net_device_ops Thread-Index: AQHauLeU3KHUR0FCCkajORloGcGgcbHEXNMAgACmHxA= Date: Thu, 13 Jun 2024 03:16:27 +0000 Message-ID: <2f6dfc4920694035bf630fccc4f3a943@realtek.com> References: <20240607084321.7254-1-justinlai0215@realtek.com> <20240607084321.7254-9-justinlai0215@realtek.com> <20240612173944.05121bf0@kernel.org> In-Reply-To: <20240612173944.05121bf0@kernel.org> Accept-Language: zh-TW, en-US Content-Language: zh-TW x-kse-serverinfo: RTEXMBS03.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback > On Fri, 7 Jun 2024 16:43:16 +0800 Justin Lai wrote: > > +static void rtase_get_stats64(struct net_device *dev, > > + struct rtnl_link_stats64 *stats) { > > + const struct rtase_private *tp =3D netdev_priv(dev); > > + const struct rtase_counters *counters; > > + > > + counters =3D tp->tally_vaddr; > > + > > + if (!counters) > > + return; >=20 > Same question about how this can be null as in the ethtool patch.. This check seems unnecessary, I will remove it. >=20 > > + netdev_stats_to_stats64(stats, &dev->stats); >=20 > Please dont use this field, there is a comment on it: >=20 > struct net_device_stats stats; /* not used by modern drivers */ >=20 > You can store the fields you need for counters in struct rtase_private Ok, I will remove all parts that use struct net_device_stats stats. >=20 > > + dev_fetch_sw_netstats(stats, dev->tstats);