Bug 561760 - please delete tcp socket option TCP_NODELAY
Summary: please delete tcp socket option TCP_NODELAY
Status: NEW
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: 1.6   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-03 22:28 EDT by Jian Xu CLA
Modified: 2020-04-16 20:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jian Xu CLA 2020-04-03 22:28:16 EDT
Option TCP_NODELAY doesn't apply to all cases. In my environment, the network is slow, the ping delay is larger than 300ms. Host debugger tool always lost connection with tcf agent, sometimes even the initial connection can be established. Then I remove the TCP_NODELAY option, it will work well. Can you delete this code (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&i, sizeof(i))) from function create_channel?
Comment 1 Jian Xu CLA 2020-04-14 04:50:02 EDT
What do you think about it ?
Comment 2 Eugene Tarassov CLA 2020-04-15 12:01:27 EDT
I found no proof that TCP_NODELAY can hurt reliability.
The option must be used for connection to meet latency requirements.
Comment 3 Jian Xu CLA 2020-04-16 00:45:23 EDT
Maybe you haven't come across a network that slow. We run a hypervisor system that has many virtual os, the network is slow.

Can you add a macro to let vxworks don't set it ?

#ifndef __VXWORKS__
		
        if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&i, sizeof(i)) < 0) {
            int error = errno;
            trace(LOG_ALWAYS, "Can't set TCP_NODELAY option on a socket: %s", errno_to_str(error));
            errno = error;
            return NULL;
        }

#endif
Comment 4 Eugene Tarassov CLA 2020-04-16 11:14:48 EDT
So, you saying it is vxWorks specific: vxWorks TCP/IP stack stops working in challenging network environment when TCP_NODELAY is set on a socket.

Then you should file a bug report against vxWorks.
Comment 5 Jian Xu CLA 2020-04-16 20:53:01 EDT
Thank you, I will try to delete TCP_NODELAY at code of vxworks.