common/sfc_efx: update copyright year
[dpdk.git] / drivers / common / sfc_efx / base / efx.h
index ed15e5e..2c82002 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- * Copyright(c) 2019-2020 Xilinx, Inc.
+ * Copyright(c) 2019-2021 Xilinx, Inc.
  * Copyright(c) 2006-2019 Solarflare Communications Inc.
  */
 
@@ -4068,6 +4068,8 @@ efx_mae_fini(
 
 typedef struct efx_mae_limits_s {
        uint32_t                        eml_max_n_action_prios;
+       uint32_t                        eml_max_n_outer_prios;
+       uint32_t                        eml_encap_types_supported;
 } efx_mae_limits_t;
 
 LIBEFX_API
@@ -4078,6 +4080,7 @@ efx_mae_get_limits(
 
 typedef enum efx_mae_rule_type_e {
        EFX_MAE_RULE_ACTION = 0,
+       EFX_MAE_RULE_OUTER,
 
        EFX_MAE_RULE_NTYPES
 } efx_mae_rule_type_t;
@@ -4112,6 +4115,29 @@ typedef enum efx_mae_field_id_e {
        EFX_MAE_FIELD_IP_PROTO,
        EFX_MAE_FIELD_IP_TOS,
        EFX_MAE_FIELD_IP_TTL,
+       EFX_MAE_FIELD_SRC_IP6_BE,
+       EFX_MAE_FIELD_DST_IP6_BE,
+       EFX_MAE_FIELD_L4_SPORT_BE,
+       EFX_MAE_FIELD_L4_DPORT_BE,
+       EFX_MAE_FIELD_TCP_FLAGS_BE,
+       EFX_MAE_FIELD_ENC_ETHER_TYPE_BE,
+       EFX_MAE_FIELD_ENC_ETH_SADDR_BE,
+       EFX_MAE_FIELD_ENC_ETH_DADDR_BE,
+       EFX_MAE_FIELD_ENC_VLAN0_TCI_BE,
+       EFX_MAE_FIELD_ENC_VLAN0_PROTO_BE,
+       EFX_MAE_FIELD_ENC_VLAN1_TCI_BE,
+       EFX_MAE_FIELD_ENC_VLAN1_PROTO_BE,
+       EFX_MAE_FIELD_ENC_SRC_IP4_BE,
+       EFX_MAE_FIELD_ENC_DST_IP4_BE,
+       EFX_MAE_FIELD_ENC_IP_PROTO,
+       EFX_MAE_FIELD_ENC_IP_TOS,
+       EFX_MAE_FIELD_ENC_IP_TTL,
+       EFX_MAE_FIELD_ENC_SRC_IP6_BE,
+       EFX_MAE_FIELD_ENC_DST_IP6_BE,
+       EFX_MAE_FIELD_ENC_L4_SPORT_BE,
+       EFX_MAE_FIELD_ENC_L4_DPORT_BE,
+       EFX_MAE_FIELD_ENC_VNET_ID_BE,
+       EFX_MAE_FIELD_OUTER_RULE_ID,
 
        EFX_MAE_FIELD_NIDS
 } efx_mae_field_id_t;
@@ -4179,6 +4205,12 @@ efx_mae_match_spec_mport_set(
        __in                            const efx_mport_sel_t *valuep,
        __in_opt                        const efx_mport_sel_t *maskp);
 
+LIBEFX_API
+extern __checkReturn                   boolean_t
+efx_mae_match_specs_equal(
+       __in                            const efx_mae_match_spec_t *left,
+       __in                            const efx_mae_match_spec_t *right);
+
 /*
  * Make sure that match fields known by EFX have proper masks set
  * in the match specification as per requirements of SF-122526-TC.
@@ -4251,6 +4283,11 @@ efx_mae_action_set_specs_equal(
  * Conduct a comparison to check whether two match specifications
  * of equal rule type (action / outer) and priority would map to
  * the very same rule class from the firmware's standpoint.
+ *
+ * For match specification fields that are not supported by firmware,
+ * the rule class only matches if the mask/value pairs for that field
+ * are equal. Clients should use efx_mae_match_spec_is_valid() before
+ * calling this API to detect usage of unsupported fields.
  */
 LIBEFX_API
 extern __checkReturn                   efx_rc_t
@@ -4267,6 +4304,26 @@ typedef struct efx_mae_rule_id_s {
        uint32_t id;
 } efx_mae_rule_id_t;
 
+LIBEFX_API
+extern __checkReturn           efx_rc_t
+efx_mae_outer_rule_insert(
+       __in                    efx_nic_t *enp,
+       __in                    const efx_mae_match_spec_t *spec,
+       __in                    efx_tunnel_protocol_t encap_type,
+       __out                   efx_mae_rule_id_t *or_idp);
+
+LIBEFX_API
+extern __checkReturn           efx_rc_t
+efx_mae_outer_rule_remove(
+       __in                    efx_nic_t *enp,
+       __in                    const efx_mae_rule_id_t *or_idp);
+
+LIBEFX_API
+extern __checkReturn                   efx_rc_t
+efx_mae_match_spec_outer_rule_id_set(
+       __in                            efx_mae_match_spec_t *spec,
+       __in                            const efx_mae_rule_id_t *or_idp);
+
 /* Action set ID */
 typedef struct efx_mae_aset_id_s {
        uint32_t id;