summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Rosen2015-06-09 14:59:33 -0400
committerIdo Rosen2015-06-09 14:59:33 -0400
commitae2cb433260acf43f7ca4da40191a0ddba52e4ec (patch)
tree1e268ec8a2854ebb4f891315010ccf6b01ff69ad
downloadaur-ae2cb433260acf43f7ca4da40191a0ddba52e4ec.tar.gz
Initial commit.
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD130
-rw-r--r--openonload-201310-cpp11-space-literal-fix.patch12
-rw-r--r--openonload-201405-extramodules-and-noinitrc.patch50
-rw-r--r--openonload-201405-extramodules-and-noinitrc2.patch12
-rw-r--r--openonload.install23
-rw-r--r--openonload.service19
7 files changed, 278 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..19d352aee0c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = openonload
+ pkgdesc = A high performance network stack from Solarflare.
+ pkgver = 201502.u1
+ pkgrel = 2
+ url = http://www.openonload.org/
+ install = openonload.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = linux-lts
+ makedepends = linux-lts-headers
+ depends = linux-lts
+ options = libtool
+ options = !strip
+ options = !makeflags
+ options = !buildflags
+ options = staticlibs
+ source = http://www.openonload.org/download/openonload-201502-u1.tgz
+ source = openonload.install
+ source = openonload.service
+ source = openonload-201310-cpp11-space-literal-fix.patch
+ source = openonload-201405-extramodules-and-noinitrc.patch
+ source = openonload-201405-extramodules-and-noinitrc2.patch
+ sha512sums = 0b2611d9e7c3987aa7b01cfe173d6b3b1f7335f33da259953d43a8c3b3608362b1114812045fbe5f380f568cfec8be5a6ecd5a98a576230604a19e57d0655400
+ sha512sums = ac464250f2fb96d13e8ae129bac80c03f8cca62e450fdd765f24ccd064e28e9942e4a16ebc693e75c71fc1eb86c3a1b08337b2e39c6c618e129d8ec87d872bdb
+ sha512sums = b7e4529e37c64f99c660ca9b58f388cdd8f0d2f250ba875eb210f4909bb1f1c985a065aae64c048ca6f824adc6e3176c6eae1f582c049631326db73e939edd7b
+ sha512sums = d4fda83764e79cff525f578e14b337937d2a6a3e0fc5f3cc5ec07b739f4bcc46b294fa560db595b0efb14bdf70eab44e833c05278e28d8fb947f9f8b77748a78
+ sha512sums = a206a6890793a4b3d7ac7090ef2a660d80782f9d6995df0e04d563e0653e10c480e7444a11b3cae64c669592375d5fdb21893c961438e0864e478138b37c5dd9
+ sha512sums = 5a2a8984bfc8ba4e75637fab24970764da165dd3cf7253dd32f647a866e4ad0bfd77732f3739066f2479333a466574a55db46142d3ed47a5c5f6e2f6e65c0b39
+
+pkgname = openonload
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9d556fe1992
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,130 @@
+# $Id: c3338e328e8e42fdbd690eaf3b9e2a273a7137d8 $
+# Maintainer: Ido Rosen <ido@kernel.org>
+#
+# NOTE: To request changes to this package, please submit a pull request
+# to the GitHub repository at https://github.com/ido/packages-archlinux
+# Otherwise, open a GitHub issue. Thank you! -Ido
+#
+# From the OpenOnload website, http://www.openonload.org/ :
+# ``OpenOnload(r) is a high performance network stack from Solarflare that
+# dramatically reduces latency and cpu utilisation, and increases message rate
+# and bandwidth. OpenOnload runs on Linux and supports TCP/UDP/IP network
+# protocols with the standard BSD sockets API, and requires no modifications
+# to applications to use. It achieves performance improvements in part by
+# performing network processing at user-level, bypassing the OS kernel
+# entirely on the data path. Networking performance is improved without
+# sacrificing the security and multiplexing functions that the OS kernel
+# normally provides.'' (10/3/2013)
+
+pkgname='openonload'
+pkgdesc="A high performance network stack from Solarflare."
+pkgver='201502.u1'
+if [[ -z "$_kernelver" ]]; then
+ _kernelver="$(uname -r)"
+ #_kernelver="$(cat /lib/modules/extramodules-3.14-lts/version)"
+fi
+pkgrel=2
+arch=('i686' 'x86_64')
+url='http://www.openonload.org/'
+license=('custom')
+depends=("linux-lts")
+makedepends=("linux-lts" "linux-lts-headers")
+options=('libtool' '!strip' '!makeflags' '!buildflags' 'staticlibs')
+source=("http://www.openonload.org/download/openonload-${pkgver//\./-}.tgz"
+ 'openonload.install'
+ 'openonload.service'
+ 'openonload-201310-cpp11-space-literal-fix.patch'
+ 'openonload-201405-extramodules-and-noinitrc.patch'
+ 'openonload-201405-extramodules-and-noinitrc2.patch'
+)
+sha512sums=('0b2611d9e7c3987aa7b01cfe173d6b3b1f7335f33da259953d43a8c3b3608362b1114812045fbe5f380f568cfec8be5a6ecd5a98a576230604a19e57d0655400'
+ 'ac464250f2fb96d13e8ae129bac80c03f8cca62e450fdd765f24ccd064e28e9942e4a16ebc693e75c71fc1eb86c3a1b08337b2e39c6c618e129d8ec87d872bdb'
+ 'b7e4529e37c64f99c660ca9b58f388cdd8f0d2f250ba875eb210f4909bb1f1c985a065aae64c048ca6f824adc6e3176c6eae1f582c049631326db73e939edd7b'
+ 'd4fda83764e79cff525f578e14b337937d2a6a3e0fc5f3cc5ec07b739f4bcc46b294fa560db595b0efb14bdf70eab44e833c05278e28d8fb947f9f8b77748a78'
+ 'a206a6890793a4b3d7ac7090ef2a660d80782f9d6995df0e04d563e0653e10c480e7444a11b3cae64c669592375d5fdb21893c961438e0864e478138b37c5dd9'
+ '5a2a8984bfc8ba4e75637fab24970764da165dd3cf7253dd32f647a866e4ad0bfd77732f3739066f2479333a466574a55db46142d3ed47a5c5f6e2f6e65c0b39')
+
+install="openonload.install"
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver//\./-}"
+
+ patch -p1 < "${srcdir}/openonload-201310-cpp11-space-literal-fix.patch"
+ patch -p1 < "${srcdir}/openonload-201405-extramodules-and-noinitrc.patch"
+ patch -p1 < "${srcdir}/openonload-201405-extramodules-and-noinitrc2.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver//\./-}"
+
+ case $CARCH in
+ "i686")
+ # x86 (32 bit) build
+ ./scripts/onload_build --kernelver "$_kernelver" --user32 ${DEBUG:+--debug}
+ ;;
+ "x86_64")
+ # x64 build
+ ./scripts/onload_build --kernelver "$_kernelver" ${DEBUG:+--debug}
+ ;;
+ *)
+ # unsupported
+ echo "Unsupported architecture."
+ exit 1
+ ;;
+ esac
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver//\./-}"
+
+ # OpenOnload:
+ install -dm755 "${pkgdir}/etc/modprobe.d"
+ install -dm755 "${pkgdir}/etc/depmod.d"
+ i_prefix="${pkgdir}" ./scripts/onload_install --verbose \
+ --kernelver "$_kernelver" \
+ ${DEBUG:+--debug} rpm_install
+ rm -f "${pkgdir}/etc/modprobe.conf" # may be created by onload_install
+ mv "${pkgdir}/usr/lib64/"* "${pkgdir}/usr/lib/"
+ rmdir "${pkgdir}/usr/lib64"
+ mv "${pkgdir}/sbin/"* "${pkgdir}/usr/bin/"
+ rmdir "${pkgdir}/sbin"
+ mv "${pkgdir}/usr/sbin/"* "${pkgdir}/usr/bin/"
+ rmdir "${pkgdir}/usr/sbin"
+
+ install -Dm755 scripts/onload_install \
+ "${pkgdir}/usr/lib/onload/onload_install"
+
+ install -Dm644 "${srcdir}/openonload.service" \
+ "${pkgdir}/usr/lib/systemd/system/openonload.service"
+
+ # ef_vi libraries:
+ install -dm755 "${pkgdir}/usr/lib/"
+ install -m644 build/gnu_${CARCH}/lib/ciul/libciul.so.1.1.1 \
+ "${pkgdir}/usr/lib/"
+ ln -s /usr/lib/libciul.so.1.1.1 ${pkgdir}/usr/lib/libciul.so.1
+ ln -s /usr/lib/libciul.so.1.1.1 ${pkgdir}/usr/lib/libciul.so
+
+ install -m644 build/gnu_${CARCH}/lib/ciul/lib{ciul,efvi}1.a \
+ "${pkgdir}/usr/lib/"
+
+ # Install documentation:
+ install -dm755 "${pkgdir}/usr/share/doc/openonload"
+ install -m644 ChangeLog "${pkgdir}/usr/share/doc/openonload"
+ install -m644 LICENSE "${pkgdir}/usr/share/doc/openonload"
+ install -m644 README "${pkgdir}/usr/share/doc/openonload"
+ install -m644 README.affinity "${pkgdir}/usr/share/doc/openonload"
+ install -m644 README.ef_vi "${pkgdir}/usr/share/doc/openonload"
+ install -m644 ReleaseNotes "${pkgdir}/usr/share/doc/openonload"
+ install -m644 ReleaseNotes-sfc "${pkgdir}/usr/share/doc/openonload"
+
+ # Install ef_vi tests/samples:
+ install -dm755 "${pkgdir}/usr/share/openonload/examples"
+ cp -r "src/tests/." "${pkgdir}/usr/share/openonload/examples/."
+ chmod -R a=rX "${pkgdir}/usr/share/openonload/examples"
+
+ # Install LICENSE file:
+ install -dm755 "${pkgdir}/usr/share/licenses/openonload"
+ ln -s "/usr/share/doc/openonload/LICENSE" \
+ "${pkgdir}/usr/share/licenses/openonload"
+
+}
diff --git a/openonload-201310-cpp11-space-literal-fix.patch b/openonload-201310-cpp11-space-literal-fix.patch
new file mode 100644
index 00000000000..5ddb7daebe5
--- /dev/null
+++ b/openonload-201310-cpp11-space-literal-fix.patch
@@ -0,0 +1,12 @@
+diff -rupN old/src/include/ci/efhw/common.h new/src/include/ci/efhw/common.h
+--- old/src/include/ci/efhw/common.h 2013-10-11 10:28:47.000000000 -0400
++++ new/src/include/ci/efhw/common.h 2013-11-05 10:59:34.023661092 -0500
+@@ -62,7 +62,7 @@ enum efhw_arch {
+ };
+
+ typedef uint32_t efhw_buffer_addr_t;
+-#define EFHW_BUFFER_ADDR_FMT "[ba:%"PRIx32"]"
++#define EFHW_BUFFER_ADDR_FMT "[ba:%" PRIx32 "]"
+
+ /* Below event structure is in NIC bytes order. When using either field for
+ * something other then check against 0xffff one should convert the event
diff --git a/openonload-201405-extramodules-and-noinitrc.patch b/openonload-201405-extramodules-and-noinitrc.patch
new file mode 100644
index 00000000000..d97c6e045d9
--- /dev/null
+++ b/openonload-201405-extramodules-and-noinitrc.patch
@@ -0,0 +1,50 @@
+diff --git a/scripts/onload_install b/scripts/onload_install
+index 3af0917..d33f565 100755
+--- a/scripts/onload_install
++++ b/scripts/onload_install
+@@ -259,7 +259,7 @@ install_userland() {
+ install_x onload_tool "$i_sbin/onload_tool"
+ install_x onload "$i_usrbin/onload"
+ install_x sfcirqaffinity "$i_usrsbin/sfcirqaffinity"
+- install_x onload_misc/onload_init_rc "$i_etc/init.d/openonload"
++# install_x onload_misc/onload_init_rc "$i_etc/init.d/openonload"
+ install_f onload_misc/onload_sysconfig "$i_etc/sysconfig/openonload"
+ install_x onload_tcpdump "$i_usrbin/onload_tcpdump"
+ install_x onload_iptables "$i_usrbin/onload_iptables"
+@@ -325,7 +325,7 @@ install_ldconfig() {
+
+ install_kernel_modules() {
+ # Install kernel drivers.
+- did="$i_prefix/lib/modules/$KVER/extra"
++ did="$i_prefix$(readlink -f /lib/modules/$KVER/extramodules)"
+ try $do cd "$TOP/build"
+ d=$(mmaketool --driverbuild)
+ if ! $test; then
+@@ -487,7 +487,7 @@ check_whether_installed() {
+ fi
+ local drv where
+ for drv in sfc.ko onload.ko sfc_aoe.ko; do
+- for where in updates extra; do
++ for where in extramodules; do
+ check_file_installed "$i_prefix/lib/modules/$KVER/$where/$drv"
+ done
+ done
+@@ -508,7 +508,7 @@ do_rpm_install() {
+
+ do_rpm_post() {
+ # Invoked by the rpm install.
+- install_init_script
++ #install_init_script
+ is_rhel4 && rhel4_modprobe_fixup
+ exit
+ }
+diff --git a/scripts/onload_misc/onload_depmod.conf b/scripts/onload_misc/onload_depmod.conf
+index c2cdeeb..65dae7a 100644
+--- a/scripts/onload_misc/onload_depmod.conf
++++ b/scripts/onload_misc/onload_depmod.conf
+@@ -1,4 +1,4 @@
+ # Ensure that drivers provided by Onload install override any that came
+ # with the kernel.
+ override sfc * weak-updates
+-override sfc * extra
++override sfc * extramodules
diff --git a/openonload-201405-extramodules-and-noinitrc2.patch b/openonload-201405-extramodules-and-noinitrc2.patch
new file mode 100644
index 00000000000..3bfad46da1c
--- /dev/null
+++ b/openonload-201405-extramodules-and-noinitrc2.patch
@@ -0,0 +1,12 @@
+diff -rupN openonload-201405/scripts/onload_install openonload-201405b/scripts/onload_install
+--- openonload-201405/scripts/onload_install 2014-07-24 12:06:05.619914425 -0400
++++ openonload-201405b/scripts/onload_install 2014-07-24 12:05:36.220069022 -0400
+@@ -488,7 +488,7 @@ check_whether_installed() {
+ local drv where
+ for drv in sfc.ko onload.ko sfc_aoe.ko; do
+ for where in extramodules; do
+- check_file_installed "$i_prefix/lib/modules/$KVER/$where/$drv"
++ check_file_installed "$i_prefix$(readlink -f /lib/modules/$KVER/$where)/$drv"
+ done
+ done
+ }
diff --git a/openonload.install b/openonload.install
new file mode 100644
index 00000000000..a2b49350151
--- /dev/null
+++ b/openonload.install
@@ -0,0 +1,23 @@
+## arg 1: the new package version
+post_install() {
+ #/lib/onload/onload_install rpm_post
+ ldconfig -n /usr/lib /usr/lib64
+}
+
+post_upgrade() {
+ #/lib/onload/onload_install rpm_post
+ ldconfig -n /usr/lib /usr/lib64
+ for k in $(cd /lib/modules && /bin/ls); do
+ [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
+ done
+}
+
+## arg 1: the old package version
+post_remove() {
+ ldconfig -n /usr/lib /usr/lib64
+
+ for k in $(cd /lib/modules && /bin/ls | grep '^[0-9]'); do
+ [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
+ done
+
+}
diff --git a/openonload.service b/openonload.service
new file mode 100644
index 00000000000..6de060acdc0
--- /dev/null
+++ b/openonload.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=OpenOnload initialisation
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+PrivateTmp=true
+ExecStart=/sbin/modprobe onload
+ExecStart=/sbin/onload_tool mknod sfc_char
+ExecStart=/sbin/onload_tool mknod onload
+ExecStart=/sbin/onload_tool mknod onload onload_epoll
+ExecStart=/sbin/modprobe sfc_affinity
+ExecStart=/sbin/onload_tool mknod sfc_affinity
+# TODO: Configure sfc_affinity.
+#ExecStart=/usr/sbin/sfcaffinity_config auto
+
+[Install]
+WantedBy=multi-user.target