Skip to content

Commit

Permalink
ptpcheck map: also display timestamping capabilities (facebook#407)
Browse files Browse the repository at this point in the history
Summary:

Update `ptpcheck map` to display the timestamping capabilities along with the interface/phc mappings.

Reviewed By: abulimov

Differential Revision: D64398322
  • Loading branch information
yarikk authored and facebook-github-bot committed Oct 15, 2024
1 parent 36c218f commit 257b376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/ptpcheck/cmd/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ func printIfaceData(ifname string, tsinfo *phc.EthtoolTSinfo, reverse bool) {
fmt.Printf("No PHC support for %s\n", ifname)
return
}
attrs := fmt.Sprintf("cap-tx-types %x cap-rx-filters %x", tsinfo.TXTypes, tsinfo.RXFilters)
if reverse {
fmt.Printf("/dev/ptp%d -> %s\n", tsinfo.PHCIndex, ifname)
fmt.Printf("/dev/ptp%d -> %s\t%s\n", tsinfo.PHCIndex, ifname, attrs)
return
}
fmt.Printf("%s -> /dev/ptp%d\n", ifname, tsinfo.PHCIndex)
fmt.Printf("%s -> /dev/ptp%d\t%s\n", ifname, tsinfo.PHCIndex, attrs)
}

func getDevice(iface string) error {
Expand Down

0 comments on commit 257b376

Please sign in to comment.