From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5BBB4DDC5; Sat, 7 Sep 2024 01:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725673522; cv=none; b=p6iOtnir8D9i3FGc/ei/QX817DjRNcr4t4Tw/24EeaADz2Brf6Eg9KUem4e4I5OMgGYTTyEXQklAYqRchPfkWIsAhntnRW3DTLUnV91aSiGDic+zkR52CNWbOGrTvDAUUB177vxaRBrguj7mekinph8CQQKNq/84+wt8WjQHpws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725673522; c=relaxed/simple; bh=eivU6XWyLHMdNOrbe+NeFg4RRfc4uS3qZGTA0LUgLcc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M00Zr9Jk7ebwIeLcfh7w8zUAIveu598Bt3mTaNTaCCEFvbz3OeJnnnK49Irxqf0Lab1O29wlqdGEIbXc8bFXGw3qXWFYnMA9hGjudHckwEUnDbxxx23hiEHDMpSaoETVntiUT69qs9nkJiP+BNJmrlewF3X68VKpXNK2bLW7Q0s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BLMUfOiP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BLMUfOiP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AC34C4CEC4; Sat, 7 Sep 2024 01:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725673521; bh=eivU6XWyLHMdNOrbe+NeFg4RRfc4uS3qZGTA0LUgLcc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BLMUfOiPebwVNtSZFGuU1uSJXqMjt4IZDzx3TbTlfTL7yW+TbipAnQ0lVQAccD9I6 CdXhI7Eed4+45LRCaOB9FbTkb8xCOWcb2ucUsDVx+ldTeF9a8U0thoL3kxWwG8NP7C 8GuNdXjCE3fME0ie5g3z82gmaIAsISZE2bbNSl5UlsDxRevvEfj2KjXaUcrRYGreVe YJ4rlUS9oYLZkO9VruEkVNP8hP32QgDI5KTQhpz7kFdojk/owEDHts9ym8bH0OEuPa vBj7org0XMnWzQ1fMS+JZzODrE9BHZflmzmqsDV2dFQ/2aW7hKOo/47XG89tt0o9PI FLAPcetWnficw== Date: Fri, 6 Sep 2024 18:45:20 -0700 From: Jakub Kicinski To: Jijie Shao Cc: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH V7 net-next 01/11] net: hibmcge: Add pci table supported in this module Message-ID: <20240906184520.765db72d@kernel.org> In-Reply-To: <20240905143120.1583460-2-shaojijie@huawei.com> References: <20240905143120.1583460-1-shaojijie@huawei.com> <20240905143120.1583460-2-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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