From 529edb32046735705a3b5126a09d8882cc3135e0 Mon Sep 17 00:00:00 2001 From: Alexandr Nevenchannyy Date: Fri, 22 Jan 2016 15:15:49 +0300 Subject: [PATCH] [Do not merge!] i40e-dkms package This is initial commit for i40e-dkms-1.3.47 package for Rackspace Lab with i710 ethernet cards Change-Id: I842df20b5f0252b148ba1d7dae085cd2bb6c8077 --- debian/README.Debian | 5 + debian/changelog | 6 + debian/compat | 1 + debian/control | 11 + debian/copyright | 31 + debian/dirs | 1 + debian/postinst | 49 + debian/prerm | 28 + debian/rules | 54 + i40e-dkms-1.3.47/Makefile | 28 + i40e-dkms-1.3.47/common.postinst | 295 + i40e-dkms-1.3.47/i40e-1.3.47/COPYING | 344 + i40e-dkms-1.3.47/i40e-1.3.47/README | 934 ++ i40e-dkms-1.3.47/i40e-1.3.47/SUMS | 47 + i40e-dkms-1.3.47/i40e-1.3.47/dkms.conf | 8 + i40e-dkms-1.3.47/i40e-1.3.47/i40e.7 | 58 + i40e-dkms-1.3.47/i40e-1.3.47/i40e.spec | 399 + i40e-dkms-1.3.47/i40e-1.3.47/pci.updates | 73 + .../i40e-1.3.47/scripts/dump_tables | 69 + .../i40e-1.3.47/scripts/set_irq_affinity | 229 + i40e-dkms-1.3.47/i40e-1.3.47/src/Makefile | 281 + i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/Kbuild | 51 + .../i40e-1.3.47/src/i40e/Module.supported | 1 + i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e.h | 941 ++ .../i40e-1.3.47/src/i40e/i40e_adminq.c | 1080 ++ .../i40e-1.3.47/src/i40e/i40e_adminq.h | 160 + .../i40e-1.3.47/src/i40e/i40e_adminq_cmd.h | 2362 ++++ .../i40e-1.3.47/src/i40e/i40e_alloc.h | 58 + .../i40e-1.3.47/src/i40e/i40e_common.c | 5474 +++++++ .../i40e-1.3.47/src/i40e/i40e_configfs.c | 357 + .../i40e-1.3.47/src/i40e/i40e_dcb.c | 1289 ++ .../i40e-1.3.47/src/i40e/i40e_dcb.h | 215 + .../i40e-1.3.47/src/i40e/i40e_dcb_nl.c | 322 + .../i40e-1.3.47/src/i40e/i40e_debugfs.c | 2618 ++++ .../i40e-1.3.47/src/i40e/i40e_devids.h | 51 + .../i40e-1.3.47/src/i40e/i40e_diag.c | 177 + .../i40e-1.3.47/src/i40e/i40e_diag.h | 54 + .../i40e-1.3.47/src/i40e/i40e_ethtool.c | 3635 +++++ .../i40e-1.3.47/src/i40e/i40e_fcoe.c | 1648 +++ .../i40e-1.3.47/src/i40e/i40e_fcoe.h | 127 + .../i40e-1.3.47/src/i40e/i40e_helper.h | 138 + .../i40e-1.3.47/src/i40e/i40e_hmc.c | 365 + .../i40e-1.3.47/src/i40e/i40e_hmc.h | 238 + .../i40e-1.3.47/src/i40e/i40e_lan_hmc.c | 1404 ++ .../i40e-1.3.47/src/i40e/i40e_lan_hmc.h | 193 + .../i40e-1.3.47/src/i40e/i40e_main.c | 11748 ++++++++++++++++ .../i40e-1.3.47/src/i40e/i40e_nvm.c | 1430 ++ .../i40e-1.3.47/src/i40e/i40e_osdep.h | 133 + .../i40e-1.3.47/src/i40e/i40e_prototype.h | 468 + .../i40e-1.3.47/src/i40e/i40e_ptp.c | 761 + .../i40e-1.3.47/src/i40e/i40e_register.h | 3376 +++++ .../i40e-1.3.47/src/i40e/i40e_status.h | 100 + .../i40e-1.3.47/src/i40e/i40e_txrx.c | 3090 ++++ .../i40e-1.3.47/src/i40e/i40e_txrx.h | 397 + .../i40e-1.3.47/src/i40e/i40e_type.h | 1730 +++ .../i40e-1.3.47/src/i40e/i40e_virtchnl.h | 371 + .../i40e-1.3.47/src/i40e/i40e_virtchnl_pf.c | 2512 ++++ .../i40e-1.3.47/src/i40e/i40e_virtchnl_pf.h | 158 + .../i40e-1.3.47/src/i40e/kcompat.c | 2146 +++ .../i40e-1.3.47/src/i40e/kcompat.h | 4634 ++++++ 60 files changed, 58963 insertions(+) create mode 100755 debian/README.Debian create mode 100755 debian/changelog create mode 100755 debian/compat create mode 100755 debian/control create mode 100755 debian/copyright create mode 100755 debian/dirs create mode 100755 debian/postinst create mode 100755 debian/prerm create mode 100755 debian/rules create mode 100644 i40e-dkms-1.3.47/Makefile create mode 100755 i40e-dkms-1.3.47/common.postinst create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/COPYING create mode 100755 i40e-dkms-1.3.47/i40e-1.3.47/README create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/SUMS create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/dkms.conf create mode 100755 i40e-dkms-1.3.47/i40e-1.3.47/i40e.7 create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/i40e.spec create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/pci.updates create mode 100755 i40e-dkms-1.3.47/i40e-1.3.47/scripts/dump_tables create mode 100755 i40e-dkms-1.3.47/i40e-1.3.47/scripts/set_irq_affinity create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/Makefile create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/Kbuild create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/Module.supported create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_adminq.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_adminq.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_adminq_cmd.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_alloc.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_common.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_configfs.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_dcb.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_dcb.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_dcb_nl.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_debugfs.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_devids.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_diag.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_diag.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_ethtool.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_fcoe.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_fcoe.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_helper.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_hmc.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_hmc.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_lan_hmc.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_lan_hmc.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_main.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_nvm.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_osdep.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_prototype.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_ptp.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_register.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_status.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_txrx.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_txrx.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_type.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_virtchnl.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_virtchnl_pf.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/i40e_virtchnl_pf.h create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/kcompat.c create mode 100644 i40e-dkms-1.3.47/i40e-1.3.47/src/i40e/kcompat.h diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100755 index 0000000..833af3d --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,5 @@ +i40e DKMS module for Debian + +This package was automatically generated by the DKMS system, +for distribution on Debian based operating systems. + diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..7541b22 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +i40e-dkms (1.3.47) i40-dkms Divergent package; urgency=low + + * Initial package build for Rackspace Intel Lab + + -- Mirantis Openstack Scale Team Fri, 22 January 2016 15:10:19 +0000 + diff --git a/debian/compat b/debian/compat new file mode 100755 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100755 index 0000000..ffb4473 --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Source: i40e-dkms +Section: misc +Priority: optional +Maintainer: Mirantis Openstack Scale Team +Build-Depends: debhelper (>= 7), dkms +Standards-Version: 3.8.1 + +Package: i40e-dkms +Architecture: all +Depends: dkms (>= 1.95), ${misc:Depends} +Description: i40e driver in DKMS format. diff --git a/debian/copyright b/debian/copyright new file mode 100755 index 0000000..92fcd2d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ + +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: i40e-dkms +Source: http://sourceforge.net/projects/e1000/files/i40e%20stable/1.2.48/ + +Files: * +Copyright: Copyright(c) 2013 - 2015 Intel Corporation. +License: GPL-2+ + +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that 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 package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + diff --git a/debian/dirs b/debian/dirs new file mode 100755 index 0000000..b601f22 --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/src diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..80bb73d --- /dev/null +++ b/debian/postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +set -e + +NAME=i40e +PACKAGE_NAME=$NAME-dkms +DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,') +CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` +ARCH=`dpkg --print-architecture` + +dkms_configure () { + for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do + if [ -f "$POSTINST" ]; then + "$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" + return $? + fi + echo "WARNING: $POSTINST does not exist." >&2 + done + echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 + echo "built with legacy DKMS support." >&2 + echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 + echo "support or upgrade DKMS to a more current version." >&2 + return 1 +} + +case "$1" in + configure) + dkms_configure + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..7254308 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME=i40e +VERSION=1.3.47 + +set -e + +case "$1" in + remove|upgrade|deconfigure) + if [ "`dkms status -m $NAME`" ]; then + dkms remove -m $NAME -v $VERSION --all + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..d2a9f0f --- /dev/null +++ b/debian/rules @@ -0,0 +1,54 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_NAME=i40e +NAME=i40e +VERSION=1.3.47 + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + -$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/$(DEB_NAME)-dkms NAME=$(NAME) VERSION=$(VERSION) install + +binary-arch: build install + +binary-indep: build install + dh_testdir + dh_testroot + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/i40e-dkms-1.3.47/Makefile b/i40e-dkms-1.3.47/Makefile new file mode 100644 index 0000000..57e13d8 --- /dev/null +++ b/i40e-dkms-1.3.47/Makefile @@ -0,0 +1,28 @@ +#/usr/bin/make +SRC = $(DESTDIR)/usr/src +SHARE = $(DESTDIR)/usr/share/$(NAME)-dkms + +all: + +clean: + +install: + +#source tree +ifeq ("$(wildcard $(NAME)-$(VERSION))", "$(NAME)-$(VERSION)") + install -d "$(SRC)" + cp -a $(NAME)-$(VERSION) $(SRC) + chmod 644 -R "$(SRC)/$(NAME)-$(VERSION)" +endif + +#tarball, possibly with binaries +ifeq ("$(wildcard $(NAME)-$(VERSION).dkms.tar.gz)", "$(NAME)-$(VERSION).dkms.tar.gz") + install -d "$(SHARE)" + install -m 644 $(NAME)-$(VERSION).dkms.tar.gz "$(SHARE)" +endif + +#postinst, only if we are supporting legacy mode +ifeq ("$(wildcard common.postinst)", "common.postinst") + install -d "$(SHARE)" + install -m 755 $(PREFIX)/usr/lib/dkms/common.postinst $(SHARE)/postinst +endif diff --git a/i40e-dkms-1.3.47/common.postinst b/i40e-dkms-1.3.47/common.postinst new file mode 100755 index 0000000..d8cf3a7 --- /dev/null +++ b/i40e-dkms-1.3.47/common.postinst @@ -0,0 +1,295 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +set -e + +uname_s=$(uname -s) + +_get_kernel_dir() { + KVER=$1 + case ${uname_s} in + Linux) DIR="/lib/modules/$KVER/build" ;; + GNU/kFreeBSD) DIR="/usr/src/kfreebsd-headers-$KVER/sys" ;; + esac + echo $DIR +} + +_check_kernel_dir() { + DIR=$(_get_kernel_dir $1) + case ${uname_s} in + Linux) test -e $DIR/include ;; + GNU/kFreeBSD) test -e $DIR/kern && test -e $DIR/conf/kmod.mk ;; + *) return 1 ;; + esac + return $? +} + +# Check the existence of a kernel named as $1 +_is_kernel_name_correct() { + CORRECT="no" + KERNEL_NAME=$1 + + for kernel in /boot/config-*; do + KERNEL=${kernel#*-} + if [ "${KERNEL}" = "${KERNEL_NAME}" ]; then + CORRECT="yes" + break + fi + done + + echo $CORRECT +} + + +# Get the most recent kernel on Debian based systems. This keeps +# into account both the version and the ABI. If the current kernel +# is the most recent kernel then the function will print a null string. +_get_newest_kernel_debian() { + NEWEST_KERNEL= + NEWEST_VERSION= + NEWEST_ABI= + + for kernel in /boot/config-*; do + KERNEL=${kernel#*-} + KERNEL_VERSION=${KERNEL%%-*} + ABI=${KERNEL#*-} + ABI=${ABI%%-*} + + if [ -z "$NEWEST_KERNEL" ]; then + # The 1st time get a version which is bigger than $1 + COMPARE_TO=$1 + else + # Get the biggest version + COMPARE_TO="$NEWEST_VERSION-$NEWEST_ABI" + fi + + # if $kernel is greater than $COMPARE_TO + if [ `dpkg --compare-versions "$KERNEL_VERSION-$ABI" gt "$COMPARE_TO" && echo "yes" || \ + echo "no"` = "yes" ]; then + NEWEST_KERNEL=$KERNEL + NEWEST_VERSION=$KERNEL_VERSION + NEWEST_ABI=$ABI + fi + done + + echo "$NEWEST_KERNEL" +} + +# Get the most recent kernel in Rhel based systems. If the current kernel +# is the most recent kernel then the function will print a null string. +_get_newest_kernel_rhel() { + NEWEST_KERNEL= + + LAST_INSTALLED_KERNEL=$(rpm -q --whatprovides kernel --last | grep kernel -m1 | cut -f1 -d' ') + + LIK_FORMATTED_NAME=$(rpm -q $LAST_INSTALLED_KERNEL --queryformat="%{VERSION}-%{RELEASE}.%{ARCH}\n") + + if [ `echo $LIK_FORMATTED_NAME | grep 2.6 >/dev/null` ]; then + # Fedora and Suse + NEWEST_KERNEL=$LIK_FORMATTED_NAME + else + # Hack for Mandriva where $LIK_FORMATTED_NAME is broken + LIK_NAME=$(rpm -q $LAST_INSTALLED_KERNEL --queryformat="%{NAME}\n") + LIK_TYPE=${LIK_NAME#kernel-} + LIK_TYPE=${LIK_TYPE%%-*} + LIK_STRIPPED=${LIK_NAME#kernel-} + LIK_STRIPPED=${LIK_STRIPPED#$LIK_TYPE-} + LIK_STRIPPED_BASE=${LIK_STRIPPED%%-*} + LIK_STRIPPED_END=${LIK_STRIPPED#$LIK_STRIPPED_BASE-} + LIK_FINAL=$LIK_STRIPPED_BASE-$LIK_TYPE-$LIK_STRIPPED_END + + NEWEST_KERNEL=$LIK_FINAL + fi + + echo $NEWEST_KERNEL +} + +# Get the newest kernel on Debian and Rhel based systems. +get_newest_kernel() { + NEWEST_KERNEL= + # Try Debian first as rpm can be installed in Debian based distros + if [ -e /usr/bin/dpkg ]; then + # If DEB based + CURRENT_KERNEL=$1 + CURRENT_VERSION=${CURRENT_KERNEL%%-*} + CURRENT_ABI=${CURRENT_KERNEL#*-} + CURRENT_FLAVOUR=${CURRENT_ABI#*-} + CURRENT_ABI=${CURRENT_ABI%%-*} + NEWEST_KERNEL=$(_get_newest_kernel_debian "$CURRENT_VERSION-$CURRENT_ABI") + + elif [ `which rpm >/dev/null` ]; then + # If RPM based + NEWEST_KERNEL=$(_get_newest_kernel_rhel) + fi + + # Make sure that kernel name that we extracted corresponds to an installed + # kernel + if [ -n "$NEWEST_KERNEL" ] && [ `_is_kernel_name_correct $NEWEST_KERNEL` = "no" ]; then + NEWEST_KERNEL= + fi + + echo $NEWEST_KERNEL +} + +NAME=$1 +VERSION=$2 +TARBALL_ROOT=$3 +ARCH=$4 +UPGRADE=$5 + +if [ -z "$NAME" ] || [ -z "$VERSION" ]; then + echo "Need NAME, and VERSION defined" + echo "ARCH is optional" + exit 1 +fi + +KERNELS=$(ls /lib/modules/) +CURRENT_KERNEL=$(uname -r) + +#We never want to keep an older version side by side to prevent conflicts +if [ -e "/var/lib/dkms/$NAME/$VERSION" ]; then + echo "Removing old $NAME-$VERSION DKMS files..." + dkms remove -m $NAME -v $VERSION --all +fi + +#Load new files, by source package and by tarball +if [ -f "$TARBALL_ROOT/$NAME-$VERSION.dkms.tar.gz" ]; then + if ! dkms ldtarball --archive "$TARBALL_ROOT/$NAME-$VERSION.dkms.tar.gz"; then + echo "" + echo "" + echo "Unable to load DKMS tarball $TARBALL_ROOT/$NAME-$VERSION.dkms.tar.gz." + echo "Common causes include: " + echo " - You must be using DKMS 2.1.0.0 or later to support binaries only" + echo " distribution specific archives." + echo " - Corrupt distribution specific archive" + echo "" + echo "" + exit 2 + fi +elif [ -d "/usr/src/$NAME-$VERSION" ]; then + echo "Loading new $NAME-$VERSION DKMS files..." + dkms add -m $NAME -v $VERSION > /dev/null +fi + +# On 1st installation, let us look for a directory +# in /lib/modules which matches `uname -r`. If none +# is found it is possible that buildd is being used +# and that uname -r is giving us the name of the +# kernel used by the buildd machine. +# +# If this is the case we try to build the kernel +# module for each kernel which has a directory in +# /lib/modules. Furthermore we will have to tell +# DKMS which architecture it should build the module +# for (e.g. if the buildd machine is using a +# 2.6.24-23-xen 64bit kernel). +# +# NOTE: if the headers are not installed then the +# module won't be built, as usual +if [ -z "$UPGRADE" ]; then + echo "First Installation: checking all kernels..." + for KERNEL in $KERNELS; do + if [ ${KERNEL} = ${CURRENT_KERNEL} ]; then + # Kernel found + KERNELS=$CURRENT_KERNEL + break + fi + done +else + KERNELS=$CURRENT_KERNEL +fi + +# Here we look for the most recent kernel so that we can +# build the module for it (in addition to doing it for the +# current kernel. +NEWEST_KERNEL=$(get_newest_kernel "$KERNELS") + +# If the current kernel doesn't come from the host of a chroot +if [ `_is_kernel_name_correct $CURRENT_KERNEL` = "yes" ]; then + # See if it's worth building the module for both the newest kernel + # and for the current kernel + if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then + echo "Building for $CURRENT_KERNEL and $NEWEST_KERNEL" + KERNELS="$CURRENT_KERNEL $NEWEST_KERNEL" + else + echo "Building only for $CURRENT_KERNEL" + fi +# The current kernel is not useful as it's the host's +else + echo "It is likely that $CURRENT_KERNEL belongs to a chroot's host" + + # Let's use only the newest kernel + if [ -n "$NEWEST_KERNEL" ]; then + KERNELS="$NEWEST_KERNEL" + echo "Building only for $NEWEST_KERNEL" + fi +fi + +if [ -n "$ARCH" ]; then + if which lsb_release >/dev/null && [ $(lsb_release -s -i) = "Ubuntu" ]; then + case $ARCH in + amd64) + ARCH="x86_64" + ;; + lpia|i?86) + ARCH="i686" + ;; + esac + fi + echo "Building for architecture $ARCH" + ARCH="-a $ARCH" +fi + +for KERNEL in $KERNELS; do + dkms_status=`dkms status -m $NAME -v $VERSION -k $KERNEL $ARCH` + if [ `echo $KERNEL | grep -c "BOOT"` -gt 0 ]; then + echo "" + echo "Module build and install for $KERNEL was skipped as " + echo "it is a BOOT variant" + continue + fi + + + #if the module isn't yet built, try to build it + if [ `echo $dkms_status | grep -c ": built"` -eq 0 ]; then + if [ ! -L /var/lib/dkms/$NAME/$VERSION/source ]; then + echo "This package appears to be a binaries-only package" + echo " you will not be able to build against kernel $KERNEL" + echo " since the package source was not provided" + continue + fi + if _check_kernel_dir $KERNEL; then + echo "Building initial module for $KERNEL" + set +e + dkms build -m $NAME -v $VERSION -k $KERNEL $ARCH > /dev/null + case $? in + 9) + set -e + echo "Skipped." + continue + ;; + 0) + set -e + echo "Done." + ;; + *) + exit $? + ;; + esac + dkms_status=`dkms status -m $NAME -v $VERSION -k $KERNEL $ARCH` + else + echo "Module build for the currently running kernel was skipped since the" + echo "kernel source for this kernel does not seem to be installed." + fi + fi + + #if the module is built (either pre-built or just now), install it + if [ `echo $dkms_status | grep -c ": built"` -eq 1 ] && + [ `echo $dkms_status | grep -c ": installed"` -eq 0 ]; then + dkms install -m $NAME -v $VERSION -k $KERNEL $ARCH + fi +done + diff --git a/i40e-dkms-1.3.47/i40e-1.3.47/COPYING b/i40e-dkms-1.3.47/i40e-1.3.47/COPYING new file mode 100644 index 0000000..e2fed1b --- /dev/null +++ b/i40e-dkms-1.3.47/i40e-1.3.47/COPYING @@ -0,0 +1,344 @@ + +"This software program is licensed subject to the GNU General Public License +(GPL). Version 2, June 1991, available at +" + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/i40e-dkms-1.3.47/i40e-1.3.47/README b/i40e-dkms-1.3.47/i40e-1.3.47/README new file mode 100755 index 0000000..9e82a61 --- /dev/null +++ b/i40e-dkms-1.3.47/i40e-1.3.47/README @@ -0,0 +1,934 @@ + +i40e Linux* Base Driver for the Intel(R) XL710 Ethernet Controller Family +=============================================================================== + +=============================================================================== + +September 25, 2015 + +=============================================================================== + +Contents +-------- + +- Overview +- Identifying Your Adapter +- Building and Installation +- Command Line Parameters +- Intel(R) i40e Ethernet Flow Director +- Additional Features & Configurations +- Known Issues + + +================================================================================ + + +Important Notes +--------------- + +Configuring SR-IOV for improved network security +------------------------------------------------ + +In a virtualized environment, on Intel(R) Server Adapters that support SR-IOV, +the virtual function (VF) may be subject to malicious behavior. Software- +generated layer two frames, like IEEE 802.3x (link flow control), IEEE 802.1Qbb +(priority based flow-control), and others of this type, are not expected and +can throttle traffic between the host and the virtual switch, reducing +performance. To resolve this issue, configure all SR-IOV enabled ports for +VLAN tagging. This configuration allows unexpected, and potentially malicious, +frames to be dropped. + + + +Overview +-------- + +This document describes the i40e Linux* Base Driver for the XL710 Ethernet Controller Family of Adapters. + +The Linux* base driver supports the following kernel versions: +2.6.32 and newer + +It includes support for Linux supported x86_64 systems. + +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 +the drivers. + +For questions related to hardware requirements, refer to the documentation +supplied with your Intel adapter. All hardware requirements listed apply to +use with Linux. + +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. + +For information on how to identify your adapter, go to the Adapter & +Driver ID Guide at: +http://support.intel.com/support/go/network/adapter/proidguide.htm + +For the best performance, make sure the latest NVM/FW is installed on your device + and that you are using the newest drivers. + +For the latest NVM/FW images and Intel network drivers, refer to the +following website and select your adapter. +http://www.intel.com/support + + +SFP+ Devices with Pluggable Optics +---------------------------------- + +SR Modules +---------- + Intel DUAL RATE 1G/10G SFP+ SR (bailed) E10GSFPSR + +LR Modules +---------- + Intel DUAL RATE 1G/10G SFP+ LR (bailed E10GSFPLR + +1G SFP Modules +-------------- +The following is a list of 3rd party SFP modules that have received some +testing. Not all modules are applicable to all devices. + +Supplier Type Part Numbers +Finisar 1000BASE-T SFP FCLF-8251-3 +Kinnex A 1000BASE-T SFP XSFP-T-RJ12-0101-DLL +Avago 1000BASE-T SFP ABCU-5710RZ + +QSFP+ Modules +------------- + Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR + QSFP+ 1G speed is not supported on XL710 based devices. + +X710/XL710 Based SFP+ adapters support passive QSFP+ Direct Attach cables. +Intel recommends using Intel optics and cables. Other modules may function +but are not validated by Intel. Contact Intel for supported media types. + + +================================================================================ + + +Building and Installation +------------------------- + +To build a binary RPM* package of this driver, run 'rpmbuild -tb +i40e-.tar.gz', where is the version number for the driver tar file. + +NOTES: + +- For the build to work properly, the currently running kernel MUST match + the version and configuration of the installed kernel sources. If you have + just recompiled the kernel reboot the system before building. +- RPM functionality has only been tested in Red Hat distributions. + +1. Move the base driver tar file to the directory of your choice. For + example, use '/home/username/i40e' or '/usr/local/src/i40e'. + +2. Untar/unzip the archive, where is the version number for the + driver tar file: + tar zxf i40e-.tar.gz + +3. Change to the driver src directory, where is the version number + for the driver tar: + cd i40e-/src/ + +4. Compile the driver module: + # make install + The binary will be installed as: + /lib/modules//kernel/drivers/net/i40e/i40e.[k]o + + The install location listed above is the default location. This may differ + for various Linux distributions. + +5. Load the module using the modprobe command: + modprobe [parameter=port1_value,port2_value] + + Make sure that any older i40e drivers are removed from the kernel before + loading the new module: + rmmod i40e; modprobe i40e + +6. Assign an IP address to the interface by entering the following, + where ethX is the interface name that was shown in dmesg after modprobe: + + ip address add / dev ethX + +7. Verify that the interface works. Enter the following, where IP_address + is the IP address for another machine on the same subnet as the interface + that is being tested: + ping + +NOTE: + For certain distributions like (but not limited to) RedHat Enterprise + Linux 7 and Ubuntu, once the driver is installed the initrd/initramfs + file may need to be updated to prevent the OS loading old versions + of the i40e driver. The dracut utility may be used on RedHat + distributions: + # dracut --force + For Ubuntu: + # update-initramfs -u + + +================================================================================ + + +Command Line Parameters +----------------------- +In general, ethtool and other OS specific commands are used to configure user +changeable parameters after the driver is loaded. The i40e driver only supports +the max_vfs kernel parameter on older kernels that do not have the standard +sysfs interface. The only other module parameter supported is the debug +parameter that can control the default logging verbosity of the driver. + +If the driver is built as a module, the following optional parameters are used +by entering them on the command line with the modprobe command using this +syntax: +modprobe i40e [