* [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs
@ 2023-12-14 14:10 Aleksandr Loktionov
2023-12-14 14:20 ` Paul Menzel
2023-12-18 23:08 ` Tony Nguyen
0 siblings, 2 replies; 4+ messages in thread
From: Aleksandr Loktionov @ 2023-12-14 14:10 UTC (permalink / raw)
To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov
Cc: netdev, Przemek Kitszel
Add trace events related to SFP module IOCTLs for troubleshooting.
Riewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
src/CORE/i40e_ethtool.c | 5 +++++
src/CORE/i40e_trace.h | 18 ++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/src/CORE/i40e_ethtool.c b/src/CORE/i40e_ethtool.c
index 0838566..e9d9d4b 100644
--- a/src/CORE/i40e_ethtool.c
+++ b/src/CORE/i40e_ethtool.c
@@ -1057,6 +1057,7 @@ static int i40e_get_link_ksettings(struct net_device *netdev,
ethtool_link_ksettings_zero_link_mode(ks, supported);
ethtool_link_ksettings_zero_link_mode(ks, advertising);
+ i40e_trace(ioctl_get_link_ksettings, pf, hw_link_info->link_info);
if (link_up)
i40e_get_settings_link_up(hw, ks, netdev, pf);
else
@@ -7219,9 +7220,12 @@ static int i40e_get_module_info(struct net_device *netdev,
modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
break;
default:
+ i40e_trace(ioctl_get_module_info, pf, ~0UL);
netdev_dbg(vsi->netdev, "SFP module type unrecognized or no SFP connector used.\n");
return -EOPNOTSUPP;
}
+ i40e_trace(ioctl_get_module_info, pf, (((u64)modinfo->type) << 32) |
+ modinfo->eeprom_len);
return 0;
}
@@ -7244,6 +7248,7 @@ static int i40e_get_module_eeprom(struct net_device *netdev,
u32 value = 0;
int i;
+ i40e_trace(ioctl_get_module_eeprom, pf, ee ? ee->len : 0U);
if (!ee || !ee->len || !data)
return -EINVAL;
diff --git a/src/CORE/i40e_trace.h b/src/CORE/i40e_trace.h
index cac0f7c..f54fc36 100644
--- a/src/CORE/i40e_trace.h
+++ b/src/CORE/i40e_trace.h
@@ -428,6 +428,24 @@ DEFINE_EVENT(
TP_ARGS(pf, val));
+DEFINE_EVENT(
+ i40e_ioctl_template, i40e_ioctl_get_module_info,
+ TP_PROTO(struct i40e_pf *pf, u64 val),
+
+ TP_ARGS(pf, val));
+
+DEFINE_EVENT(
+ i40e_ioctl_template, i40e_ioctl_get_module_eeprom,
+ TP_PROTO(struct i40e_pf *pf, u64 val),
+
+ TP_ARGS(pf, val));
+
+DEFINE_EVENT(
+ i40e_ioctl_template, i40e_ioctl_get_link_ksettings,
+ TP_PROTO(struct i40e_pf *pf, u64 val),
+
+ TP_ARGS(pf, val));
+
DECLARE_EVENT_CLASS(
i40e_nvmupd_template,
--
2.31.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs
2023-12-14 14:10 [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs Aleksandr Loktionov
@ 2023-12-14 14:20 ` Paul Menzel
2023-12-14 17:05 ` Loktionov, Aleksandr
2023-12-18 23:08 ` Tony Nguyen
1 sibling, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2023-12-14 14:20 UTC (permalink / raw)
To: Aleksandr Loktionov
Cc: intel-wired-lan, anthony.l.nguyen, Przemek Kitszel, netdev
Dear Aleksandr,
Thank you for your patch.
Am 14.12.23 um 15:10 schrieb Aleksandr Loktionov:
> Add trace events related to SFP module IOCTLs for troubleshooting.
Maybe list the three events? Maybe even a usage example.
> Riewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
> src/CORE/i40e_ethtool.c | 5 +++++
> src/CORE/i40e_trace.h | 18 ++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/src/CORE/i40e_ethtool.c b/src/CORE/i40e_ethtool.c
> index 0838566..e9d9d4b 100644
> --- a/src/CORE/i40e_ethtool.c
> +++ b/src/CORE/i40e_ethtool.c
> @@ -1057,6 +1057,7 @@ static int i40e_get_link_ksettings(struct net_device *netdev,
> ethtool_link_ksettings_zero_link_mode(ks, supported);
> ethtool_link_ksettings_zero_link_mode(ks, advertising);
>
> + i40e_trace(ioctl_get_link_ksettings, pf, hw_link_info->link_info);
> if (link_up)
> i40e_get_settings_link_up(hw, ks, netdev, pf);
> else
> @@ -7219,9 +7220,12 @@ static int i40e_get_module_info(struct net_device *netdev,
> modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
> break;
> default:
> + i40e_trace(ioctl_get_module_info, pf, ~0UL);
> netdev_dbg(vsi->netdev, "SFP module type unrecognized or no SFP connector used.\n");
Is it useful, if there is a debug print already?
Kind regards,
Paul
> return -EOPNOTSUPP;
> }
> + i40e_trace(ioctl_get_module_info, pf, (((u64)modinfo->type) << 32) |
> + modinfo->eeprom_len);
> return 0;
> }
>
> @@ -7244,6 +7248,7 @@ static int i40e_get_module_eeprom(struct net_device *netdev,
> u32 value = 0;
> int i;
>
> + i40e_trace(ioctl_get_module_eeprom, pf, ee ? ee->len : 0U);
> if (!ee || !ee->len || !data)
> return -EINVAL;
>
> diff --git a/src/CORE/i40e_trace.h b/src/CORE/i40e_trace.h
> index cac0f7c..f54fc36 100644
> --- a/src/CORE/i40e_trace.h
> +++ b/src/CORE/i40e_trace.h
> @@ -428,6 +428,24 @@ DEFINE_EVENT(
>
> TP_ARGS(pf, val));
>
> +DEFINE_EVENT(
> + i40e_ioctl_template, i40e_ioctl_get_module_info,
> + TP_PROTO(struct i40e_pf *pf, u64 val),
> +
> + TP_ARGS(pf, val));
> +
> +DEFINE_EVENT(
> + i40e_ioctl_template, i40e_ioctl_get_module_eeprom,
> + TP_PROTO(struct i40e_pf *pf, u64 val),
> +
> + TP_ARGS(pf, val));
> +
> +DEFINE_EVENT(
> + i40e_ioctl_template, i40e_ioctl_get_link_ksettings,
> + TP_PROTO(struct i40e_pf *pf, u64 val),
> +
> + TP_ARGS(pf, val));
> +
> DECLARE_EVENT_CLASS(
> i40e_nvmupd_template,
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs
2023-12-14 14:20 ` Paul Menzel
@ 2023-12-14 17:05 ` Loktionov, Aleksandr
0 siblings, 0 replies; 4+ messages in thread
From: Loktionov, Aleksandr @ 2023-12-14 17:05 UTC (permalink / raw)
To: Paul Menzel
Cc: intel-wired-lan@lists.osuosl.org, Nguyen, Anthony L,
Kitszel, Przemyslaw, netdev@vger.kernel.org
> -----Original Message-----
> From: Paul Menzel <pmenzel@molgen.mpg.de>
> Sent: Thursday, December 14, 2023 3:20 PM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next] i40e: add trace
> events related to SFP module IOCTLs
>
> Dear Aleksandr,
>
>
> Thank you for your patch.
>
>
> Am 14.12.23 um 15:10 schrieb Aleksandr Loktionov:
> > Add trace events related to SFP module IOCTLs for
> troubleshooting.
>
> Maybe list the three events? Maybe even a usage example.
There is nothing especial about start to use new events, they start to be traced if you trace ioctls.
>
> > Riewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>
> Reviewed
>
> > Signed-off-by: Aleksandr Loktionov
> <aleksandr.loktionov@intel.com>
> > ---
> > src/CORE/i40e_ethtool.c | 5 +++++
> > src/CORE/i40e_trace.h | 18 ++++++++++++++++++
> > 2 files changed, 23 insertions(+)
> >
> > diff --git a/src/CORE/i40e_ethtool.c b/src/CORE/i40e_ethtool.c
> index
> > 0838566..e9d9d4b 100644
> > --- a/src/CORE/i40e_ethtool.c
> > +++ b/src/CORE/i40e_ethtool.c
> > @@ -1057,6 +1057,7 @@ static int i40e_get_link_ksettings(struct
> net_device *netdev,
> > ethtool_link_ksettings_zero_link_mode(ks, supported);
> > ethtool_link_ksettings_zero_link_mode(ks, advertising);
> >
> > + i40e_trace(ioctl_get_link_ksettings, pf, hw_link_info-
> >link_info);
> > if (link_up)
> > i40e_get_settings_link_up(hw, ks, netdev, pf);
> > else
> > @@ -7219,9 +7220,12 @@ static int i40e_get_module_info(struct
> net_device *netdev,
> > modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
> > break;
> > default:
> > + i40e_trace(ioctl_get_module_info, pf, ~0UL);
> > netdev_dbg(vsi->netdev, "SFP module type unrecognized
> or no SFP
> > connector used.\n");
>
> Is it useful, if there is a debug print already?
In fact, very useful. On some production systems debug printk is disabled. The point to use trace is not to slowdown production as all debug printk-s start to do and start/stop tracing at any moment.
>
> Kind regards,
>
> Paul
>
>
> > return -EOPNOTSUPP;
> > }
> > + i40e_trace(ioctl_get_module_info, pf, (((u64)modinfo->type)
> << 32) |
> > + modinfo->eeprom_len);
> > return 0;
> > }
> >
> > @@ -7244,6 +7248,7 @@ static int i40e_get_module_eeprom(struct
> net_device *netdev,
> > u32 value = 0;
> > int i;
> >
> > + i40e_trace(ioctl_get_module_eeprom, pf, ee ? ee->len : 0U);
> > if (!ee || !ee->len || !data)
> > return -EINVAL;
> >
> > diff --git a/src/CORE/i40e_trace.h b/src/CORE/i40e_trace.h index
> > cac0f7c..f54fc36 100644
> > --- a/src/CORE/i40e_trace.h
> > +++ b/src/CORE/i40e_trace.h
> > @@ -428,6 +428,24 @@ DEFINE_EVENT(
> >
> > TP_ARGS(pf, val));
> >
> > +DEFINE_EVENT(
> > + i40e_ioctl_template, i40e_ioctl_get_module_info,
> > + TP_PROTO(struct i40e_pf *pf, u64 val),
> > +
> > + TP_ARGS(pf, val));
> > +
> > +DEFINE_EVENT(
> > + i40e_ioctl_template, i40e_ioctl_get_module_eeprom,
> > + TP_PROTO(struct i40e_pf *pf, u64 val),
> > +
> > + TP_ARGS(pf, val));
> > +
> > +DEFINE_EVENT(
> > + i40e_ioctl_template, i40e_ioctl_get_link_ksettings,
> > + TP_PROTO(struct i40e_pf *pf, u64 val),
> > +
> > + TP_ARGS(pf, val));
> > +
> > DECLARE_EVENT_CLASS(
> > i40e_nvmupd_template,
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs
2023-12-14 14:10 [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs Aleksandr Loktionov
2023-12-14 14:20 ` Paul Menzel
@ 2023-12-18 23:08 ` Tony Nguyen
1 sibling, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2023-12-18 23:08 UTC (permalink / raw)
To: Aleksandr Loktionov, intel-wired-lan; +Cc: netdev, Przemek Kitszel
On 12/14/2023 6:10 AM, Aleksandr Loktionov wrote:
> Add trace events related to SFP module IOCTLs for troubleshooting.
>
> Riewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
> src/CORE/i40e_ethtool.c | 5 +++++
> src/CORE/i40e_trace.h | 18 ++++++++++++++++++
> 2 files changed, 23 insertions(+)
This doesn't apply.
Thanks,
Tony
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-18 23:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 14:10 [Intel-wired-lan] [PATCH iwl-next] i40e: add trace events related to SFP module IOCTLs Aleksandr Loktionov
2023-12-14 14:20 ` Paul Menzel
2023-12-14 17:05 ` Loktionov, Aleksandr
2023-12-18 23:08 ` Tony Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox