Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken windows code #377

Merged
merged 7 commits into from
Apr 22, 2016

Conversation

christopher-s-hall
Copy link
Contributor

No description provided.

PHY delay defaults to zero if timestamper is NULL
Move init_phy_delay() before HWTimestamper_init() allowing PHY delays to
be over-ridden in derived timestamper code (using *new* set_phy_delay()).
Currently, there isn't any native I210 drivers for windows. Remove those
PHY delays.

Set the defaults to -1. Absent command line or config file over-ride these
delays will be set in the derived class code for specific HW.

TODO: Add read of configuration file to over-ride defaults in derived
timestamper class
get_phy_delay(&delay_val);

DeviceClockRateMapping *rate_map = DeviceClockRateMap;
while (rate_map->device_desc != NULL)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be rate_map != NULL here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps rate_map has a entry with device_desc == NULL to terminate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The expectation is that the array has at least one terminating entry where device_desc == NULL. This is for both the PHY delay and clock rate mapping.

@andrew-elder
Copy link

Overall, looks good to me.

default:
// Unable to identify CPU
return 0;
case 0x5E:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand by the code that these values (0x5e and 0x4e) are processor model identifiers, but I think it would improve readability if we had a define (or a const static uint8_t variable somewhere) for them.

@davidcemin
Copy link
Contributor

Looks good to me.

Windows drivers interface will by default use QPC for system time rather than
"raw" TSC. There are some exceptions for older operating systems on Intel
hardware that support ART (Always Running Timer). Nanoseconds units will still
be used for upper layers of gPTP and its application interface.
Remove some of the #defines for clock rate, adding table lookup
Add table lookup for PHY delays that can be over-ridden by top level
daemon_cl code.
@andrew-elder
Copy link

Ok, so we have a pending format cleanup commit and hopefully one to remove processor ID magic numbers.

@christopher-s-hall
Copy link
Contributor Author

Any other comments here?

@andrew-elder
Copy link

Thanks for the reminder @christopher-s-hall. It looks like you have made all the changes suggested in the various comments, so I'm going to accept the pull request.

@andrew-elder andrew-elder merged commit 1d8f5cc into Avnu:open-avb-next Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants