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] [thread-next>] [day] [month] [year] [list]
Message-ID: <98c93693-0647-4c7e-ac1c-729502beab76@linux.dev>
Date: Sun, 7 Sep 2025 18:02:11 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Fan Gong <gongfan1@...wei.com>, Zhu Yikai <zhuyikai1@...artners.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
 linux-doc@...r.kernel.org, Jonathan Corbet <corbet@....net>,
 Bjorn Helgaas <helgaas@...nel.org>, luosifu <luosifu@...wei.com>,
 Xin Guo <guoxin09@...wei.com>, Shen Chenyang <shenchenyang1@...ilicon.com>,
 Zhou Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>,
 Shi Jing <shijing34@...wei.com>, Luo Yang <luoyang82@...artners.com>,
 Meny Yossefi <meny.yossefi@...wei.com>, Gur Stavi <gur.stavi@...wei.com>,
 Lee Trager <lee@...ger.us>, Michael Ellerman <mpe@...erman.id.au>,
 Suman Ghosh <sumang@...vell.com>,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>,
 Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH net-next v04 06/14] hinic3: Nic_io initialization

On 05/09/2025 09:28, Fan Gong wrote:
> Add nic_io initialization to enable NIC service, initialize function table
> and negotiate activation of NIC features.

[...]

> +static DEFINE_IDA(hinic3_adev_ida);
> +
> +static int hinic3_adev_idx_alloc(void)
> +{
> +	return ida_alloc(&hinic3_adev_ida, GFP_KERNEL);
> +}
> +
> +static void hinic3_adev_idx_free(int id)
> +{
> +	ida_free(&hinic3_adev_ida, id);
> +}
> +
>   int hinic3_init_hwdev(struct pci_dev *pdev)
>   {
>   	struct hinic3_pcidev *pci_adapter = pci_get_drvdata(pdev);
> @@ -451,6 +463,7 @@ int hinic3_init_hwdev(struct pci_dev *pdev)
>   	hwdev->pdev = pci_adapter->pdev;
>   	hwdev->dev = &pci_adapter->pdev->dev;
>   	hwdev->func_state = 0;
> +	hwdev->dev_id = hinic3_adev_idx_alloc();

Why do you need dev_id? It's not used anywhere in the patchset. The
commit doesn't explain it neither...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ