search for: raw_send

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

2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...q; + RAWState *s = vc->opaque; + + qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); + if (s->promisc) { + ioctl(s->fd, SIOCGIFFLAGS, &req); + req.ifr_flags &= ~IFF_PROMISC; + ioctl(s->fd, SIOCSIFFLAGS, &req); + } + close(s->fd); + qemu_free(s); +} + +static void raw_send(void *opaque); + +static int raw_can_send(void *opaque) +{ + RAWState *s = opaque; + + return qemu_can_send_packet(s->vc); +} + +static void raw_send_completed(VLANClientState *vc, ssize_t len) +{ + RAWState *s = vc->opaque; + + qemu_set_fd_handler2(s->fd, raw_can_send, raw_send, NULL, s);...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...q; + RAWState *s = vc->opaque; + + qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); + if (s->promisc) { + ioctl(s->fd, SIOCGIFFLAGS, &req); + req.ifr_flags &= ~IFF_PROMISC; + ioctl(s->fd, SIOCSIFFLAGS, &req); + } + close(s->fd); + qemu_free(s); +} + +static void raw_send(void *opaque); + +static int raw_can_send(void *opaque) +{ + RAWState *s = opaque; + + return qemu_can_send_packet(s->vc); +} + +static void raw_send_completed(VLANClientState *vc, ssize_t len) +{ + RAWState *s = vc->opaque; + + qemu_set_fd_handler2(s->fd, raw_can_send, raw_send, NULL, s);...
2019 Jun 06
0
[nbdkit PATCH 1/2] server: Add support for corking
...include <netinet/tcp.h> #include "internal.h" @@ -51,6 +53,7 @@ static void free_connection (struct connection *conn); /* Don't call these raw socket functions directly. Use conn->recv etc. */ static int raw_recv (struct connection *, void *buf, size_t len); static int raw_send (struct connection *, const void *buf, size_t len); +static int raw_cork (struct connection *conn, bool cork); static void raw_close (struct connection *); int @@ -288,6 +291,15 @@ new_connection (int sockin, int sockout, int nworkers) conn->send = raw_send; conn->close = raw_close;...
2019 Jun 06
4
[nbdkit PATCH 0/2] Reduce network overhead with corking
Slightly RFC, as I need more time to investigate why Unix sockets appeared to degrade with this patch. But as TCP sockets (over loopback to localhost) and TLS sessions (regardless of underlying Unix or TCP) both showed improvements, this looks like a worthwhile series. Eric Blake (2): server: Add support for corking server: Cork around grouped transmission send()s server/internal.h | 3
2019 Jun 07
4
[nbdkit PATCH v2 0/2] Reduce network overhead with MSG_MORE/corking
This time around, the numbers are indeed looking better than in v1; and I like the interface better. Eric Blake (2): server: Prefer send() over write() server: Group related transmission send()s server/internal.h | 7 +++- server/connections.c | 51 +++++++++++++++++++++++++--- server/crypto.c | 11 ++++--
2017 Nov 17
0
[nbdkit PATCH 3/6] connections: Add read/write lock over client I/O
...sockin, int sockout) conn->sockin = sockin; conn->sockout = sockout; pthread_mutex_init (&conn->request_lock, NULL); + pthread_mutex_init (&conn->read_lock, NULL); + pthread_mutex_init (&conn->write_lock, NULL); conn->recv = raw_recv; conn->send = raw_send; @@ -223,6 +227,8 @@ free_connection (struct connection *conn) conn->close (conn); pthread_mutex_destroy (&conn->request_lock); + pthread_mutex_destroy (&conn->read_lock); + pthread_mutex_destroy (&conn->write_lock); /* Don't call the plugin again if quit ha...
2019 Jun 06
0
[nbdkit PATCH 2/2] server: Cork around grouped transmission send()s
...server/connections.c | 2 ++ server/protocol.c | 52 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/server/connections.c b/server/connections.c index 9b0b75c..8c92dc5 100644 --- a/server/connections.c +++ b/server/connections.c @@ -356,6 +356,7 @@ raw_send (struct connection *conn, const void *vbuf, size_t len) return 0; } +#ifdef TCP_CORK /* Change the cork status to batch a group of send calls, and either succeed * completely (returns 0) or fail (returns -1). */ @@ -368,6 +369,7 @@ raw_cork (struct connection *conn, bool cork) setsocko...
2017 Nov 17
2
Re: [nbdkit PATCH 3/6] connections: Add read/write lock over client I/O
...ockin = sockin; > conn->sockout = sockout; > pthread_mutex_init (&conn->request_lock, NULL); > + pthread_mutex_init (&conn->read_lock, NULL); > + pthread_mutex_init (&conn->write_lock, NULL); > > conn->recv = raw_recv; > conn->send = raw_send; > @@ -223,6 +227,8 @@ free_connection (struct connection *conn) > conn->close (conn); > > pthread_mutex_destroy (&conn->request_lock); > + pthread_mutex_destroy (&conn->read_lock); > + pthread_mutex_destroy (&conn->write_lock); > > /* Do...
2017 Nov 17
8
[RFC nbdkit PATCH 0/6] Enable full parallel request handling
I want to make my nbd forwarding plugin fully parallel - but to do that, I first need to make nbdkit itself fully parallel ;) With this series, I was finally able to demonstrate out-of-order responses when using qemu-io (which is great at sending back-to-back requests prior to waiting for responses) coupled with the nbd file plugin (which has a great feature of rdelay and wdelay, to make it
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm confident enough with the series that it should be ready to push; at any rate, I can now run test-socket-activation in a tight loop without triggering any crashes or hangs. With this in place, I'm going back to work on making the nbd forwarder wort with the parallel thread model. Eric Blake (8): sockets: Use
2019 Mar 18
3
[PATCH nbdkit 0/2] server: Split out NBD protocol code from connections code.
These are a couple of patches in preparation for the Block Status implementation. While the patches (especially the second one) are very large they are really just elementary code motion. Rich.