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_PERF_PROFILE "perf_profile"
23 #define SFC_KVARG_PERF_PROFILE_AUTO "auto"
24 #define SFC_KVARG_PERF_PROFILE_THROUGHPUT "throughput"
25 #define SFC_KVARG_PERF_PROFILE_LOW_LATENCY "low-latency"
26 #define SFC_KVARG_VALUES_PERF_PROFILE \
27 "[" SFC_KVARG_PERF_PROFILE_AUTO "|" \
28 SFC_KVARG_PERF_PROFILE_THROUGHPUT "|" \
29 SFC_KVARG_PERF_PROFILE_LOW_LATENCY "]"
31 #define SFC_KVARG_STATS_UPDATE_PERIOD_MS "stats_update_period_ms"
33 #define SFC_KVARG_DATAPATH_EFX "efx"
34 #define SFC_KVARG_DATAPATH_EF10 "ef10"
35 #define SFC_KVARG_DATAPATH_EF10_SIMPLE "ef10_simple"
37 #define SFC_KVARG_RX_DATAPATH "rx_datapath"
38 #define SFC_KVARG_VALUES_RX_DATAPATH \
39 "[" SFC_KVARG_DATAPATH_EFX "|" \
40 SFC_KVARG_DATAPATH_EF10 "]"
42 #define SFC_KVARG_TX_DATAPATH "tx_datapath"
43 #define SFC_KVARG_VALUES_TX_DATAPATH \
44 "[" SFC_KVARG_DATAPATH_EFX "|" \
45 SFC_KVARG_DATAPATH_EF10 "|" \
46 SFC_KVARG_DATAPATH_EF10_SIMPLE "]"
48 #define SFC_KVARG_FW_VARIANT "fw_variant"
50 #define SFC_KVARG_FW_VARIANT_DONT_CARE "dont-care"
51 #define SFC_KVARG_FW_VARIANT_FULL_FEATURED "full-feature"
52 #define SFC_KVARG_FW_VARIANT_LOW_LATENCY "ultra-low-latency"
53 #define SFC_KVARG_FW_VARIANT_PACKED_STREAM "capture-packed-stream"
54 #define SFC_KVARG_VALUES_FW_VARIANT \
55 "[" SFC_KVARG_FW_VARIANT_DONT_CARE "|" \
56 SFC_KVARG_FW_VARIANT_FULL_FEATURED "|" \
57 SFC_KVARG_FW_VARIANT_LOW_LATENCY "|" \
58 SFC_KVARG_FW_VARIANT_PACKED_STREAM "]"
62 int sfc_kvargs_parse(struct sfc_adapter *sa);
63 void sfc_kvargs_cleanup(struct sfc_adapter *sa);
65 int sfc_kvargs_process(struct sfc_adapter *sa, const char *key_match,
66 arg_handler_t handler, void *opaque_arg);
68 int sfc_kvarg_bool_handler(const char *key, const char *value_str,
70 int sfc_kvarg_long_handler(const char *key, const char *value_str,
72 int sfc_kvarg_string_handler(const char *key, const char *value_str,
79 #endif /* _SFC_KVARGS_H */