1
0
Fork 0
Commit Graph

57 Commits (f44a75e27d5eb4b1788f59c2bc185baaaf732f75)

Author SHA1 Message Date
Anjali Singhai Jain 60ccd45cba i40e/i40evf: Add stats to count Tunnel ATR hits
Add a 3rd dynamic filter counter to track Tunneled ATR hits separately.
Ethtool port stat "fdir_atr_tunnel_match"

Change-ID: Idd978b6db2a462b5722397cd2ffd04ef055f8655
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-28 03:38:00 -07:00
Kevin Scott 73b23402bb i40e/i40evf: Save WR_CSR_PROT field from DEV/FUNC capabilities
Store the 8 bytes of the WR_CSR_PROT field returned as part of the get
device/function capabilities AQ command.

Change-ID: Ifcaeea2ff29885fa769e4f384c7db88a25e8afd0
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-04-14 20:25:45 -07:00
Jesse Brandeburg ae24b4095c i40e/i40evf: implement KR2 support
The new devices need a new device ID some other defines to
handle the new 20G speed for KR2.

Change-ID: I03f717e364afe59657e8c9ce5ffaad856b4b21df
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-27 00:12:09 -07:00
Shannon Nelson 4f651a5b0a i40e/i40evf: grab NVM devstarter version not image version
0x2A is the NVM version so it has useful data but it is per image
version every image can have a different one. 0x18 is the dev starter
version which all the images for release will have the same version.
Of the two 0x18 is more useful and is what should be displayed.

Change-ID: Idf493da13a42ab211e2de0bef287f5de51033cca
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05 03:04:33 -08:00
Greg Rose f4492db16d i40e: Add NPAR BW get and set functions
We need to be able to get, set and commit permanently the NPAR
partition BW configuration through configfs.  These are necessary
precursor functions for that feature.

Also update the copyright year.

Change-ID: I9d5ca160a9288145f1dd2042994028679fff55f3
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 21:28:11 -08:00
Catherine Sullivan e827845c7d i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settings
Add a requested speed variable to the link_status struct to store the
last speeds we requested from the firmware (the speeds the FW will be
advertising with if autoneg is enabled).

Use the advertised speed settings in get_settings in ethtool now that
we have it.  Also set the requested speed settings in set_settings in
ethtool as they are requested and initialize them in probe based on what
the firmware remembers as the last requested speeds.

To accommodate some longer lines in this new code, and improve
readability I have added two functions i40e_get_settings_link_up
and i40e_get_settings_link_down which get_settings now calls first.
It then does all of the settings that happen regardless of link
state. Some PHY types that supported the same settings were also combined.

Also update the copyright year.

Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 20:29:54 -08:00
Catherine Sullivan 21af70fbfe i40e/i40evf: Remove unused variable an_enable and function update_link_info
An_enable was never used only set so lets remove it. The function
update_link_info only did two things, call get_link_info and set
an_enabled. Therefore we should also remove update_link_info and
change all references to it to get_link_info.

Change-ID: Ie3022680fa7a94bfd495a4f5fc76a73701d85569
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-23 17:13:18 -08:00
Neerav Parikh 63d7e5a413 i40e: Support for NPAR iSCSI partition with DCB
Add parsing and reporting of iSCSI capability for a given device or
function.

Also add support for iSCSI partition type with DCB in NPAR mode.
In this mode it is expected that software would configure both the LAN
and iSCSI traffic classes for the iSCSI partition; whereas all the NIC
type partitions will use LAN TC (TC0) only.
Hence, the patch enables querying of DCB configuration in MFP mode and
configures TCs for iSCSI partition type.

Though NIC type partitions may not have more than 1 TC enabled for them
the port may have multiple TCs enabled and hence I40E_FLAG_DCB_ENABLED
will be set/reset on all the partitions based on number of TCs on the
port. This is required as in DCB environment it is expected that all
traffic will be priority tagged.

Change-ID: I8c6e1cfd46c46d8a39c57d9020d9ff8d42ed8a7d
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-01-16 05:21:04 -08:00
Kamil Krawczyk 18f680c696 i40e: Adding function for reading PBA String
Function will read PBA Block from Shadow RAM and return it in a string format.

Change-ID: I4ee7059f6e21bd0eba38687da15e772e0b4ab36e
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-01-13 11:48:19 -08:00
Shannon Nelson 9fee9db5fb i40e/i40evf: find partition_id in npar mode
When in NPAR mode the driver instance might be controlling the base
partition or one of the other "fake" PFs.  There are some things that
can only be done by the base partition, aka partition_id 1.  This code
does a bit of work to find how many partitions are there per port and
what is the current partition_id.

Change-ID: Iba427f020a1983d02147d86f121b3627e20ee21d
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-01-13 11:48:18 -08:00
Jeff Kirsher 4bd145bed5 i40e/i40evf: Convert macro to static inline
Inline functions are preferred over macros when they can be used
interchangeably.

CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-09 12:57:05 -08:00
Shannon Nelson c509c1decb i40e: set max limit for access polling
Don't bother trying to set a smaller timeout on the polling,
just simplify the code and always use the max limit.  Also,
rename a variable for clarity and fix a comment.

Change-ID: I0300c3562ccc4fd5fa3088f8ae52db0c1eb33af5
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Michal Kosiarz <michal.kosiarz@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-09 12:57:03 -08:00
Shannon Nelson 2a6d8c2f01 i40e: remove unused nvm_semaphore_wait
The nvm_semaphore_wait field is set but never used, so let's
just get rid of it.

Change-ID: I2107bd29b69f99b1a61d7591d087429527c9d8fa
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Michal Kosiarz <michal.kosiarz@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-09 12:57:03 -08:00
Anjali Singhai Jain e7f2e4b94c i40e: Define and use i40e_is_vf macro
This patch is useful for future expansion when new VF MAC types get
added. It helps with cleaning up VF driver flow.

Change-ID: Ibe1eeb71262a3a40f24a1c5409436bdc3411da7f
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-12-06 04:00:24 -08:00
Neerav Parikh e1c4751ee2 i40e: Check for LLDP AdminStatus before querying DCBX
This patch adds a check whether LLDP Agent's default AdminStatus is
enabled or disabled on a given port. If it is disabled then it sets
the DCBX status to disabled as well; and would not query firmware for
any DCBX configuration data.

Change-ID: I73c0b9f0adbf4cae177d14914b20a48c9a8f50fd
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-By: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-18 01:09:06 -08:00
Neerav Parikh 9fa61dd215 i40e: Add support to firmware CEE DCBX mode
This patch allows i40e driver to query and use DCB configuration from
firmware when firmware DCBX agent is in CEE mode.

Change-ID: I30f92a67eb890f0f024f35339696e6e83d49a274
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-By: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-11-18 01:09:02 -08:00
Mitch Williams 5960d33f91 i40e: Add 10GBaseT support
Add driver support for 10GBaseT device.

Change-ID: I4be6ed847ac0bddd220b9878a95c523b32038174
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-10-23 20:38:04 -07:00
Vasu Dev 38e0043886 i40e: Adds FCoE related code to i40e core driver
Adds FCoE specific code to existing i40e core driver to:-

1. have separate FCoE VSI with additional FCoE queues pairs.
2. have FCoE related hash defines.
3. have additional FCoE related stats code.
4. export and then re-use existing functions required by FCoE build.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Jack Morgan<jack.morgan@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-02 19:41:13 -07:00
Shannon Nelson cd552cb49e i40e/i40evf: Add nvmupdate support
This implements a state machine intended to support the userland tool for
updating the device eeprom. The state machine implements one-shot reads,
writes, multi-step write sessions, and checksum requests. If we're in the middle
of a multi-step write session, no one should fire off other writes, however, one
shot reads are valid. The userland tool is expected to keep track of its session
status, arrange the placement and ordering of the writes, and deal with the
checksum requirement.

This patch also adds nvmupdate support to ethtool callbacks.
The get_eeprom() and set_eeprom() services in ethtool are used here to
facilitate the userland NVMUpdate tool.  The 'magic' value in the get and
set commands is used to pass additional control information for managing
the read and write steps.

The read operation works both as normally expected in the standard ethtool
method, as well as with the extra NVM controls.  The write operation
works only for the expanded NVM functions - the normal ethtool method is
not allowed because of the NVM semaphore management needed for multipart
writes, as well as the checksum requirement.

Change-ID: I1d84a170153a9f437906744e2e350fd68fe7563d
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-07-24 03:32:40 -07:00
Neerav Parikh 1f224ad2f7 i40e: Add ndo_get_phys_port_id() callback support
This patch adds a new API to get the port mac address from firmware.
It also adds support to the ndo_get_phys_port_id() callback to provide
port specific unique id to the netdev layer.
If the adapter has a valid per-port mac address then that
would be used for this purpose and is expected to be unique
on a per-port basis.

The information can be viewed by reading the phys_port_id
attribute in sysfs for each netdev or via IF netlink
interface.

Change-ID: I341fa6fff9c112f1f6d987189309e730e0b50e8b
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-07-16 11:57:22 -07:00
Catherine Sullivan c56999f948 i40e/i40evf: Add set_fc and init of FC settings
Add function set_fc to set the requested FC mode. This patch also
adds the init of FC setting to get_link_info and replaces the init
code to set FC off by default in main. Also adds i40e_set_phy_config
to support this.

Change-ID: I7b25bbaec81f15777137ab324a095f916e44351d
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-07-02 19:02:21 -07:00
Catherine Sullivan 8109e1232b i40e/i40evf: Add new HW link info variable an_enabled and function update_link_info
Add a new variable, hw.phy.link_info.an_enabled, to track whether autoneg is
enabled.  Also add a new function update_link_info that will update that
variable as well as calling get_link_info to update the rest of the link info.
Also add get_phy_capabilities to support this.

Change-ID: I5157ef03492b6dd8ec5e608ba0cf9b0db9c01710
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-07-02 19:02:21 -07:00
Jesse Brandeburg c571ea05a0 i40e/i40evf: remove reserved type
One of the PCTYPES that was moved to a reserved value
wasn't removed from the code.

Change-ID: I31fafe6d79c5f5128179979af5eaafa8c0cd62fe
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-24 18:19:02 -07:00
Carolyn Wyborny e157ea3060 i40e/i40evf: Update RSS configuration
This patch changes the RSS configuration to set table size
and write to hardware to confirm RSS table size being used.

Change-ID: I455a4c09c9dd479f5791ee1f09fdc83ff9908df5
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-20 00:46:19 -07:00
Anjali Singhai Jain 4c33f83a02 i40e/i40evf: i40e_register.h update
This updates the register file for new hardware.
The format of the file has changed requiring drivers to
declare I40E_MASK. I40E_MASK is to be used with 32 bit registers.

This patch also updates the drivers to accommodate the register changes.

Change-ID: If9bc8d736391024cbf99054efe50f9acc12ee4f1
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-19 20:22:02 -07:00
Anjali Singhai Jain 433c47de13 i40e/i40evf: Add Flow director stats to PF stats
Add members to stat struct to keep track of Flow director ATR and
SideBand filter packet matches.

Change-ID: Ibbb31a53c7adcc2bb96991dd80565442a2f2513c
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-11 08:48:33 -07:00
Jesse Brandeburg 2c50ef8047 i40e/i40evf: remove FTYPE
This change drops the FTYPE field from the Rx descriptor, to
match the hardware implementation.

Change-ID: I66d31d2b43861da45e8ace4fb03df033abe88bab
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-11 08:48:29 -07:00
Jesse Brandeburg 8a3c91cce3 i40e/i40evf: add PPRS bit to error bits and fix bug in Rx checksum
The driver was not marking packets with bad checksums
correctly, especially IPv6 packets with a bad checksum.
To do this correctly we need a define that may be set by
hardware in rare cases.

Change-ID: I1a997b72b491ded27a78ac3bce1197b2d2611130
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-09 00:39:58 -07:00
Jesse Brandeburg 704599ed0f i40e/i40evf: remove deprecated device IDs
Remove two device IDs 1582 and 1573, because they will not be shipped.

Change-ID: Ica2e550b5b21a69e3f353eba2fe5e1c532a548c4
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08 02:02:02 -07:00
Jesse Brandeburg c2451d7f55 i40e/i40evf: fix rx descriptor status
As reported by Eric Dumazet, the driver is not masking the right
bits in the receive descriptor before it starts checking them.

This patch extends the mask to allow for the right bits to be
checked, and fixes the issue permanently via a define.

CC: Eric Dumazet <eric.dumazet@gmail.com>
Change-ID: I3274f7619057a950f468143e6d7e11b129f54655
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-08 02:01:14 -07:00
Shannon Nelson 03da6f6a4f i40e/i40evf: remove rx_errors and rx_missed
The rx_errors (GLV_REPC) and rx_missed (GLV_RMPC) were removed
from the chip design.

Change-ID: Ifdeb69c90feac64ec95c36d3d32c75e3a06de3b7
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05 02:50:02 -07:00
Kamil Krawczyk 4f4e17bd12 i40e/i40evf: VEB structure added, GTIME macro update
Structure for VEB context added. Update macro for
transition from ms to GTIME (us) time units.

Change-ID: Ib3a19587b4cf355348655df8f60c6f37bb1497a3
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-06-05 02:27:39 -07:00
Greg Rose 10bc478a2a i40e/i40evf: Change type to u32 to avoid sparse error
tx_lpi_status and rx_lpi_status are declared as bool but then used in sizeof
operations in the CORE driver code.  Make them u32 to make sparse be quiet.

Change-ID: Iad6daeb1c7149e61ece242acd18c64b320c246a3
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 04:22:56 -07:00
Kevin Scott b2d36c03ef i40e/i40evf: Remove reserved PCTYPE defines
Patch to remove PCTYPE definitions which are now reserved.

Change-ID: I66c1c16a45a16f4894b2983101ab2a48ce03f1f4
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-05-29 03:12:42 -07:00
Neerav Parikh 6bb3f23c55 i40e/i40evf: Retrieve and store missing link config information
Some information returned via "Get Link Status" command was not
being cached in the struct i40e_link_status.
Add this so the driver can utilize this information as needed.

Change-ID: If084a0ae2a63b16b97572196b993742af2c67772
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-04-28 05:58:57 -07:00
Shannon Nelson d2466013bb i40e/i40evf: add driver version string to driver version command
The driver version string was added to this struct to be passed
down through the firmware to low-level NC-SI functions. We tell
the firmware about the length of the ASCII string not counting
any terminating null.

Change-ID: I09ac98ff9b869e8661c55fc6a5c98808fc280c91
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Anjali Singhai <anjali.singhai@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-04-28 04:21:49 -07:00
Anjali Singhai Jain c2e1b5966a i40e/i40evf: Add an FD message level
To use for Flow Director specific messages.

Change-ID: I69e39a410aa2661f8fd1ed6af0126fa4c335cb77
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-28 06:54:00 -07:00
Anjali Singhai Jain bee5af7e21 i40e/i40evf: Add EEE LPI stats
Add 4 new stats to keep track of EEE LPI (Low Power Idle) state.

Change-ID: Id6316619bb0559789770288b694a54d17f8fac5c
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-21 01:14:02 -07:00
Anjali Singhai Jain 77e29bc6fc i40e/i40evf: Some flow director HW definition fixes
1) Fix a name of the error bit to correctly indicate the error.
2) Added a fd_id field in the 32 byte desc at the place(qw0) where it gets
reported in the programming error desc WB. In a normal data desc
the fd_id field is reported in qw3.

Change-ID: Ide9a24bff7273da5889c36635d629bc3b5212010
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-03-14 16:29:15 -07:00
Shannon Nelson ab60085e2e i40e: Fix device ID define names to align to standard
Rework the device ID #defines to follow the _DEV_ID convention
already established in the other Intel drivers.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17 19:13:04 -08:00
Neerav Parikh afb3ff0da4 i40e: implement DCB support infastructure
Intel XL710 series of adapters support QoS as per the
IEEE 802.1 DCB (Data Center Bridging) standard.
This is supported in conjuction with:
- Enhanced Transmission Selection (ETS) - IEEE 802.1Qaz
- Priority Flow Control (PFC) - IEEE 802.1Qbb
- DCB eXchange Protocol (DCBX) - IEEE 802.1Qaz

On Intel XL710 adapters DCBX is performed by the adapter
firmware. The firmware runs DCBX in willing mode and configures
the port as per the DCB settings recommended by it's link
partner.

By default in absence of any DCBX; firmware would configure the
port with a single traffic class and all of the port bandwith
will be allocated to that traffic class.

This patch adds functions and calls to support querying and
configuring DCB using firmware APIs.

Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-By: Jack Morgan<jack.morgan@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-17 19:13:04 -08:00
Shannon Nelson 9d8bf54723 i40e: associate VMDq queue with VM type
Fix a bug where the queue was not associated with the right set-up
within the hardware.  The fix is to use the right QTX_CTL VSI type
when associating it to the VSI.

Change-ID: I65ef6c5a8205601c640a6593e4b7e78d6ba45545
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-14 18:56:00 -08:00
Shannon Nelson 8ee75a8ed0 i40e: check for possible incorrect ipv6 checksum
If the IPV6EXADD bit is set in the Rx descriptor status, there
was an optional extension header with an alternate IP address
detected.  The HW checksum offload doesn't handle the alternate
IP address correctly so likely comes up with the wrong answer.
Thus, if the bit is set we ignore the checksum offload value.

Change-ID: I70ff8d38cdcddccf44107691cae13d0c07c284c8
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-10 16:30:34 -08:00
Jesse Brandeburg c8e3c583ce i40e: drop unused macros
A previous commit removed any need for these macros, so remove
them too.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-10 16:30:31 -08:00
Greg Rose dc641b7319 i40e: Fix GPL header
The GPL header included in each file in the i40e driver doesn't
need to include the "this program" text since this driver
is already part of the larger kernel.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09 02:10:23 -08:00
Jesse Brandeburg c02e0fd393 i40e: use kernel specific defines
Replace uses of I40E_LENGTH_OF_ADDRESS with ETH_ALEN.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-09 01:17:24 -08:00
Shannon Nelson 922680b982 i40e: whitespace paren and comment tweaks
Addresses a few code format issues that have crept in over time.

Change-Id: I1a62cbd16b29a218a933b0f7176abe748f9615e8
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-07 21:50:04 -08:00
Shannon Nelson 981b754552 i40e: update firmware api to 1.1
The firmware's AdminQ interface has matured a little, so update the
code to use the new fields and values.

Change-Id: I8fcd7b443f268dcf9346bd6a9e940fe9c2958891
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-07 21:49:39 -08:00
Joseph Gasparakis 8144f0f7e9 i40e: Rx checksum offload for VXLAN
This implements receive offload for VXLAN for i40e.  The hardware
supports checksum offload/verification of the inner/outer header.

Change-Id: I450db300af6713f2044fef1191a0d1d294c13369
Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03 20:20:09 -08:00
Jeff Kirsher a1c9a9d998 i40e: Implementation of VXLAN ndo's
This adds the implementation for the VXLAN ndo's.  This allows the
hardware to do RX checksum offload for inner packets on the UDP ports
that VXLAN notifies us about.

Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-03 20:11:44 -08:00