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

Add symlink for ENA PTP device. #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

q2ven
Copy link

@q2ven q2ven commented May 29, 2024

Issue #, if available:

Description of changes:

ENA PTP device does not have the unique symlink unlike other clock devices:

  $ sudo rmmod ena && sudo modprobe ena phc_enable=1
  $ ls -al /dev/*ptp*
  crw-------. 1 root root 245, 0 May 29 17:34 /dev/ptp0

  $ sudo modprobe ptp_kvm
  $ ls -al /dev/*ptp*
  crw-------. 1 root root 245, 0 May 29 17:34 /dev/ptp0
  crw-------. 1 root root 245, 1 May 29 17:35 /dev/ptp1
  lrwxrwxrwx. 1 root root      4 May 29 17:35 /dev/ptp_kvm -> ptp1

This could lead customers to use a wrong device.

Let's add a udev rule to create the unique symlink for ENA PTP as ptp_ena.

With the new rule:

  $ sudo rmmod ena && sudo modprobe ena phc_enable=1
  $ ls -al /dev/*ptp*
  lrwxrwxrwx. 1 root root      4 May 29 17:37 /dev/ptp_ena -> ptp0
  crw-------. 1 root root 245, 0 May 29 17:37 /dev/ptp0
  crw-------. 1 root root 245, 1 May 29 17:35 /dev/ptp1
  lrwxrwxrwx. 1 root root      4 May 29 17:35 /dev/ptp_kvm -> ptp1

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@q2ven q2ven force-pushed the ena-ptp branch 2 times, most recently from e537442 to 9da6cf0 Compare May 31, 2024 12:21
ENA PTP device does not have the unique symlink unlike other clock devices:

  $ sudo rmmod ena && sudo modprobe ena phc_enable=1
  $ ls -al /dev/*ptp*
  crw-------. 1 root root 245, 0 May 29 17:34 /dev/ptp0

  $ sudo modprobe ptp_kvm
  $ ls -al /dev/*ptp*
  crw-------. 1 root root 245, 0 May 29 17:34 /dev/ptp0
  crw-------. 1 root root 245, 1 May 29 17:35 /dev/ptp1
  lrwxrwxrwx. 1 root root      4 May 29 17:35 /dev/ptp_kvm -> ptp1

This could lead customers to use a wrong device.

Let's add a udev rule to create the unique symlink for ENA PTP as ptp_ena.

With the new rule:

  $ sudo rmmod ena && sudo modprobe ena phc_enable=1
  $ ls -al /dev/*ptp*
  lrwxrwxrwx. 1 root root      4 May 29 17:37 /dev/ptp_ena -> ptp0
  crw-------. 1 root root 245, 0 May 29 17:37 /dev/ptp0
  crw-------. 1 root root 245, 1 May 29 17:35 /dev/ptp1
  lrwxrwxrwx. 1 root root      4 May 29 17:35 /dev/ptp_kvm -> ptp1

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
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.

1 participant