#if EFSYS_OPT_MAE
+typedef struct efx_mae_field_cap_s {
+ uint32_t emfc_support;
+ boolean_t emfc_mask_affects_class;
+ boolean_t emfc_match_affects_class;
+} efx_mae_field_cap_t;
+
typedef struct efx_mae_s {
+ uint32_t em_max_n_action_prios;
+ /*
+ * The number of MAE field IDs recognised by the FW implementation.
+ * Any field ID greater than or equal to this value is unsupported.
+ */
+ uint32_t em_max_nfields;
+ /** Action rule match field capabilities. */
+ efx_mae_field_cap_t *em_action_rule_field_caps;
+ size_t em_action_rule_field_caps_size;
+ uint32_t em_max_n_outer_prios;
+ uint32_t em_encap_types_supported;
} efx_mae_t;
#endif /* EFSYS_OPT_MAE */
#endif /* EFSYS_OPT_PCI */
+#if EFSYS_OPT_MAE
+
+struct efx_mae_match_spec_s {
+ efx_mae_rule_type_t emms_type;
+ uint32_t emms_prio;
+ union emms_mask_value_pairs {
+ uint8_t action[MAE_FIELD_MASK_VALUE_PAIRS_LEN];
+ } emms_mask_value_pairs;
+};
+
+typedef enum efx_mae_action_e {
+ /* These actions are strictly ordered. */
+ EFX_MAE_ACTION_VLAN_POP,
+ EFX_MAE_ACTION_VLAN_PUSH,
+
+ /*
+ * These actions are not strictly ordered and can
+ * be passed by a client in any order (before DELIVER).
+ * However, these enumerants must be kept compactly
+ * in the end of the enumeration (before DELIVER).
+ */
+ EFX_MAE_ACTION_FLAG,
+ EFX_MAE_ACTION_MARK,
+
+ /* DELIVER is always the last action. */
+ EFX_MAE_ACTION_DELIVER,
+
+ EFX_MAE_NACTIONS
+} efx_mae_action_t;
+
+/* MAE VLAN_POP action can handle 1 or 2 tags. */
+#define EFX_MAE_VLAN_POP_MAX_NTAGS (2)
+
+/* MAE VLAN_PUSH action can handle 1 or 2 tags. */
+#define EFX_MAE_VLAN_PUSH_MAX_NTAGS (2)
+
+typedef struct efx_mae_action_vlan_push_s {
+ uint16_t emavp_tpid_be;
+ uint16_t emavp_tci_be;
+} efx_mae_action_vlan_push_t;
+
+struct efx_mae_actions_s {
+ /* Bitmap of actions in spec, indexed by action type */
+ uint32_t ema_actions;
+
+ unsigned int ema_n_vlan_tags_to_pop;
+ unsigned int ema_n_vlan_tags_to_push;
+ efx_mae_action_vlan_push_t ema_vlan_push_descs[
+ EFX_MAE_VLAN_PUSH_MAX_NTAGS];
+ uint32_t ema_mark_value;
+ efx_mport_sel_t ema_deliver_mport;
+};
+
+#endif /* EFSYS_OPT_MAE */
+
#ifdef __cplusplus
}
#endif