search for: disable_nagle

Displaying 11 results from an estimated 11 matches for "disable_nagle".

2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
...; }\n"; pr " } while (!blocked);\n"; pr " return 0;\n"; pr "}\n"; diff --git a/generator/states-connect.c b/generator/states-connect.c index c6a4ae7..9e2e1d4 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -55,12 +55,12 @@ disable_nagle (int sock) if (fd == -1) { SET_NEXT_STATE (%.DEAD); set_error (errno, "socket"); - return -1; + return 0; } h->sock = nbd_internal_socket_create (fd); if (!h->sock) { SET_NEXT_STATE (%.DEAD); - return -1; + return 0; } disable_nagle (fd)...
2019 Sep 12
2
[PATCH libnbd 1/2] nbd_connect_tcp: Try to return errno from underlying connect(2) call.
...connect.c | 12 ++++++++++-- lib/internal.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/generator/states-connect.c b/generator/states-connect.c index 9e2e1d4..e9b3582 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -128,6 +128,8 @@ disable_nagle (int sock) h->result = NULL; } + h->connect_errno = 0; + memset (&h->hints, 0, sizeof h->hints); h->hints.ai_family = AF_UNSPEC; h->hints.ai_socktype = SOCK_STREAM; @@ -160,7 +162,8 @@ disable_nagle (int sock) * Save errno from most recent connect(2)...
2019 Oct 18
4
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...@@ -37,6 +37,10 @@ > #include <sys/socket.h> > #include <sys/un.h> > > +#ifdef HAVE_LINUX_VM_SOCKETS_H > +#include <linux/vm_sockets.h> > +#endif > + > /* Disable Nagle's algorithm on the socket, but don't fail. */ > static void > disable_nagle (int sock) > @@ -118,6 +122,24 @@ STATE_MACHINE { > SET_NEXT_STATE (%^CONNECT.START); > return 0; > > + CONNECT_VSOCK.START: > +#ifdef AF_VSOCK > + struct sockaddr_vm svm = { > + .svm_family = AF_VSOCK, > + .svm_cid = h->svm_cid, > + .svm_port =...
2019 Sep 26
5
[PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
If the user calls nbd_kill_subprocess, we shouldn't kill the process again when we close the handle (since the process has likely gone and we might be killing a different process). --- lib/handle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/handle.c b/lib/handle.c index 2af25fe..5ad818e 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -315,6 +315,8 @@
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to prove whether it makes the code any faster or easier to maintain, but at least the added example shows one good use case for the new API. Eric Blake (6): api: Add nbd_aio_in_flight generator: Allow DEAD state actions to run generator: Allow Int64 in callbacks states: Prepare for aio notify callback api: Add new
2019 Sep 26
0
[PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...c +++ b/generator/states-connect.c @@ -37,6 +37,9 @@ #include <sys/socket.h> #include <sys/un.h> +/* This is baked into the systemd socket activation API. */ +#define FIRST_SOCKET_ACTIVATION_FD 3 + /* Disable Nagle's algorithm on the socket, but don't fail. */ static void disable_nagle (int sock) @@ -292,4 +295,110 @@ disable_nagle (int sock) SET_NEXT_STATE (%^MAGIC.START); return 0; + CONNECT_SA.START: + /* This is in some ways similar to nbd_aio_connect_command above, + * but we must pass a listening socket to the child process and + * we must set LISTEN_PID and LI...
2019 Oct 18
0
Re: [PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...#include <sys/socket.h> > > #include <sys/un.h> > >+#ifdef HAVE_LINUX_VM_SOCKETS_H > >+#include <linux/vm_sockets.h> > >+#endif > >+ > > /* Disable Nagle's algorithm on the socket, but don't fail. */ > > static void > > disable_nagle (int sock) > >@@ -118,6 +122,24 @@ STATE_MACHINE { > > SET_NEXT_STATE (%^CONNECT.START); > > return 0; > >+ CONNECT_VSOCK.START: > >+#ifdef AF_VSOCK > >+ struct sockaddr_vm svm = { > >+ .svm_family = AF_VSOCK, > >+ .svm_cid = h->svm_ci...
2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK support. On the host side it allows you to start an nbdkit instance which listens on a virtio-vsock socket: $ ./nbdkit -fv --vsock memory 1G ... nbdkit: debug: bound to vsock 2:10809 On the guest side you can then use libnbd to connect to the server: $ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2019 Sep 26
2
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...@ > #include <sys/socket.h> > #include <sys/un.h> > > +/* This is baked into the systemd socket activation API. */ > +#define FIRST_SOCKET_ACTIVATION_FD 3 > + > /* Disable Nagle's algorithm on the socket, but don't fail. */ > static void > disable_nagle (int sock) > @@ -292,4 +295,110 @@ disable_nagle (int sock) > SET_NEXT_STATE (%^MAGIC.START); > return 0; > > + CONNECT_SA.START: > + /* This is in some ways similar to nbd_aio_connect_command above, > + * but we must pass a listening socket to the child process a...
2019 Oct 18
0
[PATCH libnbd 2/2] api: Add support for AF_VSOCK.
...rator/states-connect.c +++ b/generator/states-connect.c @@ -37,6 +37,10 @@ #include <sys/socket.h> #include <sys/un.h> +#ifdef HAVE_LINUX_VM_SOCKETS_H +#include <linux/vm_sockets.h> +#endif + /* Disable Nagle's algorithm on the socket, but don't fail. */ static void disable_nagle (int sock) @@ -118,6 +122,24 @@ STATE_MACHINE { SET_NEXT_STATE (%^CONNECT.START); return 0; + CONNECT_VSOCK.START: +#ifdef AF_VSOCK + struct sockaddr_vm svm = { + .svm_family = AF_VSOCK, + .svm_cid = h->svm_cid, + .svm_port = h->svm_port, + }; + const socklen_t len = sizeo...
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here: <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. See the Notes section on each patch for the v4 updates. The series is nearly ready for merging: every patch has at least one R-b tag, except "socket activation: avoid manipulating the sign bit". The series builds, and passes "make check" and "make check-valgrind", at