Skip to content

Add symlink for ENA PTP device. - #38

Merged
fred-lefebvre merged 1 commit into
amazonlinux:mainfrom
q2ven:ena-ptp
Nov 22, 2024
Merged

fred-lefebvre merged 1 commit into
amazonlinux:mainfrom
q2ven:ena-ptp

Conversation

@q2ven

@q2ven q2ven commented May 29, 2024

Copy link
Copy Markdown
Contributor

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>
@fred-lefebvre
fred-lefebvre merged commit 0f6b231 into amazonlinux:main Nov 22, 2024
@fred-lefebvre fred-lefebvre self-assigned this Nov 22, 2024
@ericsu66888 ericsu66888 mentioned this pull request Aug 24, 2026
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.

2 participants