netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Saeed Mahameed <saeed@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Gal Pressman <gal@nvidia.com>
Subject: Re: [net-next 08/15] net/mlx5e: Add hairpin debugfs files
Date: Wed, 11 Jan 2023 13:03:42 -0800	[thread overview]
Message-ID: <20230111130342.6cef77d7@kernel.org> (raw)
In-Reply-To: <Y78gEBXP9BuMq09O@x130>

On Wed, 11 Jan 2023 12:46:08 -0800 Saeed Mahameed wrote:
> On 11 Jan 10:34, Jakub Kicinski wrote:
> >On Tue, 10 Jan 2023 21:30:38 -0800 Saeed Mahameed wrote:  
> >> +	debugfs_create_file("hairpin_num_queues", 0644, tc->dfs_root,
> >> +			    &tc->hairpin_params, &fops_hairpin_queues);
> >> +	debugfs_create_file("hairpin_queue_size", 0644, tc->dfs_root,
> >> +			    &tc->hairpin_params, &fops_hairpin_queue_size);  
> >
> >debugfs should be read-only, please LMK if I'm missing something,
> >otherwise this series is getting reverted  
> 
> I remember asking you about this and you said it's ok to use write for
> debug features, this is needed for debugging performance bottlenecks.

FWIW I don't think this fits into the debug exemption. What I meant by
debug was stuff like write to configure what traces or debug features
of the chip are enabled. This falls into configuration, even if it's
not expected to be tweaked by users.

> hairpin + steering performance behaves differently between different
> hardware versions and under different NIC/E-Switch configs, so it's really
> important to have some control on some of these attributes when debugging.

Can you expand on the use of this params when debugging? AFAICT these
configure the RQ/SQ pairs (count and size) so really the only
"debugging" you can do here is change the config and see if it fixes
performance...

> Our dilemma was either to use devlink vendor params or a debug interface, 
> since we are pretty sure that our NIC hairpin implementation
> is unique as it uses software constructs (RQs/SQs) managed internally
> by Firmware for abstraction of a TC redirect action, thus the only place
> for this is either devlink vendor params or debugfs, we chose debugfs since
> we want to keep this for debug purposes on production systems.
> 
> we also considered extending TC but again since this is unique to CX
> architecture of the current chips, we didn't want to pollute TC.
> 
> Also devlink resource wasn't a good match since these resources don't
> exist until a TC redirect action is offloaded.
> 
> Please let me know what you think and whether this is acceptable by you.

I don't know of any other devices which need the hairpin setup 
so I won't push for a common API. But we *do* need to list these
tunables somewhere because my ability to grep them out of mlx5 when
another vendor comes with the same problem will be very limited.
Which is one of the reasons why devlink params have to be documented.
Plus IIRC you already have the EQ configuration via params.

  reply	other threads:[~2023-01-11 21:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  5:30 [pull request][net-next 00/15] mlx5 updates 2023-01-10 Saeed Mahameed
2023-01-11  5:30 ` [net-next 01/15] net/mlx5: Expose shared buffer registers bits and structs Saeed Mahameed
2023-01-11  9:10   ` patchwork-bot+netdevbpf
2023-01-11  5:30 ` [net-next 02/15] net/mlx5e: Add API to query/modify SBPR and SBCM registers Saeed Mahameed
2023-01-11  5:30 ` [net-next 03/15] net/mlx5e: Update shared buffer along with device buffer changes Saeed Mahameed
2023-01-11  5:30 ` [net-next 04/15] net/mlx5e: Add Ethernet driver debugfs Saeed Mahameed
2023-01-11  5:30 ` [net-next 05/15] net/mlx5e: kTLS, Add debugfs Saeed Mahameed
2023-01-11 18:32   ` Jakub Kicinski
2023-01-11 20:20     ` Saeed Mahameed
2023-01-11 20:52       ` Jakub Kicinski
2023-01-11  5:30 ` [net-next 06/15] net/mlx5e: Add hairpin params structure Saeed Mahameed
2023-01-11  5:30 ` [net-next 07/15] net/mlx5e: Add flow steering debugfs directory Saeed Mahameed
2023-01-11  5:30 ` [net-next 08/15] net/mlx5e: Add hairpin debugfs files Saeed Mahameed
2023-01-11 18:34   ` Jakub Kicinski
2023-01-11 20:46     ` Saeed Mahameed
2023-01-11 21:03       ` Jakub Kicinski [this message]
2023-01-11 23:01         ` Saeed Mahameed
2023-01-12  3:46           ` Jakub Kicinski
2023-01-12  9:17             ` Gal Pressman
2023-01-12 22:20               ` Jakub Kicinski
2023-01-15 10:04                 ` Gal Pressman
2023-01-17 18:48                   ` Jakub Kicinski
2023-01-11  5:30 ` [net-next 09/15] net/mlx5: Enable management PF initialization Saeed Mahameed
2023-01-11  5:30 ` [net-next 10/15] net/mlx5: Introduce and use opcode getter in command interface Saeed Mahameed
2023-01-11  5:30 ` [net-next 11/15] net/mlx5: Prevent high-rate FW commands from populating all slots Saeed Mahameed
2023-01-11  5:30 ` [net-next 12/15] net/mlx5e: Replace zero-length array with flexible-array member Saeed Mahameed
2023-01-11  5:30 ` [net-next 13/15] net/mlx5e: Replace 0-length array with flexible array Saeed Mahameed
2023-01-11  5:30 ` [net-next 14/15] net/mlx5: remove redundant ret variable Saeed Mahameed
2023-01-11  5:30 ` [net-next 15/15] net/mlx5e: Use kzalloc() in mlx5e_accel_fs_tcp_create() Saeed Mahameed

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=20230111130342.6cef77d7@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeed@kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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;
as well as URLs for NNTP newsgroup(s).