From: Jakub Kicinski <kuba@kernel.org>
To: "Zulkifli, Muhammad Husaini" <muhammad.husaini.zulkifli@intel.com>
Cc: "intel-wired-lan@osuosl.org" <intel-wired-lan@osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"Gunasekaran, Aravindhan" <aravindhan.gunasekaran@intel.com>,
"richardcochran@gmail.com" <richardcochran@gmail.com>,
"gal@nvidia.com" <gal@nvidia.com>,
"saeed@kernel.org" <saeed@kernel.org>,
"leon@kernel.org" <leon@kernel.org>,
"michael.chan@broadcom.com" <michael.chan@broadcom.com>,
"andy@greyhouse.net" <andy@greyhouse.net>,
"Gomes, Vinicius" <vinicius.gomes@intel.com>,
Vadim Fedorenko <vfedorenko@novek.ru>
Subject: Re: [PATCH v2 0/5] Add support for DMA timestamp for non-PTP packets
Date: Wed, 19 Oct 2022 19:47:57 -0700 [thread overview]
Message-ID: <20221019194757.3e21a93e@kernel.org> (raw)
In-Reply-To: <SJ1PR11MB61802672AFAA8A4B0A34E81AB82A9@SJ1PR11MB6180.namprd11.prod.outlook.com>
On Thu, 20 Oct 2022 02:16:25 +0000 Zulkifli, Muhammad Husaini wrote:
> > On Tue, 18 Oct 2022 09:07:28 +0800 Muhammad Husaini Zulkifli wrote:
> > > v1 -> v2:
> > > - Move to the end for the new enum.
> > > - Add new HWTSTAMP_FILTER_DMA_TIMESTAMP receive filters.
> >
> > Did you address my feedback? How do we know if existing
> > HWTSTAMP_FILTER_ALL is PHC quality of DMA?
>
> I apologize if I didn't respond to your feedback. If I recall properly, you agreed to only
> use the flag rather than creating a new tx type as a result of below conversation.
> https://lore.kernel.org/all/20220930074016.295cbfab@kernel.org/
My bad, I wasn't very clear. I meant to agree that if you prefer we can
forgo adding a new tx_type, and depend on SOF_TIMESTAMPING_TX_* to
advertise the capabilities and request particular type. But
SOF_TIMESTAMPING_TX_* should still not assume that SOF_TIMESTAMPING_TX_HARDWARE
is guaranteed to be measured close to the wire.
I was just looking at some mlx5 patches from last night:
https://lore.kernel.org/all/20221019063813.802772-5-saeed@kernel.org/
and if you look around you'll see that they advertise hardware
timestamps but AFAIU only packets they match to be PTP will go on
the special queue that gets real close-to-wire time:
https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/net/ethernet/mellanox/mlx5/core/en/selq.c#L247
If application requests a HW stamp on a non-PTP packet (NTP? custom
proto?), or PTP is running on a custom UDP port, or simply the FW/HW
does not support this feature (mlx5 supports at least a decade's worth
of HW generations) - the application will get a DMA stamp.
Same for Rx - close-to-wire stamps may be more expensive for the NIC
and some modern TCP congestion control algos (BBRv2, Swift) need
HW timestamps of all packets but are okay with DMA stamps.
So we need:
1) clear disambiguation when time stamps are *really* taken
close-to-the-wire (CTW);
2) ability to configure Rx to provide CTW stamps for PTP/NTP
frames and DMA stamps for all the rest for congestion control.
I think extending the documentation in:
Documentation/networking/timestamping.rst
to explain the API you're adding and how it will allow the above cases
to be satisfied will be a good start.
prev parent reply other threads:[~2022-10-20 2:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 1:07 [PATCH v2 0/5] Add support for DMA timestamp for non-PTP packets Muhammad Husaini Zulkifli
2022-10-18 1:07 ` [PATCH v2 1/5] ethtool: Add new hwtstamp flag Muhammad Husaini Zulkifli
2022-10-18 1:07 ` [PATCH v2 2/5] net-timestamp: Increase the size of tsflags Muhammad Husaini Zulkifli
2022-10-18 5:57 ` [Intel-wired-lan] " Paul Menzel
2022-10-18 12:42 ` Zulkifli, Muhammad Husaini
2022-10-18 1:07 ` [PATCH v2 3/5] net: sock: extend SO_TIMESTAMPING for DMA Fetch Muhammad Husaini Zulkifli
2022-10-18 1:07 ` [PATCH v2 4/5] igc: Add support for DMA timestamp for non-PTP packets Muhammad Husaini Zulkifli
2022-10-18 1:07 ` [PATCH v2 5/5] ethtool: Add support for HWTSTAMP_FILTER_DMA_TIMESTAMP Muhammad Husaini Zulkifli
2022-10-18 11:45 ` [PATCH v2 0/5] Add support for DMA timestamp for non-PTP packets Richard Cochran
2022-10-18 14:12 ` Zulkifli, Muhammad Husaini
2022-10-19 2:37 ` Richard Cochran
2022-10-21 0:25 ` Zulkifli, Muhammad Husaini
2022-10-21 12:48 ` Richard Cochran
2022-10-21 15:16 ` Jakub Kicinski
2022-10-18 14:23 ` Gal Pressman
2022-10-19 14:23 ` Zulkifli, Muhammad Husaini
2022-10-23 7:15 ` Gal Pressman
2022-10-18 19:02 ` Jakub Kicinski
2022-10-20 2:16 ` Zulkifli, Muhammad Husaini
2022-10-20 2:47 ` Jakub Kicinski [this message]
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=20221019194757.3e21a93e@kernel.org \
--to=kuba@kernel.org \
--cc=andy@greyhouse.net \
--cc=aravindhan.gunasekaran@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=intel-wired-lan@osuosl.org \
--cc=leon@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=muhammad.husaini.zulkifli@intel.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=saeed@kernel.org \
--cc=vfedorenko@novek.ru \
--cc=vinicius.gomes@intel.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).