summaryrefslogtreecommitdiff
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorIgor Romanov <igor.romanov@oktetlabs.ru>2019-02-07 16:29:11 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-02-08 11:35:41 +0100
commit61d820eba094e040f1e8021a025247a063670cc6 (patch)
tree7a484353741fef5d5621a4af5c5b54c32facf488 /drivers/net/sfc
parenta025fdd98c103e2628b9c528368ed36b524a7677 (diff)
downloaddpdk-next-eventdev-61d820eba094e040f1e8021a025247a063670cc6.zip
dpdk-next-eventdev-61d820eba094e040f1e8021a025247a063670cc6.tar.gz
dpdk-next-eventdev-61d820eba094e040f1e8021a025247a063670cc6.tar.xz
net/sfc/base: define max desc number for every EF10 NIC
For consistency with defines of min descriptor number, define max descriptor number for Huntington, Medford and Medford2. 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/hunt_impl.h3
-rw-r--r--drivers/net/sfc/base/hunt_nic.c4
-rw-r--r--drivers/net/sfc/base/medford2_impl.h2
-rw-r--r--drivers/net/sfc/base/medford2_nic.c2
-rw-r--r--drivers/net/sfc/base/medford_impl.h2
-rw-r--r--drivers/net/sfc/base/medford_nic.c2
6 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/sfc/base/hunt_impl.h b/drivers/net/sfc/base/hunt_impl.h
index d8dddce..0e9a1e2 100644
--- a/drivers/net/sfc/base/hunt_impl.h
+++ b/drivers/net/sfc/base/hunt_impl.h
@@ -16,6 +16,9 @@
extern "C" {
#endif
+#define HUNT_TXQ_MAXNDESCS 4096
+#define HUNT_TXQ_MAXNDESCS_BUG35388_WORKAROUND 2048
+
/* Missing register definitions */
#ifndef ER_DZ_TX_PIOBUF_OFST
#define ER_DZ_TX_PIOBUF_OFST 0x00001000
diff --git a/drivers/net/sfc/base/hunt_nic.c b/drivers/net/sfc/base/hunt_nic.c
index adb2b17..6605cfc 100644
--- a/drivers/net/sfc/base/hunt_nic.c
+++ b/drivers/net/sfc/base/hunt_nic.c
@@ -194,7 +194,9 @@ hunt_board_cfg(
* The workaround for bug35388 uses the top bit of transmit queue
* descriptor writes, preventing the use of 4096 descriptor TXQs.
*/
- encp->enc_txq_max_ndescs = encp->enc_bug35388_workaround ? 2048 : 4096;
+ encp->enc_txq_max_ndescs = encp->enc_bug35388_workaround ?
+ HUNT_TXQ_MAXNDESCS_BUG35388_WORKAROUND :
+ HUNT_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(HUNT_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);
diff --git a/drivers/net/sfc/base/medford2_impl.h b/drivers/net/sfc/base/medford2_impl.h
index 6259a70..87af5f6 100644
--- a/drivers/net/sfc/base/medford2_impl.h
+++ b/drivers/net/sfc/base/medford2_impl.h
@@ -12,6 +12,8 @@ extern "C" {
#endif
+#define MEDFORD2_TXQ_MAXNDESCS 2048
+
#ifndef ER_EZ_TX_PIOBUF_SIZE
#define ER_EZ_TX_PIOBUF_SIZE 4096
#endif
diff --git a/drivers/net/sfc/base/medford2_nic.c b/drivers/net/sfc/base/medford2_nic.c
index 2cc87e3..020c37f 100644
--- a/drivers/net/sfc/base/medford2_nic.c
+++ b/drivers/net/sfc/base/medford2_nic.c
@@ -119,7 +119,7 @@ medford2_board_cfg(
* descriptors are not supported as the top bit is used for vfifo
* stuffing.
*/
- encp->enc_txq_max_ndescs = 2048;
+ encp->enc_txq_max_ndescs = MEDFORD2_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(MEDFORD2_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);
diff --git a/drivers/net/sfc/base/medford_impl.h b/drivers/net/sfc/base/medford_impl.h
index d076afa..1afedc7 100644
--- a/drivers/net/sfc/base/medford_impl.h
+++ b/drivers/net/sfc/base/medford_impl.h
@@ -12,6 +12,8 @@ extern "C" {
#endif
+#define MEDFORD_TXQ_MAXNDESCS 2048
+
#ifndef ER_EZ_TX_PIOBUF_SIZE
#define ER_EZ_TX_PIOBUF_SIZE 4096
#endif
diff --git a/drivers/net/sfc/base/medford_nic.c b/drivers/net/sfc/base/medford_nic.c
index b728811..171e39b 100644
--- a/drivers/net/sfc/base/medford_nic.c
+++ b/drivers/net/sfc/base/medford_nic.c
@@ -117,7 +117,7 @@ medford_board_cfg(
* descriptors are not supported as the top bit is used for vfifo
* stuffing.
*/
- encp->enc_txq_max_ndescs = 2048;
+ encp->enc_txq_max_ndescs = MEDFORD_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(MEDFORD_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);