Closed laeti-tia closed 5 years ago
On Fri, Oct 12, 2018 at 12:56:00PM -0700, Antoine Delvaux wrote:
What might be causing this smaller number of packets TWAMP is sending when compared to OWAMP?
It could be that TWAMP is waiting for a response before sending the next test packet. OWAMP on the other hand just sends out all the packets and collectes the results at the end of the test. Maybe you can verify this with tcpdump?
-- Valentin Vidic Computer Systems Engineer - Expert Department of Computer Infrastructure and Services Croatian Academic and Research Network - CARNET Josipa Marohnica 5, HR-10000 Zagreb, Croatia tel: +385 1 6661 714, fax. +385 1 6661 635 gsm: +385 91 2480 919 www.CARNet.hr
On Fri, Oct 12, 2018 at 12:56:00PM -0700, Antoine Delvaux wrote:
During the TWAMP webinar preparation, we run into this capping of TWAMP packets when compared to OWAMP:
The send/receive loop should be in run_tw_test:
do{
...
if( (sent = sendto(ep->sockfd,ep->payload,
ep->len_payload,0,rsaddr,rsaddrlen)) < 0){
...
resp_len = recvfromttl(ep->cntrl->ctx,ep->sockfd,
ep->payload,resp_len_payload,lsaddr,lsaddrlen,
(struct sockaddr*)&peer_addr,&peer_addr_len,
&twdatarec.reflected.ttl);
....
if((nanosleep(&sleeptime,NULL) == 0) || (errno == EINTR)){
goto AGAIN;
}
....
} while(i < ep->tsession->test_spec.npackets);
-- Valentin Vidic Computer Systems Engineer - Expert Department of Computer Infrastructure and Services Croatian Academic and Research Network - CARNET Josipa Marohnica 5, HR-10000 Zagreb, Croatia tel: +385 1 6661 714, fax. +385 1 6661 635 gsm: +385 91 2480 919 www.CARNet.hr
Maybe it would be possible to adjust the timeout for recvfromttl so it just waits till the next packet is to be sent. Shall we ask the patch author what he thinks?
I will give this one another try next week, maybe we can manage something...
I've created a PR with a possible fix, please test...
During the TWAMP webinar preparation, we run into this capping of TWAMP packets when compared to OWAMP:
OWAMP doesn't exhibit the same behavior:
What might be causing this smaller number of packets TWAMP is sending when compared to OWAMP?