From 8e0d48cbb23cf056277ebc609d47b5184b95fa87 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Mon, 13 Apr 2009 18:42:36 +0530 Subject: use ctx->page_size in all translators and transports instead of having their own configurations Signed-off-by: Anand V. Avati --- transport/ib-verbs/src/ib-verbs.c | 42 ++++----------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) (limited to 'transport') diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index 91a3209b87b..b524a032f84 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -1256,10 +1256,10 @@ ib_verbs_options_init (transport_t *this) /* TODO: validate arguments from options below */ - options->send_size = 1048576; /* 1 MB */ - options->recv_size = 1048576; /* 1 MB */ - options->send_count = 16; - options->recv_count = 16; + options->send_size = this->xl->ctx->page_size; + options->recv_size = this->xl->ctx->page_size; + options->send_count = 32; + options->recv_count = 32; temp = dict_get (this->xl->options, "transport.ib-verbs.work-request-send-count"); @@ -1271,32 +1271,6 @@ ib_verbs_options_init (transport_t *this) if (temp) options->recv_count = data_to_int32 (temp); - temp = dict_get (this->xl->options, - "transport.ib-verbs.work-request-send-size"); - if (temp) { - ret = gf_string2bytesize (temp->data, &options->send_size); - if (ret != 0) { - gf_log ("ib-verbs", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option request-send-size\"", - temp->data); - options->send_size = 1 * GF_UNIT_MB; - } - } - - temp = dict_get (this->xl->options, - "transport.ib-verbs.work-request-recv-size"); - if (temp) { - ret = gf_string2bytesize (temp->data, &options->recv_size); - if (ret != 0) { - gf_log ("ib-verbs", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option request-recv-size\"", - temp->data); - options->recv_size = 1 * GF_UNIT_MB; - } - } - options->port = 1; temp = dict_get (this->xl->options, "transport.ib-verbs.port"); @@ -2367,14 +2341,6 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_ANY, .description = "check by 'ibv_devinfo'" }, - { .key = {"transport.ib-verbs.work-request-send-size", - "ib-verbs-work-request-send-size"}, - .type = GF_OPTION_TYPE_SIZET, - }, - { .key = {"transport.ib-verbs.work-request-recv-size", - "ib-verbs-work-request-recv-size"}, - .type = GF_OPTION_TYPE_SIZET, - }, { .key = {"transport.ib-verbs.work-request-send-count", "ib-verbs-work-request-send-count"}, .type = GF_OPTION_TYPE_INT, -- cgit