ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #3
Subsystems (3)
cover ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #3
This patch adds support for the Intel(R) 82598 based PCI Express 10GbE adapters.
Please find the full driver as a patch to latest linus-2.6 tree here:
git-pull git://lost.foo-projects.org/~aveerani/git/linux-2.6 ixgbe
Changes from the last submission...
1. Non-NAPI support is removed.
2. Ethtool support for wol indication and nway_reset ops.
3. Buf fix for issue - interface down/up after changing MAC address loses connectivity.
4. Some general cleanups.
thanks,
Ayyappan
PATCH 1/1 ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
This patch supports NAPI mode (only), MSIX, packet split in Rx side, checksum and TCP segmentation offloads etc..
---
Documentation/networking/ixgbe.txt | 188 ++ drivers/net/ixgbe/Makefile | 36 drivers/net/ixgbe/ixgbe.h | 211 +++ drivers/net/ixgbe/ixgbe_82598.c | 605 ++++++++ drivers/net/ixgbe/ixgbe_api.c | 637 ++++++++ drivers/net/ixgbe/ixgbe_api.h | 89 + drivers/net/ixgbe/ixgbe_common.c | 1726 ++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_common.h | 73 + drivers/net/ixgbe/ixgbe_ethtool.c | 895 +++++++++++ drivers/net/ixgbe/ixgbe_main.c | 2807 ++++++++++++++++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_osdep.h | 69 + drivers/net/ixgbe/ixgbe_param.c | 564 +++++++ drivers/net/ixgbe/ixgbe_phy.c | 583 +++++++ drivers/net/ixgbe/ixgbe_phy.h | 64 + drivers/net/ixgbe/ixgbe_type.h | 1390 ++++++++++++++++++ 15 files changed, 9937 insertions(+), 0 deletions(-)
Documentation/networking/ixgbe.txt new file +188 -0
@@ -0,0 +1,188 @@ +Linux* Base Driver for the 10 Gigabit Family of Adapters +================================================================ + +July 09, 2007 + + +Contents +======== + +- In This Release +- Identifying Your Adapter +- Command Line Parameters +- Support + +In This Release +=============== + +This file describes the Linux* Base Driver for the 10 Gigabit PCI Express +Family of Adapters. This driver supports the 2.6.x kernel. This driver +includes support for Itanium(R)2-based systems. + +The following features are now available in supported kernels: + - Native VLANs + - Channel Bonding (teaming) + - SNMP + +Channel Bonding documentation can be found in the Linux kernel source: +/Documentation/networking/bonding.txt + +Instructions on updating ethtool can be found in the section "Additional +Configurations" later in this document. + + +Identifying Your Adapter +======================== + +The following Intel network adapters are compatible with the drivers in this +release: + +Controller Adapter Name Physical Layer +---------- ------------ -------------- +82598 Intel(R) 10GbE-LR/LRM/SR + Server Adapters 10G Base -SR (850 nm optical fiber) + 10G Base -LRM (850 nm optical fiber) + 10G Base -LR (1310 nm optical fiber) + +For more information on how to identify your adapter, go to the Adapter & +Driver ID Guide at: + + http://support.intel.com/support/network/sb/CS-012904.htm + +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: + + http://downloadfinder.intel.com/scripts-df/support_intel.asp + +Command Line Parameters +======================= + +If the driver is built as a module, the following optional parameters are +used by entering them on the command line with the modprobe command using +this syntax: + + modprobe ixgbe [<option>=<VAL1>,<VAL2>,...] + +For example, with two PRO/10GbE PCI Express adapters, entering: + + modprobe ixgbe TxDescriptors=80,128 + +loads the ixgbe driver with 80 TX resources for the first adapter and 128 TX +resources for the second adapter. + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + + +RxQueues +-------- +Valid Range: 1, 2, 4, 8 +Default Value: 8 + Number of RX queues. + + +RxFCHighThresh +-------------- +Valid Range: 1,536 - 262,136 (0x600 - 0x3FFF8, 8 byte granularity) +Default Value: 196,608 (0x30000) + Receive Flow control high threshold (when we send a pause frame) + + +RxFCLowThresh +------------- +Valid Range: 64 - 262,136 (0x40 - 0x3FFF8, 8 byte granularity) + * must be less than high threshold by at least 8 bytes +Default Value: 163,840 (0x28000) +Receive Flow control low threshold (when we send a resume frame) + + +RxBufferMode +------------ +Valid Range: 0-2 +Default Value: 2 +0 = Driver will use single buffer for Rx packets. +1 = Driver will use packet split mode for Rx. Packet header will be +received in header buffer and payload will be received in data buffer. +2. = Optimal mode. Driver will use single buffer mode for non-Jumbo +configurations and packet split mode for Jumbo configurations. + + +InterruptType +------------- +Valid Range: 0-2 0 = Legacy Int, 1 = MSI and 2 = MSIX +Default Value: 2 + Interrupt type + + +FCReqTimeout +------------ +Valid Range: 1 - 65535 +Default Value: 65535 (0xffff) (will send an xon if we recover) + Flow control request timeout (how long to pause the link partner's tx) + + +InterruptThrottleRate +--------------------- +Valid Range: 100-100000 (0=off, 1=dynamic) +Default Value: + Interrupt Throttle Rate (interrupts/sec) + + +FlowControl +----------- +Valid Range: 0-3 +0 - No Flow Control +1 - Rx only, respond to PAUSE frames but do not generate them +2 - Tx only, generate PAUSE frames but ignore them on receive +3 - Full Flow Control Support +Default Value: 1 - Rx only + User Specified Flow Control Override + + +LLIPort +------- +Valid Range: 0 - 65535 +Default Value: 0 (disabled) + + LLI is configured with the LLIPort command-line parameter, which specifies + which TCP should general Low Latency Interrupts. + + For example, using LLIPort=80 would cause the board to generate an + immediate interrupt upon receipt of any packet sent to TCP port 80 on the + local machine. + + +LLIPush +------- +Valid Range: 0-1 +Default Value: 0 (disabled) + + LLIPush can be set to be enabled or disabled (default). It is most + effective in an environment with many small transactions. + NOTE: Enabling LLIPush may allow a denial of service attack. + + +LLISize +------- +Valid Range: 0-1500 +Default Value: 0 (disabled) + + LLISize causes an immediate interrupt if the board receives a packet smaller + than the specified size. + + +Support +======= + +For general information, go to the Intel support website at: + + http://support.intel.com + +or the Intel Wired Networking project hosted by Sourceforge at: + + http://sourceforge.net/projects/e1000 + +If an issue is identified with the released source code on the supported +kernel with a supported adapter, email the specific information related +to the issue to [email protected]
drivers/net/ixgbe/Makefile new file +36 -0
@@ -0,0 +1,36 @@ +################################################################################ +# +# Intel PRO/10GbE PCI Express Linux driver +# Copyright(c) 1999 - 2007 Intel Corporation. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". +# +# Contact Information: +# Linux NICS <[email protected]> +# e1000-devel Mailing List <[email protected]> +# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 +# +################################################################################ + +# +# Makefile for the Intel(R) PRO/10GbE PCI Express ethernet driver +# + +obj-$(CONFIG_IXGBE) += ixgbe.o + +ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_api.o ixgbe_ethtool.o \ + ixgbe_param.o ixgbe_82598.o ixgbe_phy.o
drivers/net/ixgbe/ixgbe.h new file +211 -0
211 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_82598.c new file +605 -0
605 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_api.c new file +637 -0
637 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_api.h new file +89 -0
89 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_common.c new file +1726 -0
1,234 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_common.h new file +73 -0
73 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_ethtool.c new file +895 -0
895 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_main.c new file +2807 -0
2,807 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_osdep.h new file +69 -0
69 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_param.c new file +564 -0
564 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_phy.c new file +583 -0
583 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_phy.h new file +64 -0
64 lines not on this page · raw message
drivers/net/ixgbe/ixgbe_type.h new file +1390 -0
1,390 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [PATCH 1/1]ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
Quoted 33 lines
Documentation/networking/ixgbe.txt new file +31
-0+ +Command Line Parameters +======================= + +If the driver is built as a module, the following optional parameters are +used by entering them on the command line with the modprobe command using +this syntax: + + modprobe ixgbe [<option>=<VAL1>,<VAL2>,...] + +For example, with two PRO/10GbE PCI Express adapters, entering: + + modprobe ixgbe TxDescriptors=80,128 + +loads the ixgbe driver with 80 TX resources for the first adapter and 128 TX +resources for the second adapter. + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + + +RxQueues +-------- +Valid Range: 1, 2, 4, 8 +Default Value: 8 + Number of RX queues. + + +RxFCHighThresh +-------------- +Valid Range: 1,536 - 262,136 (0x600 - 0x3FFF8, 8 byte granularity)
Documentation/networking/ixgbe.txt line 97
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +10
-0+Default Value: 196,608 (0x30000) + Receive Flow control high threshold (when we send a pause frame) + + +RxFCLowThresh +------------- +Valid Range: 64 - 262,136 (0x40 - 0x3FFF8, 8 byte granularity) + * must be less than high threshold by at least 8 bytes +Default Value: 163,840 (0x28000) +Receive Flow control low threshold (when we send a resume frame)
Does this really need to be tunable?
Quoted 9 lines
Documentation/networking/ixgbe.txt new file +8
-0+ + +RxBufferMode +------------ +Valid Range: 0-2 +Default Value: 2 +0 = Driver will use single buffer for Rx packets. +1 = Driver will use packet split mode for Rx. Packet header will be
Documentation/networking/ixgbe.txt line 115
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +10
-0+received in header buffer and payload will be received in data buffer. +2. = Optimal mode. Driver will use single buffer mode for non-Jumbo +configurations and packet split mode for Jumbo configurations. + + +InterruptType +------------- +Valid Range: 0-2 0 = Legacy Int, 1 = MSI and 2 = MSIX +Default Value: 2 + Interrupt type
Bogus, just do it.
Documentation/networking/ixgbe.txt line 123
Quoted 9 lines
Documentation/networking/ixgbe.txt new file +8
-0+ + +FCReqTimeout +------------ +Valid Range: 1 - 65535 +Default Value: 65535 (0xffff) (will send an xon if we recover) + Flow control request timeout (how long to pause the link partner's tx) +
Extend ethtool?
Documentation/networking/ixgbe.txt line 129
Quoted 7 lines
Documentation/networking/ixgbe.txt new file +6
-0+ +InterruptThrottleRate +--------------------- +Valid Range: 100-100000 (0=off, 1=dynamic) +Default Value: + Interrupt Throttle Rate (interrupts/sec)
Use ethtool for this
Documentation/networking/ixgbe.txt line 141
Quoted 13 lines
Documentation/networking/ixgbe.txt new file +12
-0+ + +FlowControl +----------- +Valid Range: 0-3 +0 - No Flow Control +1 - Rx only, respond to PAUSE frames but do not generate them +2 - Tx only, generate PAUSE frames but ignore them on receive +3 - Full Flow Control Support +Default Value: 1 - Rx only + User Specified Flow Control Override +
Use ethtool, no module parameter please
Quoted 4 lines
Documentation/networking/ixgbe.txt new file +3
-0+ +LLIPort +-------
Documentation/networking/ixgbe.txt line 154
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +10
-0+Valid Range: 0 - 65535 +Default Value: 0 (disabled) + + LLI is configured with the LLIPort command-line parameter, which specifies + which TCP should general Low Latency Interrupts. + + For example, using LLIPort=80 would cause the board to generate an + immediate interrupt upon receipt of any packet sent to TCP port 80 on the + local machine. +
This seems like a bogus feature, it is very protocol specific, and won't work with encapsulation, and probably not IPV6.
Documentation/networking/ixgbe.txt line 163
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +9
-0+ +LLIPush +------- +Valid Range: 0-1 +Default Value: 0 (disabled) + + LLIPush can be set to be enabled or disabled (default). It is most + effective in an environment with many small transactions. + NOTE: Enabling LLIPush may allow a denial of service attack.
Extend ethtool instead?
Documentation/networking/ixgbe.txt line 172
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +9
-0+ + +LLISize +------- +Valid Range: 0-1500 +Default Value: 0 (disabled) + + LLISize causes an immediate interrupt if the board receives a packet smaller + than the specified size.
Another odd hardware feature. Just because hardware supports it, you don't have to have driver support.
Quoted 7 lines
Documentation/networking/ixgbe.txt new file +6
-0+ + +Support +======= + +For general information, go to the Intel support website at:
Documentation/networking/ixgbe.txt line 188
Quoted 10 lines
Documentation/networking/ixgbe.txt new file +10
-0+ + http://support.intel.com + +or the Intel Wired Networking project hosted by Sourceforge at: + + http://sourceforge.net/projects/e1000 + +If an issue is identified with the released source code on the supported +kernel with a supported adapter, email the specific information related +to the issue to [email protected]
Using module parameter for per device settings is bad idea. Please extend existing interfaces like ethtool, etc rather than committing to a bad inflexible API.
Re: [PATCH 1/1]ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
Quoted 3 lines · Stephen Hemminger
Using module parameter for per device settings is bad idea. Please extend existing interfaces like ethtool, etc rather than committing to a bad inflexible API.
I agreed with Stephen's comments here.
In general, net driver policy is to use ethtool (per-interface granularity) rather than module options.
Jeff
RE: [PATCH 1/1]ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
Quoted 6 lines
-----Original Message-----
From: Jeff Garzik [mailto:[email protected]]Quoted 2 lines · Stephen Hemminger
Using module parameter for per device settings is bad idea. Please extend existing interfaces like ethtool, etc rather than
Quoted 9 lines
committing
Quoted 1 line
to a bad inflexible API.
I agreed with Stephen's comments here.
In general, net driver policy is to use ethtool (per-interface granularity) rather than module options.
Thanks Stephen and Jeff for the feedback. The flow control and InterruptThrottleRate parameters were carried over from e1000 and it was pointed out to me that some disros/customer's scripts used those parameters in the scripts. Ixgbe being a new driver, we can remove those.
Yes the LLI parameters can be removed.
Documentation/networking/ixgbe.txt line 84
Quoted 7 lines
Documentation/networking/ixgbe.txt new file +7
-0+RxQueues +-------- +Valid Range: 1, 2, 4, 8 +Default Value: 8 + Number of RX queues. + +
Ok. The present driver being NAPI only and supports one Rx queue only. So this parameter needs to be removed .
But, once we have DaveM/Stephen work of NAPI struct work is done, driver will support multiple Rx queues and with Multi Tx queue patch already in the kernel, driver will support multiple Tx queues also shortly.
So, with driver/device supporting multiple Tx and Rx queues, I think, it would be very useful to have ethtool interface to manage the number of Tx and Rx queues of the interface. Current ethtool interface supports managing the ring size so, we need similar interface for managing the number of Tx and Rx queues of the interface.
Ayyappan
Re: [PATCH 1/1]ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
Quoted 3 lines · Ayyappan
So, with driver/device supporting multiple Tx and Rx queues, I think, it would be very useful to have ethtool interface to manage the number of Tx and Rx queues of the interface.
Absolutely! ethtool patches welcome :)
git://git.kernel.org/pub/scm/network/ethtool/ethtool.git
Jeff
RE: [PATCH 1/1]ixgbe: Driver for Intel 82598 based 10GbE PCI Express family of adapters
Quoted 4 lines
-----Original Message-----
From: Jeff Garzik [mailto:[email protected]]Quoted 1 line · Ayyappan
So, with driver/device supporting multiple Tx and Rx queues, I think,
it
Quoted 1 line
Quoted 1 line
would be very useful to have ethtool interface to manage the number
of
Quoted 7 lines
Quoted 1 line
Tx and Rx queues of the interface.
Absolutely! ethtool patches welcome :)
git://git.kernel.org/pub/scm/network/ethtool/ethtool.git
We discussed this here today and we will try to come up with patches.
Also, FWIW, I will be offline for next 2 months, and someone (Auke ? :)) from our team will submit updated driver shortly..
Ayyappan