igc: Add multiple receive queues control supporting
Subsystems (2)
PATCH 1/1 igc: Add multiple receive queues control supporting
Enable the multi queues to receive.
Program the direction of packets to specified queuies according to the mode selected in the MRQC register.
Multiple receive queues defined by filters and RSS for 4 queues. Enable/disable RSS hashing and also to enable multiple receive queues. This patch will allow further ethtool support development.
--- drivers/net/ethernet/intel/igc/igc.h | 9 +++++ drivers/net/ethernet/intel/igc/igc_defines.h | 10 ++++++ drivers/net/ethernet/intel/igc/igc_main.c | 49 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_regs.h | 5 +++ 4 files changed, 73 insertions(+)
drivers/net/ethernet/intel/igc/igc.h +9 -0
@@ -29,6 +29,7 @@ unsigned int igc_get_max_rss_queues(struct igc_adapter *adapter);void igc_set_flag_queue_pairs (struct igc_adapter *adapter,const u32 max_rss_queues);int igc_reinit_queues (struct igc_adapter *adapter); +void igc_write_rss_indir_tbl (struct igc_adapter *adapter);bool igc_has_link (struct igc_adapter *adapter);void igc_reset (struct igc_adapter *adapter);int igc_set_spd_dplx (struct igc_adapter *adapter,u32 spd,u8 dplx);
@@ -51,6 +52,13 @@ extern char igc_driver_version[];#define IGC_FLAG_VLAN_PROMISC BIT(15)#define IGC_FLAG_RX_LEGACY BIT(16) +#define IGC_FLAG_RSS_FIELD_IPV4_UDP BIT(6) +#define IGC_FLAG_RSS_FIELD_IPV6_UDP BIT(7) + +#define IGC_MRQC_ENABLE_RSS_MQ 0x00000002 +#define IGC_MRQC_RSS_FIELD_IPV4_UDP 0x00400000 +#define IGC_MRQC_RSS_FIELD_IPV6_UDP 0x00800000 +#define IGC_START_ITR 648/* ~6000 ints/sec */ #define IGC_4K_ITR 980#define IGC_20K_ITR 196
@@ -359,6 +367,7 @@ struct igc_adapter {u32 *shadow_vfta;u32 rss_queues; +u32 rss_indir_tbl_init;/* lock for RX network flow classification filter */ spinlock_t nfc_lock;
drivers/net/ethernet/intel/igc/igc_defines.h +10 -0
@@ -310,6 +310,12 @@ IGC_RXDEXT_STATERR_CXE | \ IGC_RXDEXT_STATERR_RXE) +#define IGC_MRQC_RSS_FIELD_IPV4_TCP 0x00010000 +#define IGC_MRQC_RSS_FIELD_IPV4 0x00020000 +#define IGC_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000 +#define IGC_MRQC_RSS_FIELD_IPV6 0x00100000 +#define IGC_MRQC_RSS_FIELD_IPV6_TCP 0x00200000 +/* Header split receive */ #define IGC_RFCTL_IPV6_EX_DIS 0x00010000#define IGC_RFCTL_LEF 0x00040000
@@ -325,6 +331,10 @@#define I225_RXPBSIZE_DEFAULT 0x000000A2/* RXPBSIZE default */ #define I225_TXPBSIZE_DEFAULT 0x04000014/* TXPBSIZE default */ +/* Receive Checksum Control */ +#define IGC_RXCSUM_CRCOFL 0x00000800/* CRC32 offload enable */ +#define IGC_RXCSUM_PCSD 0x00002000/* packet checksum disabled */ +/* GPY211 - I225 defines */ #define GPY_MMD_MASK 0xFFFF0000#define GPY_MMD_SHIFT 16
drivers/net/ethernet/intel/igc/igc_main.c +49 -0
55 lines not on this page · raw message
drivers/net/ethernet/intel/igc/igc_regs.h +5 -0
@@ -80,8 +80,13 @@/* MSI-X Table Register Descriptions */ #define IGC_PBACL 0x05B68/* MSIx PBA Clear - R/W 1 to clear */ +/* RSS registers */ +#define IGC_MRQC 0x05818/* Multiple Receive Control - RW */ +/* Redirection Table - RW Array */ #define IGC_RETA (_i) (0x05C00 + ((_i) * 4)) +/* RSS Random Key - RW Array */ +#define IGC_RSSRK (_i) (0x05C80 + ((_i) * 4))/* Receive Register Descriptions */ #define IGC_RCTL 0x00100/* Rx Control - RW */
Signature · 1 line
2.11.0
Brown
PATCH 1/1 igc: Add multiple receive queues control supporting
Quoted 14 lines
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Sasha Neftin
Sent: Tuesday, February 5, 2019 11:49 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Add multiple receive queues control supportingEnable the multi queues to receive.
Program the direction of packets to specified queuies according to the mode selected in the MRQC register.
Multiple receive queues defined by filters and RSS for 4 queues. Enable/disable RSS hashing and also to enable multiple receive queues. This patch will allow further ethtool support development.
Quoted 9 lines
Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/igc/igc.h | 9 +++++ drivers/net/ethernet/intel/igc/igc_defines.h | 10 ++++++ drivers/net/ethernet/intel/igc/igc_main.c | 49 ++++++++++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_regs.h | 5 +++ 4 files changed, 73 insertions(+)