1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2019-2020 Xilinx, Inc.
4 * Copyright(c) 2019 Solarflare Communications Inc.
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
21 /** Action set registry entry */
22 struct sfc_mae_action_set {
23 TAILQ_ENTRY(sfc_mae_action_set) entries;
25 efx_mae_actions_t *spec;
28 TAILQ_HEAD(sfc_mae_action_sets, sfc_mae_action_set);
30 /** Options for MAE support status */
32 SFC_MAE_STATUS_UNKNOWN = 0,
33 SFC_MAE_STATUS_UNSUPPORTED,
34 SFC_MAE_STATUS_SUPPORTED
38 /** NIC support for MAE status */
39 enum sfc_mae_status status;
40 /** Priority level limit for MAE action rules */
41 unsigned int nb_action_rule_prios_max;
42 /** Action set registry */
43 struct sfc_mae_action_sets action_sets;
49 struct sfc_mae_parse_ctx {
50 efx_mae_match_spec_t *match_spec_action;
53 int sfc_mae_attach(struct sfc_adapter *sa);
54 void sfc_mae_detach(struct sfc_adapter *sa);
55 sfc_flow_cleanup_cb_t sfc_mae_flow_cleanup;
56 int sfc_mae_rule_parse_pattern(struct sfc_adapter *sa,
57 const struct rte_flow_item pattern[],
58 struct sfc_flow_spec_mae *spec,
59 struct rte_flow_error *error);
60 int sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
61 const struct rte_flow_action actions[],
62 struct sfc_mae_action_set **action_setp,
63 struct rte_flow_error *error);
64 sfc_flow_verify_cb_t sfc_mae_flow_verify;
69 #endif /* _SFC_MAE_H */