+#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_V2_LEN];
+ uint8_t outer[MAE_ENC_FIELD_PAIRS_LEN];
+ } emms_mask_value_pairs;
+};
+
+typedef enum efx_mae_action_e {
+ /* These actions are strictly ordered. */
+ EFX_MAE_ACTION_DECAP,
+ EFX_MAE_ACTION_VLAN_POP,
+ EFX_MAE_ACTION_VLAN_PUSH,
+ EFX_MAE_ACTION_ENCAP,
+
+ /*
+ * 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;
+
+typedef struct efx_mae_actions_rsrc_s {
+ efx_mae_eh_id_t emar_eh_id;
+} efx_mae_actions_rsrc_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;
+
+ /*
+ * Always keep this at the end of the struct since
+ * efx_mae_action_set_specs_equal() relies on that
+ * to make sure that resource IDs are not compared.
+ */
+ efx_mae_actions_rsrc_t ema_rsrc;
+};
+
+#endif /* EFSYS_OPT_MAE */
+
+#if EFSYS_OPT_VIRTIO
+
+#define EFX_VQ_MAGIC 0x026011950
+
+typedef enum efx_virtio_vq_state_e {
+ EFX_VIRTIO_VQ_STATE_UNKNOWN = 0,
+ EFX_VIRTIO_VQ_STATE_INITIALIZED,
+ EFX_VIRTIO_VQ_STATE_STARTED,
+ EFX_VIRTIO_VQ_NSTATES
+} efx_virtio_vq_state_t;
+
+struct efx_virtio_vq_s {
+ uint32_t evv_magic;
+ efx_nic_t *evv_enp;
+ efx_virtio_vq_state_t evv_state;
+ uint32_t evv_vi_index;
+ efx_virtio_vq_type_t evv_type;
+ uint16_t evv_target_vf;
+};
+
+#endif /* EFSYS_OPT_VIRTIO */
+