Skip to content

Instantly share code, notes, and snippets.

@jianzzha
Last active January 9, 2024 17:49
Show Gist options
  • Save jianzzha/e4567f9661a20bc0b394766dfa8d67ec to your computer and use it in GitHub Desktop.
Save jianzzha/e4567f9661a20bc0b394766dfa8d67ec to your computer and use it in GitHub Desktop.
XXV710-trex-vlan-PTP-PF
# cat /etc/sysconfig/phc2sys
OPTIONS="-a -r -r -n 24"
[root@53Y9R53 ~]# systemctl status phc2sys
● phc2sys.service - Synchronize system clock or PTP hardware clock (PHC)
Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; enabled; preset: disabled)
Active: active (running) since Fri 2023-12-08 19:43:28 EST; 32min ago
Main PID: 672234 (phc2sys)
Tasks: 1 (limit: 1120505)
Memory: 472.0K
CPU: 102ms
CGroup: /system.slice/phc2sys.service
└─672234 /usr/sbin/phc2sys -a -r -r -n 24
Dec 08 20:15:36 53Y9R53 phc2sys[672234]: [3211185.629] eth0 sys offset 2 s2 freq -11017 delay 550
Dec 08 20:15:37 53Y9R53 phc2sys[672234]: [3211186.631] eth0 sys offset 0 s2 freq -11018 delay 554
Dec 08 20:15:38 53Y9R53 phc2sys[672234]: [3211187.632] eth0 sys offset -2 s2 freq -11020 delay 556
Dec 08 20:15:39 53Y9R53 phc2sys[672234]: [3211188.633] eth0 sys offset 6 s2 freq -11013 delay 486
Dec 08 20:15:40 53Y9R53 phc2sys[672234]: [3211189.635] eth0 sys offset 5 s2 freq -11012 delay 550
Dec 08 20:15:41 53Y9R53 phc2sys[672234]: [3211190.636] eth0 sys offset -16 s2 freq -11031 delay 553
Dec 08 20:15:42 53Y9R53 phc2sys[672234]: [3211191.637] eth0 sys offset 8 s2 freq -11012 delay 549
Dec 08 20:15:43 53Y9R53 phc2sys[672234]: [3211192.638] eth0 sys offset -6 s2 freq -11024 delay 553
Dec 08 20:15:44 53Y9R53 phc2sys[672234]: [3211193.639] eth0 sys offset 0 s2 freq -11020 delay 552
Dec 08 20:15:45 53Y9R53 phc2sys[672234]: [3211194.640] eth0 sys offset 0 s2 freq -11020 delay 553
# cat /etc/sysconfig/ptp4l
OPTIONS="-f /etc/ptp4l.conf -i ens4f0 -m -2"
[root@53Y9R53 ~]# systemctl status ptp4l
● ptp4l.service - Precision Time Protocol (PTP) service
Loaded: loaded (/usr/lib/systemd/system/ptp4l.service; enabled; preset: disabled)
Active: active (running) since Fri 2023-12-08 19:48:54 EST; 25min ago
Main PID: 672434 (ptp4l)
Tasks: 1 (limit: 1120505)
Memory: 304.0K
CPU: 72ms
CGroup: /system.slice/ptp4l.service
└─672434 /usr/sbin/ptp4l -f /etc/ptp4l.conf -i ens4f0 -m -2
Dec 08 19:48:54 53Y9R53 ptp4l[672434]: [3209583.512] port 0: INITIALIZING to LISTENING on INIT_COMPLETE
Dec 08 19:48:54 53Y9R53 ptp4l[672434]: [3209583.512] port 0: INITIALIZING to LISTENING on INIT_COMPLETE
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: ptp4l[3209590.522]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: ptp4l[3209590.522]: selected local clock f0b2b9.fffe.049c4c as best master
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: ptp4l[3209590.522]: port 1: assuming the grand master role
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: ptp4l[3209590.522]: port 2: assuming the grand master role
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: [3209590.522] port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: [3209590.522] selected local clock f0b2b9.fffe.049c4c as best master
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: [3209590.522] port 1: assuming the grand master role
Dec 08 19:49:01 53Y9R53 ptp4l[672434]: [3209590.522] port 2: assuming the grand master role
[root@53Y9R53 ~]# ip link show ens4f0
2: ens4f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether f0:b2:b9:04:9c:4c brd ff:ff:ff:ff:ff:ff
vf 0 link/ether 2a:9f:5e:05:80:5c brd ff:ff:ff:ff:ff:ff, vlan 30, spoof checking off, link-state auto, trust on
altname enp175s0f0
[root@53Y9R53 ~]# ip link show ens4f1
4: ens4f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether f0:b2:b9:04:9c:4d brd ff:ff:ff:ff:ff:ff
vf 0 link/ether 62:ab:5b:9a:30:85 brd ff:ff:ff:ff:ff:ff, vlan 31, spoof checking off, link-state auto, trust on
altname enp175s0f1
podman run -it --rm --privileged -p 9000:9000 -v /dev/hugepages:/dev/hugepages -v /sys/bus/pci/devices:/sys/bus/pci/devices -v /lib/firmware:/lib/firmware --cpuset-cpus 5,7,9 quay.io/container-perf-tools/testpmd:22.11.2 --pci 0000:af:01.0 --pci 0000:af:09.0 --http-port 9000 --auto
trex server: 192.168.39.50
# cat /etc/sysconfig/ptp4l
OPTIONS="-f /etc/ptp4l.conf -i ens6f0 -m -2 -s"
# cat /etc/sysconfig/phc2sys
OPTIONS="-a -r"
# systemctl status ptp4l
● ptp4l.service - Precision Time Protocol (PTP) service
Loaded: loaded (/usr/lib/systemd/system/ptp4l.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-12-08 19:49:49 EST; 17min ago
Main PID: 969544 (ptp4l)
Tasks: 1 (limit: 1120566)
Memory: 556.0K
CGroup: /system.slice/ptp4l.service
└─969544 /usr/sbin/ptp4l -f /etc/ptp4l.conf -i ens6f0 -m -2 -s
Dec 08 20:07:03 53X8R53 ptp4l[969544]: ptp4l[2522848.880]: master offset 1 s2 freq -16064 path delay 856
Dec 08 20:07:03 53X8R53 ptp4l[969544]: [2522848.880] master offset 1 s2 freq -16064 path delay 856
Dec 08 20:07:04 53X8R53 ptp4l[969544]: ptp4l[2522849.880]: master offset -6 s2 freq -16070 path delay 856
Dec 08 20:07:04 53X8R53 ptp4l[969544]: [2522849.880] master offset -6 s2 freq -16070 path delay 856
Dec 08 20:07:05 53X8R53 ptp4l[969544]: ptp4l[2522850.880]: master offset 6 s2 freq -16060 path delay 853
Dec 08 20:07:05 53X8R53 ptp4l[969544]: [2522850.880] master offset 6 s2 freq -16060 path delay 853
Dec 08 20:07:06 53X8R53 ptp4l[969544]: ptp4l[2522851.880]: master offset -13 s2 freq -16077 path delay 856
Dec 08 20:07:06 53X8R53 ptp4l[969544]: [2522851.880] master offset -13 s2 freq -16077 path delay 856
Dec 08 20:07:07 53X8R53 ptp4l[969544]: ptp4l[2522852.880]: master offset 2 s2 freq -16066 path delay 856
Dec 08 20:07:07 53X8R53 ptp4l[969544]: [2522852.880] master offset 2 s2 freq -16066 path delay 856
[root@53X8R53 ~]# ip link show ens6f0
1073: ens6f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 40:a6:b7:30:1f:10 brd ff:ff:ff:ff:ff:ff
vf 0 link/ether a6:b0:79:67:9b:6c brd ff:ff:ff:ff:ff:ff, vlan 30, spoof checking off, link-state auto, trust on
altname enp24s0f0
[root@53X8R53 ~]# ip link show ens6f1
1074: ens6f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 40:a6:b7:30:1f:11 brd ff:ff:ff:ff:ff:ff
vf 0 link/ether 1e:97:28:4f:c6:90 brd ff:ff:ff:ff:ff:ff, vlan 31, spoof checking off, link-state auto, trust on
altname enp24s0f1
podman run -it --rm --privileged -v /dev/hugepages:/dev/hugepages -v /sys/bus/pci/devices:/sys/bus/pci/devices -v /lib/modules:/lib/modules --cpuset-cpus 4,6,8,10,12,14,16 -e pci_list=0000:18:02.0,0000:18:0a.0 -e rate=10 -e steady_rate=1 -e validation_seconds=5 quay.io/container-perf-tools/trafficgen:v2.88 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment