__in efx_nic_t *enp,
__out efx_mae_limits_t *emlp);
+typedef enum efx_mae_rule_type_e {
+ EFX_MAE_RULE_ACTION = 0,
+
+ EFX_MAE_RULE_NTYPES
+} efx_mae_rule_type_t;
+
+typedef struct efx_mae_match_spec_s efx_mae_match_spec_t;
+
+LIBEFX_API
+extern __checkReturn efx_rc_t
+efx_mae_match_spec_init(
+ __in efx_nic_t *enp,
+ __in efx_mae_rule_type_t type,
+ __in uint32_t prio,
+ __out efx_mae_match_spec_t **specp);
+
+LIBEFX_API
+extern void
+efx_mae_match_spec_fini(
+ __in efx_nic_t *enp,
+ __in efx_mae_match_spec_t *spec);
+
#endif /* EFSYS_OPT_MAE */
#ifdef __cplusplus
#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;
+};
+
+#endif /* EFSYS_OPT_MAE */
+
#ifdef __cplusplus
}
#endif
return (rc);
}
+ __checkReturn efx_rc_t
+efx_mae_match_spec_init(
+ __in efx_nic_t *enp,
+ __in efx_mae_rule_type_t type,
+ __in uint32_t prio,
+ __out efx_mae_match_spec_t **specp)
+{
+ efx_mae_match_spec_t *spec;
+ efx_rc_t rc;
+
+ switch (type) {
+ case EFX_MAE_RULE_ACTION:
+ break;
+ default:
+ rc = ENOTSUP;
+ goto fail1;
+ }
+
+ EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), spec);
+ if (spec == NULL) {
+ rc = ENOMEM;
+ goto fail2;
+ }
+
+ spec->emms_type = type;
+ spec->emms_prio = prio;
+
+ *specp = spec;
+
+ return (0);
+
+fail2:
+ EFSYS_PROBE(fail2);
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ return (rc);
+}
+
+ void
+efx_mae_match_spec_fini(
+ __in efx_nic_t *enp,
+ __in efx_mae_match_spec_t *spec)
+{
+ EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
+}
+
#endif /* EFSYS_OPT_MAE */
efx_mae_fini;
efx_mae_get_limits;
efx_mae_init;
+ efx_mae_match_spec_fini;
+ efx_mae_match_spec_init;
efx_mcdi_fini;
efx_mcdi_get_proxy_handle;