1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation.
9 #include <rte_option.h>
11 #include "eal_private.h"
13 TAILQ_HEAD(rte_option_list, rte_option);
15 struct rte_option_list rte_option_list =
16 TAILQ_HEAD_INITIALIZER(rte_option_list);
18 static struct rte_option *option;
21 rte_option_parse(const char *opt)
23 /* Check if the option is registered */
24 TAILQ_FOREACH(option, &rte_option_list, next) {
25 if (strcmp(opt, option->opt_str) == 0) {
34 void __rte_experimental
35 rte_option_register(struct rte_option *opt)
37 TAILQ_FOREACH(option, &rte_option_list, next) {
38 if (strcmp(opt->opt_str, option->opt_str) == 0) {
39 RTE_LOG(INFO, EAL, "Option %s has already been registered.\n",
45 TAILQ_INSERT_HEAD(&rte_option_list, opt, next);
51 TAILQ_FOREACH(option, &rte_option_list, next) {