Subject: Re: [PATCH net-next v3 3/5] eth: fbnic: add RX packets timestamping support

From: Vadim Fedorenko <[email-masked]>
Date: Tue, 8 Oct 2024 10:58:24 +0100

On 08/10/2024 00:51, Jacob Keller wrote:
> 
> 
> On 10/7/2024 3:26 AM, Vadim Fedorenko wrote:
>> On 05/10/2024 00:18, Jacob Keller wrote:
>>> Is there any benefit to implementing anything other than
>>> HWTSTAMP_FILTER_ALL?
>>>
>>> Those are typically considered legacy with the primary reason being to
>>> support hardware which does not support timestamping all frames.
>>>
>>> I suppose if you have measurement that supporting them is valuable (i.e.
>>> because of performance impact on timestamping all frames?) it makes
>>> sense to support. But otherwise I'm not sure its worth the extra complexity.
>>>
>>> Upgrading the filtering modes to HWTSTAMP_FILTER_ALL is acceptable and
>>> is done by a few drivers.
>>
>> Even though the hardware is able to timestamp TX packets at line rate,
>> we would like to avoid having 2x times more interrupts for the cases
>> when we don't need all packets to be timestamped. And as it mentioned
>> in the comment, we don't have very precise HW filters, but we would like
>> to avoid timestamping TCP packets when TCP is the most used one on the
>> host.
> 
> Tx timestamps don't use the filters in the first place. The filter only
> applies to Rx timestamps. You should only initiate a Tx timestamp when
> requested, which will generally not be the case for TCP.
> 
> Are you saying that Rx timestamps generate interrupts?

Sorry for the confusion with TX timestamping.
For RX we will utilize additional buffer to provide timestamp metadata,
and we will have to process this metadata even if it will not be needed
later in the stack. For 100G links that will add some delays which we
would like to avoid.