History

net/mlx5e: Add clock info page to mlx5 core devices

Adds a new page to mlx5 core containing clock info data that allows user level applications to translate between cqe timestamp to nanoseconds. The information stored into this page is represented through mlx5_ib_clock_info. In order to synchronize between kernel and user space a sequence number is incremented at the beginning and end of each update. An odd number means the data is being updated while an even means the access was already done. To guarantee that the data structure was accessed atomically user will: repeat: seq1 = <read sequence> goto <repeate> while odd <read data structure> seq2 = <read sequence> if seq1 != seq2 goto repeat

Feras Daoud committed 8 years ago

Commit 24d33d21 parent 246d8b13 files · +74 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/rdma/mlx5-abi.h+16−0
@@ -381,4 +381,20 @@ struct mlx5_ib_modify_wq { · 380 unmodified lines
381 __u32 comp_mask;381 __u32 comp_mask;
382 __u32 reserved;382 __u32 reserved;
383};383};
384
385struct mlx5_ib_clock_info {
386 __u32 sign;
387 __u32 resv;
388 __u64 nsec;
389 __u64 cycles;
390 __u64 frac;
391 __u32 mult;
392 __u32 shift;
393 __u64 mask;
394 __u64 overflow_period;
395};
396
397enum {
398 MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
399};
384#endif /* MLX5_ABI_USER_H */400#endif /* MLX5_ABI_USER_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t