Loading block/sheepdog.c +1 −10 Original line number Diff line number Diff line Loading @@ -787,15 +787,6 @@ static int aio_flush_request(void *opaque) !QLIST_EMPTY(&s->pending_aio_head); } static int set_nodelay(int fd) { int ret, opt; opt = 1; ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt)); return ret; } /* * Return a socket discriptor to read/write objects. * Loading @@ -814,7 +805,7 @@ static int get_sheep_fd(BDRVSheepdogState *s) socket_set_nonblock(fd); ret = set_nodelay(fd); ret = socket_set_nodelay(fd); if (ret) { error_report("%s", strerror(errno)); closesocket(fd); Loading gdbstub.c +2 −3 Original line number Diff line number Diff line Loading @@ -2841,7 +2841,7 @@ static void gdb_accept(void) GDBState *s; struct sockaddr_in sockaddr; socklen_t len; int val, fd; int fd; for(;;) { len = sizeof(sockaddr); Loading @@ -2858,8 +2858,7 @@ static void gdb_accept(void) } /* set short latency */ val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); socket_set_nodelay(fd); s = g_malloc0(sizeof(GDBState)); s->c_cpu = first_cpu; Loading include/qemu/sockets.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ int inet_aton(const char *cp, struct in_addr *ia); int qemu_socket(int domain, int type, int protocol); int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); int socket_set_cork(int fd, int v); int socket_set_nodelay(int fd); void socket_set_block(int fd); void socket_set_nonblock(int fd); int send_all(int fd, const void *buf, int len1); Loading qemu-char.c +0 −6 Original line number Diff line number Diff line Loading @@ -2365,12 +2365,6 @@ static void tcp_chr_telnet_init(int fd) send(fd, (char *)buf, 3, 0); } static void socket_set_nodelay(int fd) { int val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); } static int tcp_chr_add_client(CharDriverState *chr, int fd) { TCPCharDriver *s = chr->opaque; Loading slirp/tcp_subr.c +1 −2 Original line number Diff line number Diff line Loading @@ -430,8 +430,7 @@ void tcp_connect(struct socket *inso) setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(int)); opt = 1; setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (char *)&opt, sizeof(int)); opt = 1; setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(int)); socket_set_nodelay(s); so->so_fport = addr.sin_port; so->so_faddr = addr.sin_addr; Loading Loading
block/sheepdog.c +1 −10 Original line number Diff line number Diff line Loading @@ -787,15 +787,6 @@ static int aio_flush_request(void *opaque) !QLIST_EMPTY(&s->pending_aio_head); } static int set_nodelay(int fd) { int ret, opt; opt = 1; ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt)); return ret; } /* * Return a socket discriptor to read/write objects. * Loading @@ -814,7 +805,7 @@ static int get_sheep_fd(BDRVSheepdogState *s) socket_set_nonblock(fd); ret = set_nodelay(fd); ret = socket_set_nodelay(fd); if (ret) { error_report("%s", strerror(errno)); closesocket(fd); Loading
gdbstub.c +2 −3 Original line number Diff line number Diff line Loading @@ -2841,7 +2841,7 @@ static void gdb_accept(void) GDBState *s; struct sockaddr_in sockaddr; socklen_t len; int val, fd; int fd; for(;;) { len = sizeof(sockaddr); Loading @@ -2858,8 +2858,7 @@ static void gdb_accept(void) } /* set short latency */ val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); socket_set_nodelay(fd); s = g_malloc0(sizeof(GDBState)); s->c_cpu = first_cpu; Loading
include/qemu/sockets.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ int inet_aton(const char *cp, struct in_addr *ia); int qemu_socket(int domain, int type, int protocol); int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); int socket_set_cork(int fd, int v); int socket_set_nodelay(int fd); void socket_set_block(int fd); void socket_set_nonblock(int fd); int send_all(int fd, const void *buf, int len1); Loading
qemu-char.c +0 −6 Original line number Diff line number Diff line Loading @@ -2365,12 +2365,6 @@ static void tcp_chr_telnet_init(int fd) send(fd, (char *)buf, 3, 0); } static void socket_set_nodelay(int fd) { int val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); } static int tcp_chr_add_client(CharDriverState *chr, int fd) { TCPCharDriver *s = chr->opaque; Loading
slirp/tcp_subr.c +1 −2 Original line number Diff line number Diff line Loading @@ -430,8 +430,7 @@ void tcp_connect(struct socket *inso) setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(int)); opt = 1; setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (char *)&opt, sizeof(int)); opt = 1; setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&opt, sizeof(int)); socket_set_nodelay(s); so->so_fport = addr.sin_port; so->so_faddr = addr.sin_addr; Loading