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"
36 #define SFC_KVARG_DATAPATH_EF10_ESSB "ef10_essb"
38 #define SFC_KVARG_RX_DATAPATH "rx_datapath"
39 #define SFC_KVARG_VALUES_RX_DATAPATH \
40 "[" SFC_KVARG_DATAPATH_EFX "|" \
41 SFC_KVARG_DATAPATH_EF10 "|" \
42 SFC_KVARG_DATAPATH_EF10_ESSB "]"
44 #define SFC_KVARG_TX_DATAPATH "tx_datapath"
45 #define SFC_KVARG_VALUES_TX_DATAPATH \
46 "[" SFC_KVARG_DATAPATH_EFX "|" \
47 SFC_KVARG_DATAPATH_EF10 "|" \
48 SFC_KVARG_DATAPATH_EF10_SIMPLE "]"
50 #define SFC_KVARG_FW_VARIANT "fw_variant"
52 #define SFC_KVARG_FW_VARIANT_DONT_CARE "dont-care"
53 #define SFC_KVARG_FW_VARIANT_FULL_FEATURED "full-feature"
54 #define SFC_KVARG_FW_VARIANT_LOW_LATENCY "ultra-low-latency"
55 #define SFC_KVARG_FW_VARIANT_PACKED_STREAM "capture-packed-stream"
56 #define SFC_KVARG_VALUES_FW_VARIANT \
57 "[" SFC_KVARG_FW_VARIANT_DONT_CARE "|" \
58 SFC_KVARG_FW_VARIANT_FULL_FEATURED "|" \
59 SFC_KVARG_FW_VARIANT_LOW_LATENCY "|" \
60 SFC_KVARG_FW_VARIANT_PACKED_STREAM "]"
64 int sfc_kvargs_parse(struct sfc_adapter *sa);
65 void sfc_kvargs_cleanup(struct sfc_adapter *sa);
67 int sfc_kvargs_process(struct sfc_adapter *sa, const char *key_match,
68 arg_handler_t handler, void *opaque_arg);
70 int sfc_kvarg_bool_handler(const char *key, const char *value_str,
72 int sfc_kvarg_long_handler(const char *key, const char *value_str,
74 int sfc_kvarg_string_handler(const char *key, const char *value_str,
81 #endif /* _SFC_KVARGS_H */