efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_mcdi_req_t req;
EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_CAPABILITIES_IN_LEN,
- MC_CMD_GET_CAPABILITIES_V5_OUT_LEN);
+ MC_CMD_GET_CAPABILITIES_V7_OUT_LEN);
efx_rc_t rc;
req.emr_cmd = MC_CMD_GET_CAPABILITIES;
req.emr_in_buf = payload;
req.emr_in_length = MC_CMD_GET_CAPABILITIES_IN_LEN;
req.emr_out_buf = payload;
- req.emr_out_length = MC_CMD_GET_CAPABILITIES_V5_OUT_LEN;
+ req.emr_out_length = MC_CMD_GET_CAPABILITIES_V7_OUT_LEN;
efx_mcdi_execute_quiet(enp, &req);
(MCDI_OUT_DWORD((_req), GET_CAPABILITIES_V2_OUT_FLAGS2) & \
(1u << (MC_CMD_GET_CAPABILITIES_V2_OUT_ ## _flag ## _LBN))))
+#define CAP_FLAGS3(_req, _flag) \
+ (((_req).emr_out_length_used >= MC_CMD_GET_CAPABILITIES_V7_OUT_LEN) && \
+ (MCDI_OUT_DWORD((_req), GET_CAPABILITIES_V7_OUT_FLAGS3) & \
+ (1u << (MC_CMD_GET_CAPABILITIES_V7_OUT_ ## _flag ## _LBN))))
+
/* Check if RXDP firmware inserts 14 byte prefix */
if (CAP_FLAGS1(req, RX_PREFIX_LEN_14))
encp->enc_rx_prefix_size = 14;
else
encp->enc_fw_assisted_tso_v2_encap_enabled = B_FALSE;
+ /* Check if TSOv3 is supported */
+ if (CAP_FLAGS2(req, TX_TSO_V3))
+ encp->enc_tso_v3_enabled = B_TRUE;
+ else
+ encp->enc_tso_v3_enabled = B_FALSE;
+
/* Check if the firmware has vadapter/vport/vswitch support */
if (CAP_FLAGS1(req, EVB))
encp->enc_datapath_cap_evb = B_TRUE;
else
encp->enc_rx_disable_scatter_supported = B_FALSE;
+ /* No limit on maximum number of Rx scatter elements per packet. */
+ encp->enc_rx_scatter_max = -1;
+
/* Check if the firmware supports packed stream mode */
if (CAP_FLAGS1(req, RX_PACKED_STREAM))
encp->enc_rx_packed_stream_supported = B_TRUE;
else
encp->enc_init_evq_v2_supported = B_FALSE;
+ /*
+ * Check if firmware supports extended width event queues, which have
+ * a different event descriptor layout.
+ */
+ if (CAP_FLAGS3(req, EXTENDED_WIDTH_EVQS_SUPPORTED))
+ encp->enc_init_evq_extended_width_supported = B_TRUE;
+ else
+ encp->enc_init_evq_extended_width_supported = B_FALSE;
+
/*
* Check if the NO_CONT_EV mode for RX events is supported.
*/
else
encp->enc_filter_action_mark_max = 0;
+#if EFSYS_OPT_MAE
+ /*
+ * Indicate support for MAE.
+ * MAE is supported by Riverhead boards starting with R2,
+ * and it is required that FW is built with MAE support, too.
+ */
+ if (CAP_FLAGS3(req, MAE_SUPPORTED))
+ encp->enc_mae_supported = B_TRUE;
+ else
+ encp->enc_mae_supported = B_FALSE;
+#else
+ encp->enc_mae_supported = B_FALSE;
+#endif /* EFSYS_OPT_MAE */
+
#undef CAP_FLAGS1
#undef CAP_FLAGS2
+#undef CAP_FLAGS3
return (0);
*/
encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
+ /* EF10 TSO engine demands that packet header be contiguous. */
+ encp->enc_tx_tso_max_header_ndescs = 1;
+
+ /* The overall TSO header length is not limited. */
+ encp->enc_tx_tso_max_header_length = UINT32_MAX;
+
+ /*
+ * There are no specific limitations on the number of
+ * TSO payload descriptors.
+ */
+ encp->enc_tx_tso_max_payload_ndescs = UINT32_MAX;
+
+ /* TSO superframe payload length is not limited. */
+ encp->enc_tx_tso_max_payload_length = UINT32_MAX;
+
+ /*
+ * Limitation on the maximum number of outgoing packets per
+ * TSO transaction described in SF-108452-SW.
+ */
+ encp->enc_tx_tso_max_nframes = 32767;
+
/*
* Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use
* MC_CMD_GET_RESOURCE_LIMITS here as that reports the available
return (rc);
}
-static __checkReturn efx_rc_t
+#endif /* EFX_OPTS_EF10() */
+
+#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10()
+
+ __checkReturn efx_rc_t
ef10_upstream_port_vadaptor_alloc(
__in efx_nic_t *enp)
{
return (rc);
}
+#endif /* EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() */
+
+#if EFX_OPTS_EF10()
+
__checkReturn efx_rc_t
ef10_nic_init(
__in efx_nic_t *enp)