From: Saeed Mahameed <saeed@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Tariq Toukan <ttoukan.linux@gmail.com>,
Tariq Toukan <tariqt@nvidia.com>, Simon Horman <horms@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Shahar Shitrit <shshitrit@nvidia.com>,
Gal Pressman <gal@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org,
Carolina Jubran <cjubran@nvidia.com>
Subject: Re: [PATCH net-next 4/4] net/mlx5: Add sensor name to temperature event message
Date: Thu, 20 Feb 2025 14:22:37 -0800 [thread overview]
Message-ID: <Z7erLQwDBHYoCV7X@x130> (raw)
In-Reply-To: <20250219072829.21ee1cfc@kernel.org>
On 19 Feb 07:28, Jakub Kicinski wrote:
>On Wed, 19 Feb 2025 15:00:57 +0200 Tariq Toukan wrote:
>> >> If you have to respin for some other reason, please consider limiting lines
>> >> to 80 columns wide or less here and elsewhere in this patch where it
>> >> doesn't reduce readability (subjective I know).
>> >
>> > +1, please try to catch such situations going forward
>>
>> This was not missed.
>> This is not a new thing...
>> We've been enforcing a max line length of 100 chars in mlx5 driver for
>> the past few years.
>> I don't have the full image now, but I'm convinced that this dates back
>> to an agreement between the mlx5 and netdev maintainers at that time.
>>
>> 80 chars could be too restrictive, especially with today's large
>> monitors, while 100-chars is still highly readable.
>> This is subjective of course...
>>
>> If you don't have a strong preference, we'll keep the current 100 chars
>> limit. Otherwise, just let me know and we'll start enforcing the
>> 80-chars limit for future patches.
>
>Right, I think mlx5 is the only exception to the 80 column guidance.
>I don't think it's resulting in more readable code, so yes, my
>preference is to end this experiment.
>
The reason in mlx5 was that we wanted to preserve the official HW spec
auto-generated fields names and they are really long.
100 chars worked very well with us for example the following sequence of
code setting up a FW command buffer would have to be broken in every line
if we were to restrict 80 chars per line.
MLX5_SET(modify_vhca_state_in, in, opcode, MLX5_CMD_OP_MODIFY_VHCA_STATE);
MLX5_SET(modify_vhca_state_in, in, vhca_state_field_select.sw_function_id, 1);
MLX5_SET(modify_vhca_state_in, in, vhca_state_context.sw_function_id, sw_fn_id);
MLX5_SET(modify_vhca_state_in, in, vhca_state_context.arm_change_event, 1);
MLX5_SET(modify_vhca_state_in, in, vhca_state_field_select.arm_change_event, 1);
But I believe the driver grow larger than caring about those lines too
much, I just did a quick check and it seems less than 2% of the lines are
actually > 80, not sure this is due to being more strict in the past few
years or that we don't really need more than 80 lines.
I also check the interesting cases with macros such
MLX5_SET/MLX5_GET/MLX5_CAP and also the percentile of long lines was very
minor just about 5% in all cases..
So I kinda agree mlx5 doesn't need be so special anymore.
Tariq up to you, you are the main reviewer now.
Thanks
Saeed.
next prev parent reply other threads:[~2025-02-20 22:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 9:46 [PATCH net-next 0/4] mlx5: Add sensor name in temperature message Tariq Toukan
2025-02-13 9:46 ` [PATCH net-next 1/4] net/mlx5: Apply rate-limiting to high temperature warning Tariq Toukan
2025-02-13 10:15 ` Mateusz Polchlopek
2025-02-13 9:46 ` [PATCH net-next 2/4] net/mlx5: Prefix temperature event bitmap with '0x' for clarity Tariq Toukan
2025-02-13 10:33 ` Mateusz Polchlopek
2025-02-13 9:46 ` [PATCH net-next 3/4] net/mlx5: Modify LSB bitmask in temperature event to include only the first bit Tariq Toukan
2025-02-13 12:11 ` Mateusz Polchlopek
2025-02-13 9:46 ` [PATCH net-next 4/4] net/mlx5: Add sensor name to temperature event message Tariq Toukan
2025-02-15 19:29 ` Simon Horman
2025-02-18 0:27 ` Jakub Kicinski
2025-02-19 13:00 ` Tariq Toukan
2025-02-19 15:28 ` Jakub Kicinski
2025-02-20 22:22 ` Saeed Mahameed [this message]
2025-02-18 0:40 ` [PATCH net-next 0/4] mlx5: Add sensor name in temperature message patchwork-bot+netdevbpf
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=Z7erLQwDBHYoCV7X@x130 \
--to=saeed@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shshitrit@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=ttoukan.linux@gmail.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).