search for: wbuf

Displaying 20 results from an estimated 100 matches for "wbuf".

Did you mean: buf
2019 Jun 08
6
[PATCH libnbd 0/3] states: Use MSG_MORE to coalesce messages.
Appears to have a measurable benefit, see 3/3 for test results. Rich.
2019 Jun 08
0
[PATCH libnbd 3/3] states: Use MSG_MORE to coalesce messages into single packets.
...ged, 11 insertions(+) diff --git a/generator/states-issue-command.c b/generator/states-issue-command.c index 627a54f..cce43d7 100644 --- a/generator/states-issue-command.c +++ b/generator/states-issue-command.c @@ -42,6 +42,8 @@ h->request.count = htobe32 ((uint32_t) cmd->count); h->wbuf = &h->request; h->wlen = sizeof (h->request); + if (cmd->type == NBD_CMD_WRITE) + h->wflags = MSG_MORE; SET_NEXT_STATE (%SEND_REQUEST); return 0; diff --git a/generator/states-newstyle-opt-export-name.c b/generator/states-newstyle-opt-export-name.c index 774c93c..9...
2023 Aug 30
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...all.c +++ b/plugins/sh/call.c @@ -34,6 +34,7 @@ #include <assert.h> #include <fcntl.h> +#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> @@ -130,6 +131,7 @@ debug_call (const char **argv) */ static int call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ + bool *pipe_full, /* set if wbuf not fully written */ string *rbuf, /* read from stdout */ string *ebuf, /* read from stderr */ const char **argv)...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt; #include <assert.h> > #include <fcntl.h> > +#include <stdbool.h> > #include <stdio.h> > #include <stdlib.h> > #include <inttypes.h> > @@ -130,6 +131,7 @@ debug_call (const char **argv) > */ > static int > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > + bool *pipe_full, /* set if wbuf not fully written */ > string *rbuf, /* read from stdout */ > string *ebuf, /* read from stderr */ > const char *...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt; #include <assert.h> > #include <fcntl.h> > +#include <stdbool.h> > #include <stdio.h> > #include <stdlib.h> > #include <inttypes.h> > @@ -130,6 +131,7 @@ debug_call (const char **argv) > */ > static int > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > + bool *pipe_full, /* set if wbuf not fully written */ > string *rbuf, /* read from stdout */ > string *ebuf, /* read from stderr */ > const char *...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...clude <fcntl.h> > > +#include <stdbool.h> > > #include <stdio.h> > > #include <stdlib.h> > > #include <inttypes.h> > > @@ -130,6 +131,7 @@ debug_call (const char **argv) > > */ > > static int > > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > > + bool *pipe_full, /* set if wbuf not fully written */ > > string *rbuf, /* read from stdout */ > > string *ebuf, /* read from stderr */ > >...
2019 Jun 09
1
Re: [PATCH libnbd 2/3] states: Add handle h->wflags field.
...ve to another state. --- generator/states.c | 10 +++++++--- lib/internal.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/generator/states.c b/generator/states.c index e879a83..b0dab83 100644 --- a/generator/states.c +++ b/generator/states.c @@ -91,8 +91,8 @@ send_from_wbuf (struct nbd_handle *h) ssize_t r; if (h->wlen == 0) - return 0; /* move to next state */ - r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen, 0); + goto next_state; + r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen, h-...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt; #include <fcntl.h> >> +#include <stdbool.h> >> #include <stdio.h> >> #include <stdlib.h> >> #include <inttypes.h> >> @@ -130,6 +131,7 @@ debug_call (const char **argv) >> */ >> static int >> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >> + bool *pipe_full, /* set if wbuf not fully written */ >> string *rbuf, /* read from stdout */ >> string *ebuf, /* read from stderr */ >>...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt; +#include <stdbool.h> > >> #include <stdio.h> > >> #include <stdlib.h> > >> #include <inttypes.h> > >> @@ -130,6 +131,7 @@ debug_call (const char **argv) > >> */ > >> static int > >> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >> + bool *pipe_full, /* set if wbuf not fully written */ > >> string *rbuf, /* read from stdout */ > >> string *ebuf, /* read from stderr *...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...t;>> +#include <stdbool.h> >>> #include <stdio.h> >>> #include <stdlib.h> >>> #include <inttypes.h> >>> @@ -130,6 +131,7 @@ debug_call (const char **argv) >>> */ >>> static int >>> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >>> + bool *pipe_full, /* set if wbuf not fully written */ >>> string *rbuf, /* read from stdout */ >>> string *ebuf, /* read from stderr */ &...
2015 Aug 28
1
HP EFI binaries
On Fri, Aug 28, 2015 at 03:34:12AM -0700, Patrick Masotta via Syslinux wrote: Derrick wrote: > > More importantly: look at the actual captured text.? It does NOT > > specify a valid MAC in its entirety and leaves off the leading nibble > > (11 characters, not 12).? Handle 267 shows "065F36E00EE" not "0065F36E00EE". > > I saw that, they might even be
2023 Aug 31
2
[PATCH nbdkit] sh: In pwrite, allow scripts to ignore stdin
...T += \ test-sh-errors.sh \ test-sh-extents.sh \ + test-sh-pwrite-ignore-stdin.sh \ test-sh-tmpdir-leak.sh \ $(NULL) diff --git a/plugins/sh/call.c b/plugins/sh/call.c index 888c6459a..621465252 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -275,22 +275,31 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ r = write (pfds[0].fd, wbuf, wbuflen); if (r == -1) { if (errno == EPIPE) { - /* We tried to write to the script but it didn't consume - * the data. Probably the script exited without reading -...
2019 Jun 08
0
[PATCH libnbd 2/3] states: Add handle h->wflags field.
...we move to another state. --- generator/states.c | 6 ++++-- lib/internal.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/generator/states.c b/generator/states.c index e879a83..36cca37 100644 --- a/generator/states.c +++ b/generator/states.c @@ -92,7 +92,7 @@ send_from_wbuf (struct nbd_handle *h) if (h->wlen == 0) return 0; /* move to next state */ - r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen, 0); + r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen, h->wflags); if (r == -1) {...
2019 May 21
0
[libnbd PATCH 2/3] states: Split ISSUE_COMMAND.SEND_REQUEST
In order to handle reading an in-flight response while in the middle of sending a second command, we'll need a way to jump back into the middle of a command being sent. This is easier if the state that sets wbuf is distinct from the state that reads into wbuf, and if we don't move the command to the in-flight queue until after the writes finish. --- generator/generator | 14 ++++++++++ generator/states-issue-command.c | 45 ++++++++++++++++++++------------ 2 files changed, 42 insertions(+...
2019 Jun 09
0
[PATCH libnbd] states: In recv_into_rbuf and send_from_wbuf loop until EAGAIN.
...== 0) - return 0; /* move to next state */ - else - return 1; /* more data */ + if (h->rbuf) + h->rbuf += r; + h->rlen -= r; + } + + return 0; /* move to next state */ } static int @@ -90,21 +87,19 @@ send_from_wbuf (struct nbd_handle *h) { ssize_t r; - if (h->wlen == 0) - return 0; /* move to next state */ - r = h->sock->ops->send (h, h->sock, h->wbuf, h->wlen); - if (r == -1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) - return 1;...
2023 Aug 31
0
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...include <stdio.h> > >>>> #include <stdlib.h> > >>>> #include <inttypes.h> > >>>> @@ -130,6 +131,7 @@ debug_call (const char **argv) > >>>> */ > >>>> static int > >>>> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>>> + bool *pipe_full, /* set if wbuf not fully written */ > >>>> string *rbuf, /* read from stdout */ > >>>> string *ebuf,...
2020 Apr 15
0
[PATCH nbdkit 8/9] eval, sh: Set $tmpdir before running the command, instead of globally.
...l.c | 11 +++++++++++ plugins/sh/sh.c | 7 +------ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/sh/call.h b/plugins/sh/call.h index 6aa70e56..78305d1e 100644 --- a/plugins/sh/call.h +++ b/plugins/sh/call.h @@ -49,4 +49,6 @@ extern exit_code call_write (const char *wbuf, size_t wbuflen, const char **argv) __attribute__((__nonnull__ (1, 3))); +extern char tmpdir[]; + #endif /* NBDKIT_CALL_H */ diff --git a/plugins/eval/eval.c b/plugins/eval/eval.c index f09e49f3..3bc7f2a6 100644 --- a/plugins/eval/eval.c +++ b/plugins/eval/eval.c...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...gt; > >>> #include <stdio.h> > >>> #include <stdlib.h> > >>> #include <inttypes.h> > >>> @@ -130,6 +131,7 @@ debug_call (const char **argv) > >>> */ > >>> static int > >>> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>> + bool *pipe_full, /* set if wbuf not fully written */ > >>> string *rbuf, /* read from stdout */ > >>> string *ebuf, /* read f...
2019 Jun 12
3
[libnbd PATCH 0/2] More with MSG_MORE
I'm not sure if this is worth pursuing. On paper, it makes sense (if we know we have multiple commands batched to send over the wire, AND those commands are short in length, we might as well use MSG_MORE), but the measurement numbers with it applied might just be in the noise. Eric Blake (2): examples: Enhance access patterns of threaded-reads-and-writes states: Another use for MSG_MORE
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must