From: Albert Date: Wed, 11 May 2016 18:27:55 +0000 (+0300) Subject: Update i40e-dkms kernel module to 1.5.18 version for Ubuntu X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=HEAD;p=packages%2Ftrusty%2Fi40e-dkms.git Update i40e-dkms kernel module to 1.5.18 version for Ubuntu Change-Id: Ib393e4a63426ed28cf26c0f394d2e079d9a1ebbf Closes-bug: #1581096 --- diff --git a/debian/changelog b/debian/changelog index 257663c..4fab518 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +i40e-dkms (1.5.18-1~u14.04+mos1) MOS 10.0; urgency=low + + * Update the driver i40e version up to 1.5.18 + * There are two changes in dkms.conf file: + * 1)the KSRC variable now is used for pointing to correst kernel path + * 2)make was taken in quotes ('') to suppress passing KERNELRELEASE + * variable by DKMS otherwise the building fails. + * Like: MAKE[0]="'make' -C src/ KSRC=/lib/modules/{kernelver}/build" + + -- Mirantis Openstack Linux Team Wed, 11 May 2016 21:35:42 +0200 + -- The sources were taken from http://sourceforge.net/projects/e1000/files/i40e%20stable/1.5.18/ + i40e-dkms (1.3.47-1~u14.04+mos2) MOS 9.0; urgency=low * Cleanup, removing unnecessary version from the i40e-dkms folder name diff --git a/debian/prerm b/debian/prerm index 7254308..d4b9bc1 100755 --- a/debian/prerm +++ b/debian/prerm @@ -1,7 +1,7 @@ #!/bin/sh NAME=i40e -VERSION=1.3.47 +VERSION=1.5.18 set -e diff --git a/debian/rules b/debian/rules index d2a9f0f..b054023 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ DEB_NAME=i40e NAME=i40e -VERSION=1.3.47 +VERSION=1.5.18 configure: configure-stamp configure-stamp: diff --git a/i40e-dkms/i40e-1.3.47/SUMS b/i40e-dkms/i40e-1.3.47/SUMS deleted file mode 100644 index 1b96aea..0000000 --- a/i40e-dkms/i40e-1.3.47/SUMS +++ /dev/null @@ -1,47 +0,0 @@ -46789 4 i40e-1.3.47/pci.updates -63894 4 i40e-1.3.47/src/i40e/i40e_helper.h -44588 1 i40e-1.3.47/src/i40e/Module.supported -13919 68 i40e-1.3.47/src/i40e/i40e_adminq_cmd.h -07159 138 i40e-1.3.47/src/i40e/kcompat.h -19688 82 i40e-1.3.47/src/i40e/i40e_debugfs.c -05671 86 i40e-1.3.47/src/i40e/i40e_txrx.c -29128 6 i40e-1.3.47/src/i40e/i40e_lan_hmc.h -33481 42 i40e-1.3.47/src/i40e/i40e_nvm.c -04585 30 i40e-1.3.47/src/i40e/i40e_adminq.c -33767 2 i40e-1.3.47/src/i40e/Kbuild -07400 3 i40e-1.3.47/src/i40e/i40e_alloc.h -30794 66 i40e-1.3.47/src/i40e/i40e_virtchnl_pf.c -11873 7 i40e-1.3.47/src/i40e/i40e_dcb.h -60649 2 i40e-1.3.47/src/i40e/i40e_diag.h -29182 21 i40e-1.3.47/src/i40e/i40e_prototype.h -29883 23 i40e-1.3.47/src/i40e/i40e_ptp.c -36071 37 i40e-1.3.47/src/i40e/i40e_dcb.c -49741 4 i40e-1.3.47/src/i40e/i40e_osdep.h -00677 9 i40e-1.3.47/src/i40e/i40e_dcb_nl.c -37534 320 i40e-1.3.47/src/i40e/i40e_main.c -17556 221 i40e-1.3.47/src/i40e/i40e_register.h -57597 52 i40e-1.3.47/src/i40e/kcompat.c -52476 5 i40e-1.3.47/src/i40e/i40e_adminq.h -50800 6 i40e-1.3.47/src/i40e/i40e_virtchnl_pf.h -57192 47 i40e-1.3.47/src/i40e/i40e_fcoe.c -42138 9 i40e-1.3.47/src/i40e/i40e_hmc.h -30403 52 i40e-1.3.47/src/i40e/i40e_type.h -64716 105 i40e-1.3.47/src/i40e/i40e_ethtool.c -22745 4 i40e-1.3.47/src/i40e/i40e_status.h -60864 13 i40e-1.3.47/src/i40e/i40e_virtchnl.h -23673 6 i40e-1.3.47/src/i40e/i40e_diag.c -30055 2 i40e-1.3.47/src/i40e/i40e_devids.h -23231 11 i40e-1.3.47/src/i40e/i40e_hmc.c -45761 11 i40e-1.3.47/src/i40e/i40e_configfs.c -12717 164 i40e-1.3.47/src/i40e/i40e_common.c -25879 42 i40e-1.3.47/src/i40e/i40e_lan_hmc.c -65207 5 i40e-1.3.47/src/i40e/i40e_fcoe.h -10333 31 i40e-1.3.47/src/i40e/i40e.h -22557 13 i40e-1.3.47/src/i40e/i40e_txrx.h -48687 11 i40e-1.3.47/src/Makefile -09576 6 i40e-1.3.47/scripts/set_irq_affinity -53852 2 i40e-1.3.47/scripts/dump_tables -02733 18 i40e-1.3.47/COPYING -52865 10 i40e-1.3.47/i40e.spec -18539 35 i40e-1.3.47/README -08612 3 i40e-1.3.47/i40e.7 diff --git a/i40e-dkms/i40e-1.3.47/pci.updates b/i40e-dkms/i40e-1.3.47/pci.updates deleted file mode 100644 index e0ae83f..0000000 --- a/i40e-dkms/i40e-1.3.47/pci.updates +++ /dev/null @@ -1,73 +0,0 @@ -# updates for the system pci.ids file -# -# IMPORTANT! Entries in this list must be sorted as they -# would appear in the system pci.ids file. Entries -# are sorted by ven, dev, subven, subdev -# (numerical order). -# -8086 Intel Corporation - 154c XL710/X710 Virtual Function - 1571 XL710/X710 Virtual Function - 1572 Ethernet Controller X710 for 10GbE SFP+ - 1028 0000 Ethernet 10G X710 rNDC - 1028 1f99 Ethernet 10G 4P X710/I350 rNDC - 1028 1f9c Ethernet 10G 4P X710 SFP+ rNDC - 103c 0000 HPE Ethernet 10Gb 562SFP+ Adapter - 103c 22fc HPE Ethernet 10Gb 2-port 562FLR-SFP+ Adapter - 103c 22fd HPE Ethernet 10Gb 2-port 562SFP+ Adapter - 1137 0000 Cisco(R) Ethernet Converged NIC X710-4 - 1137 013b Cisco(R) Ethernet Converged NIC X710-4 - 17aa 0000 Lenovo ThinkServer X710 AnyFabric for 10GbE SFP+ - 17aa 4001 Lenovo ThinkServer X710-4 AnyFabric for 10GbE SFP+ - 17aa 4002 Lenovo ThinkServer X710-2 AnyFabric for 10GbE SFP+ - 8086 0000 Ethernet Converged Network Adapter X710 - 8086 0001 Ethernet Converged Network Adapter X710-4 - 8086 0002 Ethernet Converged Network Adapter X710-4 - 8086 0004 Ethernet Converged Network Adapter X710-4 - 8086 0005 Ethernet Converged Network Adapter X710 - 8086 0006 Ethernet Converged Network Adapter X710 - 8086 0007 Ethernet Converged Network Adapter X710-2 - 8086 0008 Ethernet Converged Network Adapter X710-2 - 8086 0009 Ethernet Controller X710 for 10GbE SFP+ - 8086 000a Ethernet Controller X710 for 10GbE SFP+ - 8086 4005 Ethernet Controller X710 for 10GbE SFP+ - 8086 4006 Ethernet Controller X710 for 10GbE SFP+ - 1580 Ethernet Controller XL710 for 40GbE backplane - 1581 Ethernet Controller X710 for 10GbE backplane - 1028 0000 Ethernet 10G X710-k bNDC - 1028 1f98 Ethernet 10G 4P X710-k bNDC - 1028 1f9e Ethernet 10G 2P X710-k bNDC - 8086 0000 Ethernet Converged Network Adapter XL710-Q2 - 1583 Ethernet Controller XL710 for 40GbE QSFP+ - 1028 0000 Ethernet 40G 2P XL710 QSFP+ rNDC - 1028 1f9f Ethernet 40G 2P XL710 QSFP+ rNDC - 108e 0000 Oracle Quad 10Gb Ethernet Adapter - 108e 7b1b Oracle Quad 10Gb Ethernet Adapter - 1137 0000 Cisco(R) Ethernet Converged NIC XL710-Q2 - 1137 013c Cisco(R) Ethernet Converged NIC XL710-Q2 - 8086 0000 Ethernet Converged Network Adapter XL710-Q2 - 8086 0001 Ethernet Converged Network Adapter XL710-Q2 - 8086 0002 Ethernet Converged Network Adapter XL710-Q2 - 8086 0003 Ethernet I/O Module XL710-Q2 - 8086 0004 Ethernet Server Adapter XL710-Q2OCP - 8086 0006 Ethernet Converged Network Adapter XL710-Q2 - 1584 Ethernet Controller XL710 for 40GbE QSFP+ - 8086 0000 Ethernet Converged Network Adapter XL710-Q1 - 8086 0001 Ethernet Converged Network Adapter XL710-Q1 - 8086 0002 Ethernet Converged Network Adapter XL710-Q1 - 8086 0003 Ethernet I/O Module XL710-Q1 - 8086 0004 Ethernet Server Adapter XL710-Q1OCP - 1585 Ethernet Controller X710 for 10GbE QSFP+ - 1586 Ethernet Controller X710 for 10GBASE-T - 108e 0000 Ethernet Controller X710 for 10GBASE-T - 108e 4857 Ethernet Controller X710 for 10GBASE-T - 1587 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Flex-20 20Gb 2-port 660FLB Adapter - 103c 22fe HPE Flex-20 20Gb 2-port 660FLB Adapter - 1588 Ethernet Controller XL710 for 20GbE backplane - 103c 0000 HPE Flex-20 20Gb 2-port 660M Adapter - 103c 22ff HPE Flex-20 20Gb 2-port 660M Adapter - 1589 Ethernet Controller X710/X557-AT 10GBASE-T - 8086 0000 Ethernet Converged Network Adapter X710-T - 8086 0001 Ethernet Converged Network Adapter X710-T4 - 8086 0002 Ethernet Converged Network Adapter X710-T4 diff --git a/i40e-dkms/i40e-1.3.47/src/Makefile b/i40e-dkms/i40e-1.3.47/src/Makefile deleted file mode 100644 index 1f20882..0000000 --- a/i40e-dkms/i40e-1.3.47/src/Makefile +++ /dev/null @@ -1,281 +0,0 @@ -########################################################################### -# -# Intel Ethernet Controller XL710 Family Linux Driver -# Copyright(c) 2013 - 2015 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, see . -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# e1000-devel Mailing List -# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -########################################################################### -# Environment tests - -ifeq (,$(BUILD_KERNEL)) -BUILD_KERNEL=$(shell uname -r) -endif - -ifeq (,$(wildcard build.mk)) - DRIVERS := $(shell ls -ld i40e* | awk '/^d/ { print $$9 }') -else - DRIVERS := $(shell ls -ld i40e i40evf | awk '/^d/ { print $$9 }') -endif -DIRS := $(patsubst %,%/,$(DRIVERS)) -SOURCES := $(shell find $(DRIVERS) -name "*.[ch]" | grep -v "\.mod\.c") -MODULES := $(patsubst %,%.ko,$(DRIVERS)) -TARGETS := $(join $(DIRS), $(MODULES)) -MANFILES := $(patsubst %,%.7,$(DRIVERS)) -MANFILES := $(patsubst %,../%,$(MANFILES)) -########################################################################### -# Environment tests - -# Kernel Search Path -# All the places we look for kernel source -KSP := /lib/modules/$(BUILD_KERNEL)/build \ - /lib/modules/$(BUILD_KERNEL)/source \ - /usr/src/linux-$(BUILD_KERNEL) \ - /usr/src/linux-$($(BUILD_KERNEL) | sed 's/-.*//') \ - /usr/src/kernel-headers-$(BUILD_KERNEL) \ - /usr/src/kernel-source-$(BUILD_KERNEL) \ - /usr/src/linux-$($(BUILD_KERNEL) | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \ - /usr/src/linux - -# prune the list down to only values that exist -# and have an include/config sub-directory -# as of last check, everything beyond 2.6.32 should have include/config -# even in the SLES12 /lib/modules/`uname -r`/build -test_dir = $(shell [ -e $(dir)/include/config ] && echo $(dir)) -KSP := $(foreach dir, $(KSP), $(test_dir)) - -# we will use this first valid entry in the search path -ifeq (,$(KSRC)) - KSRC := $(firstword $(KSP)) -endif - -ifeq (,$(KSRC)) - $(warning *** Kernel header files not in any of the expected locations.) - $(warning *** Install the appropriate kernel development package, e.g.) - $(error kernel-devel, for building kernel modules and try again) -else -ifeq (/lib/modules/$(BUILD_KERNEL)/source, $(KSRC)) - KOBJ := /lib/modules/$(BUILD_KERNEL)/build -else - KOBJ := $(KSRC) -endif -endif - -# Version file Search Path -VSP := $(KOBJ)/include/generated/utsrelease.h \ - $(KOBJ)/include/linux/utsrelease.h \ - $(KOBJ)/include/linux/version.h \ - $(KOBJ)/include/generated/uapi/linux/version.h \ - /boot/vmlinuz.version.h - -# Config file Search Path -CSP := $(KOBJ)/include/generated/autoconf.h \ - $(KOBJ)/include/linux/autoconf.h \ - /boot/vmlinuz.autoconf.h - -# prune the lists down to only files that exist -test_file = $(shell [ -f $(file) ] && echo $(file)) -VSP := $(foreach file, $(VSP), $(test_file)) -CSP := $(foreach file, $(CSP), $(test_file)) - -# and use the first valid entry in the Search Paths -ifeq (,$(VERSION_FILE)) - VERSION_FILE := $(firstword $(VSP)) -endif -ifeq (,$(CONFIG_FILE)) - CONFIG_FILE := $(firstword $(CSP)) -endif - -ifeq (,$(wildcard $(VERSION_FILE))) - $(error Linux kernel source not configured - missing version header file) -endif - -ifeq (,$(wildcard $(CONFIG_FILE))) - $(error Linux kernel source not configured - missing autoconf.h) -endif - -# Some helper functions for converting kernel version to version codes -get_kver = $(or $(word ${2},$(subst ., ,${1})),0) -get_kvercode = $(shell [ "${1}" -ge 0 -a "${1}" -le 255 2>/dev/null ] && \ - [ "${2}" -ge 0 -a "${2}" -le 255 2>/dev/null ] && \ - [ "${3}" -ge 0 -a "${3}" -le 255 2>/dev/null ] && \ - printf %d $$(( ( ${1} << 16 ) + ( ${2} << 8 ) + ( ${3} ) )) ) - -# Convert LINUX_VERSION into LINUX_VERSION_CODE -ifneq (${LINUX_VERSION},) - LINUX_VERSION_CODE=$(call get_kvercode,$(call get_kver,${LINUX_VERSION},1),$(call get_kver,${LINUX_VERSION},2),$(call get_kver,${LINUX_VERSION},3)) -endif - -# Honor LINUX_VERSION_CODE -ifneq (${LINUX_VERSION_CODE},) - $(info Setting LINUX_VERSION_CODE to ${LINUX_VERSION_CODE}$(if ${LINUX_VERSION}, from LINUX_VERSION=${LINUX_VERSION})) - KVER_CODE := ${LINUX_VERSION_CODE} - EXTRA_CFLAGS += -DLINUX_VERSION_CODE=${LINUX_VERSION_CODE} -endif - -EXTRA_CFLAGS += $(CFLAGS_EXTRA) - -# get the kernel version - we use this to find the correct install path -KVER := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \ - awk '{ print $$3 }' | sed 's/\"//g') - -# assume source symlink is the same as build, otherwise adjust KOBJ -ifneq (,$(wildcard /lib/modules/$(KVER)/build)) -ifneq ($(KSRC),$(shell readlink /lib/modules/$(KVER)/build)) - KOBJ=/lib/modules/$(KVER)/build -endif -endif - -ifeq (${KVER_CODE},) - KVER_CODE := $(shell $(CC) $(EXTRA_CFLAGS) -E -dM $(VSP) 2> /dev/null |\ - grep -m 1 LINUX_VERSION_CODE | awk '{ print $$3 }' | sed 's/\"//g') -endif - -# set the install path before and after 3.2.0, and handle -# distros like SLES 11 that backported the directories -ifeq (1,$(shell [ -d /lib/modules/$(KVER)/kernel/drivers/net/ethernet/intel ] && echo 1 || echo 0)) -INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net/ethernet/intel -else -INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net -endif - -# abort the build on kernels older than 2.6.32 -ifneq (1,$(shell [ $(KVER_CODE) -ge 132640 ] && echo 1 || echo 0)) - $(error *** Aborting the build. \ - *** This driver is not supported on kernel versions older than 2.6.32) -endif - -MANSECTION = 7 - -ifeq (,$(MANDIR)) - # find the best place to install the man page - MANPATH := $(shell (manpath 2>/dev/null || echo $MANPATH) | sed 's/:/ /g') - ifneq (,$(MANPATH)) - # test based on inclusion in MANPATH - test_dir = $(findstring $(dir), $(MANPATH)) - else - # no MANPATH, test based on directory existence - test_dir = $(shell [ -e $(dir) ] && echo $(dir)) - endif - # our preferred install path - # should /usr/local/man be in here ? - MANDIR := /usr/share/man /usr/man - MANDIR := $(foreach dir, $(MANDIR), $(test_dir)) - MANDIR := $(firstword $(MANDIR)) -endif -ifeq (,$(MANDIR)) - # fallback to /usr/man - MANDIR := /usr/man -endif - -# kernel build function -# $1 is the relative path of the subdir to build in -# $2 is the kernel build target -kernelbuild = $(shell (\ - if [ -n "$(KOBJ)" ]; then \ - $(MAKE) ccflags-y:="$(CFLAGS_EXTRA)" -C $(KSRC) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=$(realpath $(1)) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) $(2) ; \ - else \ - $(MAKE) ccflags-y:="$(CFLAGS_EXTRA)" -C $(KSRC) -O $(KOBJ) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=$(realpath $(1)) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) $(2) ; \ - fi > .tmp ; rm .tmp)) - - -########################################################################### -# Build rules - -# We can't use the kernelbuild macro in verbose targets because it gobbles the -# output of the shell. - -$(MODULES): $(TARGETS) - @cp $(TARGETS) . - -$(TARGETS): $(SOURCES) - @for s in $(DRIVERS) ; do \ - if [ -n "$(KOBJ)" ]; then \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s modules ; \ - else \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) -O $(KOBJ) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s modules ; \ - fi ; \ - done - -noisy: $(SOURCES) - @for s in $(DRIVERS) ; do \ - if [ -n "$(KOBJ)" ]; then \ - $(MAKE) -C $(KSRC) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s V=1 modules ; \ - else \ - $(MAKE) -C $(KSRC) -O $(KOBJ) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s V=1 modules ; \ - fi ; \ - done - @cp $(TARGETS) . - -silent: $(SOURCES) - $(foreach d, $(DRIVERS), $(call kernelbuild,$(d),modules)) - @cp $(TARGETS) . - -sparse: clean $(SOURCES) - @for s in $(DRIVERS) ; do \ - if [ -n "$(KOBJ)" ]; then \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s C=2 CF="-D__CHECK_ENDIAN__ -Wbitwise -Wcontext" modules ; \ - else \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) -O $(KOBJ) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s C=2 CF="-D__CHECK_ENDIAN_ -Wbitwise -Wcontext" modules ; \ - fi ; \ - done - -ccc: clean $(SOURCES) - @for s in $(DRIVERS) ; do \ - if [ -n "$(KOBJ)" ]; then \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s coccicheck MODE=report; \ - else \ - $(MAKE) ccflags-y+="$(CFLAGS_EXTRA)" -C $(KSRC) -O $(KOBJ) CONFIG_I40E=m CONFIG_I40EVF=m SUBDIRS=`pwd`/$$s coccicheck MODE=report; \ - fi ; \ - done - -manfile: - $(foreach m, $(DRIVERS), $(shell gzip -c ../$(m).$(MANSECTION) > $(m).$(MANSECTION).gz)) - -clean: - $(foreach d, $(DRIVERS), $(call kernelbuild,$(d),clean)) - @-rm -rf *.$(MANSECTION).gz *.ko - -install: $(MODULES) manfile -# remove all old versions of the driver - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).ko)) - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).gz)) - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).ko.xz)) - $(foreach m, $(DRIVERS), $(shell \ - install -D -m 644 $(m).$(MANSECTION).gz $(INSTALL_MOD_PATH)$(MANDIR)/man$(MANSECTION)/$(m).$(MANSECTION).gz ; \ - install -D -m 644 $(m).ko $(INSTALL_MOD_PATH)$(INSTDIR)/$(m)/$(m).ko)) -ifeq (,$(INSTALL_MOD_PATH)) - @-/sbin/depmod -a $(KVER) || true -else - @-/sbin/depmod -b $(INSTALL_MOD_PATH) -a -n $(KVER) > /dev/null || true -endif - -uninstall: - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).ko)) - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).gz)) - $(foreach d, $(DRIVERS), $(shell rm -f $(INSTALL_MOD_PATH)$(INSTDIR)/$(d)/$(d).ko.xz)) - @-/sbin/depmod -a $(KVER) - $(foreach m, $(DRIVERS), $(shell \ - if [ -e $(INSTALL_MOD_PATH)$(MANDIR)/man$(MANSECTION)/$(m).$(MANSECTION).gz ] ; then \ - rm -f $(INSTALL_MOD_PATH)$(MANDIR)/man$(MANSECTION)/$(m).$(MANSECTION).gz ; \ - fi)) - -.PHONY: noisy clean manfile silent sparse ccc install uninstall -.NOTPARALLEL: - diff --git a/i40e-dkms/i40e-1.3.47/src/i40e/Kbuild b/i40e-dkms/i40e-1.3.47/src/i40e/Kbuild deleted file mode 100644 index fdcc55f..0000000 --- a/i40e-dkms/i40e-1.3.47/src/i40e/Kbuild +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################ -# -# Intel Ethernet Controller XL710 Family Linux Driver -# Copyright(c) 2013 - 2015 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, see . -# -# The full GNU General Public License is included in this distribution in -# the file called "COPYING". -# -# Contact Information: -# e1000-devel Mailing List -# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -# -################################################################################ - -# -# Makefile for the Intel(R) Ethernet Connection XL710 (i40e.ko) driver -# - -obj-m += i40e.o - -i40e-objs := i40e_main.o \ - kcompat.o \ - i40e_ethtool.o \ - i40e_adminq.o \ - i40e_common.o \ - i40e_hmc.o \ - i40e_lan_hmc.o \ - i40e_nvm.o \ - i40e_configfs.o \ - i40e_debugfs.o \ - i40e_diag.o \ - i40e_txrx.o \ - i40e_ptp.o \ - i40e_virtchnl_pf.o - - -i40e-$(CONFIG_DCB) += i40e_dcb.o i40e_dcb_nl.o - -i40e-$(CONFIG_FCOE:m=y) += i40e_fcoe.o diff --git a/i40e-dkms/i40e-1.3.47/src/i40e/i40e_configfs.c b/i40e-dkms/i40e-1.3.47/src/i40e/i40e_configfs.c deleted file mode 100644 index fb260b6..0000000 --- a/i40e-dkms/i40e-1.3.47/src/i40e/i40e_configfs.c +++ /dev/null @@ -1,357 +0,0 @@ -/******************************************************************************* - * - * Intel Ethernet Controller XL710 Family Linux Driver - * Copyright(c) 2013 - 2015 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, see . - * - * The full GNU General Public License is included in this distribution in - * the file called "COPYING". - * - * Contact Information: - * e1000-devel Mailing List - * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 - * - ******************************************************************************/ - - -#include -#include "i40e.h" - -#if IS_ENABLED(CONFIG_CONFIGFS_FS) - -/** - * configfs structure for i40e - * - * This file adds code for configfs support for the i40e driver. This sets - * up a filesystem under /sys/kernel/config in which configuration changes - * can be made for the driver's netdevs. - * - * The initialization in this code creates the "i40e" entry in the configfs - * system. After that, the user needs to use mkdir to create configurations - * for specific netdev ports; for example "mkdir eth3". This code will verify - * that such a netdev exists and that it is owned by i40e. - * - **/ - -struct i40e_cfgfs_vsi { - struct config_item item; - struct i40e_vsi *vsi; -}; - -static inline struct i40e_cfgfs_vsi *to_i40e_cfgfs_vsi(struct config_item *item) -{ - return item ? container_of(item, struct i40e_cfgfs_vsi, item) : NULL; -} - -static struct configfs_attribute i40e_cfgfs_vsi_attr_min_bw = { - .ca_owner = THIS_MODULE, - .ca_name = "min_bw", - .ca_mode = S_IRUGO | S_IWUSR, -}; - -static struct configfs_attribute i40e_cfgfs_vsi_attr_max_bw = { - .ca_owner = THIS_MODULE, - .ca_name = "max_bw", - .ca_mode = S_IRUGO | S_IWUSR, -}; - -static struct configfs_attribute i40e_cfgfs_vsi_attr_commit = { - .ca_owner = THIS_MODULE, - .ca_name = "commit", - .ca_mode = S_IRUGO | S_IWUSR, -}; - -static struct configfs_attribute i40e_cfgfs_vsi_attr_port_count = { - .ca_owner = THIS_MODULE, - .ca_name = "ports", - .ca_mode = S_IRUGO | S_IWUSR, -}; - -static struct configfs_attribute i40e_cfgfs_vsi_attr_part_count = { - .ca_owner = THIS_MODULE, - .ca_name = "partitions", - .ca_mode = S_IRUGO | S_IWUSR, -}; - -static struct configfs_attribute *i40e_cfgfs_vsi_attrs[] = { - &i40e_cfgfs_vsi_attr_min_bw, - &i40e_cfgfs_vsi_attr_max_bw, - &i40e_cfgfs_vsi_attr_commit, - &i40e_cfgfs_vsi_attr_port_count, - &i40e_cfgfs_vsi_attr_part_count, - NULL, -}; - -/** - * i40e_cfgfs_vsi_attr_show - Show a VSI's NPAR BW partition info - * @item: A pointer back to the configfs item created on driver load - * @attr: A pointer to this item's configuration attribute - * @page: A pointer to the output buffer - **/ -static ssize_t i40e_cfgfs_vsi_attr_show(struct config_item *item, - struct configfs_attribute *attr, - char *page) -{ - struct i40e_cfgfs_vsi *i40e_cfgfs_vsi = to_i40e_cfgfs_vsi(item); - struct i40e_pf *pf = i40e_cfgfs_vsi->vsi->back; - ssize_t count; - - if (i40e_cfgfs_vsi->vsi != pf->vsi[pf->lan_vsi]) - return 0; - - if (strncmp(attr->ca_name, "min_bw", 6) == 0) - count = sprintf(page, "%s %s %d%%\n", - i40e_cfgfs_vsi->vsi->netdev->name, - (pf->min_bw & I40E_ALT_BW_RELATIVE_MASK) ? - "Relative Min BW" : "Absolute Min BW", - pf->min_bw & I40E_ALT_BW_VALUE_MASK); - else if (strncmp(attr->ca_name, "max_bw", 6) == 0) - count = sprintf(page, "%s %s %d%%\n", - i40e_cfgfs_vsi->vsi->netdev->name, - (pf->max_bw & I40E_ALT_BW_RELATIVE_MASK) ? - "Relative Max BW" : "Absolute Max BW", - pf->max_bw & I40E_ALT_BW_VALUE_MASK); - else if (strncmp(attr->ca_name, "ports", 5) == 0) - count = sprintf(page, "%d\n", - pf->hw.num_ports); - else if (strncmp(attr->ca_name, "partitions", 10) == 0) - count = sprintf(page, "%d\n", - pf->hw.num_partitions); - else - return 0; - - return count; -} - -/** - * i40e_cfgfs_vsi_attr_store - Show a VSI's NPAR BW partition info - * @item: A pointer back to the configfs item created on driver load - * @attr: A pointer to this item's configuration attribute - * @page: A pointer to the user input buffer holding the user input values - **/ -static ssize_t i40e_cfgfs_vsi_attr_store(struct config_item *item, - struct configfs_attribute *attr, - const char *page, size_t count) -{ - struct i40e_cfgfs_vsi *i40e_cfgfs_vsi = to_i40e_cfgfs_vsi(item); - struct i40e_pf *pf = i40e_cfgfs_vsi->vsi->back; - char *p = (char *) page; - int rc; - unsigned long tmp; - - if (i40e_cfgfs_vsi->vsi != pf->vsi[pf->lan_vsi]) - return 0; - - if (!p || (*p && (*p == '\n'))) - return -EINVAL; - - rc = kstrtoul(p, 10, &tmp); - if (rc) - return rc; - if (tmp > 100) - return -ERANGE; - - if (strncmp(attr->ca_name, "min_bw", 6) == 0) { - if (tmp > (pf->max_bw & I40E_ALT_BW_VALUE_MASK)) - return -ERANGE; - /* Preserve the valid and relative BW bits - the rest is - * don't care. - */ - pf->min_bw &= (I40E_ALT_BW_RELATIVE_MASK | - I40E_ALT_BW_VALID_MASK); - pf->min_bw |= (tmp & I40E_ALT_BW_VALUE_MASK); - i40e_set_partition_bw_setting(pf); - } else if (strncmp(attr->ca_name, "max_bw", 6) == 0) { - if (tmp < 1 || - tmp < (pf->min_bw & I40E_ALT_BW_VALUE_MASK)) - return -ERANGE; - /* Preserve the valid and relative BW bits - the rest is - * don't care. - */ - pf->max_bw &= (I40E_ALT_BW_RELATIVE_MASK | - I40E_ALT_BW_VALID_MASK); - pf->max_bw |= (tmp & I40E_ALT_BW_VALUE_MASK); - i40e_set_partition_bw_setting(pf); - } else if (strncmp(attr->ca_name, "commit", 6) == 0 && tmp == 1) { - if (i40e_commit_partition_bw_setting(pf)) - return -EIO; - } - - return count; -} - -/** - * i40e_cfgfs_vsi_release - Free up the configuration item memory - * @item: A pointer back to the configfs item created on driver load - **/ -static void i40e_cfgfs_vsi_release(struct config_item *item) -{ - kfree(to_i40e_cfgfs_vsi(item)); -} - -static struct configfs_item_operations i40e_cfgfs_vsi_item_ops = { - .release = i40e_cfgfs_vsi_release, - .show_attribute = i40e_cfgfs_vsi_attr_show, - .store_attribute = i40e_cfgfs_vsi_attr_store, -}; - -static struct config_item_type i40e_cfgfs_vsi_type = { - .ct_item_ops = &i40e_cfgfs_vsi_item_ops, - .ct_attrs = i40e_cfgfs_vsi_attrs, - .ct_owner = THIS_MODULE, -}; - -struct i40e_cfgfs_group { - struct config_group group; -}; - -/** - * to_i40e_cfgfs_group - Get the group pointer from the config item - * @item: A pointer back to the configfs item created on driver load - **/ -static inline struct i40e_cfgfs_group * -to_i40e_cfgfs_group(struct config_item *item) -{ - return item ? container_of(to_config_group(item), - struct i40e_cfgfs_group, group) : NULL; -} - -/** - * i40e_cfgfs_group_make_item - Create the configfs item with group container - * @group: A pointer to our configfs group - * @name: A pointer to the nume of the device we're looking for - **/ -static struct config_item * -i40e_cfgfs_group_make_item(struct config_group *group, const char *name) -{ - struct i40e_cfgfs_vsi *i40e_cfgfs_vsi; - struct net_device *netdev; - struct i40e_netdev_priv *np; - - read_lock(&dev_base_lock); - netdev = first_net_device(&init_net); - while (netdev) { - if (strncmp(netdev->name, name, sizeof(netdev->name)) == 0) - break; - netdev = next_net_device(netdev); - } - read_unlock(&dev_base_lock); - - if (!netdev) - return ERR_PTR(-ENODEV); - - /* is this netdev owned by i40e? */ - if (netdev->netdev_ops->ndo_open != i40e_open) - return ERR_PTR(-EACCES); - - i40e_cfgfs_vsi = kzalloc(sizeof(struct i40e_cfgfs_vsi), GFP_KERNEL); - if (!i40e_cfgfs_vsi) - return ERR_PTR(-ENOMEM); - - np = netdev_priv(netdev); - i40e_cfgfs_vsi->vsi = np->vsi; - config_item_init_type_name(&i40e_cfgfs_vsi->item, name, - &i40e_cfgfs_vsi_type); - - return &i40e_cfgfs_vsi->item; -} - -static struct configfs_attribute i40e_cfgfs_group_attr_description = { - .ca_owner = THIS_MODULE, - .ca_name = "description", - .ca_mode = S_IRUGO, -}; - -static struct configfs_attribute *i40e_cfgfs_group_attrs[] = { - &i40e_cfgfs_group_attr_description, - NULL, -}; - -static ssize_t i40e_cfgfs_group_attr_show(struct config_item *item, - struct configfs_attribute *attr, - char *page) -{ - return sprintf(page, -"i40e\n" -"\n" -"This subsystem allows the modification of network port configurations.\n" -"To start, use the name of the network port to be configured in a 'mkdir'\n" -"command, e.g. 'mkdir eth3'.\n"); -} - -static void i40e_cfgfs_group_release(struct config_item *item) -{ - kfree(to_i40e_cfgfs_group(item)); -} - -static struct configfs_item_operations i40e_cfgfs_group_item_ops = { - .release = i40e_cfgfs_group_release, - .show_attribute = i40e_cfgfs_group_attr_show, -}; - -/* - * Note that, since no extra work is required on ->drop_item(), - * no ->drop_item() is provided. - */ -static struct configfs_group_operations i40e_cfgfs_group_ops = { - .make_item = i40e_cfgfs_group_make_item, -}; - -static struct config_item_type i40e_cfgfs_group_type = { - .ct_item_ops = &i40e_cfgfs_group_item_ops, - .ct_group_ops = &i40e_cfgfs_group_ops, - .ct_attrs = i40e_cfgfs_group_attrs, - .ct_owner = THIS_MODULE, -}; - -static struct configfs_subsystem i40e_cfgfs_group_subsys = { - .su_group = { - .cg_item = { - .ci_namebuf = "i40e", - .ci_type = &i40e_cfgfs_group_type, - }, - }, -}; - -/** - * i40e_configfs_init - Initialize configfs support for our driver - **/ -int i40e_configfs_init(void) -{ - int ret; - struct configfs_subsystem *subsys; - - subsys = &i40e_cfgfs_group_subsys; - - config_group_init(&subsys->su_group); - mutex_init(&subsys->su_mutex); - ret = configfs_register_subsystem(subsys); - if (ret) { - pr_err("Error %d while registering configfs subsystem %s\n", - ret, subsys->su_group.cg_item.ci_namebuf); - return ret; - } - - return 0; -} - -/** - * i40e_configfs_init - Bail out - unregister configfs subsystem and release - **/ -void i40e_configfs_exit(void) -{ - configfs_unregister_subsystem(&i40e_cfgfs_group_subsys); -} - -#endif /* CONFIG_CONFIGFS_FS */ diff --git a/i40e-dkms/i40e-1.3.47/COPYING b/i40e-dkms/i40e-1.5.18/COPYING similarity index 100% rename from i40e-dkms/i40e-1.3.47/COPYING rename to i40e-dkms/i40e-1.5.18/COPYING diff --git a/i40e-dkms/i40e-1.3.47/README b/i40e-dkms/i40e-1.5.18/README similarity index 66% rename from i40e-dkms/i40e-1.3.47/README rename to i40e-dkms/i40e-1.5.18/README index 9e82a61..dd645cb 100755 --- a/i40e-dkms/i40e-1.3.47/README +++ b/i40e-dkms/i40e-1.5.18/README @@ -4,7 +4,7 @@ i40e Linux* Base Driver for the Intel(R) XL710 Ethernet Controller Family =============================================================================== -September 25, 2015 +April 6, 2016 =============================================================================== @@ -26,6 +26,26 @@ Contents Important Notes --------------- +Enabling a VF link if the port is disconnected +---------------------------------------------- + +If the physical function (PF) link is down, you can force link up (from the host +PF) on any virtual functions (VF) bound to the PF. Note that this requires +kernel support (Redhat kernel 3.10.0-327 or newer, upstream kernel 3.11.0 or +newer, and associated iproute2 user space support). If the following command +does not work, it may not be supported by your system. The following command +forces link up on VF 0 bound to PF eth0: + ip link set eth0 vf 0 state enable + + +Do not unload port driver if VF with active VM is bound to it +------------------------------------------------------------- + +Do not unload a port's driver if a Virtual Function (VF) with an active Virtual +Machine (VM) is bound to it. Doing so will cause the port to appear to hang. +Once the VM shuts down, or otherwise releases the VF, the command will complete. + + Configuring SR-IOV for improved network security ------------------------------------------------ @@ -43,12 +63,13 @@ frames to be dropped. Overview -------- -This document describes the i40e Linux* Base Driver for the XL710 Ethernet Controller Family of Adapters. +This driver supports kernel versions 2.6.32 and newer. -The Linux* base driver supports the following kernel versions: -2.6.32 and newer +It supports Linux supported x86_64 systems. -It includes support for Linux supported x86_64 systems. +Driver information can be obtained using ethtool, lspci, and ifconfig. +Instructions on updating ethtool can be found in the section Additional +Configurations later in this document. This driver is only supported as a loadable module at this time. Intel is not supplying patches against the kernel source to allow for static linking of @@ -62,26 +83,24 @@ The following features are now available in supported kernels: - Native VLANs - Channel Bonding (teaming) - SNMP -- Generic Receive Offload Adapter teaming is implemented using the native Linux Channel bonding module. This is included in supported Linux kernels. + Channel Bonding documentation can be found in the Linux kernel source: /documentation/networking/bonding.txt The driver information previously displayed in the /proc file system is not supported in this release. -Driver information can be obtained using ethtool, lspci, and ifconfig. -Instructions on updating ethtool can be found in the section Additional -Configurations later in this document. - Identifying Your Adapter ------------------------ -The driver in this release is compatible with XL710 and X710-based Intel -Ethernet Network Connections. +The driver in this release is compatible with devices based on the following: + * Intel(R) Ethernet Controller X710 + * Intel(R) Ethernet Controller XL710 + * Intel(R) Ethernet Controller X722 For information on how to identify your adapter, go to the Adapter & Driver ID Guide at: @@ -118,7 +137,14 @@ Avago 1000BASE-T SFP ABCU-5710RZ QSFP+ Modules ------------- +NOTE: Intel branded network adapters based on the X710/XL710 controller + (for example, Intel(R) Ethernet Converged Network Adapter XL710-Q1) support + the E40GQSFPLR module. For other connections based on the X710/XL710 + controller, support is dependent on your system board. Please see your vendor + for details. + Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR + Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed) E40GQSFPLR QSFP+ 1G speed is not supported on XL710 based devices. X710/XL710 Based SFP+ adapters support passive QSFP+ Direct Attach cables. @@ -156,7 +182,7 @@ NOTES: 4. Compile the driver module: # make install The binary will be installed as: - /lib/modules//kernel/drivers/net/i40e/i40e.[k]o + /lib/modules//updates/drivers/net/ethernet/intel/i40e/i40e.ko The install location listed above is the default location. This may differ for various Linux distributions. @@ -220,17 +246,27 @@ max_vfs Valid Range: 1-32 (X710 based devices) 1-64 (XL710 based devices) + NOTE: This parameter is only used on kernel 3.7.x and below. On kernel 3.8.x and above, use sysfs to enable VFs. For example: #echo $num_vf_enabled > /sys/class/net/$dev/device/sriov_numvfs //enable VFs #echo 0 > /sys/class/net/$dev/device/sriov_numvfs //disable VFs + +The parameters for the driver are referenced by position. Thus, if you have a +dual port adapter, or more than one adapter in your system, and want N virtual +functions per port, you must specify a number for each port with each parameter +separated by a comma. For example: + modprobe i40e max_vfs=4,1 +NOTE: Caution must be used in loading the driver with these parameters. +Depending on your system configuration, number of slots, etc., it is impossible +to predict in all cases where the positions would be on the command line. This parameter adds support for SR-IOV. It causes the driver to spawn up to max_vfs worth of virtual functions. Some hardware configurations support fewer SR-IOV instances, as the whole XL710 controller (all functions) is limited to 128 SR-IOV interfaces in total. -NOTE: When SR-IOV mode is enabled, hardware VLAN filtering -and VLAN tag stripping/insertion will remain enabled. Please remove the old -VLAN filter before the new VLAN filter is added. For example, +NOTE: When SR-IOV mode is enabled, hardware VLAN +filtering and VLAN tag stripping/insertion will remain enabled. Please remove +the old VLAN filter before the new VLAN filter is added. For example, ip link set eth0 vf 0 vlan 100 // set vlan 100 for VF 0 ip link set eth0 vf 0 vlan 0 // Delete vlan 100 ip link set eth0 vf 0 vlan 200 // set a new vlan 200 for VF 0 @@ -263,41 +299,111 @@ the first VF on VLAN 10. $ ip link set dev eth0 vf 0 vlan 10 . +VLAN Tag Packet Steering +------------------------ + +Allows you to send all packets with a specific VLAN tag to a particular +SR-IOV virtual function (VF). Further, this feature allows you to designate +a particular VF as trusted, and allows that trusted VF to request selective +promiscuous mode on the Physical Function (PF). + +To set a VF as trusted or untrusted, enter the following command in the +Hypervisor: + # ip link set dev eth0 vf 1 trust [on|off] + +Once the VF is designated as trusted, use the following commands in the VM +to set the VF to promiscuous mode. + For promiscuous all: + #ip link set eth2 promisc on + Where eth2 is a VF interface in the VM + For promiscuous Multicast: + #ip link set eth2 allmulti on + Where eth2 is a VF interface in the VM + + NOTE: By default, the ethtool priv-flag vf-true-promisc-support is set to + “off”,meaning that promiscuous mode for the VF will be limited. To set the + promiscuous mode for the VF to true promiscuous and allow the VF to see + all ingress traffic, use the following command. + #ethtool –set-priv-flags p261p1 vf-true-promisc-support on + The vf-true-promisc-support priv-flag does not enable promiscuous mode; + rather, it designates which type of promiscuous mode (limited or true) + you will get when you enable promiscuous mode using the ip link commands + above. Note that this is a global setting that affects the entire device. + However,the vf-true-promisc-support priv-flag is only exposed to the first + PF of the device. The PF remains in limited promiscuous mode (unless it + is in MFP mode) regardless of the vf-true-promisc-support setting. + +Now add a VLAN interface on the VF interface. + #ip link add link eth2 name eth2.100 type vlan id 100 + +Note that the order in which you set the VF to promiscuous mode and add +the VLAN interface does not matter (you can do either first). The end result +in this example is that the VF will get all traffic that is tagged with +VLAN 100. + + Intel(R) Ethernet Flow Director ------------------------------- +NOTE: Flow director parameters are only supported on kernel versions 2.6.30 or +newer. + The Flow Director performs the following tasks: - Directs receive packets according to their flows to different queues. - Enables tight control on routing a flow in the platform. - Matches flows and CPU cores for flow affinity. - Supports multiple parameters for flexible flow classification and load - balancing. + balancing (in SFP mode only). NOTES: - - The Flow Director is enabled only if the kernel supports multiple - transmit queues. - An included script (set_irq_affinity) automates setting the IRQ to CPU affinity. - - The i40e Linux driver does not support configuration of the mask field. - It only accepts rules that completely qualify a certain flow type. + - The Linux i40e driver supports the following flow types: IPv4, TCPv4, and + UDPv4. For a given flow type, it supports valid combinations of + IP addresses (source or destination) and UDP/TCP ports (source and + destination). For example, you can supply only a source IP address, + a source IP address and a destination port, or any combination of one or + more of these four parameters. + - The Linux i40e driver allows you to filter traffic based on a user-defined + flexible two-byte pattern and offset by using the ethtool user-def and + mask fields. Only L3 and L4 flow types are supported for user-defined + flexible filters. For a given flow type, you must clear all Flow Director + filters before changing the input set (for that flow type). ethtool commands: - - To enable or disable the Flow Director + - To enable or disable the Flow Director: # ethtool -K ethX ntuple - When disabling ntuple filters all the user programed filters are flushed - from the driver cache and hardware. Filters must be re-added if they are - needed when ntuple is re-enabled. + When disabling ntuple filters, all the user programed filters are + flushed from the driver cache and hardware. All needed filters must + be re-added when ntuple is re-enabled. - - To add a filter that directs packet to queue 2, use -U or -N switch + - To add a filter that directs packet to queue 2, use -U or -N switch: # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \ 192.168.10.2 src-port 2000 dst-port 2001 action 2 [loc 1] - - To see the list of filters currently present + To set a filter using only the source and destination IP address: + + # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \ + 192.168.10.2 action 2 [loc 1] + + To set a filter based on a user defined pattern and offset: + + # ethtool -N ethX flow-type tcp4 src-ip 192.168.10.1 dst-ip \ + 192.168.10.2 user-def 0xffffffff00000001 m 0x40 action 2 [loc 1] + + where the value of the user-def field (0xffffffff00000001) is the + pattern and m 0x40 is the offset. + + Note that in this case the mask (m 0x40) parameter is used with the + user-def field, whereas for cloud filter support the mask parameter + is not used. + + - To see the list of filters currently present: # ethtool <-u|-n> ethX Application Targeted Routing (ATR) Perfect Filters @@ -352,6 +458,108 @@ sideband filter list replay. This will help flush any stale ATR rules and create space. +Cloud Filter Support +-------------------- +On a complex network that supports multiple types of traffic (such as for +storage as well as cloud), cloud filter support allows you to send one type of + traffic (for example, the storage traffic) to the Physical Function (PF) and +another type (say, the cloud traffic) to a Virtual Function (VF). Because cloud +networks are typically VXLAN/Geneve-based, you can define a cloud filter to +identify VXLAN/Geneve packets and send them to a queue in the VF to be +processed by the virtual machine (VM). Similarly, other cloud filters can be +designed for various other traffic tunneling. + +NOTES: + - Cloud filters are only supported when the underlying device is in Single + Function per Port mode. + - The "action -1" option, which drops matching packets in regular Flow + Director filters, is not available to drop packets when used with + cloud filters. + - For IPv4 and ether flow-types, cloud filters cannot be used for TCP or + UDP filters. + - Cloud filters can be used as a method for implementing queue splitting in + the PF. + +The following filters are supported: + Cloud Filters + Inner MAC, Inner VLAN (for NVGRE, VXLAN or Geneve packets) + Inner MAC, Inner VLAN, Tenant ID (for NVGRE, VXLAN or Geneve packets) + Inner MAC, Tenant ID (NVGRE packet or VXLAN/Geneve packets) + Outer MAC L2 filter + Inner MAC filter + Outer MAC, Tenant ID, Inner MAC + Application Destination IP + Application Source-IP, Inner MAC + ToQueue: Use MAC, VLAN to point to a queue + L3 filters + Application Destination IP + +Use ethtool’s flow director and user defined (user-def) options to define +cloud filters for tunneled packets (VF) and L3 filters for non-tunneled +packets (PF or VF). In this case, the user-def field specifies that a cloud +filter is being programmed instead of a Flow Director filter. Note that this +is not the same as setting filters using a user-defined pattern and offset, +which requires using the mask ('m') parameter in conjunction with the user-def +field (see the Intel Ethernet Flow Director section in this document). + +For regular Flow Director filters: + + - No user-def specified or upper 32 bits of user-def is all 0s + + Example: + + ethtool -N p258p1 flow-type ip4 src-ip 192.168.1.108 dst-ip 192.168.1.109 / + action 6 loc 3 + +For L3 filters (non-tunneled packets): + + - “user-def 0xffffffff00000002” (no Tenant ID/VNI specified in the upper + 32 bits of the user-def field and send to VF id 2) + - Only L3 parameters (src-IP, dst-IP) are considered + + Example: + + ethtool -N p4p2 flow-type ip4 src-ip 192.168.42.13 dst-ip 192.168.42.33 / + src-port 12344 dst-port 12344 user-def 0xffffffff00000001 loc 3 + Redirect traffic coming from 192.168.42.13 port 12344 with destination + 192.168.42.33 port 12344 into VF id 1, and call this “rule 3” + +For cloud filters (tunneled packets): + + - All other filters, including where Tenant ID/VNI is specified. + - The upper 32 bits of the user def field can carry the tenant ID/VNI + if specified or required. + - The lower 32 bits of the 'user-def' field can be used to specify the + VF ID. If the ID is greater than the maximum number of VFs currently + enabled then the ID will default back to the main VSI. + - Cloud filters can be defined with inner MAC, outer MAC, inner IP address, + inner VLAN, and VNI as part of the cloud tuple. Cloud filters filter on + destination (not source) MAC and IP. The destination and source MAC + address fields in the ethtool command are overloaded as dst = outer, + src = inner MAC address to facilitate tuple definition for a cloud filter. + - The 'loc' parameter specifies the rule number of the filter as being + stored in the base driver + + Example: + + ethtool -N p4p2 flow-type ip4 src-ip 192.168.42.13 dst-ip 192.168.42.33 / + src-port 12344 dst-port 12344 user-def 0x2200000001 loc 38 + Redirect traffic on VXLAN using tunnel id 34 (hex 0x22) coming from + 192.168.42.13 port 12344 with destination 192.168.42.33 port 12344 into + VF id 1, and call this “rule 38” + NOTE: If the VF id given is larger than the number of active VFs (e.g. + if you set num_vfs to 8 and use VF id 12 in the ethtool command) the + traffic will be redirected to the PF rather than to the VF. + +To see the list of filters currently present: + ethtool <-u|-n> ethX + NOTE: For cloud filters in which the specified VF is greater than + the number of VFs supported, the cloud filter will send traffic + to the PF. However, the driver does not store the specified VF + number, so in this case the ethtool -n command will display + 0xffff for the VF number. + + ================================================================================ @@ -438,7 +646,7 @@ NAPI ---- NAPI (Rx polling mode) is supported in the i40e driver. For more information on NAPI, see -ftp://robur.slu.se/pub/Linux/net-development/NAPI/usenix-paper.tgz. +https://www.linuxfoundation.org/collaborate/workgroups/networking/napi Flow Control @@ -460,6 +668,26 @@ ethtool -A eth? autoneg off rx on tx on NOTE: You must have a flow control capable link partner. +RSS Hash Flow +------------- + +Allows you to set the hash bytes per flow type and any combination of one or +more options for Receive Side Scaling (RSS) hash byte configuration. + +#ethtool –N rx-flow-hash