From: Igor Romanov Date: Thu, 7 Feb 2019 16:29:21 +0000 (+0000) Subject: net/sfc/base: make max number of TxQ bufs EF10-specific X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=217688651d7085c1f0465838e279d5142423bc3e;p=dpdk.git net/sfc/base: make max number of TxQ bufs EF10-specific The define EFX_TXQ_MAX_BUFS is used only by EF10 family implementation. Since the macro is not used by any drivers, it does not require exposed libefx interface. Make the define EF10-specific. Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h index 44f7f635d5..12747f43ca 100644 --- a/drivers/net/sfc/base/ef10_impl.h +++ b/drivers/net/sfc/base/ef10_impl.h @@ -19,6 +19,9 @@ extern "C" { #define EF10_TXQ_MINNDESCS 512 +/* Maximum independent of EFX_BUG35388_WORKAROUND. */ +#define EF10_TXQ_MAXNBUFS 8 + /* Number of hardware PIO buffers (for compile-time resource dimensions) */ #define EF10_MAX_PIOBUF_NBUFS (16) diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c index 5f3df42b92..aacf4310ac 100644 --- a/drivers/net/sfc/base/ef10_tx.c +++ b/drivers/net/sfc/base/ef10_tx.c @@ -31,7 +31,8 @@ efx_mcdi_init_txq( __in efsys_mem_t *esmp) { efx_mcdi_req_t req; - EFX_MCDI_DECLARE_BUF(payload, MC_CMD_INIT_TXQ_IN_LEN(EFX_TXQ_MAX_BUFS), + EFX_MCDI_DECLARE_BUF(payload, + MC_CMD_INIT_TXQ_IN_LEN(EF10_TXQ_MAXNBUFS), MC_CMD_INIT_TXQ_OUT_LEN); efx_qword_t *dma_addr; uint64_t addr; @@ -39,7 +40,7 @@ efx_mcdi_init_txq( int i; efx_rc_t rc; - EFSYS_ASSERT(EFX_TXQ_MAX_BUFS >= + EFSYS_ASSERT(EF10_TXQ_MAXNBUFS >= EFX_TXQ_NBUFS(enp->en_nic_cfg.enc_txq_max_ndescs)); if ((esmp == NULL) || (EFSYS_MEM_SIZE(esmp) < EFX_TXQ_SIZE(ndescs))) { diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h index 71500d6b88..d8914aa7ca 100644 --- a/drivers/net/sfc/base/efx.h +++ b/drivers/net/sfc/base/efx.h @@ -2649,8 +2649,6 @@ efx_tx_fini( #define EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_SIZE) #define EFX_TXQ_LIMIT(_ndescs) ((_ndescs) - 16) -#define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */ - #define EFX_TXQ_CKSUM_IPV4 0x0001 #define EFX_TXQ_CKSUM_TCPUDP 0x0002 #define EFX_TXQ_FATSOV2 0x0004