BIND 10 trac2776, updated. da274764a6096182c8a64b5f66cfecaa715a470c [2776] Tweak the receptionist
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Feb 28 13:31:36 UTC 2013
The branch, trac2776 has been updated
via da274764a6096182c8a64b5f66cfecaa715a470c (commit)
from af52109c9d749dc249349dadcba64c07db18b9ff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit da274764a6096182c8a64b5f66cfecaa715a470c
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Feb 28 14:31:14 2013 +0100
[2776] Tweak the receptionist
-----------------------------------------------------------------------
Summary of changes:
src/bin/receptionist/main.cc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/receptionist/main.cc b/src/bin/receptionist/main.cc
index 38f22b2..08899be 100644
--- a/src/bin/receptionist/main.cc
+++ b/src/bin/receptionist/main.cc
@@ -23,11 +23,11 @@ namespace {
const uint16_t listen_port = 5310;
const uint16_t up_port = 5311;
const uint16_t answer_port = 5312;
-const size_t conn_count = 1;
+const size_t conn_count = 4;
const size_t event_cnt = 10;
const size_t buffer_size = 6553600;
const size_t msg_size = 65536;
-const size_t maxmsg_count = 50;
+const size_t maxmsg_count = 10;
struct epoll_handler {
void (*handler)(size_t param);
@@ -40,8 +40,8 @@ int udp_socket;
struct epoll_handler udp_handler = { udp_ready, 0 };
uint8_t udp_buffer[buffer_size * conn_count];
size_t udp_buff_pos = 0;
-struct mmsghdr out_headers[maxmsg_count * conn_count];
-struct iovec out_vectors[maxmsg_count * conn_count];
+struct mmsghdr out_headers[maxmsg_count * conn_count * 10];
+struct iovec out_vectors[maxmsg_count * conn_count * 10];
size_t out_hdrpos = 0;
struct upconn {
@@ -98,6 +98,7 @@ void upstream_ready(size_t index) {
pos += msg_len;
out_hdrpos ++;
}
+ udp_buff_pos += length;
}
}
@@ -115,7 +116,7 @@ int main() {
// to pass the answer to the reply.
udp_headers[0].msg_hdr.msg_name = &remote_addr;
udp_headers[0].msg_hdr.msg_namelen = sizeof remote_addr;
- for (size_t i = 0; i < maxmsg_count * conn_count; i ++) {
+ for (size_t i = 0; i < maxmsg_count * conn_count * 10; i ++) {
out_headers[i].msg_hdr.msg_iovlen = 1;
out_headers[i].msg_hdr.msg_iov = &out_vectors[i];
out_headers[i].msg_hdr.msg_namelen = sizeof remote_addr;
@@ -160,7 +161,7 @@ int main() {
}
// Send all read data
for (size_t i = 0; i < conn_count; i ++) {
- if (conns[i].buff_size == 4)
+ if (conns[i].buff_size < 300)
continue;
uint32_t size = htonl(conns[i].buff_size - 4);
memcpy(conns[i].buff, &size, 4);
More information about the bind10-changes
mailing list