Skip to contentSkip to conversation

selftests: forwarding: update PTP tcpdump patterns

PATCH Applied Jakub Kicinski 3 participants 3 messages Jan 7 – Jan 10

Subsystems (4)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 selftests: forwarding: update PTP tcpdump patterns

Recent version of tcpdump (tcpdump-4.99.6-1.fc43.x86_64) seems to have removed the spurious space after msg type in PTP info, e.g.:

before: PTPv2, majorSdoId: 0x0, msg type : sync msg, length: 44
after: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44

Update our patterns to match both.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 .../net/forwarding/local_termination.sh        | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
tools/testing/selftests/net/forwarding/local_termination.sh +9 -9
index 892895659c7e..1f2bf6e81847 100755
@@ -306,39 +306,39 @@ run_test()
 
 	if [ $skip_ptp = false ]; then
 		check_rcv $rcv_if_name "1588v2 over L2 transport, Sync" \
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : sync msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: sync msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over L2 transport, Follow-Up" \
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : follow up msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: follow up msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over L2 transport, Peer Delay Request" \
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: peer delay req msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv4, Sync" \
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : sync msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: sync msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv4, Follow-Up" \
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : follow up msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: follow up msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv4, Peer Delay Request" \
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: peer delay req msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv6, Sync" \
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : sync msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: sync msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv6, Follow-Up" \
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : follow up msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: follow up msg" \
 			true "$test_name"
 
 		check_rcv $rcv_if_name "1588v2 over IPv6, Peer Delay Request" \
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: peer delay req msg" \
 			true "$test_name"
 	fi
 
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Jakub,

Quoted 9 lines · Jakub Kicinski

Recent version of tcpdump (tcpdump-4.99.6-1.fc43.x86_64) seems to have removed the spurious space after msg type in PTP info, e.g.:

 before:  PTPv2, majorSdoId: 0x0, msg type : sync msg, length: 44 after:   PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44

Update our patterns to match both.

Quoted 62 lines

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
---
 .../net/forwarding/local_termination.sh        | 18 +++++++++---------

 1 file changed, 9 insertions(+), 9 deletions(-)
tools/testing/selftests/net/forwarding/local_termination.sh +0 -0
index 892895659c7e..1f2bf6e81847 100755
@@ -306,39 +306,39 @@ run_test()


  if [ $skip_ptp = false ]; then
  check_rcv $rcv_if_name "1588v2 over L2 transport, Sync" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : sync msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: sync msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over L2 transport, Follow-Up" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : follow up msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: follow up msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over L2 transport, Peer Delay Request" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype PTP (0x88f7).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype PTP (0x88f7).* PTPv2.* msg type *: peer delay req msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv4, Sync" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : sync msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: sync msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv4, Follow-Up" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : follow up msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: follow up msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv4, Peer Delay Request" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv4 (0x0800).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype IPv4 (0x0800).* PTPv2.* msg type *: peer delay req msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv6, Sync" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : sync msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: sync msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv6, Follow-Up" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : follow up msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: follow up msg" \

  true "$test_name"

  check_rcv $rcv_if_name "1588v2 over IPv6, Peer Delay Request" \

tools/testing/selftests/net/forwarding/local_termination.sh +1 -1
-			"ethertype IPv6 (0x86dd).* PTPv2.* msg type : peer delay req msg" \
+			"ethertype IPv6 (0x86dd).* PTPv2.* msg type *: peer delay req msg" \

  true "$test_name"
  fi

Signature · 1 line
Alexander Sverdlin.
#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Wed, 7 Jan 2026 06:53:19 -0800 you wrote:

Recent version of tcpdump (tcpdump-4.99.6-1.fc43.x86_64) seems to have removed the spurious space after msg type in PTP info, e.g.:

before: PTPv2, majorSdoId: 0x0, msg type : sync msg, length: 44
after: PTPv2, majorSdoId: 0x0, msg type: sync msg, length: 44

Update our patterns to match both.

[...]

Here is the summary with links:
- [net-next] selftests: forwarding: update PTP tcpdump patterns

    https://git.kernel.org/netdev/net-next/c/68ec2b9fc59e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html