diff options
author | Matias Elo <matias.elo@nokia.com> | 2016-04-27 12:52:39 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-04-27 18:02:23 +0300 |
commit | 82e53ace8175b2a9dd2073a002b0fd882a19e1bb (patch) | |
tree | 1b866dd46e5a25e32ace11e584bf0b1288876f61 /example/switch | |
parent | 4103cae3d5996a3c18e9206e7d3d3fc630fc57c7 (diff) |
example: switch: set minimum interface count to two
There is no use for a switch with a single interface.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example/switch')
-rw-r--r-- | example/switch/odp_switch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/example/switch/odp_switch.c b/example/switch/odp_switch.c index b0e5b9145..96229ff91 100644 --- a/example/switch/odp_switch.c +++ b/example/switch/odp_switch.c @@ -717,7 +717,7 @@ static void usage(char *progname) "\n" "Mandatory OPTIONS:\n" " -i, --interface Eth interfaces (comma-separated, no spaces)\n" - " Interface count min 1, max %i\n" + " Interface count min 2, max %i\n" "\n" "Optional OPTIONS:\n" " -c, --count <number> CPU count.\n" @@ -800,7 +800,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->if_count = i; - if (appl_args->if_count < 1 || + if (appl_args->if_count < 2 || appl_args->if_count > MAX_PKTIOS) { usage(argv[0]); exit(EXIT_FAILURE); @@ -892,7 +892,6 @@ int main(int argc, char **argv) odp_instance_t instance; odph_linux_thr_params_t thr_params; - /* Init ODP before calling anything else */ if (odp_init_global(&instance, NULL, NULL)) { printf("Error: ODP global init failed.\n"); |