Instantly share code, notes, and snippets.

Embed
What would you like to do?
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
ssh ubuntu@n.n.n.n "bash -s -x" -- <ixgbevf-upgrade.sh
# https://gist.github.com/CBarraford/8850424
mkdir work
cd work
wget http://sourceforge.net/projects/e1000/files/ixgbevf%20stable/2.16.1/ixgbevf-2.16.1.tar.gz
tar zxf ixgbevf-2.16.1.tar.gz
# https://gist.github.com/defila-aws/44946d3a3c0874fe3d17
curl -L -O https://gist.github.com/defila-aws/44946d3a3c0874fe3d17/raw/af64c3c589811a0d214059d1e4fd220a96eaebb3/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
cd ixgbevf-2.16.1/src
patch -p5 <../../patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
sudo su
aptitude install -y build-essential
make install
modprobe ixgbevf
update-initramfs -c -k all
echo "options ixgbevf InterruptThrottleRate=1,1,1,1,1,1,1,1" > /etc/modprobe.d/ixgbevf.conf
cd ../../..
rm -Rf work
reboot
@moogoos

This comment has been minimized.

moogoos commented Apr 29, 2015

patching file kcompat.h
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 4172 with fuzz 1.

14.04.2. LTS

@ColmHally

This comment has been minimized.

ColmHally commented May 20, 2015

@moogooos I ran into the same problem.. Add a newline to the end of the patch file and run the path -p5 ... line again.

@vdm Thanks for this patch; it works a treat!

@defila-aws

This comment has been minimized.

defila-aws commented Jun 5, 2015

Hello,

I went ahead and updated the patch file so that it includes the newline at the end. Hopefully this resolves the error that you were running into.

The new raw file is:
https://gist.githubusercontent.com/defila-aws/44946d3a3c0874fe3d17/raw/18e8d8eb53364ab3dea9028c0aa06a3c05dea7b6/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch

-Andrew D.

@doapp-ryanp

This comment has been minimized.

doapp-ryanp commented Jul 7, 2015

Thanks for this. I prefer to leverage dkms to auto handle rebuilds on kernel updates. Here are the steps I did. Here are some docs from AWS that explain a bit in detail.

wget http://sourceforge.net/projects/e1000/files/ixgbevf%20stable/2.16.1/ixgbevf-2.16.1.tar.gz
tar zxf ixgbevf-2.16.1.tar
mv ixgbevf-2.16.1 /usr/src/
cd /usr/src/ixgbevf-2.16.1
nano dkms.conf #change version - @see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced-networking-ubuntu
curl -L -O https://gist.githubusercontent.com/defila-aws/44946d3a3c0874fe3d17/raw/18e8d8eb53364ab3dea9028c0aa06a3c05dea7b6/patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
cd src
patch -p5 < ../patch-ubuntu_14.04.1-ixgbevf-2.16.1-kcompat.h.patch
dkms add -m ixgbevf -v 2.16.1
dkms build -m ixgbevf -v 2.16.1
dkms install -m ixgbevf -v 2.16.1
update-initramfs -c -k all
#stop instance, enable: aws ec2 modify-instance-attribute --instance-id i-xxx --sriov-net-support simple
#create ami then startup instance, verify via:
#aws ec2 describe-image-attribute --image-id ami-xxx --attribute sriovNetSupport
#verify from inside instance via: 
ethtool -i eth0 | grep ixgbevf
#DONE
@montaro

This comment has been minimized.

montaro commented Aug 6, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment