netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
	netdev@vger.kernel.org,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Subject: Re: [PATCH iwl-next v1 01/13] ixgbe: add initial devlink support
Date: Sun, 9 Feb 2025 11:13:14 +0000	[thread overview]
Message-ID: <20250209111314.GC554665@kernel.org> (raw)
In-Reply-To: <20250203150328.4095-2-jedrzej.jagielski@intel.com>

On Mon, Feb 03, 2025 at 04:03:16PM +0100, Jedrzej Jagielski 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@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>

...

> +/**
> + * ixgbe_devlink_register_port - Register devlink port
> + * @adapter: pointer to the device adapter structure
> + *
> + * Create and register a devlink_port for this physical function.
> + *
> + * Return: 0 on success, error code on failure.
> + */
> +int ixgbe_devlink_register_port(struct ixgbe_adapter *adapter)
> +{
> +	struct devlink_port *devlink_port = &adapter->devlink_port;
> +	struct devlink *devlink = adapter->devlink;
> +	struct device *dev = &adapter->pdev->dev;
> +	struct devlink_port_attrs attrs = {};
> +	int err;
> +
> +	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
> +	attrs.phys.port_number = adapter->hw.bus.func;
> +	ixgbe_devlink_set_switch_id(adapter, &attrs.switch_id);
> +
> +	devlink_port_attrs_set(devlink_port, &attrs);
> +
> +	err = devl_port_register(devlink, devlink_port, 0);
> +	if (err) {
> +		dev_err(dev,
> +			"devlink port registration failed, err %d\n",
> +			err);

nit: I think we can fit this onto one 80 column-wide line (just!).

		dev_err(dev, "devlink port registration failed, err %d\n", err);

> +	}
> +
> +	return err;
> +}

...

  parent reply	other threads:[~2025-02-09 11:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 15:03 [PATCH iwl-next v1 00/13] ixgbe: Add basic devlink support Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 01/13] ixgbe: add initial " Jedrzej Jagielski
2025-02-06 21:39   ` Tony Nguyen
2025-02-07 10:47   ` Simon Horman
2025-02-10 11:08     ` Jagielski, Jedrzej
2025-02-09 11:13   ` Simon Horman [this message]
2025-02-03 15:03 ` [PATCH iwl-next v1 02/13] ixgbe: add handler for devlink .info_get() Jedrzej Jagielski
2025-02-09 16:27   ` Simon Horman
2025-02-10 11:06     ` Jagielski, Jedrzej
2025-02-03 15:03 ` [PATCH iwl-next v1 03/13] ixgbe: add E610 functions for acquiring flash data Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 04/13] ixgbe: read the OROM version information Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 05/13] ixgbe: read the netlist " Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 06/13] ixgbe: add .info_get extension specific for E610 devices Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 07/13] ixgbe: add E610 functions getting PBA and FW ver info Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 08/13] ixgbe: extend .info_get with stored versions Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 09/13] ixgbe: add device flash update via devlink Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 10/13] ixgbe: add support for devlink reload Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 11/13] ixgbe: add FW API version check Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 12/13] ixgbe: add E610 implementation of FW recovery mode Jedrzej Jagielski
2025-02-03 15:03 ` [PATCH iwl-next v1 13/13] ixgbe: add support for FW rollback mode Jedrzej Jagielski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250209111314.GC554665@kernel.org \
    --to=horms@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jedrzej.jagielski@intel.com \
    --cc=mateusz.polchlopek@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).