aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/record/rec_layer_d1.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-01-12 14:52:35 +0000
committerMatt Caswell <matt@openssl.org>2016-03-07 21:39:27 +0000
commit94777c9c86a2b2ea2726c49d6c8f61078558beba (patch)
treea0c4cc27b76e5e4044bdb34c21dd1f298af8094d /ssl/record/rec_layer_d1.c
parent2f2c9caa727d7d2a5ce4bfb8266e019546ce77df (diff)
downloadopenssl-94777c9c86a2b2ea2726c49d6c8f61078558beba.tar.gz
Implement read pipeline support in libssl
Read pipelining is controlled in a slightly different way than with write pipelining. While reading we are constrained by the number of records that the peer (and the network) can provide to us in one go. The more records we can get in one go the more opportunity we have to parallelise the processing. There are two parameters that affect this: * The number of pipelines that we are willing to process in one go. This is controlled by max_pipelines (as for write pipelining) * The size of our read buffer. A subsequent commit will provide an API for adjusting the size of the buffer. Another requirement for this to work is that "read_ahead" must be set. The read_ahead parameter will attempt to read as much data into our read buffer as the network can provide. Without this set, data is read into the read buffer on demand. Setting the max_pipelines parameter to a value greater than 1 will automatically also turn read_ahead on. Finally, the read pipelining as currently implemented will only parallelise the processing of application data records. This would only make a difference for renegotiation so is unlikely to have a significant impact. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/record/rec_layer_d1.c')
-rw-r--r--ssl/record/rec_layer_d1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index cd033e008f..86b65854fc 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -355,7 +355,7 @@ int dtls1_process_buffered_records(SSL *s)
if (!dtls1_process_record(s))
return (0);
if (dtls1_buffer_record(s, &(s->rlayer.d->processed_rcds),
- SSL3_RECORD_get_seq_num(&s->rlayer.rrec)) < 0)
+ SSL3_RECORD_get_seq_num(s->rlayer.rrec)) < 0)
return -1;
}
}
@@ -464,7 +464,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
* s->s3->rrec.off, - offset into 'data' for next read
* s->s3->rrec.length, - number of bytes.
*/
- rr = &s->rlayer.rrec;
+ rr = s->rlayer.rrec;
/*
* We are not handshaking and have no data yet, so process data buffered