+ SFC_MAE_STATUS_SUPPORTED,
+ SFC_MAE_STATUS_ADMIN,
+};
+
+/*
+ * Encap. header bounce buffer. It is used to store header data
+ * when parsing the header definition in the action VXLAN_ENCAP.
+ */
+struct sfc_mae_bounce_eh {
+ uint8_t *buf;
+ size_t buf_size;
+ size_t size;
+ efx_tunnel_protocol_t type;
+};
+
+/** Counter collection entry */
+struct sfc_mae_counter {
+ bool inuse;
+ uint32_t generation_count;
+ union sfc_pkts_bytes value;
+ union sfc_pkts_bytes reset;
+
+ uint64_t *ft_group_hit_counter;
+};
+
+struct sfc_mae_counters_xstats {
+ uint64_t not_inuse_update;
+ uint64_t realloc_update;
+};
+
+struct sfc_mae_counters {
+ /** An array of all MAE counters */
+ struct sfc_mae_counter *mae_counters;
+ /** Extra statistics for counters */
+ struct sfc_mae_counters_xstats xstats;
+ /** Count of all MAE counters */
+ unsigned int n_mae_counters;
+};
+
+struct sfc_mae_counter_registry {
+ /* Common counter information */
+ /** Counters collection */
+ struct sfc_mae_counters counters;
+
+ /* Information used by counter update service */
+ /** Callback to get packets from RxQ */
+ eth_rx_burst_t rx_pkt_burst;
+ /** Data for the callback to get packets */
+ struct sfc_dp_rxq *rx_dp;
+ /** Number of buffers pushed to the RxQ */
+ unsigned int pushed_n_buffers;
+ /** Are credits used by counter stream */
+ bool use_credits;
+
+ /* Information used by configuration routines */
+ /** Counter service core ID */
+ uint32_t service_core_id;
+ /** Counter service ID */
+ uint32_t service_id;
+};
+
+/**
+ * MAE rules used to capture traffic generated by VFs and direct it to
+ * representors (one for each VF).
+ */
+#define SFC_MAE_NB_REPR_RULES_MAX (64)
+
+/** Rules to forward traffic from PHY port to PF and from PF to PHY port */
+#define SFC_MAE_NB_SWITCHDEV_RULES (2)
+/** Maximum required internal MAE rules */
+#define SFC_MAE_NB_RULES_MAX (SFC_MAE_NB_SWITCHDEV_RULES + \
+ SFC_MAE_NB_REPR_RULES_MAX)
+
+struct sfc_mae_rule {
+ efx_mae_match_spec_t *spec;
+ efx_mae_actions_t *actions;
+ efx_mae_aset_id_t action_set;
+ efx_mae_rule_id_t rule_id;
+};
+
+struct sfc_mae_internal_rules {
+ /*
+ * Rules required to sustain switchdev mode or to provide
+ * port representor functionality.
+ */
+ struct sfc_mae_rule rules[SFC_MAE_NB_RULES_MAX];