From: sashiko-bot@kernel.org
To: "Abhijit Gangurde" <abhijit.gangurde@amd.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [for-next v4 1/5] net: ionic: register PHC for rdma timestamping
Date: Fri, 30 Oct 2026 04:54:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-190463@kernel.org> (raw)
In-Reply-To: <20260610154216.712374-2-abhijit.gangurde@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] ionic_get_ts_info incorrectly drops software timestamping capabilities for devices supporting only RDMA timestamping.
--
commit e70a276bad5dcce2118c120bed8e5cd4bc2c22fd
Author: Abhijit Gangurde <abhijit.gangurde@amd.com>
net: ionic: register PHC for rdma timestamping
Currently, the driver only registers the PTP Hardware Clock (PHC) if
Ethernet hardware timestamping is supported. Update the registration
logic to register the PHC if the device supports either Ethernet
hardware timestamping or RDMA completion timestamping.
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 78a802eb159f0..154ea1bef85d9 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -1018,10 +1018,14 @@ static int ionic_get_ts_info(struct net_device *netdev,
>
> info->phc_index = ptp_clock_index(lif->phc->ptp);
>
> - info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
> - SOF_TIMESTAMPING_TX_HARDWARE |
> - SOF_TIMESTAMPING_RX_HARDWARE |
> - SOF_TIMESTAMPING_RAW_HARDWARE;
> + info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
> +
> + if (!(lif->hw_features & IONIC_ETH_HW_TIMESTAMP))
> + return 0;
[Severity: Medium]
Does this early return omit software timestamping capabilities for devices
that only support RDMA timestamping?
Before this patch, devices supporting only RDMA timestamping (where
IONIC_ETH_HW_RDMA_TIMESTAMP is present but IONIC_ETH_HW_TIMESTAMP is not)
did not allocate lif->phc. Because lif->phc was NULL, ionic_get_ts_info()
would fall back to ethtool_op_get_ts_info(), which correctly advertises
SOF_TIMESTAMPING_TX_SOFTWARE, SOF_TIMESTAMPING_RX_SOFTWARE, and
SOF_TIMESTAMPING_SOFTWARE.
With this patch, lif->phc is allocated for RDMA-only devices, causing the
ethtool_op_get_ts_info() fallback to be skipped. The custom logic here
only sets SOF_TIMESTAMPING_TX_SOFTWARE and then returns 0, dropping the
SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE capabilities
for these interfaces.
> +
> + info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
> + SOF_TIMESTAMPING_RX_HARDWARE |
> + SOF_TIMESTAMPING_RAW_HARDWARE;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260610154216.712374-1-abhijit.gangurde@amd.com?part=1
next prev parent reply other threads:[~2026-10-30 4:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 15:42 [for-next v4 0/5] ionic: RDMA completion timestamping support Abhijit Gangurde
2026-06-10 15:42 ` [for-next v4 1/5] net: ionic: register PHC for rdma timestamping Abhijit Gangurde
2026-10-30 4:54 ` sashiko-bot [this message]
2026-06-10 15:42 ` [for-next v4 2/5] net: ionic: Add PHC state page for user space access Abhijit Gangurde
2026-10-30 4:54 ` sashiko-bot
2026-06-10 15:42 ` [for-next v4 3/5] RDMA/ionic: map PHC state into user space Abhijit Gangurde
2026-10-30 4:54 ` sashiko-bot
2026-06-10 15:42 ` [for-next v4 4/5] RDMA/ionic: add completion timestamp to CQE format Abhijit Gangurde
2026-10-30 4:54 ` sashiko-bot
2026-06-10 15:42 ` [for-next v4 5/5] RDMA/mlx5: move mlx5 clock info to common struct ib_uverbs_clock_info Abhijit Gangurde
2026-07-15 13:08 ` [for-next v4 0/5] ionic: RDMA completion timestamping support Abhijit Gangurde
2026-07-16 8:01 ` Leon Romanovsky
2026-07-16 8:56 ` Abhijit Gangurde
2026-07-16 9:19 ` Leon Romanovsky
2026-07-22 8:45 ` Abhijit Gangurde
2026-07-22 8:55 ` Leon Romanovsky
2026-07-22 8:56 ` Leon Romanovsky
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=sashiko-outbox-190463@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abhijit.gangurde@amd.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox