X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Futils%2Flst.c;h=0b6d40a513f63002c368f63f591de52210c5d466;hp=ff8db840e1515e162ff6c13bd35e553b0ebfbd5d;hb=272e49ce2d5d6883e6ca1b00a9322b3a23b2e55a;hpb=d92bd22523aa9bb1cdb91ded3d46fb180f68a93c diff --git a/lnet/utils/lst.c b/lnet/utils/lst.c index ff8db84..0b6d40a 100644 --- a/lnet/utils/lst.c +++ b/lnet/utils/lst.c @@ -23,7 +23,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2016, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -51,7 +51,7 @@ #include #include #include -#include +#include "lnetconfig/liblnetconfig.h" struct lst_sid LST_INVALID_SID = { .ses_nid = LNET_NID_ANY, .ses_stamp = -1 }; static struct lst_sid session_id; @@ -2952,8 +2952,6 @@ lst_get_bulk_param(int argc, char **argv, struct lst_test_bulk_param *bulk) } else if (strcasestr(argv[i], "size=") == argv[i] || strcasestr(argv[i], "s=") == argv[i]) { - int max_size = sysconf(_SC_PAGESIZE) * LNET_MAX_IOV; - tok = strchr(argv[i], '=') + 1; bulk->blk_size = strtol(tok, &end, 0); @@ -2970,7 +2968,7 @@ lst_get_bulk_param(int argc, char **argv, struct lst_test_bulk_param *bulk) else if (*end == 'm' || *end == 'M') bulk->blk_size *= 1024 * 1024; - if (bulk->blk_size > max_size) { + if (bulk->blk_size > LNET_MTU) { fprintf(stderr, "Size exceed limitation: %d bytes\n", bulk->blk_size); return -1; @@ -3332,9 +3330,9 @@ main(int argc, char **argv) if (rc < 0) goto errorout; - rc = ptl_initialize(argc, argv); - if (rc < 0) - goto errorout; + rc = lustre_lnet_config_lib_init(); + if (rc < 0) + goto errorout; Parser_init("lst > ", lst_cmdlist);