From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Wei Fang <wei.fang@nxp.com>,
"Wei Fang (OSS)" <wei.fang@oss.nxp.com>,
"richardcochran@gmail.com" <richardcochran@gmail.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"andrew@lunn.ch" <andrew@lunn.ch>,
"olteanv@gmail.com" <olteanv@gmail.com>
Cc: "chleroy@kernel.org" <chleroy@kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net-next 6/7] net: dsa: netc: add PTP two-step timestamping support
Date: Thu, 30 Jul 2026 14:02:19 +0100 [thread overview]
Message-ID: <48631703-cbd9-45ba-b079-c4d94f4cf405@linux.dev> (raw)
In-Reply-To: <GV2PR04MB11739A4EDB782AB83B60968D988C92@GV2PR04MB11739.eurprd04.prod.outlook.com>
On 30/07/2026 02:31, Wei Fang wrote:
>>> +int netc_get_ts_info(struct dsa_switch *ds, int port,
>>> + struct kernel_ethtool_ts_info *info)
>>> +{
>>> + struct netc_switch *priv = ds->priv;
>>> +
>>> + info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
>>> + SOF_TIMESTAMPING_RX_SOFTWARE |
>>> + SOF_TIMESTAMPING_SOFTWARE;
>>
>> SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE
>> are available
>> by default, no need to add them.
>
> Yes, you are right, I will remove them.
>
>>
>> the code doesn't have skb_tx_timestamp() calls, I wonder how is
>> SOF_TIMESTAMPING_TX_SOFTWARE implemented?
>
> The switch and the conduit port (ENETC) are integrated into the NETC IP,
> so the switch can only connect to the ENETC MAC. And the ENETC driver
> calls skb_tx_timestamp() unconditionally, so I thought
> SOF_TIMESTAMPING_TX_SOFTWARE can be added. I checked the existing
> DSA drivers and found no drivers set this flag, maybe I should remove this
> flag as well. Thanks.
well, you have the hardware, you can actually check if enetc driver
provides it for you
>
>>
>>> +
>>> + info->phc_index = netc_get_phc_index(priv);
>>> + if (info->phc_index < 0)
>>> + return 0;
>>> +
>>> + info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
>>> + SOF_TIMESTAMPING_RX_HARDWARE |
>>> + SOF_TIMESTAMPING_RAW_HARDWARE;
>>> +
>>> + info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
>>> +
>>> + info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
>>> + BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) |
>>> + BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
>>> + BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
>>> +
>>> + return 0;
>>> +}
>>
>
next prev parent reply other threads:[~2026-07-30 13:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 10:45 [PATCH net-next 0/7] net: dsa: netc: add PTP support for NETC switch wei.fang
2026-07-28 10:45 ` [PATCH net-next 1/7] ptp: netc: use ioread64_lo_hi/iowrite64_lo_hi for 64-bit register access wei.fang
2026-07-28 10:45 ` [PATCH net-next 2/7] ptp: netc: remove unnecessary pcie_flr() call in probe wei.fang
2026-07-28 10:45 ` [PATCH net-next 3/7] ptp: netc: export netc_timer_get_current_time() for cross-driver use wei.fang
2026-07-28 10:45 ` [PATCH net-next 4/7] net: dsa: netc: use entry ID instead of pointer to track host flood rule wei.fang
2026-07-28 10:45 ` [PATCH net-next 5/7] net: dsa: netc: enable ingress port filtering lookup by default wei.fang
2026-07-28 10:45 ` [PATCH net-next 6/7] net: dsa: netc: add PTP two-step timestamping support wei.fang
2026-07-29 13:41 ` Vadim Fedorenko
2026-07-30 1:31 ` Wei Fang
2026-07-30 13:02 ` Vadim Fedorenko [this message]
2026-07-28 10:45 ` [PATCH net-next 7/7] net: dsa: netc: add PTP one-step " wei.fang
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=48631703-cbd9-45ba-b079-c4d94f4cf405@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=chleroy@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=wei.fang@oss.nxp.com \
--cc=xiaoning.wang@nxp.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