On 12/13/24 8:02 AM, Jason Xing wrote:
+static u64 delay_tolerance_nsec = 5000000;
If I count right, 5ms may not a lot for the bpf CI and the test could become
flaky. Probably good enough to ensure the delay is larger than the previous one.
You're right, initially I set 2ms which make the test flaky. How about
20ms? We cannot ensure each delta (calculated between two tx points)
is larger than the previous one.
or I was thinking the delay is always measured from sendmsg_ns.
Regardless, whatever way the delay of a tx point is measured from (always from
sendmsg_ns or from the previous tx point), it can also just check the measured
delay is +ve or something like that instead of having a hard coded maximum delay
here.
The following "struct delay_info" may not be the best. Feel free to adjust.
struct delay_info {
u64 sendmsg_ns;
u32 sched_delay; /* SCHED_OPT_CB - sendmsg_ns */
u32 sw_snd_delay;
u32 ack_delay;
};