search for: recv_error_messag

Displaying 7 results from an estimated 7 matches for "recv_error_messag".

Did you mean: recv_error_message
2019 Jun 14
1
[libnbd PATCH] states: Validate error message size
..._STATE (%.DEAD); + set_error (0, "error message length too large"); + return -1; + } + /* We skip the human readable error for now. XXX */ h->rbuf = NULL; - h->rlen = be16toh (h->sbuf.sr.payload.error.len); + h->rlen = msglen; SET_NEXT_STATE (%RECV_ERROR_MESSAGE); } return 0; REPLY.STRUCTURED_REPLY.RECV_ERROR_MESSAGE: + uint32_t length, msglen; + uint16_t type; + + switch (recv_into_rbuf (h)) { + case -1: SET_NEXT_STATE (%.DEAD); return -1; + case 0: + length = be32toh (h->sbuf.sr.structured_reply.length); + msglen = be16toh (h->...
2023 Jun 09
4
[libnbd PATCH v4 0/4] Saner reply header layout
This was v3 patch 2/22, reworked to address the confusion about how a structured reply header is read in two pieces before getting to the payload portion. I'm still working on rebasing the rest of my v3 series (patches 1, 3-22) from other comments given, but this seemed independent enough that it's worth posting now rather than holding it up for the rest of the series. Eric Blake (4):
2023 Jun 20
1
[libnbd PATCH v4 4/4] internal: Refactor layout of replies in sbuf
...; > + h->rlen = sizeof h->sbuf.reply.payload.offset_hole; > SET_NEXT_STATE (%RECV_OFFSET_HOLE); > break; > > @@ -127,10 +127,10 @@ REPLY.CHUNK_REPLY.START: > * compliant, will favor the wire error over EPROTO during more > * length checks in RECV_ERROR_MESSAGE and RECV_ERROR_TAIL. > */ > - if (length < sizeof h->sbuf.sr.payload.error.error.error) > + if (length < sizeof h->sbuf.reply.payload.error.error.error) > goto resync; > - h->rbuf = &h->sbuf.sr.payload.error.error; > - h-...
2019 Jun 25
0
Re: [libnbd PATCH] states: Never block state machine inside REPLY
..._state with > name = "RECV_ERROR"; > comment = "Receive a structured reply error header"; > - external_events = [ NotifyRead, "" ]; > + external_events = [] > }; > > State { > default_state with > name = "RECV_ERROR_MESSAGE"; > comment = "Receive a structured reply error message"; > - external_events = [ NotifyRead, "" ]; > + external_events = []; > }; > > State { > default_state with > name = "RECV_ERROR_TAIL"; > comment =...
2019 Jun 19
4
[libnbd PATCH] states: Never block state machine inside REPLY
...ructured_reply_state_machine = [ default_state with name = "RECV_ERROR"; comment = "Receive a structured reply error header"; - external_events = [ NotifyRead, "" ]; + external_events = [] }; State { default_state with name = "RECV_ERROR_MESSAGE"; comment = "Receive a structured reply error message"; - external_events = [ NotifyRead, "" ]; + external_events = []; }; State { default_state with name = "RECV_ERROR_TAIL"; comment = "Receive a structured reply error tail&...
2019 Jun 14
10
[libnbd PATCH 0/7] state machine refactoring
I'm still playing with ideas on how to split rstate from wstate (so that we can send a request without waiting for POLLIN to complete a pending reply), but this is some preliminary refactoring I found useful. I also fixed a couple of bugs while in the area (already pushed). There's a question of whether we want nbd_handle to be nearly 5k, or if we should instead keep it small and add one
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