Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Michal Wilczynski <michal.wilczynski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next v4 3/3] ice: Enable switching default tx scheduler topology
Date: Mon, 11 Jul 2022 17:25:14 -0700	[thread overview]
Message-ID: <5b566477-85d5-d319-a81b-4b7cb064f9d5@intel.com> (raw)
In-Reply-To: <20220704123252.2962020-4-michal.wilczynski@intel.com>



On 7/4/2022 5:32 AM, Michal Wilczynski wrote:
> Introduce support for tx scheduler topology change, based on user
> selection, from default 9-layer to 5-layer. In order for switch to be
> successful there is a new NVM(version 3.20 or older) and DDP package(OS
> Package 1.3.29 or older).
> 
> Enable 5-layer topology switch in init path of the driver. To accomplish
> that upload of the DDP package needs to be delayed, until change in Tx
> topology is finished. To trigger the Tx change user selection should be
> changed in NVM using devlink. Then the platform should be rebooted.
> 
> Example way of switching NVM settings in devlink:
> 
> Show:
> devlink dev param show pci/0000:4b:00.0
>    name txbalancing type driver-specific
>      values:
>        cmode permanent value true
> 
> Set:
> devlink dev param set pci/0000:4b:00.0 name txbalancing value true cmode
> permanent

Did I miss the devlink implementation?

> Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
> ---

<snip>


> +static int ice_init_tx_topology(struct ice_hw *hw,
> +				const struct firmware *firmware)
> +{
> +	u8 num_tx_sched_layers = hw->num_tx_sched_layers;
> +	struct ice_pf *pf = hw->back;
> +	struct device *dev;
> +	u8 *buf_copy;
> +	int err;
> +
> +	dev = ice_pf_to_dev(pf);
> +	/* ice_cfg_tx_topo buf argument is not a constant,
> +	 * so we have to make a copy
> +	 */
> +	buf_copy = kmemdup(firmware->data, firmware->size, GFP_KERNEL);
> +
> +	err = ice_cfg_tx_topo(hw, buf_copy, firmware->size);
> +	if (!err) {
> +		if (hw->num_tx_sched_layers > num_tx_sched_layers)
> +			dev_info(dev, "Transmit balancing feature disabled\n");
> +		else
> +			dev_info(dev, "Transmit balancing feature enabled\n");
> +
> +		/* if there was a change in topology ice_cfg_tx_topo triggered
> +		 * a CORER and we need to re-init hw.
> +		 */
> +		ice_deinit_hw(hw);
> +		err = ice_init_hw(hw);
> +
> +		/* in this case we're not allowing safe mode */
> +		devm_kfree(ice_hw_to_dev(hw), buf_copy);

		This should be a kfree now.

> +
> +		return err;
> +
> +	} else if (err == -EIO) {
> +		dev_info(dev, "DDP package does not support transmit balancing feature - please update to the latest DDP package and try again\n");
> +	}
> +
> +	kfree(buf_copy);
> +
> +	return 0;
> +}
> +
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2022-07-12  0:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 12:32 [Intel-wired-lan] [PATCH net-next v3 0/3] ice: Support 5 layer tx scheduler topology Michal Wilczynski
2022-07-04 12:32 ` [Intel-wired-lan] [PATCH net-next v4 1/3] ice: Support 5 layer topology Michal Wilczynski
2022-07-04 12:32 ` [Intel-wired-lan] [PATCH net-next v4 2/3] ice: Adjust the VSI/Aggregator layers Michal Wilczynski
2022-07-04 12:32 ` [Intel-wired-lan] [PATCH net-next v4 3/3] ice: Enable switching default tx scheduler topology Michal Wilczynski
2022-07-12  0:25   ` Tony Nguyen [this message]
2022-07-12  7:51     ` Wilczynski, Michal
2022-07-14 20:31       ` Tony Nguyen
2022-07-20 14:48         ` Wilczynski, Michal

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=5b566477-85d5-d319-a81b-4b7cb064f9d5@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=michal.wilczynski@intel.com \
    /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