summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/atheros/atl1c/atl1c.h
diff options
context:
space:
mode:
authorGatis Peisenieks <gatis@mikrotik.com>2021-05-27 17:44:23 +0300
committerJakub Kicinski <kuba@kernel.org>2021-05-28 02:06:46 +0300
commit057f4af2b1716f6d6cef285a1c9b7a9bb63d822b (patch)
tree6f80e840a62ac13297c67336a72fb05dec3f95dc /drivers/net/ethernet/atheros/atl1c/atl1c.h
parent8042824a3c0bcf7fc96c62b932b44b0b54714642 (diff)
downloadlinux-057f4af2b1716f6d6cef285a1c9b7a9bb63d822b.tar.xz
atl1c: add 4 RX/TX queue support for Mikrotik 10/25G NIC
More RX/TX queues on a network card help spread the CPU load among cores and achieve higher overall networking performance. The new Mikrotik 10/25G NIC supports 4 RX and 4 TX queues. TX queues are treated with equal priority. RX queue balancing is fixed based on L2/L3/L4 hash. This adds support for 4 RX/TX queues while maintaining backwards compatibility with older hardware. Simultaneous TX + RX performance on AMD Threadripper 3960X with Mikrotik 10/25G NIC improved from 1.6Mpps to 3.2Mpps per port. Backwards compatiblitiy was verified with AR8151 and AR8131 based NICs. Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/atheros/atl1c/atl1c.h')
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c.h b/drivers/net/ethernet/atheros/atl1c/atl1c.h
index 9edf90e1f028..43d821fe7a54 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c.h
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c.h
@@ -63,7 +63,7 @@
#define AT_MAX_RECEIVE_QUEUE 4
#define AT_DEF_RECEIVE_QUEUE 1
-#define AT_MAX_TRANSMIT_QUEUE 2
+#define AT_MAX_TRANSMIT_QUEUE 4
#define AT_DMA_HI_ADDR_MASK 0xffffffff00000000ULL
#define AT_DMA_LO_ADDR_MASK 0x00000000ffffffffULL
@@ -294,11 +294,6 @@ enum atl1c_nic_type {
athr_mt,
};
-enum atl1c_trans_queue {
- atl1c_trans_normal = 0,
- atl1c_trans_high = 1
-};
-
struct atl1c_hw_stats {
/* rx */
unsigned long rx_ok; /* The number of good packet received. */
@@ -522,6 +517,8 @@ struct atl1c_adapter {
struct atl1c_hw_stats hw_stats;
struct mii_if_info mii; /* MII interface info */
u16 rx_buffer_len;
+ unsigned int tx_queue_count;
+ unsigned int rx_queue_count;
unsigned long flags;
#define __AT_TESTING 0x0001