Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change latency protocol #36

Merged
merged 13 commits into from
May 30, 2023
Merged

change latency protocol #36

merged 13 commits into from
May 30, 2023

Conversation

junppyo
Copy link
Contributor

@junppyo junppyo commented May 23, 2023

Client send tx timestamp at oneway mode.
Client get rx timestamp at normal mode.

@junppyo junppyo requested a review from tribela May 23, 2023 03:13
@junppyo junppyo changed the title change protocol change latency protocol May 23, 2023
Copy link
Contributor

@tribela tribela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On src/bin/latency.rs#L167, Save SW rx timestamp right after recv. For "one way mode packet but HW doesn't support HW RX timestamp"

Again, These are required.

  1. SW timestamp right after TX/RX ALWAYS. Because some HW doesn't support HW timestamp. HW timestamp function can overwrite timestamp after SW timestamp if supported.

src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@tribela tribela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to print elapsed time even if elapsed time is negative value

src/bin/latency.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@tribela tribela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to print elapsed time even if elapsed time is negative value

src/bin/latency.rs Outdated Show resolved Hide resolved
src/bin/latency.rs Outdated Show resolved Hide resolved
@tribela tribela merged commit 8e7d0ca into main May 30, 2023
junppyo added a commit that referenced this pull request May 30, 2023
* change protocol

* fix fmt, clippy

* change server get rx by packet, clean code

* server identifies act as opcode

* store ts only last one and server don't get oneway parameter

* get SW timestamp immediately after receive the message

* clean code

* change opcode match in server

* error handling about negative elapsed time

* fix fmt, clippy

* server prints negative elapsed time

* simplify get tx_timestamp at packet

* fix fmt
tribela added a commit that referenced this pull request Aug 30, 2023
* get rx, tx timestamp

* no more call SystemTime::now() on oneway mode

* fix cargo fmt

* Fix sock_open to return created vlan name instead of interface name (#32)

* Get rx timestamp from HW on latency app (#33)

* get rx, tx timestamp

* no more call SystemTime::now() on oneway mode

* fix cargo fmt

* print only rx timestamp

* fix fmt

* Revert "Fix sock_open to return created vlan name instead of interface name (#32)" (#35)

This reverts commit 2cec046.

* Implement HW/SW TX timestamp feature (#37)

* Implement HW TX timestamp

Even if failed to set HW TX timestamp, SW TX timestamp is still can be
used.

* Cargo fmt, Clippy

* Remove perror

* Remove print, fix typo

* change latency protocol (#36)

* change protocol

* fix fmt, clippy

* change server get rx by packet, clean code

* server identifies act as opcode

* store ts only last one and server don't get oneway parameter

* get SW timestamp immediately after receive the message

* clean code

* change opcode match in server

* error handling about negative elapsed time

* fix fmt, clippy

* server prints negative elapsed time

* simplify get tx_timestamp at packet

* fix fmt

* get HW tx_timestamp that apply to latency

* get rx, tx timestamp

* no more call SystemTime::now() on oneway mode

* merge hw_tx_timestamp

* Consume tx timestamp after sending SYNC packet

* Warn if SW TX timestamp is used

---------

Co-authored-by: Jeong Arm <kjwonmail@gmail.com>
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