Add support for TWAMP-LIGHT API#1786
Conversation
079753f to
135c203
Compare
|
please fix errors, api not defined for new header |
90dd0b3 to
378bbee
Compare
|
/azp run |
|
Pull request contains merge conflicts. |
@AlanYoush - ocp SAI meeting is Thur 8am PST. Does this time work for you? would you please reach out to me [email protected], thanks. |
994ae2b to
0cf5490
Compare
|
/azp run |
|
Commenter does not have sufficient privileges for PR 1786 in repo opencomputeproject/SAI |
8bc974b to
355d745
Compare
|
We had reivewed and discussed this PR during this week's SAI community meeting, please help to review this PR more detaily, @rlhui @kcudnik @JaiOCP @clarklee-guizhao @marian-pritsak,Thanks very much. If you have any questions, please feel free to contact us by @AlanYoush or @guxianghong. We expect the TWAMP Light SAI to be pushed in the release version on August 28, because TWAMP Light feature in SONiC(sonic-net/SONiC#1192) has a dependency on these APIs. |
ca6fc3c to
a7479df
Compare
70403bb to
0716b70
Compare
0716b70 to
3ae2036
Compare
722a7bd to
4f48467
Compare
|
We have implemented TWAMP Light in SONiC and verified TWAMP Light SAI APIs feasible. And we expect this PR merged in the release version on August 28 to support SONiC TWAMP Light feature. Please review and merge this PR @rlhui @kcudnik. Thanks very much. If you have any questions, please feel free to contact us by @AlanYoush or @guxianghong. |
|
there are conflicts on this branch, please resolve |
e73b8ca to
2ce9ffb
Compare
2ce9ffb to
ee5cd5d
Compare
| * | ||
| * @type sai_twamp_mode_t | ||
| * @flags MANDATORY_ON_CREATE | CREATE_ONLY | ||
| */ |
There was a problem hiding this comment.
Thanks for comments.
TWAMP Light is simple version of TWAMP. When you create a twamp session, you must configure the attribute as TWAMP or TWAMP Light, so there is no default value and it is mandatory. We provide this attribute because it may support TWAMP feature in the furture.
There was a problem hiding this comment.
It is different between TWAMP and TWAMP Light for configuration.
| * | ||
| * @type sai_twamp_session_role_t | ||
| * @flags MANDATORY_ON_CREATE | CREATE_ONLY | ||
| */ |
There was a problem hiding this comment.
There are two roles of the TWAMP session. One is sender and the other is reflector. Users must assign the role of the twamp session when they create a twamp session. So there is no default value required and it is MANDATORY_ON_CREATE.
|  | ||
|
|
||
| ## How to get measurement data ## | ||
| It provides two methods to get measurement data for application. |
There was a problem hiding this comment.
what is the way to configure one of them or both ?
There was a problem hiding this comment.
There are two methods to get measurement data.
One is that the sai plugin proactively reports measurement data periodically through the callback function called "sai_twamp_session_event_notification_fn". It is the default method and should be implemented and supported by sai plugin.
The other is that the application can actively retrieve measurement data through "sai_get_twamp_session_stats_fn" or "sai_get_twamp_session_stats_ext_fn" when the application wants to get the measurement data immediately. It is an additional and optional method.
So these two methods are not conflict when they are both supported. The first one is defaultly supported by sai plugin. The other is optional and depends on the appliction.
There was a problem hiding this comment.
The SAI Callback function "sai_twamp_session_state_change_notification_fn" in MD file has been modified as "sai_twamp_session_event_notification_fn" based on the file "saitwamp.h"
| Since TWAMP Light is a simple and lightweight protocol, it is easy for vendors to implement TWAMP Light in their ASIC, which can improve performance and reduce CPU overload on network devices. TWAMP Light offloading in ASIC should work for sending and receiving TWAMP Light packets, collecting measurement data such as latency, jitter and packet loss. And also, RFC-5357 TWAMP Light should be followed. For TWAMP Light hardware solution, the main requirements are as follows: | ||
| * Can be deployed as one sender | ||
| * Construct Test-request packets based on configuration including IP header, UDP port, etc. | ||
| * Transmit Test-request packets to a reflector within tx timestamps which are captured in ASIC. |
There was a problem hiding this comment.
Sorry, I misunderstood. It means that the timestamp should be encoded in packets and use "with". I have modified it
| * Receive Test-request packets from a sender and capture rx timestamps in ASIC. | ||
| * Construct Test-response packets based on configuration including IP header, UDP port, etc. | ||
| * Encode rx timestamps of Test-request packets into Test-response packets. | ||
| * Reflect Test-response packets back to a sender within tx timestamps which are captured in ASIC. |
There was a problem hiding this comment.
Sorry, I misunderstood. It means that the timestamp should be encoded in packets and use "with". I have modified it
Signed-off-by: yoush <[email protected]>
ee5cd5d to
317bfa8
Compare
Define SAI layerTWAMP-LIGHT function API in saitwamp.h