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: <d19211a1-b092-499a-aea2-d5addb263508@intel.com>
Date: Thu, 13 Feb 2025 16:37:18 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: "Jagielski, Jedrzej" <jedrzej.jagielski@...el.com>, Jiri Pirko
	<jiri@...nulli.us>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "horms@...nel.org" <horms@...nel.org>, "Polchlopek,
 Mateusz" <mateusz.polchlopek@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 02/14] ixgbe: add initial
 devlink support

On 2/12/25 16:47, Jagielski, Jedrzej wrote:
> From: Jiri Pirko <jiri@...nulli.us>
> Sent: Wednesday, February 12, 2025 4:09 PM
>> Wed, Feb 12, 2025 at 02:14:01PM +0100, jedrzej.jagielski@...el.com wrote:
>>> Add an initial support for devlink interface to ixgbe driver.
>>>
>>> Similarly to i40e driver the implementation doesn't enable
>>> devlink to manage device-wide configuration. Devlink instance
>>> is created for each physical function of PCIe device.
>>>
>>> Create separate directory for devlink related ixgbe files
>>> and use naming scheme similar to the one used in the ice driver.
>>>
>>> Add a stub for Documentation, to be extended by further patches.
>>>
>>> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
>>> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@...el.com>


>>> +int ixgbe_allocate_devlink(struct ixgbe_adapter *adapter)
>>> +{
>>> +	struct ixgbe_devlink_priv *devlink_private;
>>> +	struct device *dev = &adapter->pdev->dev;
>>> +	struct devlink *devlink;
>>> +
>>> +	devlink = devlink_alloc(&ixgbe_devlink_ops,
>>> +				sizeof(*devlink_private), dev);
>>> +	if (!devlink)
>>> +		return -ENOMEM;
>>> +
>>> +	devlink_private = devlink_priv(devlink);
>>> +	devlink_private->adapter = adapter;
>>
>> struct ixgbe_adapter * should be returned by devlink_priv(), that is the
>> idea, to let devlink allocate the driver private for you.
> 
> Using ixgbe_devlink_priv here is a workaround which i decided to introduce
> to mitigate the fact that ixgbe_adapter is used to alloc netdev with
> alloc_etherdev_mq().
> This would require general ixgbe refactoring.
We will try to do that, pending a retest before for new submission ;)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ