1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016-2018 Solarflare Communications Inc.
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
13 #include <rte_kvargs.h>
19 #define SFC_KVARG_VALUES_BOOL "[1|y|yes|on|0|n|no|off]"
21 #define SFC_KVARG_DEBUG_INIT "debug_init"
23 #define SFC_KVARG_MCDI_LOGGING "mcdi_logging"
25 #define SFC_KVARG_PERF_PROFILE "perf_profile"
27 #define SFC_KVARG_PERF_PROFILE_AUTO "auto"
28 #define SFC_KVARG_PERF_PROFILE_THROUGHPUT "throughput"
29 #define SFC_KVARG_PERF_PROFILE_LOW_LATENCY "low-latency"
30 #define SFC_KVARG_VALUES_PERF_PROFILE \
31 "[" SFC_KVARG_PERF_PROFILE_AUTO "|" \
32 SFC_KVARG_PERF_PROFILE_THROUGHPUT "|" \
33 SFC_KVARG_PERF_PROFILE_LOW_LATENCY "]"
35 #define SFC_KVARG_STATS_UPDATE_PERIOD_MS "stats_update_period_ms"
37 #define SFC_KVARG_DATAPATH_EFX "efx"
38 #define SFC_KVARG_DATAPATH_EF10 "ef10"
39 #define SFC_KVARG_DATAPATH_EF10_SIMPLE "ef10_simple"
41 #define SFC_KVARG_RX_DATAPATH "rx_datapath"
42 #define SFC_KVARG_VALUES_RX_DATAPATH \
43 "[" SFC_KVARG_DATAPATH_EFX "|" \
44 SFC_KVARG_DATAPATH_EF10 "]"
46 #define SFC_KVARG_TX_DATAPATH "tx_datapath"
47 #define SFC_KVARG_VALUES_TX_DATAPATH \
48 "[" SFC_KVARG_DATAPATH_EFX "|" \
49 SFC_KVARG_DATAPATH_EF10 "|" \
50 SFC_KVARG_DATAPATH_EF10_SIMPLE "]"
54 int sfc_kvargs_parse(struct sfc_adapter *sa);
55 void sfc_kvargs_cleanup(struct sfc_adapter *sa);
57 int sfc_kvargs_process(struct sfc_adapter *sa, const char *key_match,
58 arg_handler_t handler, void *opaque_arg);
60 int sfc_kvarg_bool_handler(const char *key, const char *value_str,
62 int sfc_kvarg_long_handler(const char *key, const char *value_str,
64 int sfc_kvarg_string_handler(const char *key, const char *value_str,
71 #endif /* _SFC_KVARGS_H */