From: Carolina Jubran <cjubran@nvidia.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Andrew Lunn <andrew@lunn.ch>,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Tariq Toukan <tariqt@nvidia.com>, Gal Pressman <gal@nvidia.com>,
intel-wired-lan@lists.osuosl.org,
Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [RFC PATCH v5] ethtool: add FEC bins histogramm report
Date: Tue, 19 Aug 2025 10:31:02 +0300 [thread overview]
Message-ID: <203ae8b4-9b45-43c2-a1e2-a3d0d80b81ea@nvidia.com> (raw)
In-Reply-To: <cab8df87-46fc-49f4-be1d-a55585587e61@linux.dev>
On 18/08/2025 21:35, Vadim Fedorenko wrote:
> On 18/08/2025 19:17, Carolina Jubran wrote:
>>
>>
>> On 15/08/2025 16:27, Vadim Fedorenko wrote:
>>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>>> index de5bd76a400ca..6c0dc6ae080a8 100644
>>> --- a/include/linux/ethtool.h
>>> +++ b/include/linux/ethtool.h
>>> @@ -492,7 +492,25 @@ struct ethtool_pause_stats {
>>> };
>>> #define ETHTOOL_MAX_LANES 8
>>> +#define ETHTOOL_FEC_HIST_MAX 18
>>
>> Could you clarify why it is set to 18?
>> AFAIU IEEE 802.3ck/df define 16 bins.
>
> Yeah, the standard defines 16 bins, but this value came out of the
> discussion with Gal and Yael because the hardware supports more bins,
> I believe, in RDMA mode
>
currently I believe those are internal modes that expose 19 on our
hardware. Therefore, I think 16 is sufficient and we can easily extend
in the future.
>>> diff --git a/net/ethtool/fec.c b/net/ethtool/fec.c
>>> index e7d3f2c352a34..9313bd17544fd 100644
>>> --- a/net/ethtool/fec.c
>>> +++ b/net/ethtool/fec.c
>>> @@ -17,6 +17,7 @@ struct fec_reply_data {
>>> u64 stats[1 + ETHTOOL_MAX_LANES];
>>> u8 cnt;
>>> } corr, uncorr, corr_bits;
>>> + struct ethtool_fec_hist fec_stat_hist;
>>> };
>>> #define FEC_REPDATA(__reply_base) \
>>> @@ -113,7 +114,11 @@ static int fec_prepare_data(const struct
>>> ethnl_req_info *req_base,
>>> struct ethtool_fec_stats stats;
>>> ethtool_stats_init((u64 *)&stats, sizeof(stats) / 8);
>>> - dev->ethtool_ops->get_fec_stats(dev, &stats);
>>> + ethtool_stats_init((u64 *)data->fec_stat_hist.values,
>>> + ETHTOOL_MAX_LANES *
>> this should be ETHTOOL_FEC_HIST_MAX since we’re initializing the
>> histogram bins array.
>
> Yes, you're right, I'll change it in the next version
WARNING: multiple messages have this Message-ID (diff)
From: Carolina Jubran <cjubran@nvidia.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
Andrew Lunn <andrew@lunn.ch>,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Tariq Toukan <tariqt@nvidia.com>, Gal Pressman <gal@nvidia.com>,
intel-wired-lan@lists.osuosl.org,
Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [RFC PATCH v5] ethtool: add FEC bins histogramm report
Date: Tue, 19 Aug 2025 10:31:02 +0300 [thread overview]
Message-ID: <203ae8b4-9b45-43c2-a1e2-a3d0d80b81ea@nvidia.com> (raw)
In-Reply-To: <cab8df87-46fc-49f4-be1d-a55585587e61@linux.dev>
On 18/08/2025 21:35, Vadim Fedorenko wrote:
> On 18/08/2025 19:17, Carolina Jubran wrote:
>>
>>
>> On 15/08/2025 16:27, Vadim Fedorenko wrote:
>>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>>> index de5bd76a400ca..6c0dc6ae080a8 100644
>>> --- a/include/linux/ethtool.h
>>> +++ b/include/linux/ethtool.h
>>> @@ -492,7 +492,25 @@ struct ethtool_pause_stats {
>>> };
>>> #define ETHTOOL_MAX_LANES 8
>>> +#define ETHTOOL_FEC_HIST_MAX 18
>>
>> Could you clarify why it is set to 18?
>> AFAIU IEEE 802.3ck/df define 16 bins.
>
> Yeah, the standard defines 16 bins, but this value came out of the
> discussion with Gal and Yael because the hardware supports more bins,
> I believe, in RDMA mode
>
currently I believe those are internal modes that expose 19 on our
hardware. Therefore, I think 16 is sufficient and we can easily extend
in the future.
>>> diff --git a/net/ethtool/fec.c b/net/ethtool/fec.c
>>> index e7d3f2c352a34..9313bd17544fd 100644
>>> --- a/net/ethtool/fec.c
>>> +++ b/net/ethtool/fec.c
>>> @@ -17,6 +17,7 @@ struct fec_reply_data {
>>> u64 stats[1 + ETHTOOL_MAX_LANES];
>>> u8 cnt;
>>> } corr, uncorr, corr_bits;
>>> + struct ethtool_fec_hist fec_stat_hist;
>>> };
>>> #define FEC_REPDATA(__reply_base) \
>>> @@ -113,7 +114,11 @@ static int fec_prepare_data(const struct
>>> ethnl_req_info *req_base,
>>> struct ethtool_fec_stats stats;
>>> ethtool_stats_init((u64 *)&stats, sizeof(stats) / 8);
>>> - dev->ethtool_ops->get_fec_stats(dev, &stats);
>>> + ethtool_stats_init((u64 *)data->fec_stat_hist.values,
>>> + ETHTOOL_MAX_LANES *
>> this should be ETHTOOL_FEC_HIST_MAX since we’re initializing the
>> histogram bins array.
>
> Yes, you're right, I'll change it in the next version
next prev parent reply other threads:[~2025-08-19 7:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 13:27 [Intel-wired-lan] [RFC PATCH v5] ethtool: add FEC bins histogramm report Vadim Fedorenko
2025-08-15 13:27 ` Vadim Fedorenko
2025-08-18 18:17 ` [Intel-wired-lan] " Carolina Jubran
2025-08-18 18:17 ` Carolina Jubran
2025-08-18 18:35 ` [Intel-wired-lan] " Vadim Fedorenko
2025-08-18 18:35 ` Vadim Fedorenko
2025-08-19 7:31 ` Carolina Jubran [this message]
2025-08-19 7:31 ` Carolina Jubran
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=203ae8b4-9b45-43c2-a1e2-a3d0d80b81ea@nvidia.com \
--to=cjubran@nvidia.com \
--cc=andrew@lunn.ch \
--cc=donald.hunter@gmail.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=tariqt@nvidia.com \
--cc=vadim.fedorenko@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.