Page MenuHomeFreeBSD

ena: PHC error bound/flags support
Needs ReviewPublic

Authored by osamaabb_amazon.com on Aug 20 2024, 8:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 10, 1:07 PM
Unknown Object (File)
Dec 21 2024, 5:46 PM
Unknown Object (File)
Dec 5 2024, 4:45 PM
Unknown Object (File)
Nov 24 2024, 1:10 AM
Unknown Object (File)
Nov 23 2024, 5:55 AM
Unknown Object (File)
Nov 15 2024, 4:01 AM
Unknown Object (File)
Nov 11 2024, 12:03 AM
Unknown Object (File)
Oct 6 2024, 6:46 PM
Subscribers

Details

Reviewers
cperciva
Summary

PTP Hardware Clock (PHC) algorithm is updated to support reading new
PHC values.
Until this change, the driver retrieved PHC timestamp from the device's
PHC address, this change expands this API by adding 2 new values
to ena_admin_phc_resp:

  1. PHC error bound:

PTP HW clock error bound refers to the maximum allowable
difference
between the clock of the device and the reference clock.
The error bound is used to ensure that the clock of the device
remains within a certain level of accuracy relative to the reference
clock. The error bound (expressed in nanoseconds) is calculated by
the device, taking into account the accuracy of all related
subsystems read delay.
Error bound (u32) may contain values of 0-4294967295 (nsec) while
driver may only report values of 0-4294967294 (nsec) because max
error bound value will be used to represent error bound read error.
The error bound value is retrieved from the device by the driver upon
every get PHC timestamp request and is cached for future retrieval by
the user.

  1. PHC error flags:

Indicates on any PHC timestamp and error bound errors.
The error flags value is retrieved from the device by the driver upon
every get PHC timestamp request.

Any PHC error type will:

  1. Enter the PHC into blocked state until passing blocking time
  2. Return device busy error to timestamp caller
  3. Return device busy error to error bound caller

This new error flags eliminates the need to check if the driver got
a bad PHC timestamp (ENA_PHC_TIMESTAMP_ERROR).

Approved by: cperciva
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 59068
Build 55955: arc lint + arc unit

Event Timeline

I'd suggest expanding the abbreviation "PHC" somewhere early in the commit message. I *think* we're talking about PTP Hardware Clock here?

the PTA device, march hare network, TOR, Chrony, Pacemaker and ENA driver read delay

I know what most of those are, but I have no clue what the "march hare network" is. Maybe something internal to the AWS network? If so I'm not sure if it needs to be mentioned in the commit message.

sys/contrib/ena-com/ena_com.h
337

Why did this move?

osamaabb_amazon.com edited the summary of this revision. (Show Details)

I'd suggest expanding the abbreviation "PHC" somewhere early in the commit message. I *think* we're talking about PTP Hardware Clock here?

Yes, added

the PTA device, march hare network, TOR, Chrony, Pacemaker and ENA driver read delay

I know what most of those are, but I have no clue what the "march hare network" is. Maybe something internal to the AWS network? If so I'm not sure if it needs to be mentioned in the commit message.

collectively addressed the subsystems

sys/contrib/ena-com/ena_com.h
337

For caching reasons - we use error_bound when getting phc timestsamp, so they need to be together with the doorbell, the mem_handle is less needed

osamaabb_amazon.com edited the summary of this revision. (Show Details)
osamaabb_amazon.com edited the summary of this revision. (Show Details)
osamaabb_amazon.com edited the summary of this revision. (Show Details)