lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240906184520.765db72d@kernel.org>
Date: Fri, 6 Sep 2024 18:45:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
 <liuyonglong@...wei.com>, <chenhao418@...wei.com>,
 <sudongming1@...wei.com>, <xujunsheng@...wei.com>,
 <shiyongbang@...wei.com>, <libaihan@...wei.com>, <zhuyuan@...wei.com>,
 <forest.zhouchang@...wei.com>, <andrew@...n.ch>, <jdamato@...tly.com>,
 <horms@...nel.org>, <jonathan.cameron@...wei.com>,
 <shameerali.kolothum.thodi@...wei.com>, <salil.mehta@...wei.com>,
 <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V7 net-next 01/11] net: hibmcge: Add pci table supported
 in this module

On Thu, 5 Sep 2024 22:31:10 +0800 Jijie Shao wrote:
> +	netdev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev,
> +						      struct pcpu_sw_netstats);
> +	if (!netdev->tstats)
> +		return -ENOMEM;

Please set 

	dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;

will allocate and free the stats for you.
This will also let other parts of the stack use the stats
since the type will be known (netdev->tstats is part of 
a union).
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ