summaryrefslogtreecommitdiff
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorIgor Romanov <igor.romanov@oktetlabs.ru>2019-02-07 16:29:21 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-02-08 11:35:41 +0100
commit217688651d7085c1f0465838e279d5142423bc3e (patch)
treeaa8dd1817d8f5038d8636314769e23b43effc9bd /drivers/net/sfc
parent5b5c345c1e6931005b1603eb6c0ebfa1c8af1730 (diff)
downloaddpdk-next-eventdev-217688651d7085c1f0465838e279d5142423bc3e.zip
dpdk-next-eventdev-217688651d7085c1f0465838e279d5142423bc3e.tar.gz
dpdk-next-eventdev-217688651d7085c1f0465838e279d5142423bc3e.tar.xz
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>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/base/ef10_impl.h3
-rw-r--r--drivers/net/sfc/base/ef10_tx.c5
-rw-r--r--drivers/net/sfc/base/efx.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
index 44f7f63..12747f4 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 5f3df42..aacf431 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 71500d6..d8914aa 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