{
efx_mcdi_req_t req;
EFX_MCDI_DECLARE_BUF(payload,
- MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
+ MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EF10_EVQ_MAXNEVS)),
MC_CMD_INIT_EVQ_OUT_LEN);
efx_qword_t *dma_addr;
uint64_t addr;
{
efx_mcdi_req_t req;
EFX_MCDI_DECLARE_BUF(payload,
- MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
+ MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_EVQ_NBUFS(EF10_EVQ_MAXNEVS)),
MC_CMD_INIT_EVQ_V2_OUT_LEN);
boolean_t interrupting;
unsigned int evq_type;
efx_rc_t rc;
_NOTE(ARGUNUSED(id)) /* buftbl id managed by MC */
- EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MAXNEVS));
- EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MINNEVS));
+ EFSYS_ASSERT(ISP2(encp->enc_evq_max_nevs));
+ EFSYS_ASSERT(ISP2(encp->enc_evq_min_nevs));
if (!ISP2(ndescs) ||
- (ndescs < EFX_EVQ_MINNEVS) || (ndescs > EFX_EVQ_MAXNEVS)) {
+ (ndescs < encp->enc_evq_min_nevs) ||
+ (ndescs > encp->enc_evq_max_nevs)) {
rc = EINVAL;
goto fail1;
}
rptr = count & eep->ee_mask;
if (enp->en_nic_cfg.enc_bug35388_workaround) {
- EFX_STATIC_ASSERT(EFX_EVQ_MINNEVS >
+ EFX_STATIC_ASSERT(EF10_EVQ_MINNEVS >
(1 << ERF_DD_EVQ_IND_RPTR_WIDTH));
- EFX_STATIC_ASSERT(EFX_EVQ_MAXNEVS <
+ EFX_STATIC_ASSERT(EF10_EVQ_MAXNEVS <
(1 << 2 * ERF_DD_EVQ_IND_RPTR_WIDTH));
EFX_POPULATE_DWORD_2(dword,
extern "C" {
#endif
+#define EF10_EVQ_MAXNEVS 32768
+#define EF10_EVQ_MINNEVS 512
+
#define EF10_RXQ_MAXNDESCS 4096
#define EF10_RXQ_MINNDESCS 512
uint32_t enc_evq_limit;
uint32_t enc_txq_limit;
uint32_t enc_rxq_limit;
+ uint32_t enc_evq_max_nevs;
+ uint32_t enc_evq_min_nevs;
uint32_t enc_rxq_max_ndescs;
uint32_t enc_rxq_min_ndescs;
uint32_t enc_txq_max_ndescs;
efx_ev_fini(
__in efx_nic_t *enp);
+/*
+ * These symbols are deprecated and will be removed.
+ * Use the fields from efx_nic_cfg_t instead.
+ */
#define EFX_EVQ_MAXNEVS 32768
#define EFX_EVQ_MINNEVS 512
_NOTE(ARGUNUSED(esmp))
- EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MAXNEVS));
- EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MINNEVS));
+ EFSYS_ASSERT(ISP2(encp->enc_evq_max_nevs));
+ EFSYS_ASSERT(ISP2(encp->enc_evq_min_nevs));
if (!ISP2(ndescs) ||
- (ndescs < EFX_EVQ_MINNEVS) || (ndescs > EFX_EVQ_MAXNEVS)) {
+ (ndescs < encp->enc_evq_min_nevs) ||
+ (ndescs > encp->enc_evq_max_nevs)) {
rc = EINVAL;
goto fail1;
}
goto fail3;
}
#endif
- for (size = 0; (1 << size) <= (EFX_EVQ_MAXNEVS / EFX_EVQ_MINNEVS);
+ for (size = 0;
+ (1U << size) <= encp->enc_evq_max_nevs / encp->enc_evq_min_nevs;
size++)
- if ((1 << size) == (int)(ndescs / EFX_EVQ_MINNEVS))
+ if ((1U << size) == (uint32_t)ndescs / encp->enc_evq_min_nevs)
break;
if (id + (1 << size) >= encp->enc_buftbl_limit) {
rc = EINVAL;
encp->enc_rx_buf_align_start = 1;
encp->enc_rx_buf_align_end = 64; /* RX DMA end padding */
+ encp->enc_evq_max_nevs = EF10_EVQ_MAXNEVS;
+ encp->enc_evq_min_nevs = EF10_EVQ_MINNEVS;
+
encp->enc_rxq_max_ndescs = EF10_RXQ_MAXNDESCS;
encp->enc_rxq_min_ndescs = EF10_RXQ_MINNDESCS;
}
encp->enc_rx_buf_align_end = end_padding;
+ encp->enc_evq_max_nevs = EF10_EVQ_MAXNEVS;
+ encp->enc_evq_min_nevs = EF10_EVQ_MINNEVS;
+
encp->enc_rxq_max_ndescs = EF10_RXQ_MAXNDESCS;
encp->enc_rxq_min_ndescs = EF10_RXQ_MINNDESCS;
}
encp->enc_rx_buf_align_end = end_padding;
+ encp->enc_evq_max_nevs = EF10_EVQ_MAXNEVS;
+ encp->enc_evq_min_nevs = EF10_EVQ_MINNEVS;
+
encp->enc_rxq_max_ndescs = EF10_RXQ_MAXNDESCS;
encp->enc_rxq_min_ndescs = EF10_RXQ_MINNDESCS;
#endif
#define EFX_TXQ_DC_NDESCS(_dcsize) (8 << (_dcsize))
+#define SIENA_EVQ_MAXNEVS 32768
+#define SIENA_EVQ_MINNEVS 512
+
#define SIENA_TXQ_MAXNDESCS 4096
#define SIENA_TXQ_MINNDESCS 512
encp->enc_rxq_limit = MIN(EFX_RXQ_LIMIT_TARGET, nrxq);
encp->enc_txq_limit = MIN(EFX_TXQ_LIMIT_TARGET, ntxq);
+ encp->enc_evq_max_nevs = SIENA_EVQ_MAXNEVS;
+ encp->enc_evq_min_nevs = SIENA_EVQ_MINNEVS;
+
encp->enc_rxq_max_ndescs = EF10_RXQ_MAXNDESCS;
encp->enc_rxq_min_ndescs = EF10_RXQ_MINNDESCS;