History log of /freebsd-current/sys/dev/ixl/ixl_txrx.c
Revision Date Author Comments
# 71625ec9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# f7926a6d 28-Dec-2021 Vincenzo Maffione <vmaffione@FreeBSD.org>

net: iflib: fix vlan processing in the drivers

The logic that sets iri_vtag and M_VLANTAG does not handle the
case where the 802.11q VLAN tag is 0. Fix this issue across
the iflib drivers. While there, also improve and align the
VLAN tag check extraction, by moving it outside the RX descriptor
loop, eliminating a local variable and additional checks.

PR: 260068
Reviewed by: kbowling, gallatin
Reported by: erj
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D33156


# 52f45d8a 28-Dec-2021 Vincenzo Maffione <vmaffione@FreeBSD.org>

net: iflib: let the drivers use isc_capenable

Since isc_capenable (private copy of ifp->if_capenable) is
now synchronized to if_capenable, use it in the drivers
when checking the IFCAP_* bits.
This results in better cache usage and avoids indirection
through the ifp pointer.

PR: 260068
Reviewed by: kbowling, gallatin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33156


# 9f99061e 02-Mar-2021 Krzysztof Galazka <krzysztof.galazka@intel.com>

ixl(4): Report RX errors as sum of all RX error counters

HW keeps track of RX errors using several counters, each for
specific type of errors. Report RX errors to OS as sum
of all those counters: CRC errors, illegal bytes, checksum,
length, undersize, fragment, oversize and jabber errors.

There is no HW counter for frames with invalid L3/L4 checksums
so add a SW one.

Also add a "rx_errors" sysctl with a copy of netstat IERRORS
counter value to make it easier accessible from scripts.

Reviewed By: erj
Tested By: gowtham.kumar.ks@intel.com
Sponsored By: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D27639


# b4a7ce06 09-Jun-2020 Eric Joyner <erj@FreeBSD.org>

ixl(4): Add FW recovery mode support and other things

Update the iflib version of ixl driver based on the OOT version ixl-1.11.29.

Major changes:

- Extract iflib specific functions from ixl_pf_main.c to ixl_pf_iflib.c
to simplify code sharing between legacy and iflib version of driver

- Add support for most recent FW API version (1.10), which extends FW
LLDP Agent control by user to X722 devices

- Improve handling of device global reset

- Add support for the FW recovery mode

- Use virtchnl function to validate virtual channel messages instead of
using separate checks

- Fix MAC/VLAN filters accounting

Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: erj@
Tested by: Jeffrey Pieper <jeffrey.e.pieper@intel.com>
MFC after: 1 week
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D24564


# 20b91f0a 24-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (15 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.


# 088a0b27 23-Jan-2019 Eric Joyner <erj@FreeBSD.org>

intel iflib drivers: correct initialization of tx_cidx_processed

From Jake:

In r341156 ("Fix first-packet completion", 2018-11-28) a hack to work
around a delta calculation determining how many descriptors were used
was added to ixl_isc_tx_credits_update_dwb.

The same fix was also applied to the em and igb drivers in r340310, and
to ix in r341156.

The hack checked the case where prev and cur were equal, and then added
one. This works, because by the time we do the delta check, we already
know there is at least one packet available, so the delta should be at
least one.

However, it's not a complete fix, and as indicated by the comment is
really a hack to work around the real bug.

The real problem is that the first time that we transmit a packet,
tx_cidx_processed will be set to point to the start of the ring.
Ultimately, the credits_update function expects it to point to the
*last* descriptor that was processed. Since we haven't yet processed any
descriptors, pointing it to 0 results in this incorrect calculation.

Fix the initialization code to have it point to the end of the ring
instead. One way to think about this, is that we are setting the value
to be one prior to the first available descriptor.

Doing so, corrects the delta calculation in all cases. The original fix
only works if the first packet has exactly one descriptor. Otherwise, we
will report 1 less than the correct value.

As part of this fix, also update the MPASS assertions to match the real
expectations. First, ensure that prev is not equal to cur, since this
should never happen. Second, remove the assertion about prev==0 || delta
!= 0. It looks like that originated from when the em driver was
converted to iflib. It seems like it was supposed to ensure that delta
was non-zero. However, because we originally returned 0 delta for the
first calculation, the "prev == 0" was tacked on.

Instead, replace this with a check that delta is greater than zero,
after the correction necessary when the ring pointers wrap around.

This new solution should fix the same bug as r341156 did, but in a more
robust way.

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: shurd@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D18545


# e8e0ecb9 28-Nov-2018 Stephen Hurd <shurd@FreeBSD.org>

Fix first-packet completion

The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.

This is the same fix as the r340310 for e1000

PR: 233607
Reported by: lev
Reviewed by: lev
MFC after: 3 days
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D18368


# 37761e2e 08-Nov-2018 Eric Joyner <erj@FreeBSD.org>

ixl/iavf(4): Fix TSO offloads when TXCSUM is disabled

From Jake:
The iflib stack does not disable TSO automatically when TXCSUM is
disabled, instead assuming that the driver will correctly handle TSOs
even when CSUM_IP is not set.

This results in iflib calling ixl_isc_txd_encap with packets which have
CSUM_IP_TSO, but do not have CSUM_IP or CSUM_IP_TCP set. Because of
this, ixl_tx_setup_offload will not setup the IPv4 checksum offloading.

This results in bad TSO packets being sent if a user disables TXCSUM
without disabling TSO.

Fix this by updating the ixl_tx_setup_offload function to check both
CSUM_IP and CSUM_IP_TSO when deciding whether to enable IPv4 checksums.

Once this is corrected, another issue for TSO packets is revealed. The
driver sets IFLIB_NEED_ZERO_CSUM in order to enable a work around that
causes the ip->sum field to be zero'd. This is necessary for ixl
hardware to correctly perform TSOs.

However, if TXCSUM is disabled, then the work around is not enabled, as
CSUM_IP will not be set when the iflib stack checks to see if it should
clear the sum field.

Fix this by adding IFLIB_TSO_INIT_IP to the iflib flags for the iavf and
ixl interface files.

It is uncertain if the hardware needs IFLIB_NEED_ZERO_CSUM for any other
case besides TSO, so leave that flag assigned. It may be worth
investigating to see if this work around flag could be disabled in
a future change.

Once both of these changes are made, the ixl driver should correctly
offload TSO packets when TSO4 offload is enabled, regardless of whether
TXCSUM is enabled or disabled.

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: erj@, shurd@
MFC after: 0 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D17900


# 77c1fcec 12-Oct-2018 Eric Joyner <erj@FreeBSD.org>

ixl/iavf(4): Change ixlv to iavf and update it to use iflib(9)

Finishes the conversion of the 40Gb Intel Ethernet drivers to iflib(9) for
FreeBSD 12.0, and fixes numerous bugs in both ixl(4) and iavf(4).

This commit also re-adds the VF driver to GENERIC since it now compiles and
functions.

The VF driver name was changed from ixlv(4) to iavf(4) because the VF driver is
now intended to be used with future products, not just with Fortville/Fort Park
VFs.

A man page update that documents these drivers is forthcoming in a separate
commit.

Reviewed by: sbruno@, kbowling@
Tested by: jeffrey.e.pieper@intel.com
Approved by: re (gjb@)
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D16429


# 52a05efa 15-Jul-2018 Marius Strobl <marius@FreeBSD.org>

As suggested by a comment in ixl_initialize_vsi(), use if_getcapenable(9)
instead of directly interrogating ifp->if_capenable.

Reviewed by: erj (ixl_initialize_vsi())
Differential Revision: https://reviews.freebsd.org/D15720 (part of)


# f4cc2d17 18-Jun-2018 Eric Joyner <erj@FreeBSD.org>

ixl(4): Update version number to 2.0.0-k

And update copyrights to current year.

MFC after: 1 month
Sponsored by: Intel Corporation


# 1031d839 18-Jun-2018 Eric Joyner <erj@FreeBSD.org>

ixl(4): Update to use iflib

Update the driver to use iflib in order to bring performance,
maintainability, and (hopefully) stability benefits to the driver.

The driver currently isn't completely ported; features that are missing:

- VF driver (ixlv)
- SR-IOV host support
- RDMA support

The plan is to have these re-added to the driver before the next FreeBSD release.

Reviewed by: gallatin@
Contributions by: gallatin@, mmacy@, krzysztof.galazka@intel.com
Tested by: jeffrey.e.pieper@intel.com
MFC after: 1 month
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D15577


# ceebc2f3 01-May-2018 Eric Joyner <erj@FreeBSD.org>

ixl(4): Update to 1.9.9-k

Refresh upstream driver before impending conversion to iflib.

Major changes:

- Support for descriptor writeback mode (required by ixlv(4) for AVF support)
- Ability to disable firmware LLDP agent by user (PR 221530)
- Fix for TX queue hang when using TSO (PR 221919)
- Separate descriptor ring sizes for TX and RX rings

PR: 221530, 221919
Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: #IntelNetworking
MFC after: 1 day
Relnotes: Yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D14985


# 2ff91c17 12-Apr-2018 Vincenzo Maffione <vmaffione@FreeBSD.org>

netmap: align codebase to the current upstream (commit id 3fb001303718146)

Changelist:
- Turn tx_rings and rx_rings arrays into arrays of pointers to kring
structs. This patch includes fixes for ixv, ixl, ix, re, cxgbe, iflib,
vtnet and ptnet drivers to cope with the change.
- Generalize the nm_config() callback to accept a struct containing many
parameters.
- Introduce NKR_FAKERING to support buffers sharing (used for netmap
pipes)
- Improved API for external VALE modules.
- Various bug fixes and improvements to the netmap memory allocator,
including support for externally (userspace) allocated memory.
- Refactoring of netmap pipes: now linked rings share the same netmap
buffers, with a separate set of kring pointers (rhead, rcur, rtail).
Buffer swapping does not need to happen anymore.
- Large refactoring of the control API towards an extensible solution;
the goal is to allow the addition of more commands and extension of
existing ones (with new options) without the need of hacks or the
risk of running out of configuration space.
A new NIOCCTRL ioctl has been added to handle all the requests of the
new control API, which cover all the functionalities so far supported.
The netmap API bumps from 11 to 12 with this patch. Full backward
compatibility is provided for the old control command (NIOCREGIF), by
means of a new netmap_legacy module. Many parts of the old netmap.h
header has now been moved to netmap_legacy.h (included by netmap.h).

Approved by: hrs (mentor)


# 03b04fd4 26-Sep-2017 Sepherosa Ziehau <sephe@FreeBSD.org>

ixl: Fix mbuf hash type settings.

IPV6_EXs in RSS never mean fragment. They mean:
"- Home address from the home address option in the IPv6 destination
options header. If the extension header is not present, use the
Source IPv6 Address.
- IPv6 address that is contained in the Routing-Header-Type-2 from
the associated extension header. If the extension header is not
present, use the Destination IPv6 Address."

UDP_IPV4_EX is an invalid RSS hash type, which will be removed.

Quoted from:
https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-hashing-types#ndishashipv6ex

Reviewed by: erj
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D12450


# b7e0bde0 27-Jul-2017 Sean Bruno <sbruno@FreeBSD.org>

Drop IXL RX lock during TCP_LRO, fixes LOR mahem while holding the RX
queue lock when the uppoer stack is called inside TCP_LRO

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Reviewed by: erj
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D11724


# 33c66d8a 13-Jul-2017 Ryan Libby <rlibby@FreeBSD.org>

ixl: gcc build errors

Fix minor -Werror issues when building with gcc from -Wredundant-decls,
-Wunused, -Wbool-operations. Also ensure the M_IXL malloc type is only
defined once.

Reviewed by: efj
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11414


# 38200071 13-Jul-2017 Eric Joyner <erj@FreeBSD.org>

ixl(4)/ixlv(4): Stop leaking every busdma entry in receive path

From Brett:

In short, busdma maps for received packets were not being unloaded in the
interrupt handler before the packets were passed up the network stack. The fix
was to add a busdma sync and unload for the two receive maps.

This bug is significant for certain busdma providers, for example IOMMUs,
where not unloading the maps means that 1) the IOMMU mappings that allow the
NIC to DMA the received packets into host memory stay open indefinitely,
potentially violating a desired security policy, and 2) resources such as
device address space addresses and host memory for bookkeeping are never freed.

Without an IOMMU or bounce buffering enabled for the ixl device, I don't think
adding these calls will have any significant performance impact. With the
IOMMU enabled, I have noticed a performance impact on the receive side, which
is expected.

Submitted by: Brett Gutstein <bgutstein@rice.edu>
Reviewed by: erj@
MFC after: 1 week


# 5b83a512 10-Jun-2017 Eric Joyner <erj@FreeBSD.org>

ixl(4)/ixlv(4): Fix some busdma tags and improper map NULL.

Description from Brett:

"The busdma tags used to create mappings for the tx and rx rings did not have
the device's tag as parents, meaning that they did not respect the device's
busdma properties. The other tags used in the driver had their parents set
appropriately.

Also, the dma maps for each buffer in ixl_txeof() were being NULLed after
being unloaded, which is an error because those maps are then reused without
being recreated (I believe this also leaked resources since the maps were not
destroyed). Simply removing the line that sets the maps to NULL gives the
desired behavior. There does not seem to be a similar problem with ixl_rxeof().
Functions to free the tx and rx rings also NULL out the dma maps for each
buffer, but this seems okay because the maps are destroyed and not reused in
this case.

With these fixes, my ixl card seems to be working with the IOMMU enabled."

Submitted by: Brett Gutstein <bgutstein@rice.edu>
Reviewed by: erj
Approved by: Alan Cox <alc@rice.edu>
MFC after: 1 week


# cb6b8299 09-Feb-2017 Eric Joyner <erj@FreeBSD.org>

ixl(4): Update to 1.7.12-k

Refresh upstream driver before impending conversion to iflib.

Major new features:

- Support for Fortville-based 25G adapters
- Support for I2C reads/writes

(To prevent getting or sending corrupt data, you should set
dev.ixl.0.debug.disable_fw_link_management=1 when using I2C
[this will disable link!], then set it to 0 when done. The driver implements
the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data,
but there are read_i2c and write_i2c sysctls under the .debug sysctl tree
[the latter being useful for upper page support in QSFP+]).

- Addition of an iWARP client interface (so the future iWARP driver for
X722 devices can communicate with the base driver).
- Compiling this option in is enabled by default, with "options IXL_IW" in
GENERIC.

Differential Revision: https://reviews.freebsd.org/D9227
Reviewed by: sbruno
MFC after: 2 weeks
Sponsored by: Intel Corporation


# ff9b61ca 31-Aug-2016 Eric Joyner <erj@FreeBSD.org>

Fix linker warnings (errors on gcc) that resulted from r304510.

The variables that are extern in the netmap header file should be
defined in ixl_txrx.c (the file that is included in both ixl(4)/ixlv(4),
not in the main driver source files.

Reported by: ed@, dim@, ngie@


# 4294f337 07-Aug-2016 Sean Bruno <sbruno@FreeBSD.org>

ixl(4): Update to ixl-1.6.6-k.

Submitted by: erj
Reviewed by: jeffrey.e.pieper@intel.com
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D7391


# 36ad8372 06-Jun-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties

Reviewed by: hps, erj, tuexen
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6688


# 6d011ad5 12-May-2016 Eric Joyner <erj@FreeBSD.org>

ixl: Update to 1.4.24-k.

Changes by author:

Eric Joyner ixl: Fix compile error when IXL_DEBUG is defined.
Eric Joyner ixl: Fix taskqueues created in init() not being freed in stop().
Eric Joyner ixl: Add additional debug sysctls, for Tx and Rx queue stats.
Eric Joyner ixl: Enable dynamic itr by default.
Eric Joyner ixl: Edit spacing, comments, function signatures (to conform to style(9)).
Eric Joyner ixl: Check for errors when tearing down msix interrupts.
Eric Joyner ixl: Remove unnecessary register reads/writes.
Eric Joyner ixl: Remove admin queue interrupt enable from general interrupt enable.
Eric Joyner ixl: Update switch config after teardown/reset flow in init().
Eric Joyner ixl: Add additional admin queue error code output to admin queue call errors.
Eric Joyner ixl: Don't destroy i40e spinlock if it's already uninitialized.
Shannon Nelson i40e-shared: clean event descriptor before use
Anjali Singhai Jain i40e-shared: When in promisc mode apply promisc mode to Tx Traffic as well
Kevin Scott i40e_shared: Increase timeout when checking GLGEN_RSTAT_DEVSTATE bit
Eric Joyner ixlv: Fix IXL_DEBUG compile issue.
Eric Joyner ixlv: Attempt to fix panic/other issues when rapidly unloading/loading driver.
Eric Joyner ixl/ixlv: Revert m_collapse() in ixl_xmit() to m_defrag().
Deepthi Kavalur i40e_shared: Trace logging HW capabilities
Eric Joyner ixlv: Correctly unlock/relock around init() call in vc_completion().
Eric Joyner ixl: Stop preventing changing flow control mode for CR4 media.
Eric Joyner ixl: Set IPv6 TCP offload flag when doing TSO.

Differential Revision: https://reviews.freebsd.org/D6211
Reviewed by: sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after: 2 weeks
Sponsored by: Intel Corporation


# ac83ea83 12-May-2016 Eric Joyner <erj@FreeBSD.org>

ixl: Update to 1.4.5-k.

This first update will revert some upstream changes; forthcoming updates will reinstate them.

Changes, by author:

Anjali Singhai Jain i40e-shared: Add WB_ON_ITR offload support
Shannon Nelson i40e-shared: fix phy_types bitmap type
Kevin Scott i40e-shared: Store off PHY capabilities
Shannon Nelson i40e-shared: fix byteswap of phy_type
Jingjing Wu i40e-shared: Fix compile issue related to const string
Greg Bowers i40e-shared: Add AQ defines for non-willing Apps (DCB)
Greg Bowers i40e-shared: Support for non-willing Apps (DCB)
Shannon Nelson i40e-shared: use upper-32 bit macro for address
Shannon Nelson i40e-shared: grab the AQ spinlocks before clearing registers
Eric Joyner ixl: Properly strip out X722_SUPPORT (temporarily).
Eric Joyner ixl: Allow Fort Pond devices to advertise 100M in set_advertise sysctl.

Differential Revision: https://reviews.freebsd.org/D6211
Reviewed by: sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after: 2 weeks
Sponsored by: Intel Corporation


# 6dd38b87 01-Apr-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication

And factor out tcp_lro_rx_done, which deduplicates the same logic with
netinet/tcp_lro.c

Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com>
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5725


# e4c893dd 23-Feb-2016 Eric Joyner <erj@FreeBSD.org>

ixl(4)/ixlv(4): Remove a couple unnecessary register writes/flushes.

The one in ixl_xmit() has brought up to us as being unnecessary at least a
couple times.

Differential Revision: https://reviews.freebsd.org/D5208
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation


# 2bc4747c 19-Feb-2016 Eric Joyner <erj@FreeBSD.org>

ixl(4)/ixlv(4): Revert m_collapse() in ixl_xmit() to m_defrag().

The m_collapse() call would fail when transmitting medium-sized packets
when the interface mtu was set to 9000, so revert back to m_defrag(),
which does not fail.

Differential Revision: https://reviews.freebsd.org/D5207
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation


# 4e8e1ebd 19-May-2015 John Baldwin <jhb@FreeBSD.org>

Remove executable property from several ixl(4) source files.

Differential Revision: https://reviews.freebsd.org/D2583
Reviewed by: erj


# 31830672 10-Mar-2015 Jack F Vogel <jfv@FreeBSD.org>

Replace the DEV_NETMAP code that accidentally got removed in the
last commit.

MFC after: 1 week


# 56c2c47b 10-Mar-2015 Jack F Vogel <jfv@FreeBSD.org>

This delta introduces SRIOV support, thanks to Ryan Stone of Sandvine for
adding this major feature to the driver. Secondly, this updates the base
driver with new 20G device support, and with the new firmware levels some
changes to link handling and initialization were required.

MFC after: 1 week


# bc8b78d3 23-Feb-2015 Luigi Rizzo <luigi@FreeBSD.org>

Add native netmap support to ixl.
Preliminary tests indicate 32 Mpps on tx, 24 Mpps on rx
with source and receiver on two different ports of the same 40G card.
Optimizations are likely possible.
The code follows closely the one for ixgbe so i do not
expect stability issues.

Hardware kindly supplied by Intel.

Reviewed by: Jack Vogel
MFC after: 1 week


# b6c8f260 19-Feb-2015 Jack F Vogel <jfv@FreeBSD.org>

Bring the XL710 drivers up to the SW3 release level.

MFC after: 1 week


# b2bdc62a 18-Jan-2015 Adrian Chadd <adrian@FreeBSD.org>

Refactor / restructure the RSS code into generic, IPv4 and IPv6 specific
bits.

The motivation here is to eventually teach netisr and potentially
other networking subsystems a bit more about how RSS work queues / buckets
are configured so things have a hope of auto-configuring in the future.

* net/rss_config.[ch] takes care of the generic bits for doing
configuration, hash function selection, etc;
* topelitz.[ch] is now in net/ rather than netinet/;
* (and would be in libkern if it didn't directly include RSS_KEYSIZE;
that's a later thing to fix up.)
* netinet/in_rss.[ch] now just contains the IPv4 specific methods;
* and netinet/in6_rss.[ch] now just contains the IPv6 specific methods.

This should have no functional impact on anyone currently using
the RSS support.

Differential Revision: D1383
Reviewed by: gnn, jfv (intel driver bits)


# dcd7b3b2 16-Jan-2015 Jack F Vogel <jfv@FreeBSD.org>

Some RSS issues discovered by Adrian, missing header, variable
names fat fingered, incorrect hash config setup. Thanks :)

MFC after: 1 week


# df1d7a71 13-Jan-2015 Jack F Vogel <jfv@FreeBSD.org>

Cleanup some bogus code in the RSS config, and add the include
for the rss option file. And bump the version.

MFC after: 1 week


# 6b30e6ae 13-Jan-2015 Jack F Vogel <jfv@FreeBSD.org>

Complete the RX side RSS code: parse the encoded portion of the RX
descriptor to determine the correct hash type.

MFC after:1 week


# a2cf30b9 13-Jan-2015 Bjoern A. Zeeb <bz@FreeBSD.org>

Move the vsi variable outside of the #ifdef block to unbreak NOIP kernels
after r277084.

MFC after: 6 days
X-MFC with: r277084


# 845a028f 12-Jan-2015 Jack F Vogel <jfv@FreeBSD.org>

Missing RSS support added, this fixes the build, but the code
in the RX side was complicated by recent changes and will need
some further tweaking.


# 393c4bb1 12-Jan-2015 Jack F Vogel <jfv@FreeBSD.org>

Intel I40E driver updates:
if_ixl to version 1.3.0, if_ixlv to version 1.2.0
- Major change in both drivers is to add RSS support
- In ixl fix some interface speed related issues, dual
speed was not changing correctly, KR/X media was not
displaying correctly (this has a workaround until a
more robust media handling is in place)
- Add a warning when using Dell NPAR and the speed is
less than 10G
- Wrap a queue hung message in IXL_DEBUG, as it is non-fatal,
and without tuning can display excessively

MFC after: 1 week


# c2529042 01-Dec-2014 Hans Petter Selasky <hselasky@FreeBSD.org>

Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

Additional notes:
- The SCTP code changes will be committed as a separate patch.
- Removal of the "M_FLOWID" flag will also be done separately.
- The FreeBSD version has been bumped.

MFC after: 1 month
Sponsored by: Mellanox Technologies


# 20dc9e17 07-Nov-2014 Bjoern A. Zeeb <bz@FreeBSD.org>

After r274205 unbreak NOIP kernels. vsi is now also used outside
address family specific blocks so move it out from under the condition.

MFC after: 6 days
X-MFC with: r274205


# e5100ee2 06-Nov-2014 Jack F Vogel <jfv@FreeBSD.org>

Update the Intel i40e drivers, ixl version 1.2.8, ixlv version 1.1.18
-Improved VF stability, thanks to changes from Ryan Stone,
and Juniper.
- RSS fixes in the ixlv driver
- link detection in the ixlv driver
- New sysctl's added in ixl and ixlv
- reset timeout increased for ixlv
- stability fixes in detach
- correct media reporting
- Coverity warnings fixed
- Many small bug fixes
- VF Makefile modified - nvm shared code needed
- remove unused sleep channels in ixlv_sc struct

Submitted by: Eric Joyner (committed by jfv)
MFC after: 1 week


# 4b443922 27-Sep-2014 Gleb Smirnoff <glebius@FreeBSD.org>

Convert driver to if_get_counter method.

Submitted by: rstone
Reviewed by: Eric Joyner <ricera10 gmail.com>


# b3f7259b 20-Sep-2014 Bjoern A. Zeeb <bz@FreeBSD.org>

Hide LRO code under #ifdef INET/INET6 to allow NOIP kernel to compile.

While the code comments indicate that LRO is currently only supported
for IPv4/TCP, we'll still compile it in for IPv6.

MFC after: 3 days


# b555c614 28-Aug-2014 Bjoern A. Zeeb <bz@FreeBSD.org>

Properly place #ifdef INET and #ifdef INET6 around variable declarations
and code to make the code compile.

Give the function seems to be slightly mixed with csum and tso,
make it non-fatal if we try to setup thing on a kernel without IP
support. In practise the printf on the console will probably still
make your machine unhappy.

MFC after: 3 days
X-MFC with: r270755


# 2f4959ab 28-Aug-2014 Jack F Vogel <jfv@FreeBSD.org>

Fix the NOINET and NOINET6 builds.

MFC after:3 days


# 1f873f18 28-Aug-2014 Jack F Vogel <jfv@FreeBSD.org>

Remove the DEV_NETMAP code from the ixl drivers, it was a placeholder
and not yet ready to be defined, and its causing build errors.

MFC after: 3 days


# 61ae650d 22-Aug-2014 Jack F Vogel <jfv@FreeBSD.org>

Update to the Intel Base driver for the Intel XL710 Ethernet Controller Family
- It was decided to change the driver name to if_ixl for FreeBSD
- This release adds the VF Driver to the tree, it can be built into
the kernel or as the if_ixlv module
- The VF driver is independent for the first time, this will be
desireable when full SRIOV capability is added to the OS.
- Thanks to my new coworker Eric Joyner for his superb work in
both the core and vf driver code.

Enjoy everyone!

Submitted by: jack.vogel@intel.com and eric.joyner@intel.com
MFC after: 3 days (hoping to make 10.1)