Compare commits

..

1 Commits

Author SHA1 Message Date
Witold Kręcicki
7e2b3d93f7 Test larger quantum and more threads 2018-08-10 19:59:13 +02:00
2 changed files with 2 additions and 47 deletions

View File

@@ -158,8 +158,7 @@ void
isc__taskmgr_resume(isc_taskmgr_t *manager0);
#define DEFAULT_TASKMGR_QUANTUM 10
#define DEFAULT_DEFAULT_QUANTUM 30
#define DEFAULT_DEFAULT_QUANTUM 100
#define FINISHED(m) ((m)->exiting && EMPTY((m)->tasks))
/*%

View File

@@ -1048,49 +1048,6 @@ ns_client_sendraw(ns_client_t *client, dns_message_t *message) {
ns_client_next(client, result);
}
static void
client_pseudosend(ns_client_t *client, uint16_t id) {
isc_result_t result;
unsigned char *data;
isc_buffer_t buffer;
isc_buffer_t tcpbuffer;
isc_region_t r;
unsigned char sendbuf[SEND_BUFFER_SIZE];
result = client_allocsendbuf(client, &buffer, &tcpbuffer, 0,
sendbuf, &data);
if (result != ISC_R_SUCCESS) {
goto done;
}
isc_buffer_putuint16(&buffer, id);
isc_buffer_putuint8(&buffer, 0x81);
isc_buffer_putuint8(&buffer, 0x80);
isc_buffer_putuint16(&buffer, 0);
isc_buffer_putuint16(&buffer, 0);
isc_buffer_putuint16(&buffer, 0);
isc_buffer_putuint16(&buffer, 0);
if (client->sendcb != NULL) {
client->sendcb(&buffer);
} else if (TCP_CLIENT(client)) {
isc_buffer_usedregion(&buffer, &r);
isc_buffer_putuint16(&tcpbuffer, (uint16_t) r.length);
isc_buffer_add(&tcpbuffer, r.length);
result = client_sendpkg(client, &tcpbuffer);
} else {
result = client_sendpkg(client, &buffer);
}
if (result == ISC_R_SUCCESS) {
return;
}
done:
if (client->tcpbuf != NULL) {
isc_mem_put(client->mctx, client->tcpbuf, TCP_BUFFER_SIZE);
client->tcpbuf = NULL;
}
ns_client_next(client, result);
}
static void
client_send(ns_client_t *client) {
isc_result_t result;
@@ -2389,6 +2346,7 @@ ns__client_request(isc_task_t *task, isc_event_t *event) {
}
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
#if NS_CLIENT_DROPPORT
if (ns_client_dropport(isc_sockaddr_getport(&client->peeraddr)) ==
DROPPORT_REQUEST) {
@@ -2445,8 +2403,6 @@ ns__client_request(isc_task_t *task, isc_event_t *event) {
ns_client_next(client, result);
return;
}
client_pseudosend(client, id);
return;
/*
* The client object handles requests, not responses.