+#if EFSYS_OPT_MAE
+ /*
+ * Check support for EF100 Match Action Engine (MAE).
+ * MAE hardware is present on Riverhead boards (from R2),
+ * and on Keystone, and requires support in firmware.
+ *
+ * MAE control operations require MAE control privilege,
+ * which is not available for VFs.
+ *
+ * Privileges can change dynamically at runtime: we assume
+ * MAE support requires the privilege is granted initially,
+ * and ignore later dynamic changes.
+ */
+ if (CAP_FLAGS3(req, MAE_SUPPORTED) &&
+ EFX_MCDI_HAVE_PRIVILEGE(encp->enc_privilege_mask, MAE))
+ encp->enc_mae_supported = B_TRUE;
+ else
+ encp->enc_mae_supported = B_FALSE;
+#else
+ encp->enc_mae_supported = B_FALSE;
+#endif /* EFSYS_OPT_MAE */
+