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 <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Igor Romanov 2019-02-07 16:29:21 +00:00 committed by Ferruh Yigit
parent 5b5c345c1e
commit 217688651d
3 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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))) {

View File

@ -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