rdma-core infrastructure
Subsystems (2)
cover rdma-core infrastructure
This is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split.
Jarod Wilson (4):
rpm spec: install documentation too glue/redhat: add udev/systemd/etc infrastructure bits glue/redhat: copy stock spec for RH customization glue/redhat/spec: build split rpm packages
glue/redhat/ibacm.service | 12 + glue/redhat/iwpmd.service | 12 + glue/redhat/rdma-core.spec | 534 +++++++++++++++++++++++++++++++ glue/redhat/rdma.conf | 25 ++ glue/redhat/rdma.cxgb3.sys.modprobe | 1 + glue/redhat/rdma.cxgb4.sys.modprobe | 1 + glue/redhat/rdma.fixup-mtrr.awk | 160 +++++++++ glue/redhat/rdma.ifdown-ib | 183 +++++++++++ glue/redhat/rdma.ifup-ib | 308 ++++++++++++++++++ glue/redhat/rdma.kernel-init | 262 +++++++++++++++ glue/redhat/rdma.mlx4-setup.sh | 91 ++++++ glue/redhat/rdma.mlx4.conf | 27 ++ glue/redhat/rdma.mlx4.sys.modprobe | 5 + glue/redhat/rdma.mlx4.user.modprobe | 21 ++ glue/redhat/rdma.modules-setup.sh | 30 ++ glue/redhat/rdma.service | 15 + glue/redhat/rdma.sriov-init | 137 ++++++++ glue/redhat/rdma.sriov-vfs | 41 +++ glue/redhat/rdma.udev-ipoib-naming.rules | 13 + glue/redhat/rdma.udev-rules | 18 ++ glue/redhat/srp_daemon.service | 17 + rdma-core.spec | 4 + 22 files changed, 1917 insertions(+) create mode 100644 glue/redhat/ibacm.service create mode 100644 glue/redhat/iwpmd.service create mode 100644 glue/redhat/rdma-core.spec create mode 100644 glue/redhat/rdma.conf create mode 100644 glue/redhat/rdma.cxgb3.sys.modprobe create mode 100644 glue/redhat/rdma.cxgb4.sys.modprobe create mode 100644 glue/redhat/rdma.fixup-mtrr.awk create mode 100644 glue/redhat/rdma.ifdown-ib create mode 100644 glue/redhat/rdma.ifup-ib create mode 100644 glue/redhat/rdma.kernel-init create mode 100644 glue/redhat/rdma.mlx4-setup.sh create mode 100644 glue/redhat/rdma.mlx4.conf create mode 100644 glue/redhat/rdma.mlx4.sys.modprobe create mode 100644 glue/redhat/rdma.mlx4.user.modprobe create mode 100644 glue/redhat/rdma.modules-setup.sh create mode 100644 glue/redhat/rdma.service create mode 100644 glue/redhat/rdma.sriov-init create mode 100644 glue/redhat/rdma.sriov-vfs create mode 100644 glue/redhat/rdma.udev-ipoib-naming.rules create mode 100644 glue/redhat/rdma.udev-rules create mode 100644 glue/redhat/srp_daemon.service
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014192136.11731-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
PATCH 1/4 rpm spec: install documentation too
At least in the Red Hat world, we like to install the documentation files provided in a given source tree.
--- rdma-core.spec | 4 ++++ 1 file changed, 4 insertions(+)
rdma-core.spec +4 -0
@@ -91,6 +91,9 @@ This is a simple example without the split sub packages to get things started. %install %cmake_install +mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version} +install -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ + %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/ %else
@@ -110,6 +113,7 @@ rm -rf %{buildroot}/%{my_unitdir}/ %{_libdir}/rsocket/* %{_sbindir}/* %{_libexecdir}/* +%{_docdir}/%{name}-%{version}/* %if 0%{?_unitdir:1} %{_unitdir}/* %else
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014192136.11731-2-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core 1/4] rpm spec: install documentation too
Quoted 2 lines · Jarod Wilson
At least in the Red Hat world, we like to install the documentation files provided in a given source tree.
I think other distros would like to do this too, can you use this patch instead?
Quoted 1 line
From
a23838ccc05574b1975741770abcbd66f7587293Mon Sep 17 00:00:00 2001
From: Jarod Wilson <[email protected]>
Date: Fri, 14 Oct 2016 15:21:33 -0400
Subject: [PATCH] Install end user focused documentation files
We recommend that all distros ship these.
--- CMakeLists.txt | 3 ++- Documentation/CMakeLists.txt | 8 ++++++++ debian/ibacm.install | 1 + debian/ibverbs-providers.install | 1 + debian/libibcm1.install | 1 + debian/libibverbs1.install | 1 + debian/librdmacm1.install | 1 + debian/srptools.install | 1 + rdma-core.spec | 4 +++- 9 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Documentation/CMakeLists.txt
CMakeLists.txt +2 -1
@@ -21,7 +21,7 @@ # Use the historical search path for providers, in the standard system library. cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) -project(RDMA C) +project(rdma-core C) # CMake likes to use -rdynamic too much, they fixed it in 3.4. if(POLICY CMP0065)
@@ -321,6 +321,7 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT # Sub-directories add_subdirectory(ccan) add_subdirectory(util) +add_subdirectory(Documentation) # Libraries add_subdirectory(libibumad) add_subdirectory(libibumad/man)
Documentation/CMakeLists.txt new file +8 -0
@@ -0,0 +1,8 @@ +install(FILES + ibacm.md + ibsrpdm.md + libibcm.md + libibverbs.md + librdmacm.md + rxe.md + DESTINATION "${CMAKE_INSTALL_DOCDIR}")
debian/ibacm.install +1 -0
@@ -8,3 +8,4 @@ usr/share/man/man1/ib_acme.1 usr/share/man/man1/ibacm.1 usr/share/man/man7/ibacm.7 usr/share/man/man7/ibacm_prov.7 +usr/share/doc/rdma-core/ibacm.md usr/share/doc/ibacm/
debian/ibverbs-providers.install +1 -0
@@ -5,3 +5,4 @@ usr/lib/truescale-serdes.cmds usr/share/man/man8/rxe_cfg.8 usr/share/man/man7/rxe.7 usr/bin/rxe_cfg +usr/share/doc/rdma-core/rxe.md usr/share/doc/ibverbs-providers/
debian/libibcm1.install +1 -0
@@ -1 +1,2 @@ usr/lib/*/libibcm*.so.* +usr/share/doc/rdma-core/libibcm.md usr/share/doc/libibcm1/
debian/libibverbs1.install +1 -0
@@ -1 +1,2 @@ usr/lib/*/libibverbs*.so.* +usr/share/doc/rdma-core/libibverbs.md usr/share/doc/libibverbs1/
debian/librdmacm1.install +1 -0
@@ -1,2 +1,3 @@ usr/lib/*/librdmacm*.so.* usr/lib/*/rsocket/librspreload*.so* +usr/share/doc/rdma-core/librdmacm.md usr/share/doc/librdmacm1/
debian/srptools.install +1 -0
@@ -6,3 +6,4 @@ usr/sbin/ibsrpdm usr/sbin/srp_daemon usr/share/man/man1/ibsrpdm.1 usr/share/man/man1/srp_daemon.1 +usr/share/doc/rdma-core/ibsrpdm.md usr/share/doc/srptools/
rdma-core.spec +3 -1
@@ -85,7 +85,8 @@ This is a simple example without the split sub packages to get things started. -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ - -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} + -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} %make_jobs %install
@@ -110,6 +111,7 @@ rm -rf %{buildroot}/%{my_unitdir}/ %{_libdir}/rsocket/* %{_sbindir}/* %{_libexecdir}/* +%{_docdir}/%{name}-%{version}/* %if 0%{?_unitdir:1} %{_unitdir}/* %else
Signature · 8 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014225204.GB16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 1/4] rpm spec: install documentation too
Quoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Jarod Wilson
At least in the Red Hat world, we like to install the documentation files provided in a given source tree.
I think other distros would like to do this too, can you use this patch instead?
Ah. Yeah. My cmake-fu is ... lacking. That does look like a better way to go. I'll pull this into my working tree and play with it.
Quoted 21 lines
From
a23838ccc05574b1975741770abcbd66f7587293Mon Sep 17 00:00:00 2001
From: Jarod Wilson <[email protected]>
Date: Fri, 14 Oct 2016 15:21:33 -0400
Subject: [PATCH] Install end user focused documentation filesWe recommend that all distros ship these.
Suggested-by Jarod Wilson <[email protected]>--- CMakeLists.txt | 3 ++- Documentation/CMakeLists.txt | 8 ++++++++ debian/ibacm.install | 1 + debian/ibverbs-providers.install | 1 + debian/libibcm1.install | 1 + debian/libibverbs1.install | 1 + debian/librdmacm1.install | 1 + debian/srptools.install | 1 + rdma-core.spec | 4 +++- 9 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Documentation/CMakeLists.txt
...
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/4 glue/redhat: add udev/systemd/etc infrastructure bits
In reply to a message not in the archiveRed Hat has been shipping an "rdma" package, as well as it's own systemd unit files for some daemons for a while now, in both Fedora and Red Hat Enterprise Linux. Some of these are fairly RH-specific, but might be of use to others, so we'd like to move them into the upstream source tree.
Most of these were authored by Doug Ledford, though I'm currently the one that maintains (most of) them in RHEL.
--- glue/redhat/ibacm.service | 12 ++ glue/redhat/iwpmd.service | 12 ++ glue/redhat/rdma.conf | 25 +++ glue/redhat/rdma.cxgb3.sys.modprobe | 1 + glue/redhat/rdma.cxgb4.sys.modprobe | 1 + glue/redhat/rdma.fixup-mtrr.awk | 160 ++++++++++++++++ glue/redhat/rdma.ifdown-ib | 183 ++++++++++++++++++ glue/redhat/rdma.ifup-ib | 308 +++++++++++++++++++++++++++++++ glue/redhat/rdma.kernel-init | 262 ++++++++++++++++++++++++++ glue/redhat/rdma.mlx4-setup.sh | 91 +++++++++ glue/redhat/rdma.mlx4.conf | 27 +++ glue/redhat/rdma.mlx4.sys.modprobe | 5 + glue/redhat/rdma.mlx4.user.modprobe | 21 +++ glue/redhat/rdma.modules-setup.sh | 30 +++ glue/redhat/rdma.service | 15 ++ glue/redhat/rdma.sriov-init | 137 ++++++++++++++ glue/redhat/rdma.sriov-vfs | 41 ++++ glue/redhat/rdma.udev-ipoib-naming.rules | 13 ++ glue/redhat/rdma.udev-rules | 18 ++ glue/redhat/srp_daemon.service | 17 ++ 20 files changed, 1379 insertions(+) create mode 100644 glue/redhat/ibacm.service create mode 100644 glue/redhat/iwpmd.service create mode 100644 glue/redhat/rdma.conf create mode 100644 glue/redhat/rdma.cxgb3.sys.modprobe create mode 100644 glue/redhat/rdma.cxgb4.sys.modprobe create mode 100644 glue/redhat/rdma.fixup-mtrr.awk create mode 100644 glue/redhat/rdma.ifdown-ib create mode 100644 glue/redhat/rdma.ifup-ib create mode 100644 glue/redhat/rdma.kernel-init create mode 100644 glue/redhat/rdma.mlx4-setup.sh create mode 100644 glue/redhat/rdma.mlx4.conf create mode 100644 glue/redhat/rdma.mlx4.sys.modprobe create mode 100644 glue/redhat/rdma.mlx4.user.modprobe create mode 100644 glue/redhat/rdma.modules-setup.sh create mode 100644 glue/redhat/rdma.service create mode 100644 glue/redhat/rdma.sriov-init create mode 100644 glue/redhat/rdma.sriov-vfs create mode 100644 glue/redhat/rdma.udev-ipoib-naming.rules create mode 100644 glue/redhat/rdma.udev-rules create mode 100644 glue/redhat/srp_daemon.service
glue/redhat/ibacm.service new file +12 -0
@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the InfiniBand Address Cache Manager daemon +Documentation=man:ibacm +Requires=rdma.service +After=rdma.service opensm.service + +[Service] +Type=forking +ExecStart=/usr/sbin/ibacm + +[Install] +WantedBy=network.target
glue/redhat/iwpmd.service new file +12 -0
@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the IWPMD daemon +Documentation=file:///usr/share/doc/iwpmd/README +After=network.target syslog.target + +[Service] +Type=simple +LimitNOFILE=102400 +ExecStart=/usr/bin/iwpmd + +[Install] +WantedBy=multi-user.target
glue/redhat/rdma.conf new file +25 -0
@@ -0,0 +1,25 @@ +# Load IPoIB +IPOIB_LOAD=yes +# Load SRP (SCSI Remote Protocol initiator support) module +SRP_LOAD=yes +# Load SRPT (SCSI Remote Protocol target support) module +SRPT_LOAD=yes +# Load iSER (iSCSI over RDMA initiator support) module +ISER_LOAD=yes +# Load iSERT (iSCSI over RDMA target support) module +ISERT_LOAD=yes +# Load RDS (Reliable Datagram Service) network protocol +RDS_LOAD=no +# Load NFSoRDMA client transport module +XPRTRDMA_LOAD=yes +# Load NFSoRDMA server transport module +SVCRDMA_LOAD=no +# Load Tech Preview device driver modules +TECH_PREVIEW_LOAD=no +# Should we modify the system mtrr registers? We may need to do this if you +# get messages from the ib_ipath driver saying that it couldn't enable +# write combining for the PIO buffs on the card. +# +# Note: recent kernels should do this for us, but in case they don't, we'll +# leave this option +FIXUP_MTRR_REGS=no
glue/redhat/rdma.cxgb3.sys.modprobe new file +1 -0
@@ -0,0 +1 @@ +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3
glue/redhat/rdma.cxgb4.sys.modprobe new file +1 -0
@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4
glue/redhat/rdma.fixup-mtrr.awk new file +160 -0
160 lines not on this page · raw message
glue/redhat/rdma.ifdown-ib new file +183 -0
183 lines not on this page · raw message
glue/redhat/rdma.ifup-ib new file +308 -0
308 lines not on this page · raw message
glue/redhat/rdma.kernel-init new file +262 -0
262 lines not on this page · raw message
glue/redhat/rdma.mlx4-setup.sh new file +91 -0
91 lines not on this page · raw message
glue/redhat/rdma.mlx4.conf new file +27 -0
@@ -0,0 +1,27 @@ +# Config file for mlx4 hardware port settings +# This file is read when the mlx4_core module is loaded and used to +# set the port types for any hardware found. If a card is not listed +# in this file, then its port types are left alone. +# +# Format: +# <pci_device_of_card> <port1_type> [port2_type] +# +# @port1 and @port2: +# One of auto, ib, or eth. No checking is performed to make sure that +# combinations are valid. Invalid inputs will result in the driver +# not setting the port to the type requested. port1 is required at +# all times, port2 is required for dual port cards. +# +# Example: +# 0000:0b:00.0 eth eth +# +# You can find the right pci device to use for any given card by loading +# the mlx4_core module, then going to /sys/bus/pci/drivers/mlx4_core and +# seeing what possible PCI devices are listed there. The possible values +# for ports are: ib, eth, and auto. However, not all cards support all +# types, so if you get messages from the kernel that your selected port +# type isn't supported, there's nothing this script can do about it. Also, +# some cards don't support using different types on the two ports (aka, +# both ports must be either eth or ib). Again, we can't set what the kernel +# or hardware won't support. +#
glue/redhat/rdma.mlx4.sys.modprobe new file +5 -0
@@ -0,0 +1,5 @@ +# WARNING! - This file is overwritten any time the rdma rpm package is +# updated. Please do not make any changes to this file. Instead, make +# changes to the mlx4.conf file. It's contents are preserved if they +# have been changed from the default values. +install mlx4_core /sbin/modprobe --ignore-install mlx4_core $CMDLINE_OPTS && (if [ -f /usr/libexec/mlx4-setup.sh -a -f /etc/rdma/mlx4.conf ]; then /usr/libexec/mlx4-setup.sh < /etc/rdma/mlx4.conf; fi; /sbin/modprobe mlx4_en; if /sbin/modinfo mlx4_ib > /dev/null 2>&1; then /sbin/modprobe mlx4_ib; fi)
glue/redhat/rdma.mlx4.user.modprobe new file +21 -0
@@ -0,0 +1,21 @@ +# This file is intended for users to select the various module options +# they need for the mlx4 driver. On upgrade of the rdma package, +# any user made changes to this file are preserved. Any changes made +# to the libmlx4.conf file in this directory are overwritten on +# pacakge upgrade. +# +# Some sample options and what they would do +# Enable debugging output, device managed flow control, and disable SRIOV +#options mlx4_core debug_level=1 log_num_mgm_entry_size=-1 probe_vf=0 num_vfs=0 +# +# Enable debugging output and create SRIOV devices, but don't attach any of +# the child devices to the host, only the parent device +#options mlx4_core debug_level=1 probe_vf=0 num_vfs=7 +# +# Enable debugging output, SRIOV, and attach one of the SRIOV child devices +# in addition to the parent device to the host +#options mlx4_core debug_level=1 probe_vf=1 num_vfs=7 +# +# Enable per priority flow control for send and receive, setting both priority +# 1 and 2 as no drop priorities +#options mlx4_en pfctx=3 pfcrx=3
glue/redhat/rdma.modules-setup.sh new file +30 -0
@@ -0,0 +1,30 @@ +#!/bin/bash + +check() { + [ -n "$hostonly" -a -c /sys/class/infiniband_verbs/uverbs0 ] && return 0 + [ -n "$hostonly" ] && return 255 + return 0 +} + +depends() { + return 0 +} + +install() { + inst /etc/rdma/rdma.conf + inst /etc/rdma/mlx4.conf + inst /etc/rdma/sriov-vfs + inst /usr/libexec/rdma-init-kernel + inst /usr/libexec/rdma-fixup-mtrr.awk + inst /usr/libexec/mlx4-setup.sh + inst /usr/libexec/rdma-set-sriov-vf + inst /usr/lib/modprobe.d/libmlx4.conf + inst_multiple lspci setpci awk sleep + inst_multiple -o /etc/modprobe.d/mlx4.conf + inst_rules 98-rdma.rules 70-persistent-ipoib.rules +} + +installkernel() { + hostonly='' instmods =drivers/infiniband =drivers/net/ethernet/mellanox =drivers/net/ethernet/chelsio =drivers/net/ethernet/cisco =drivers/net/ethernet/emulex =drivers/target + hostonly='' instmods crc-t10dif crct10dif_common +}
glue/redhat/rdma.service new file +15 -0
@@ -0,0 +1,15 @@ +[Unit] +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/rdma-init-kernel + +[Install] +WantedBy=sysinit.target
glue/redhat/rdma.sriov-init new file +137 -0
137 lines not on this page · raw message
glue/redhat/rdma.sriov-vfs new file +41 -0
41 lines not on this page · raw message
glue/redhat/rdma.udev-ipoib-naming.rules new file +13 -0
@@ -0,0 +1,13 @@ +# This is a sample udev rules file that demonstrates how to get udev to +# set the name of IPoIB interfaces to whatever you wish. There is a +# 16 character limit on network device names though, so don't go too nuts +# +# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the +# ATTR{address} match must start with ?* and only reference the last 8 +# bytes of the address or else the address might not match on any given +# start of the IPoIB stack +# +# Note: as of rhel7, udev is case sensitive on the address field match +# and all addresses need to be in lower case. +# +# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
glue/redhat/rdma.udev-rules new file +18 -0
@@ -0,0 +1,18 @@ +# We list all the various kernel modules that drive hardware in the +# InfiniBand stack (and a few in the network stack that might not actually +# be RDMA capable, but we don't know that at this time and it's safe to +# enable the IB stack, so do so unilaterally) and on load of any of that +# hardware, we trigger the rdma.service load in systemd + +SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" + +# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'" +
glue/redhat/srp_daemon.service new file +17 -0
@@ -0,0 +1,17 @@ +[Unit] +Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.target + +[Service] +Type=simple +ExecStart=/usr/sbin/srp_daemon.sh + +[Install] +WantedBy=remote-fs-pre.target
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014192136.11731-3-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 4 lines · Jarod Wilson
Red Hat has been shipping an "rdma" package, as well as it's own systemd unit files for some daemons for a while now, in both Fedora and Red Hat Enterprise Linux. Some of these are fairly RH-specific, but might be of use to others, so we'd like to move them into the upstream source tree.
We have a directory called 'debian', so lets just have one called 'redhat'..
The below comments are my view on what we should try and move into common cross-distro locations..
Common stuff should be installed via cmake
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.service
Can we just put this in ibacm/ ?
glue/redhat/ibacm.service
Quoted 2 lines
glue/redhat/ibacm.service new file +2
-0+Requires=rdma.service +After=rdma.service opensm.service
This is the only RH specific thiing I see.. Could we standardize on something here and use it on all distros? rdma-available.target?
glue/redhat/ibacm.service line 3
Quoted 5 lines
+++ b/glue/redhat/iwpmd.service
glue/redhat/ibacm.service new file +3
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the IWPMD daemon +Documentation=file:///usr/share/doc/iwpmd/README
File does not exit? There is a man page now
We already have a iwpmd/iwpmd.service that is almost identical, can you you just update it and drop this version?
glue/redhat/rdma.cxgb4.sys.modprobe line 1
Quoted 9 lines
glue/redhat/ibacm.service new file +2
-0+++ b/glue/redhat/rdma.cxgb3.sys.modprobe@@ -0,0 +1 @@ +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3glue/redhat/rdma.cxgb4.sys.modprobe new file +2
-0+++ b/glue/redhat/rdma.cxgb4.sys.modprobe@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4
What are these for? Should they be cross distro? Why are only a few drivers this special?
glue/redhat/rdma.cxgb4.sys.modprobe line 11
Quoted 13 lines
+++
b/glue/redhat/rdma.fixup-mtrr.awkglue/redhat/rdma.cxgb4.sys.modprobe new file +11
-0@@ -0,0 +1,160 @@ +# This is a simple script that checks the contents of /proc/mtrr to see if +# the BIOS maker for the computer took the easy way out in terms of +# specifying memory regions when there is a hole below 4GB for PCI access +# and the machine has 4GB or more of RAM. When the contents of /proc/mtrr +# show a 4GB mapping of write-back cached RAM, minus punch out hole(s) of +# uncacheable regions (the area reserved for PCI access), then it becomes +# impossible for the ib_ipath driver to set write_combining on its PIO +# buffers. To correct the problem, remap the lower memory region in various +# chunks up to the start of the punch out hole(s), then delete the punch out +# hole(s) entirely as they aren't needed any more. That way, ib_ipath will +# be able to set write_combining on its PIO memory access region.
Yuk, a thousand times yuk.
I thought the mtrr cleanup built into modern kernel took care of this?
Really though, this needs to be fixed upstream in the kernel :|
glue/redhat/rdma.kernel-init
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +1
-0+++ b/glue/redhat/rdma.kernel-init
I wonder if this could be split into a generic 'load the modules' part and a distro specific part? Every distro needs systemd to load the extra modules because out auto-loading is broken - IMHO, and that is pretty complex unfortunately.
glue/redhat/rdma.kernel-init line 189
Quoted 8 lines
glue/redhat/rdma.kernel-init new file +8
-0+errata_58() +{ + # Check AMD chipset issue Errata #58 + if test -x /sbin/lspci && test -x /sbin/setpci; then + if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) && + ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) && + ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then + CURVAL=`/sbin/setpci -d 1022:1100 69`
Another yuk. Why isn't this handled upstream in drivers/pci/quirks.c with the rest of the 8131 errata?
Fortunately I expect all 8131 hardware is long since gone, that chip was end-of-manufacturing'd very quickly 2003ish IIRC.
glue/redhat/rdma.kernel-init line 7
Quoted 9 lines
+++ b/glue/redhat/rdma.service
glue/redhat/rdma.kernel-init new file +7
-0@@ -0,0 +1,15 @@ +[Unit] +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.target
This is an area we really need to cross-distro standardize - we really need a set of rdma-*.targets.
eg
rdma-available.target
- RDMA hardware is available and all prep is done opensm (if installed) is started, etc Use in place of rdma.service
rdma-detected.target
- udev detected rdma hardware
Quoted 5 lines
glue/redhat/rdma.kernel-init new file +4
-0+++ b/glue/redhat/rdma.udev-ipoib-naming.rules@@ -0,0 +1,13 @@ +# This is a sample udev rules file that demonstrates how to get udev to +# set the name of IPoIB interfaces to whatever you wish. There is a +# 16 character limit on network device names though, so don't go too nuts
glue/redhat/rdma.kernel-init line 13
Quoted 10 lines
glue/redhat/rdma.kernel-init new file +10
-0+# +# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the +# ATTR{address} match must start with ?* and only reference the last 8 +# bytes of the address or else the address might not match on any given +# start of the IPoIB stack +# +# Note: as of rhel7, udev is case sensitive on the address field match +# and all addresses need to be in lower case. +# +# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
This should be a cross distro file.
Quoted 4 lines
+++ b/glue/redhat/rdma.udev-rules
glue/redhat/rdma.kernel-init new file +2
-0@@ -0,0 +1,18 @@ +# We list all the various kernel modules that drive hardware in the +# InfiniBand stack (and a few in the network stack that might not actually
glue/redhat/rdma.kernel-init line 12
Quoted 10 lines
glue/redhat/rdma.kernel-init new file +10
-0+# be RDMA capable, but we don't know that at this time and it's safe to +# enable the IB stack, so do so unilaterally) and on load of any of that +# hardware, we trigger the rdma.service load in systemd + +SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
Also cross distro
glue/redhat/rdma.kernel-init line 16
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"
Shouldn't this udev drop-in by in the rdma-ndd package?
glue/redhat/rdma.kernel-init line 10
Quoted 12 lines
glue/redhat/rdma.kernel-init new file +11
-0+++ b/glue/redhat/srp_daemon.service@@ -0,0 +1,17 @@ +[Unit] +Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.target
Also should be common, why does it reference opensm.service?
glue/redhat/rdma.kernel-init line 14
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+ +[Service] +Type=simple +ExecStart=/usr/sbin/srp_daemon.sh
Hurm, someday we have to make better systemd integration for these daemons..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014231934.GC16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 9 lines · Jason Gunthorpe
glue/redhat/ibacm.service
Quoted 4 lines · Jarod Wilson
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Quoted 5 lines
glue/redhat/ibacm.service
Quoted 2 lines
glue/redhat/ibacm.service new file +2
-0+Requires=rdma.service +After=rdma.service opensm.serviceThis is the only RH specific thiing I see.. Could we standardize on something here and use it on all distros? rdma-available.target?
You can't, unless you rename the rdma.service unit file to something else. They are tied in that way.
Quoted 4 lines
Quoted 4 lines
+++ b/glue/redhat/rdma.cxgb3.sys.modprobe
glue/redhat/ibacm.service new file +1
-0@@ -0,0 +1 @@ +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3glue/redhat/rdma.cxgb4.sys.modprobe +0
-0
Quoted 8 lines
glue/redhat/rdma.cxgb4.sys.modprobe line 1
Quoted 5 lines
new file mode 100644
index 0000000..44163ab
+++ b/glue/redhat/rdma.cxgb4.sys.modprobeglue/redhat/rdma.cxgb4.sys.modprobe +1
-0@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4What are these for? Should they be cross distro? Why are only a few drivers this special?
We have one of these for every two (or more) part driver. They aren't special, it's just the multipart drivers that are.
Quoted 16 lines
glue/redhat/rdma.cxgb4.sys.modprobe line 11
Quoted 13 lines
+++
b/glue/redhat/rdma.fixup-mtrr.awkglue/redhat/rdma.cxgb4.sys.modprobe +11
-0@@ -0,0 +1,160 @@ +# This is a simple script that checks the contents of /proc/mtrr to see if +# the BIOS maker for the computer took the easy way out in terms of +# specifying memory regions when there is a hole below 4GB for PCI access +# and the machine has 4GB or more of RAM. When the contents of /proc/mtrr +# show a 4GB mapping of write-back cached RAM, minus punch out hole(s) of +# uncacheable regions (the area reserved for PCI access), then it becomes +# impossible for the ib_ipath driver to set write_combining on its PIO +# buffers. To correct the problem, remap the lower memory region in various +# chunks up to the start of the punch out hole(s), then delete the punch out +# hole(s) entirely as they aren't needed any more. That way, ib_ipath will +# be able to set write_combining on its PIO memory access region.Yuk, a thousand times yuk.
Quoted 3 lines
I thought the mtrr cleanup built into modern kernel took care of this?
Really though, this needs to be fixed upstream in the kernel :|
It is fixed in recent kernels. This is a holdover from rhel5 days where this code made the difference between a 50MBit/s and 850MBit/s qib adapter.
Quoted 9 lines
glue/redhat/rdma.kernel-init
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +1
-0+++ b/glue/redhat/rdma.kernel-initI wonder if this could be split into a generic 'load the modules' part and a distro specific part? Every distro needs systemd to load the extra modules because out auto-loading is broken - IMHO, and that is pretty complex unfortunately.
Yes, this probably could be broken out.
Quoted 12 lines
glue/redhat/rdma.kernel-init line 189
Quoted 8 lines
glue/redhat/rdma.kernel-init new file +8
-0+errata_58() +{ + # Check AMD chipset issue Errata #58 + if test -x /sbin/lspci && test -x /sbin/setpci; then + if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) && + ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) && + ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then + CURVAL=`/sbin/setpci -d 1022:1100 69`Another yuk. Why isn't this handled upstream in
drivers/pci/quirks.cwith the rest of the 8131 errata?
Quoted 2 lines
Fortunately I expect all 8131 hardware is long since gone, that chip was end-of-manufacturing'd very quickly 2003ish IIRC.
See the above about the mtrr registers. Same thing here. Holdover from long ago.
Quoted 13 lines
glue/redhat/rdma.kernel-init line 7
Quoted 9 lines
+++ b/glue/redhat/rdma.service
glue/redhat/rdma.kernel-init new file +7
-0@@ -0,0 +1,15 @@ +[Unit] +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.targetThis is an area we really need to cross-distro standardize - we really need a set of rdma-*.targets.
Quoted 7 lines
eg
rdma-available.target
- RDMA hardware is available and all prep is done opensm (if installed) is started, etc Use in place of rdma.service
rdma-detected.target
- udev detected rdma hardware
It's not that easy, unfortunately. Creating a target is a big deal. A service is not. And targets don't work the way someone would expect in systemd. Putting a Before= tag in a systemd unit file doesn't mean what I would expect (I think I'm probably fairly common in this regard, but I could be wrong). I would have thought it means "Start this unit before starting the target listed in the Before= line", instead it means "Start this unit and make sure it finishes before the target in the Before= line is considered complete". It can be started after the listed target is started, but the listed target won't be considered complete until it is also complete. This caused me lots of heartache when I was creating these files :-/
Fortunately, the targets listed in the unit files are pretty standard (they are part of the systemd upstream), and so I think they can be cross distro just as they are.
Quoted 7 lines
glue/redhat/rdma.kernel-init line 11
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"Shouldn't this udev drop-in by in the rdma-ndd package?
Quoted 14 lines
glue/redhat/rdma.kernel-init line 10
Quoted 12 lines
glue/redhat/rdma.kernel-init new file +11
-0+++ b/glue/redhat/srp_daemon.service@@ -0,0 +1,17 @@ +[Unit] +Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.targetAlso should be common, why does it reference opensm.service?
Because if opensm is running on this host, then it must be up before the configured srp targets are valid any time there is a non-default subnet prefix.
Quoted 7 lines
glue/redhat/rdma.kernel-init line 14
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+ +[Service] +Type=simple +ExecStart=/usr/sbin/srp_daemon.shHurm, someday we have to make better systemd integration for these daemons..
There really isn't any better integration to get with our complex daemons unless we update the daemons themselves to get rid of their shell script starters...
Signature · 2 lines
Doug Ledford <[email protected]> GPG Key ID: 0E572FDD
A message that is not in the archive (sent off-list or not yet received): 1e03ceea-5584-6bbb-6fbe-e11d9d251649-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 8 lines · Doug Ledford
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+Requires=rdma.service +After=rdma.service opensm.serviceThis is the only RH specific thiing I see.. Could we standardize on something here and use it on all distros? rdma-available.target?
You can't, unless you rename the rdma.service unit file to something else. They are tied in that way.
Well, I don't really care about names too much, rdma-whatever.target is fine...
Quoted 9 lines
Quoted 6 lines
glue/redhat/rdma.cxgb4.sys.modprobe line 1
Quoted 3 lines
+++ b/glue/redhat/rdma.cxgb4.sys.modprobe
glue/redhat/rdma.cxgb4.sys.modprobe new file +1
-0@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4What are these for? Should they be cross distro? Why are only a few drivers this special?
We have one of these for every two (or more) part driver. They aren't special, it's just the multipart drivers that are.
So, should we move them into the provider directories? Or patch some kind of request_module into the kernel?
Quoted 6 lines
Quoted 4 lines
I wonder if this could be split into a generic 'load the modules' part and a distro specific part? Every distro needs systemd to load the extra modules because out auto-loading is broken - IMHO, and that is pretty complex unfortunately.
Yes, this probably could be broken out.
So, I think the 'systemd way' would be a rdma-load-modules.service onshot and a rdma-whatever.target
This way a distro can add their other stuff with additional drops ins, eg rdma-bios-fixup.service (after load-modules, before rdma-whatever.target)
Quoted 19 lines
Quoted 11 lines
glue/redhat/rdma.service line 7
Quoted 7 lines
+[Unit]
glue/redhat/rdma.service new file +6
-0+Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.targetThis is an area we really need to cross-distro standardize - we really need a set of rdma-*.targets.
Quoted 7 lines
eg
rdma-available.target
- RDMA hardware is available and all prep is done opensm (if installed) is started, etc Use in place of rdma.service
rdma-detected.target
- udev detected rdma hardware
Quoted 1 line
It's not that easy, unfortunately. Creating a target is a big deal.
Okay, do you mean big deal in the sense we need to get approval from systemd folks or something? We are a big grown up subsystem now, and good systemd integration is very important to a good user experience these days.
I think we are in a better place now, because the target(s) *really* needs to be cross distro and maintained 'upstream' - rdma-core is the natural place to do that.
Quoted 6 lines
I could be wrong). I would have thought it means "Start this unit before starting the target listed in the Before= line", instead it means "Start this unit and make sure it finishes before the target in the Before= line is considered complete". It can be started after the listed target is started, but the listed target won't be considered complete until it is also complete.
I'm not sure I follow the issue?
Your description matches how I understand systemd - a .target will not become ready until all the prerequisits reach a 'ready' state (eg a oneshot script completes). As the target does not become 'ready' until its prerequisites are all 'ready', and dependents never start until the parent is 'ready', this provides a reliable ordering sequence point in the startup.
The order of starting is simply that target prerequisites are started before the target becomes ready.
When systemd enabling anything it is important to keep in mind the distinction between 'started' and 'ready' - and broadly speaking, our daemons do not do this correctly today :/.
So the design goal is to make a target(s) that indicates enough of the RDMA core systems is 'ready' so that we can begin to start things that use rdmacm, etc.
We have problems with our daemons not properly interacting with systemd to indicate 'ready', and that will cause bugs, but the overall idea should be sound.
So this is a sketch of what I am thinking about.
rdma-fix-bios.service:
[Unit]
Type=oneshot
Before=rdma-available.target, rdma-load-modules.service
rdma-load-modules.service:
[Unit]
Type=oneshot
Before=rdma-available.target
iwpmd.service:
[Unit]
After=rdma-load-modules.service Before=rdma-available.target
opensm.service:
[Unit]
After=rdma-load-modules.service Before=rdma-available.target
rdma-available.target:
[Unit]
Description=Target indicating that the RDMA kernel stack is setup for user use.
srp_daemon.service:
[Unit]
After=rdma-available.target
Before=remote-fs-pre.target
'Type=oneshot' will prevent anything past rdma-available.target from starting until the scripts complete.
Internal ordering in the 'before' section has stuff like opensm and iwpmd taken care of, and all 'user' daemons have a clear single .target to depend on that works no matter what the distro or underlying RDMA protocol.
To be clear, I'm proposing something like this as a goal, there will certainly be some needed work on the C daemons to get there:
- iwpmd forks in the wrong place, it needs to fork after it sets up netlink, or stop forking and use sd_notify. (or even better, we should figure out how to use ListenNetlink !!)
- ibacmd needs to use socket activation/sd_notify/fork order to ensure acm is started before rdma cm users start
- srp_daemon needs to respond to dynamic prefix changes and probably use sd_notify/fork order to indicate that it is OK to move on to mounting FS.
Why is this more important now?
1) There are more SM's than opensm, it makes those peoples lives very hard if 'opensm' is hardcoded into all the service files for correctness, hard to swap out opensm with something else. Eg hfi does not use opensm.
2) iwarp is involved in all of this too, and we need to start iwpmd before moving on to other services that might need rdmacm. Ditto for ibacm
3) Things like rxe could use additional 'before' service plugins to enable rxe mode on interfaces.
So, I think this is a subject worth tackling.. (over the long term, let us not block Jarod's stuff)
The goal would be to standardize the .target names and be able to use upstream .service files for many of the things, and allow distros/users/other to reliably 'drop in' additional stuff (eg the bios-fixup) at various well defined sequence points.
Quoted 3 lines
Fortunately, the targets listed in the unit files are pretty standard (they are part of the systemd upstream), and so I think they can be cross distro just as they are.
Sure, the pre-existing targets are, it is stuff like opensm.service that seems off to me.
Quoted 12 lines
Quoted 11 lines
glue/redhat/srp_daemon.service line 10
Quoted 9 lines
glue/redhat/srp_daemon.service new file +9
-0+Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.targetAlso should be common, why does it reference opensm.service?
Quoted 3 lines
Because if opensm is running on this host, then it must be up before the configured srp targets are valid any time there is a non-default subnet prefix.
Well, that kinda sounds like a srp_daemon bug - how does it work race-free with an external SM?
Even with an on-node opensm, how does this work without a race? Is After=opensm.service enough to assert that opensm has completed a sweep and assigned the subnet prefix?
If we can have srp_daemon respond to dynamic changes in the subnet prefix can we drop this from the unit file?
Quoted 10 lines
Quoted 6 lines
glue/redhat/srp_daemon.service line 14
Quoted 3 lines
+[Service]
glue/redhat/srp_daemon.service new file +2
-0+Type=simple +ExecStart=/usr/sbin/srp_daemon.shHurm, someday we have to make better systemd integration for these daemons..
There really isn't any better integration to get with our complex daemons unless we update the daemons themselves to get rid of their shell script starters...
Exactly, update the daemons.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
In reply to a message not in the archiveQuoted 8 lines · Jason Gunthorpe
Quoted 4 lines · Jarod Wilson
Red Hat has been shipping an "rdma" package, as well as it's own systemd unit files for some daemons for a while now, in both Fedora and Red Hat Enterprise Linux. Some of these are fairly RH-specific, but might be of use to others, so we'd like to move them into the upstream source tree.
We have a directory called 'debian', so lets just have one called 'redhat'..
Worksforme. As mentioned in reply to Leon, I really don't care what the directory is called, just that we get this stuff out there, instead of being in our own custom glue package. I do think maybe Leon's suggestion of having a directory to put a bunch of distro-specific directories under would be good for cleanliness, but I also seem to recall that debian actually looks for a directory in the root of the tarball, so it may need to stay like it is.
Quoted 2 lines
The below comments are my view on what we should try and move into common cross-distro locations..
I should have been more clear: some of this is just an initial dump of everything we ship, and there's absolutely a desire to extract anything from this pile that is generic and usable by all distros into a common location. Just pressed for time, and sending it out this way was the fastest way to get it in front of eyeballs. :)
Quoted 8 lines
Common stuff should be installed via cmake
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Probably.
Quoted 5 lines
glue/redhat/ibacm.service
Quoted 2 lines
glue/redhat/ibacm.service new file +2
-0+Requires=rdma.service +After=rdma.service opensm.serviceThis is the only RH specific thiing I see.. Could we standardize on something here and use it on all distros? rdma-available.target?
I'll defer to what Doug said on this one.
Quoted 10 lines
glue/redhat/ibacm.service line 3
Quoted 5 lines
+++ b/glue/redhat/iwpmd.service
glue/redhat/ibacm.service new file +3
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the IWPMD daemon +Documentation=file:///usr/share/doc/iwpmd/READMEFile does not exit? There is a man page now
We already have a iwpmd/iwpmd.service that is almost identical, can you you just update it and drop this version?
Bah, that's a carryover from our individually packaged iwpmd, didn't look closely enough. Can we merge a bit from ours into the 'stock' one? The main relevant difference I see is we have ours set to load after syslog.target as well as network.target.
Quoted 4 lines
Quoted 4 lines
glue/redhat/ibacm.service new file +2
-0+++ b/glue/redhat/rdma.cxgb3.sys.modprobe@@ -0,0 +1 @@ +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3glue/redhat/rdma.cxgb4.sys.modprobe +0
-0
Quoted 8 lines
glue/redhat/rdma.cxgb4.sys.modprobe line 1
Quoted 5 lines
new file mode 100644
index 0000000..44163ab
+++ b/glue/redhat/rdma.cxgb4.sys.modprobeglue/redhat/rdma.cxgb4.sys.modprobe +1
-0@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4What are these for? Should they be cross distro? Why are only a few drivers this special?
What Doug said.
Quoted 16 lines
glue/redhat/rdma.cxgb4.sys.modprobe line 11
Quoted 13 lines
+++
b/glue/redhat/rdma.fixup-mtrr.awkglue/redhat/rdma.cxgb4.sys.modprobe +11
-0@@ -0,0 +1,160 @@ +# This is a simple script that checks the contents of /proc/mtrr to see if +# the BIOS maker for the computer took the easy way out in terms of +# specifying memory regions when there is a hole below 4GB for PCI access +# and the machine has 4GB or more of RAM. When the contents of /proc/mtrr +# show a 4GB mapping of write-back cached RAM, minus punch out hole(s) of +# uncacheable regions (the area reserved for PCI access), then it becomes +# impossible for the ib_ipath driver to set write_combining on its PIO +# buffers. To correct the problem, remap the lower memory region in various +# chunks up to the start of the punch out hole(s), then delete the punch out +# hole(s) entirely as they aren't needed any more. That way, ib_ipath will +# be able to set write_combining on its PIO memory access region.Yuk, a thousand times yuk.
Quoted 3 lines
I thought the mtrr cleanup built into modern kernel took care of this?
Really though, this needs to be fixed upstream in the kernel :|
Yeah, this is still floating around for hysterical raisins, as Doug said. We might be able to drop this, or at least relegate it to a dark corner with a huge warning label...
Quoted 9 lines
glue/redhat/rdma.kernel-init
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +1
-0+++ b/glue/redhat/rdma.kernel-initI wonder if this could be split into a generic 'load the modules' part and a distro specific part? Every distro needs systemd to load the extra modules because out auto-loading is broken - IMHO, and that is pretty complex unfortunately.
Possibly. Not sure how much you'd save by splitting it though, the added complexity of playing connect the dots to see how things come up could be counter-productive. Haven't looked very closely at that though.
Quoted 12 lines
glue/redhat/rdma.kernel-init line 189
Quoted 8 lines
glue/redhat/rdma.kernel-init new file +8
-0+errata_58() +{ + # Check AMD chipset issue Errata #58 + if test -x /sbin/lspci && test -x /sbin/setpci; then + if ( /sbin/lspci -nd 1022:1100 | grep "1100" > /dev/null ) && + ( /sbin/lspci -nd 1022:7450 | grep "7450" > /dev/null ) && + ( /sbin/lspci -nd 15b3:5a46 | grep "5a46" > /dev/null ); then + CURVAL=`/sbin/setpci -d 1022:1100 69`Another yuk. Why isn't this handled upstream in
drivers/pci/quirks.cwith the rest of the 8131 errata?
Quoted 2 lines
Fortunately I expect all 8131 hardware is long since gone, that chip was end-of-manufacturing'd very quickly 2003ish IIRC.
More hysterical raisins.
Quoted 13 lines
glue/redhat/rdma.kernel-init line 7
Quoted 9 lines
+++ b/glue/redhat/rdma.service
glue/redhat/rdma.kernel-init new file +7
-0@@ -0,0 +1,15 @@ +[Unit] +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.targetThis is an area we really need to cross-distro standardize - we really need a set of rdma-*.targets.
Quoted 7 lines
eg
rdma-available.target
- RDMA hardware is available and all prep is done opensm (if installed) is started, etc Use in place of rdma.service
rdma-detected.target
- udev detected rdma hardware
Deferring to Doug ehre too.
Quoted 18 lines
Quoted 5 lines
glue/redhat/rdma.kernel-init new file +4
-0+++ b/glue/redhat/rdma.udev-ipoib-naming.rules@@ -0,0 +1,13 @@ +# This is a sample udev rules file that demonstrates how to get udev to +# set the name of IPoIB interfaces to whatever you wish. There is a +# 16 character limit on network device names though, so don't go too nutsglue/redhat/rdma.kernel-init line 13
Quoted 10 lines
glue/redhat/rdma.kernel-init new file +10
-0+# +# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the +# ATTR{address} match must start with ?* and only reference the last 8 +# bytes of the address or else the address might not match on any given +# start of the IPoIB stack +# +# Note: as of rhel7, udev is case sensitive on the address field match +# and all addresses need to be in lower case. +# +# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"This should be a cross distro file.
Quoted 16 lines
Quoted 4 lines
+++ b/glue/redhat/rdma.udev-rules
glue/redhat/rdma.kernel-init new file +2
-0@@ -0,0 +1,18 @@ +# We list all the various kernel modules that drive hardware in the +# InfiniBand stack (and a few in the network stack that might not actuallyglue/redhat/rdma.kernel-init line 12
Quoted 10 lines
glue/redhat/rdma.kernel-init new file +10
-0+# be RDMA capable, but we don't know that at this time and it's safe to +# enable the IB stack, so do so unilaterally) and on load of any of that +# hardware, we trigger the rdma.service load in systemd + +SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"Also cross distro
Yeah, these are definitely prime candidates for being cross-distro. And really, I was thinking maybe these should be part of the core upstream udev/systemd rules set, rather than something we ship here.
Quoted 6 lines
glue/redhat/rdma.kernel-init line 16
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"Shouldn't this udev drop-in by in the rdma-ndd package?
Honestly don't even have a clue what rdma-ndd is. :) Don't remember what Doug said about this one...
Quoted 15 lines
glue/redhat/rdma.kernel-init line 10
Quoted 12 lines
glue/redhat/rdma.kernel-init new file +11
-0+++ b/glue/redhat/srp_daemon.service@@ -0,0 +1,17 @@ +[Unit] +Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.targetAlso should be common, why does it reference opensm.service?
Quoted 7 lines
glue/redhat/rdma.kernel-init line 14
Quoted 4 lines
glue/redhat/rdma.kernel-init new file +4
-0+ +[Service] +Type=simple +ExecStart=/usr/sbin/srp_daemon.shHurm, someday we have to make better systemd integration for these daemons..
More deferrals to Doug!
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 7 lines · Jarod Wilson
Worksforme. As mentioned in reply to Leon, I really don't care what the directory is called, just that we get this stuff out there, instead of being in our own custom glue package. I do think maybe Leon's suggestion of having a directory to put a bunch of distro-specific directories under would be good for cleanliness, but I also seem to recall that debian actually looks for a directory in the root of the tarball, so it may need to stay like it is.
Okay, let us just do a very minimal upstreaming and tackle things from there..
Quoted 10 lines
Quoted 8 lines
Common stuff should be installed via cmake
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Probably.
Okay, the only thing I really don't like being upstream is the opensm.service..
Do you know why acm needs that?
Quoted 8 lines
Quoted 8 lines
glue/redhat/ibacm.service line 3
Quoted 5 lines
+++ b/glue/redhat/iwpmd.service
glue/redhat/ibacm.service new file +3
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the IWPMD daemon +Documentation=file:///usr/share/doc/iwpmd/READMEFile does not exit? There is a man page now
Quoted 7 lines
Quoted 2 lines
We already have a iwpmd/iwpmd.service that is almost identical, can you you just update it and drop this version?
Bah, that's a carryover from our individually packaged iwpmd, didn't look closely enough. Can we merge a bit from ours into the 'stock' one? The main relevant difference I see is we have ours set to load after syslog.target as well as network.target.
syslog.target is obsolete now, just drop it from all your unit files unless you need to support systemd <= 35. systemd no longer even documents this special target exists.
commit e8f2b5c11e9db0bab2654e75c2558955effb82fe
Author: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Date: Mon Sep 12 15:53:10 2016 -0600
iwpmd: Remove syslog.target from service file
Debian's Lintian remarks:
W: rdma-plumbing: systemd-service-file-refers-to-obsolete-target lib/systemd/system/iwpmd.service syslog.target
Apparently systemd stopped recommending this in version 35, socket activation eliminates the need.
Quoted 9 lines
Quoted 8 lines
glue/redhat/ibacm.service line 9
Quoted 6 lines
glue/redhat/ibacm.service new file +6
-0+SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"Also cross distro
Quoted 3 lines
Yeah, these are definitely prime candidates for being cross-distro. And really, I was thinking maybe these should be part of the core upstream udev/systemd rules set, rather than something we ship here.
Okay. The trick will be to standardize the systemd_wants name ..
Quoted 9 lines
Quoted 6 lines
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"Shouldn't this udev drop-in by in the rdma-ndd package?
Honestly don't even have a clue what rdma-ndd is. :) Don't remember what Doug said about this one...
Guess I didn't read closely enough, this is used if rdma-ndd is not installed..
So something like that should be upstream, but the 'sleep 1' is ugly - this should probably be a systemd service that runs after network-online.target not as a script run from udev?
rdma-ndd dynamically sets the NodeDescription to the hostname in the adaptor for the subnet manager/tools to ready. I guess this hunk is setting the NodeDescription one-shot at boot..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161017174611.GB6430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 11 lines · Jason Gunthorpe
Quoted 7 lines · Jarod Wilson
Worksforme. As mentioned in reply to Leon, I really don't care what the directory is called, just that we get this stuff out there, instead of being in our own custom glue package. I do think maybe Leon's suggestion of having a directory to put a bunch of distro-specific directories under would be good for cleanliness, but I also seem to recall that debian actually looks for a directory in the root of the tarball, so it may need to stay like it is.
Okay, let us just do a very minimal upstreaming and tackle things from there..
Sounds like a plan.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Common stuff should be installed via cmake
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Quoted 6 lines
Quoted 1 line
Probably.
Okay, the only thing I really don't like being upstream is the opensm.service..
Do you know why acm needs that?
I think Doug already attempted to address this elsewhere in the thread, and he'd know better than me.
Quoted 26 lines
Quoted 8 lines
Quoted 8 lines
glue/redhat/ibacm.service line 3
Quoted 5 lines
+++ b/glue/redhat/iwpmd.service
glue/redhat/ibacm.service new file +3
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the IWPMD daemon +Documentation=file:///usr/share/doc/iwpmd/READMEFile does not exit? There is a man page now
Quoted 7 lines
Quoted 2 lines
We already have a iwpmd/iwpmd.service that is almost identical, can you you just update it and drop this version?
Bah, that's a carryover from our individually packaged iwpmd, didn't look closely enough. Can we merge a bit from ours into the 'stock' one? The main relevant difference I see is we have ours set to load after syslog.target as well as network.target.
syslog.target is obsolete now, just drop it from all your unit files unless you need to support systemd <= 35. systemd no longer even documents this special target exists.
commit
e8f2b5c11e9db0bab2654e75c2558955effb82feAuthor: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Date: Mon Sep 12 15:53:10 2016 -0600iwpmd: Remove syslog.target from service file
Quoted 8 lines
Debian's Lintian remarks:
W: rdma-plumbing: systemd-service-file-refers-to-obsolete-target
lib/systemd/system/iwpmd.servicesyslog.targetApparently systemd stopped recommending this in version 35, socket activation eliminates the need.
Ah, okay. So not needed for any distro that is even remotely modern.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
glue/redhat/ibacm.service line 9
Quoted 6 lines
glue/redhat/ibacm.service new file +6
-0+SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"Also cross distro
Quoted 5 lines
Quoted 3 lines
Yeah, these are definitely prime candidates for being cross-distro. And really, I was thinking maybe these should be part of the core upstream udev/systemd rules set, rather than something we ship here.
Okay. The trick will be to standardize the
systemd_wantsname ..
Perhaps rdma-core should go with rdma-core.service? We were shipping a package called 'rdma' that carried that.
Quoted 13 lines
Quoted 9 lines
Quoted 6 lines
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"Shouldn't this udev drop-in by in the rdma-ndd package?
Honestly don't even have a clue what rdma-ndd is. :) Don't remember what Doug said about this one...
Guess I didn't read closely enough, this is used if rdma-ndd is not installed..
Quoted 7 lines
So something like that should be upstream, but the 'sleep 1' is ugly - this should probably be a systemd service that runs after network-online.target not as a script run from udev?
rdma-ndd dynamically sets the NodeDescription to the hostname in the adaptor for the subnet manager/tools to ready. I guess this hunk is setting the NodeDescription one-shot at boot..
Rather than having this janky udev rule, what if we simply made rdma-ndd part of what's installed with rdma-core, rather than something found in yet another infiniband package? (Looks like it's in infiniband-diags, wasn't even aware rdma-ndd existed until looking at this here).
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 12 lines · Jarod Wilson
Quoted 11 lines · Jason Gunthorpe
Quoted 8 lines · Jarod Wilson
Quoted 6 lines
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Probably.
Quoted 7 lines
Quoted 4 lines
Okay, the only thing I really don't like being upstream is the opensm.service..
Do you know why acm needs that?
I think Doug already attempted to address this elsewhere in the thread, and he'd know better than me.
Since it got snipped, I'm pretty sure it just lists opensm in the Wants= tag. With systemd, that's a soft dependency. Only if opensm is installed and configured to start anyway does systemd then order this item after opensm. Since you need opensm for links to come up anyway, it makes sense for the order of startup for RDMA related items to be:
rdma-core
\-opensm
\-Everything else
Because of that, I think I had opensm listed as a want in pretty much everything, but as already stated, it's a soft dependency and systemd ignores it if you don't have opensm configured to run on that machine.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
glue/redhat/ibacm.service
Quoted 6 lines
glue/redhat/ibacm.service new file +6
-0+SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"Also cross distro
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Yeah, these are definitely prime candidates for being cross-distro. And really, I was thinking maybe these should be part of the core upstream udev/systemd rules set, rather than something we ship here.
Okay. The trick will be to standardize the
systemd_wantsname ..Perhaps rdma-core should go with rdma-core.service? We were shipping a package called 'rdma' that carried that.
Whatever the service file is, that's what the name is. I'm partial to just leaving it as rdma.service. The -core suffix doesn't add anything of value IMO, and we really are initializing the entire rdma stack minus just those upper layer protocols that have their own setup.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +4
-0+# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"Shouldn't this udev drop-in by in the rdma-ndd package?
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Honestly don't even have a clue what rdma-ndd is. :) Don't remember what Doug said about this one...
Guess I didn't read closely enough, this is used if rdma-ndd is not installed..
A bit of a chicken and egg issue here isn't there? Wasn't rdma-ndd part of ibutils? And since ibutils isn't in rdma-core, how do we know if it's installed?
Quoted 4 lines
Quoted 4 lines
So something like that should be upstream, but the 'sleep 1' is ugly - this should probably be a systemd service that runs after network-online.target not as a script run from udev?
Quoted 8 lines
Quoted 3 lines
rdma-ndd dynamically sets the NodeDescription to the hostname in the adaptor for the subnet manager/tools to ready. I guess this hunk is setting the NodeDescription one-shot at boot..
Rather than having this janky udev rule, what if we simply made rdma-ndd part of what's installed with rdma-core, rather than something found in yet another infiniband package? (Looks like it's in infiniband-diags, wasn't even aware rdma-ndd existed until looking at this here).
It's probably a good candidate to be pulled back to rdma-core. Ira?
Signature · 2 lines
Doug Ledford <[email protected]> GPG Key ID: 0E572FDD
A message that is not in the archive (sent off-list or not yet received): a6c8091e-fe83-8413-77d7-4aac053b8e62-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 5 lines · Doug Ledford
Since it got snipped, I'm pretty sure it just lists opensm in the Wants= tag. With systemd, that's a soft dependency. Only if opensm is installed and configured to start anyway does systemd then order this item after opensm. Since you need opensm for links to come up anyway, it makes sense for the order of startup for RDMA related items to be:
Daemons should not require opensm to be started to operate correctly.
If they do we surely have a boot race bug that should be fixed, because we cannot rely on a remote SM to have configured the port the time window betweeen rdma.service completion and dependent service start.
So I view every use of a opensm dependent in a unit file as either unnecessary or working around a bug.. Lets ID the bugs so we at least know where we stand..
Plus, there are more SM's than opensm, so we really should not hardwire a single SM in the service files upstream, but try and work with all the SMs...
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
In reply to a message not in the archiveQuoted 9 lines · Jarod Wilson
Quoted 9 lines
Quoted 8 lines
Quoted 6 lines
glue/redhat/ibacm.service
Quoted 4 lines
glue/redhat/ibacm.service new file +1
-0+++ b/glue/redhat/ibacm.serviceCan we just put this in ibacm/ ?
Probably.
Quoted 7 lines
Quoted 4 lines
Okay, the only thing I really don't like being upstream is the opensm.service..
Do you know why acm needs that?
I think Doug already attempted to address this elsewhere in the thread, and he'd know better than me.
srp_daemon not being able to handle a change in prefix makes sense.
But that doesn't explain what problem ibacm has..
To my mind, depending on something like opensm indicates the daemon has a bug - eg it cannot handle dynamic subnet changes. So lets at least be clear on what the bugs we are working around are, ask if they have been fixed, etc.
Sean, do you know why ibacm would need to be started after opensm?
Quoted 4 lines
Quoted 1 line
Okay. The trick will be to standardize the
systemd_wantsname ..Perhaps rdma-core should go with rdma-core.service? We were shipping a package called 'rdma' that carried that.
Maybe, but I'd like to have an overall systemd plan..
If we can't have a .target then sure, this is probably the best way..
Quoted 8 lines
Quoted 3 lines
rdma-ndd dynamically sets the NodeDescription to the hostname in the adaptor for the subnet manager/tools to ready. I guess this hunk is setting the NodeDescription one-shot at boot..
Rather than having this janky udev rule, what if we simply made rdma-ndd part of what's installed with rdma-core, rather than something found in yet another infiniband package? (Looks like it's in infiniband-diags, wasn't even aware rdma-ndd existed until looking at this here).
Yep, very good idea.
Ira? What do you think?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161017185657.GA8122-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
rdma-ndd dynamically sets the NodeDescription to the hostname in the adaptor for the subnet manager/tools to ready. I guess this hunk is setting the NodeDescription one-shot at boot..
Quoted 7 lines
Quoted 4 lines
Rather than having this janky udev rule, what if we simply made rdma-ndd part of what's installed with rdma-core, rather than something found in yet another infiniband package? (Looks like it's in infiniband-diags, wasn't even aware rdma-ndd existed until looking at this
here).
Yep, very good idea.
Yep, very good idea...
Quoted 2 lines
Ira? What do you think?
Yes, I've been trying to find time to make a patch which adds rdma-ndd into the rdma-core. I absolutely agree it should be part of rdma-core as it is much better than the 1 time shot of the start up scripts.
What I have been worried about is conflicts between infiniband-diags and the new rdma-core. RH made a separate package out of rdma-ndd so that would be easy but I don't think other distros have.
So how do you obsolete "part" of a package?
Ira
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 2807E5FD2F6FDA4886F6618EAC48510E24F0A408-8k97q/[email protected]
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 5 lines · Ira
What I have been worried about is conflicts between infiniband-diags and the new rdma-core. RH made a separate package out of rdma-ndd so that would be easy but I don't think other distros have.
So how do you obsolete "part" of a package?
The distros know how to do this, they just conflict with the old version of infiniband-diags.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161017201309.GA24291-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 10 lines · Jason Gunthorpe
Quoted 5 lines · Ira
What I have been worried about is conflicts between infiniband-diags and the new rdma-core. RH made a separate package out of rdma-ndd so that would be easy but I don't think other distros have.
So how do you obsolete "part" of a package?
The distros know how to do this, they just conflict with the old version of infiniband-diags.
Yeah, basically, you spin up a new infiniband-diags package that doesn't have rdma-ndd and a new rdma-core package that includes it, along with (in rpm-ese) 'Conflicts: infiniband-diags < <first version w/o rdma-ndd>', and that should pretty much cover it.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Ok,
I have the C code ported to rdma-core but how do I do this in cmake?
AS_IF([test x$rdmandd = xyes], [
PKG_CHECK_MODULES([UDEV], [libudev])
AC_CONFIG_FILES([doc/man/rdma-ndd.8 \
etc/rdma-ndd.init \
etc/rdma-ndd.service])
AC_SUBST([UDEV_CFLAGS])
AC_SUBST([UDEV_LIBS])
if test "$with_udev" = "yes"; then
PKG_CHECK_EXISTS(libudev >= 218, [with_dev_logging=no],
[with_udev_logging=yes])
if test "$with_udev_logging" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1,
[whether libudev logging can be used])
fi
fi])
I've found a "modules" file which looks like it has a compatible BSD license and could be added but is there a better way?
http://fossies.org/linux/flightgear/CMakeModules/FindUDev.cmake
I also have to convert the man page from *.rst to man in some way... Would it be ok if I put a dependency on rst2man in the repo?
Ira
Quoted 21 lines
-----Original Message-----
From: Jarod Wilson [mailto:[email protected]]
Sent: Tuesday, October 18, 2016 7:51 AM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Weiny, Ira <[email protected]>; [email protected]; Doug Ledford <[email protected]>; Hefty, Sean <[email protected]>
Subject: Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc
infrastructure bitsQuoted 10 lines · Jason Gunthorpe
Quoted 5 lines · Ira
What I have been worried about is conflicts between infiniband-diags and the new rdma-core. RH made a separate package out of rdma-ndd so that would be easy but I don't think other distros have.
So how do you obsolete "part" of a package?
The distros know how to do this, they just conflict with the old version of infiniband-diags.
Quoted 8 lines
Yeah, basically, you spin up a new infiniband-diags package that doesn't have rdma-ndd and a new rdma-core package that includes it, along with (in rpm-ese) 'Conflicts: infiniband-diags < <first version w/o rdma-ndd>', and that should pretty much cover it.
--
Jarod Wilson
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 2807E5FD2F6FDA4886F6618EAC48510E24F0DF57-8k97q/[email protected]
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 1 line · Ira
I have the C code ported to rdma-core but how do I do this in cmake?
Attached, you will also need
target_link_libraries(rdma-ndd ${UDEV_LIBRARIES})
Quoted 5 lines
PKG_CHECK_EXISTS(libudev >= 218, [with_dev_logging=no],
[with_udev_logging=yes])
if test "$with_udev_logging" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1,
[whether libudev logging can be used])
Dump HAVE_UDEV_LOGGING from the code, upstream deleted support for it:
https://www.redhat.com/archives/libvir-list/2014-December/msg00749.html
src.c:3:2: warning: 'udev_set_log_fn' is deprecated (declared at /usr/include/libudev.h:41) [-Wdeprecated-declarations]
int main(int argc,const char *argv[]) {udev_set_log_fn(NULL, NULL); return 0;}
^
Quoted 2 lines
I've found a "modules" file which looks like it has a compatible BSD license and could be added but is there a better way?
Basically the right idea, but I prefer to avoid pkgconfig whenever possible as it screws up cross compiling.
Quoted 2 lines
I also have to convert the man page from *.rst to man in some way... Would it be ok if I put a dependency on rst2man in the repo?
We have talked about it, maybe for now just include both the .rst and the rst2man output and we can revisit it..
Jason
Quoted 1 line
From
b0062acc238e06289aa946dacd5c534cf6c68d7dMon Sep 17 00:00:00 2001
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Wed, 19 Oct 2016 12:57:25 -0600
Subject: [PATCH] Add a dependency on libudev
incomplete, needs the RH stuff too.
--- .travis.yml | 1 + CMakeLists.txt | 4 ++++ README.md | 2 +- buildlib/FindUDev.cmake | 10 ++++++++++ debian/control | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 buildlib/FindUDev.cmake
.travis.yml +1 -0
@@ -24,6 +24,7 @@ addons: - gcc-6 - libnl-3-dev - libnl-route-3-dev + - libudev-dev - make - ninja-build - pkg-config
CMakeLists.txt +4 -0
@@ -237,6 +237,10 @@ if (NOT NL_KIND EQUAL 0) set(CMAKE_REQUIRED_INCLUDES "${SAFE_CMAKE_REQUIRED_INCLUDES}") endif() +# udev +find_package(UDev REQUIRED) +include_directories(${UDEV_INCLUDE_DIRS}) + # Statically determine sizeof(long), this is largely unnecessary, no new code # should rely on this. check_type_size("long" SIZEOF_LONG BUILTIN_TYPES_ONLY LANGUAGE C)
README.md +1 -1
@@ -48,7 +48,7 @@ only load from the system path. ### Debian Derived ```sh -$ apt-get install build-essential cmake gcc libnl-3-dev libnl-route-3-dev ninja-build pkg-config valgrind +$ apt-get install build-essential cmake gcc libudev-dev libnl-3-dev libnl-route-3-dev ninja-build pkg-config valgrind ``` ### Fedora
buildlib/FindUDev.cmake new file +10 -0
@@ -0,0 +1,10 @@ +# COPYRIGHT (c) 2016 Obsidian Research Corporation. See COPYING file + +find_library(LIBUDEV_LIBRARY NAMES udev libudev) + +set(UDEV_LIBRARIES ${LIBUDEV_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(UDev REQUIRED_VARS LIBUDEV_LIBRARY) + +mark_as_advanced(LIBUDEV_LIBRARY)
debian/control +1 -0
@@ -8,6 +8,7 @@ Build-Depends: build-essential, dh-systemd, dpkg-dev (>= 1.17), gcc, + libudev-dev, libnl-3-dev, libnl-route-3-dev, make,
Signature · 6 lines
2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161019185920.GA20600-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Udev below works great. Thanks!
But I have another cmake question.
I have specified the following:
install(FILES rdma-ndd.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") set(rdma_ndd_CONFIG_PATH "${CMAKE_INSTALL_SYSCONFDIR}") configure_file ("${PROJECT_SOURCE_DIR}/rdma-ndd/rdma-config.h.in"
"${PROJECT_BINARY_DIR}/rdma-ndd/rdma-config.h")include_directories("${PROJECT_BINARY_DIR}/rdma-ndd")
The idea here is to have an rdma-ndd.conf file which allows the user to configure their names. (previously this was the infiniband-diags.conf file). But I have ported over the code.
The value in rdma-config.h ends up being:
17:30:34 > cat build/rdma-ndd/rdma-config.h
/* Pick up configuration items from cmake */
#define RDMA_NDD_CONFIG_PATH "etc"
#define PACKAGE_VERSION 11
Which seems fine but after a "make install" I'm left with an incorrect path:
[root@phcppriv13 sbin]# pwd && ./rdma-ndd -f /usr/local/sbin
rdma-ndd[91656]: Using config file (etc/rdma-ndd.conf)
...
So it is not reading the correct config file.
How do I link the install to this variable in the code?
Ira
Quoted 134 lines
-----Original Message-----
From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Wednesday, October 19, 2016 11:59 AM
To: Weiny, Ira <[email protected]>
Cc: Jarod Wilson <[email protected]>; [email protected]; Doug Ledford <[email protected]>; Hefty, Sean <[email protected]>
Subject: Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc
infrastructure bitsQuoted 1 line · Ira
I have the C code ported to rdma-core but how do I do this in cmake?
Attached, you will also need
target_link_libraries(rdma-ndd ${UDEV_LIBRARIES})Quoted 5 lines
PKG_CHECK_EXISTS(libudev >= 218, [with_dev_logging=no],
[with_udev_logging=yes])
if test "$with_udev_logging" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1,
[whether libudev logging can be used])Dump
HAVE_UDEV_LOGGINGfrom the code, upstream deleted support for it:https://www.redhat.com/archives/libvir-list/2014-December/msg00749.html
src.c:3:2: warning: '
udev_set_log_fn' is deprecated (declared at/usr/include/libudev.h:41) [-Wdeprecated-declarations]
intmain(int argc,const char *argv[]){udev_set_log_fn(NULL, NULL); return 0;} ^Quoted 2 lines
I've found a "modules" file which looks like it has a compatible BSD license and could be added but is there a better way?
Basically the right idea, but I prefer to avoid pkgconfig whenever possible as it screws up cross compiling.
Quoted 2 lines
I also have to convert the man page from *.rst to man in some way... Would it be ok if I put a dependency on rst2man in the repo?
We have talked about it, maybe for now just include both the .rst and the rst2man output and we can revisit it..
Jason
From
b0062acc238e06289aa946dacd5c534cf6c68d7dMon Sep 17 00:00:00
2001
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Wed, 19 Oct 2016 12:57:25 -0600
Subject: [PATCH] Add a dependency on libudevincomplete, needs the RH stuff too.
--- .travis.yml | 1 + CMakeLists.txt | 4 ++++ README.md | 2 +- buildlib/FindUDev.cmake | 10 ++++++++++ debian/control | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644buildlib/FindUDev.cmake
.travis.yml +1
-0@@ -24,6 +24,7 @@ addons: - gcc-6 - libnl-3-dev - libnl-route-3-dev + - libudev-dev - make - ninja-build - pkg-configCMakeLists.txt index a23aa860e6d3..9402bacf70ce renamed from CMakeLists.txt +0
-0100644
CMakeLists.txt +4
-0@@ -237,6 +237,10 @@ if (NOT NL_KIND EQUAL 0) set(CMAKE_REQUIRED_INCLUDES "${SAFE_CMAKE_REQUIRED_INCLUDES}") endif() +# udev +find_package(UDev REQUIRED) +include_directories(${UDEV_INCLUDE_DIRS}) + # Statically determine sizeof(long), this is largely unnecessary, no new code #should rely on this.
check_type_size("long" SIZEOF_LONG BUILTIN_TYPES_ONLY LANGUAGE C)diff
--gita/README.mdb/README.mdindex66aee3f49f00..d24fd0bf2606100644README.md +0
-1@@ -48,7 +48,7 @@ only load from the system path. ### Debian Derived ```sh -$ apt-get install build-essential cmake gcc libnl-3-dev libnl-route-3-dev ninja-build pkg-config valgrind
+$ apt-get install build-essential cmake gcc libudev-dev libnl-3-devREADME.md +1
-0+libnl-route-3-dev ninja-build pkg-config valgrind ``` ### Fedorabuildlib/FindUDev.cmake new file mode renamed from buildlib/FindUDev.cmake +0
-0100644 index 000000000000..ce05ddf991a1
buildlib/FindUDev.cmake new file +8
-0@@ -0,0 +1,10 @@ +# COPYRIGHT (c) 2016 Obsidian Research Corporation. See COPYING file + +find_library(LIBUDEV_LIBRARY NAMES udev libudev) + +set(UDEV_LIBRARIES ${LIBUDEV_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(UDev REQUIRED_VARS
LIBUDEV_LIBRARY)buildlib/FindUDev.cmake new file +2
-0+ +mark_as_advanced(LIBUDEV_LIBRARY)debian/control index renamed from debian/control +0
-0
2335d1f4814d..ed9850a348be100644debian/control +1
-1@@ -8,6 +8,7 @@ Build-Depends: build-essential, dh-systemd, dpkg-dev (>= 1.17), gcc, + libudev-dev, libnl-3-dev, libnl-route-3-dev, make, --
Quoted 1 line
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 2807E5FD2F6FDA4886F6618EAC48510E24F0E288-8k97q/[email protected]
RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Nevermind I think I have it...
Just need to test with an rpm build...
Ira
Quoted 184 lines
-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Weiny, Ira
Sent: Wednesday, October 19, 2016 2:35 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Jarod Wilson <[email protected]>; [email protected]; Doug Ledford <[email protected]>; Hefty, Sean <[email protected]>
Subject: RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc
infrastructure bitsUdev below works great. Thanks!
But I have another cmake question.
I have specified the following:
install(FILES rdma-ndd.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}")set(rdma_ndd_CONFIG_PATH "${CMAKE_INSTALL_SYSCONFDIR}")configure_file("${PROJECT_SOURCE_DIR}/rdma-ndd/rdma-config.h.in""${PROJECT_BINARY_DIR}/rdma-ndd/rdma-config.h")
include_directories("${PROJECT_BINARY_DIR}/rdma-ndd")The idea here is to have an rdma-ndd.conf file which allows the user to configure their names. (previously this was the infiniband-diags.conf file). But I have ported over the code.
The value in
rdma-config.hends up being:17:30:34 > cat
build/rdma-ndd/rdma-config.h/* Pick up configuration items from cmake */ #defineRDMA_NDD_CONFIG_PATH"etc"
#definePACKAGE_VERSION11Which seems fine but after a "make install" I'm left with an incorrect path:
[root@phcppriv13 sbin]# pwd && ./rdma-ndd -f
/usr/local/sbinrdma-ndd[91656]: Using config file (etc/rdma-ndd.conf) ...So it is not reading the correct config file.
How do I link the install to this variable in the code?
Ira
Quoted 24 lines
-----Original Message-----
From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Wednesday, October 19, 2016 11:59 AM
To: Weiny, Ira <[email protected]>
Cc: Jarod Wilson <[email protected]>; [email protected]; Doug Ledford <[email protected]>; Hefty, Sean <[email protected]>
Subject: Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc
infrastructure bitsQuoted 1 line · Ira
I have the C code ported to rdma-core but how do I do this in cmake?
Attached, you will also need
target_link_libraries(rdma-ndd ${UDEV_LIBRARIES})Quoted 6 lines
PKG_CHECK_EXISTS(libudev >= 218, [with_dev_logging=no],
[with_udev_logging=yes])
if test "$with_udev_logging" = "yes"; then
AC_DEFINE_UNQUOTED([HAVE_UDEV_LOGGING], 1,
[whether libudev logging can be
used])Quoted 8 lines
Dump
HAVE_UDEV_LOGGINGfrom the code, upstream deleted support for it:https://www.redhat.com/archives/libvir-list/2014-December/msg00749.htm
lsrc.c:3:2: warning: '
udev_set_log_fn' is deprecated (declared at/usr/include/libudev.h:41) [-Wdeprecated-declarations]
intmain(int argc,const char *argv[]){udev_set_log_fn(NULL, NULL); return0;}
Quoted 52 lines
^
Quoted 2 lines
I've found a "modules" file which looks like it has a compatible BSD license and could be added but is there a better way?
Basically the right idea, but I prefer to avoid pkgconfig whenever possible as it screws up cross compiling.
Quoted 2 lines
I also have to convert the man page from *.rst to man in some way... Would it be ok if I put a dependency on rst2man in the repo?
We have talked about it, maybe for now just include both the .rst and the rst2man output and we can revisit it..
Jason
From
b0062acc238e06289aa946dacd5c534cf6c68d7dMon Sep 17 00:00:00
2001
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Wed, 19 Oct 2016 12:57:25 -0600
Subject: [PATCH] Add a dependency on libudevincomplete, needs the RH stuff too.
--- .travis.yml | 1 + CMakeLists.txt | 4 ++++ README.md | 2 +- buildlib/FindUDev.cmake | 10 ++++++++++ debian/control | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644buildlib/FindUDev.cmake
.travis.yml index renamed from .travis.yml +0
-0
d81b699294eb..d9c36cc9c649100644.travis.yml +1
-0@@ -24,6 +24,7 @@ addons: - gcc-6 - libnl-3-dev - libnl-route-3-dev + - libudev-dev - make - ninja-build - pkg-configCMakeLists.txt index renamed from CMakeLists.txt +0
-0
a23aa860e6d3..9402bacf70ce
100644CMakeLists.txt if (NOT NL_KIND EQUAL 0) · line 237
Quoted 1 line
CMakeLists.txt +0
-0@@ -237,6 +237,10 @@ if (NOT NL_KIND EQUAL 0) set(CMAKE_REQUIRED_INCLUDES"${SAFE_CMAKE_REQUIRED_INCLUDES}")
Quoted 52 lines
CMakeLists.txt +4
-0endif() +# udev +find_package(UDev REQUIRED) +include_directories(${UDEV_INCLUDE_DIRS}) + # Statically determine sizeof(long), this is largely unnecessary, nonew code # should rely on this.
check_type_size("long" SIZEOF_LONG BUILTIN_TYPES_ONLY LANGUAGE C)README.md index 66aee3f49f00..d24fd0bf2606 renamed from README.md +0
-0100644
README.md +0
-1@@ -48,7 +48,7 @@ only load from the system path. ### Debian Derived ```sh -$ apt-get install build-essential cmake gcc libnl-3-devlibnl-route-3-dev ninja- build pkg-config valgrind
+$ apt-get install build-essential cmake gcc libudev-dev libnl-3-devREADME.md +1
-0+libnl-route-3-dev ninja-build pkg-config valgrind ``` ### Fedorabuildlib/FindUDev.cmake new renamed from buildlib/FindUDev.cmake +0
-0file mode
100644 index 000000000000..ce05ddf991a1buildlib/FindUDev.cmake new file +8
-0@@ -0,0 +1,10 @@ +# COPYRIGHT (c) 2016 Obsidian Research Corporation. See COPYING file + +find_library(LIBUDEV_LIBRARY NAMES udev libudev) + +set(UDEV_LIBRARIES ${LIBUDEV_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(UDev REQUIRED_VARS
LIBUDEV_LIBRARY)buildlib/FindUDev.cmake new file +2
-0+ +mark_as_advanced(LIBUDEV_LIBRARY)debian/control index renamed from debian/control +0
-0
2335d1f4814d..ed9850a348be100644debian/control +1
-0@@ -8,6 +8,7 @@ Build-Depends: build-essential, dh-systemd, dpkg-dev (>= 1.17), gcc, + libudev-dev, libnl-3-dev, libnl-route-3-dev,
Quoted 8 lines
Quoted 3 lines
debian/control +0
-1make, --2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
In reply to a message not in the archiveQuoted 4 lines · Ira
set(rdma_ndd_CONFIG_PATH "${CMAKE_INSTALL_SYSCONFDIR}")configure_file("${PROJECT_SOURCE_DIR}/rdma-ndd/rdma-config.h.in""${PROJECT_BINARY_DIR}/rdma-ndd/rdma-config.h")
include_directories("${PROJECT_BINARY_DIR}/rdma-ndd")
Please just use the existing buildlib/config.h.in and put in:
#define RDMA_NDD_CONFIG_FILE "@CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma-ndd.conf"
Nothing else is needed, please don't add more config.h's.
Quoted 1 line
#define
RDMA_NDD_CONFIG_PATH"etc"
This is the difference between the 'FULL' and normal path versions in the cmake scheme. The FULL version must be used everyplace needing an absolute path, the other verions are used with install and have to do with making DESTDIR work properly.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161020035054.GB28678-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
RE: [PATCH rdma-core 2/4] glue/redhat: add udev/systemd/etc infrastructure bits
Quoted 9 lines · Ira
Quoted 2 lines
set(rdma_ndd_CONFIG_PATH "${CMAKE_INSTALL_SYSCONFDIR}")
configure_fileQuoted 3 lines
("${PROJECT_SOURCE_DIR}/rdma-ndd/rdma-config.h.in"
"${PROJECT_BINARY_DIR}/rdma-ndd/rdma-config.h")
include_directories("${PROJECT_BINARY_DIR}/rdma-ndd")
Quoted 6 lines
Please just use the existing buildlib/config.h.in and put in:
#define
RDMA_NDD_CONFIG_FILE
"@CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma-ndd.conf"Nothing else is needed, please don't add more config.h's.
Fair enough, I missed that as it was buried in buildlib...
Quoted 7 lines
Quoted 2 lines
#define
RDMA_NDD_CONFIG_PATH"etc"This is the difference between the 'FULL' and normal path versions in the cmake scheme. The FULL version must be used everyplace needing an absolute path, the other verions are used with install and have to do with making DESTDIR work properly.
Good to know...
I think the biggest issue I have with cmake is that I finally feel like I understand autotools and now I have to learn another system... :-P
Ira
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/4 glue/redhat: copy stock spec for RH customization
In reply to a message not in the archiveWe're going to need to do a bit of majorly invasive surgery, and we're not sure everyone else is going to want to package things this way, so we'll make a copy of our own spec here, starting from the one in the tree.
--- glue/redhat/rdma-core.spec | 127 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 glue/redhat/rdma-core.spec
glue/redhat/rdma-core.spec new file +127 -0
@@ -0,0 +1,127 @@ +Name: rdma-core +Version: 11 +Release: 1%{?dist} +Summary: RDMA core userspace libraries and daemons + +# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license +# providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause +# providers/rxe/ Incorporates code from ipathverbs and contains the patent clause +# providers/hfi1verbs Uses the 3 Clause BSD license +License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +Url: http://openfabrics.org/ +Source: rdma-core-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +BuildRequires: binutils +BuildRequires: cmake >= 2.8.11 +BuildRequires: gcc +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libnl-3.0) +BuildRequires: pkgconfig(libnl-route-3.0) +BuildRequires: valgrind-devel + +# Since we recommend developers use Ninja, so should packagers, for consistency. +%define CMAKE_FLAGS %{nil} +%if 0%{?suse_version} +# SuSE releases have it, and sometime around cmake 3.3.2-1.2 the macros learned to use it. +BuildRequires: ninja,make +%define __builder ninja +# cmake_install,make_jobs is specified by opensuse + +# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags +# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style +# module libraries (eg ibacmp). +%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS="" +%else +%if 0%{?fedora} >= 23 +# Ninja was introduced in FC23 +BuildRequires: ninja-build +%define CMAKE_FLAGS -GNinja +%define make_jobs ninja -v %{?_smp_mflags} +%define cmake_install DESTDIR=%{buildroot} ninja-build install +%else +# Fallback to make otherwise +BuildRequires: make +%define make_jobs make -v %{?_smp_mflags} +%define cmake_install DESTDIR=%{buildroot} make install +%endif +%endif + +%description +Temporary packaging + +This is a simple example without the split sub packages to get things started. + +%prep +%setup + +%build + +# Detect if systemd is supported on this system +%if 0%{?_unitdir:1} +%define my_unitdir %{_unitdir} +%else +%define my_unitdir /tmp/ +%endif + +# New RPM defines _rundir, usually as /run +%if 0%{?_rundir:1} +%else +%define _rundir /var/run +%endif + +# Pass all of the rpm paths directly to GNUInstallDirs and our other defines. +%cmake %{CMAKE_FLAGS} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \ + -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ + -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ + -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ + -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ + -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ + -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} +%make_jobs + +%install +%cmake_install + +mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version} +install -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ + +%if 0%{?_unitdir:1} +rm -rf %{buildroot}/%{_initrddir}/ +%else +rm -rf %{buildroot}/%{my_unitdir}/ +%endif + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%doc %{_mandir}/man*/* +%{_bindir}/* +%{_includedir}/* +%{_libdir}/lib*.so* +%{_libdir}/libibverbs/* +%{_libdir}/ibacm/* +%{_libdir}/rsocket/* +%{_sbindir}/* +%{_libexecdir}/* +%{_docdir}/%{name}-%{version}/* +%if 0%{?_unitdir:1} +%{_unitdir}/* +%else +%config %{_initrddir}/* +%endif +%config %{_sysconfdir}/iwpmd.conf +%config %{_sysconfdir}/srp_daemon.conf +%config %{_sysconfdir}/libibverbs.d/* +%config %{_sysconfdir}/logrotate.d/srp_daemon +%{_sysconfdir}/modprobe.d/* +%config %{_sysconfdir}/rsyslog.d/srp_daemon.conf
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/4 glue/redhat/spec: build split rpm packages
In reply to a message not in the archiveWe're thinking that the upgrade path for our users will be simpler and less surprising if we take rdma-core and split out the end result into the same packages we currently ship in our distributions. End result with this spec:
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-devel-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibverbs-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibverbs-utils-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/ibacm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/iwpmd-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibcm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibumad-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/librdmacm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/librdmacm-utils-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/srp_daemon-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libcxgb3-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libcxgb4-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libhfi1-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libi40iw-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libipathverbs-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libmlx4-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libmlx5-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libmthca-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libnes-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libocrdma-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/librxe-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-debuginfo-11-1.el7.x86_64.rpm
--- glue/redhat/rdma-core.spec | 477 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 442 insertions(+), 35 deletions(-)
glue/redhat/rdma-core.spec +442 -35
@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSD Url: http://openfabrics.org/ Source: rdma-core-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/linux-rdma/rdma-core +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: binutils BuildRequires: cmake >= 2.8.11
@@ -19,20 +20,15 @@ BuildRequires: pkgconfig BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel +BuildRequires: libnl3-devel + +# Red Hat/Fedora previously shipped glue/redhat/ as a stand-alone +# package called 'rdma', which we're supplanting here. +Provides: rdma = %{version}-%{release} +Obsoletes: rdma < %{version}-%{release} # Since we recommend developers use Ninja, so should packagers, for consistency. %define CMAKE_FLAGS %{nil} -%if 0%{?suse_version} -# SuSE releases have it, and sometime around cmake 3.3.2-1.2 the macros learned to use it. -BuildRequires: ninja,make -%define __builder ninja -# cmake_install,make_jobs is specified by opensuse - -# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags -# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style -# module libraries (eg ibacmp). -%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS="" -%else %if 0%{?fedora} >= 23 # Ninja was introduced in FC23 BuildRequires: ninja-build
@@ -45,12 +41,225 @@ BuildRequires: make %define make_jobs make -v %{?_smp_mflags} %define cmake_install DESTDIR=%{buildroot} make install %endif + +%define systemd_dep systemd-units +%if 0%{?fedora} >= 18 +%define systemd_dep systemd %endif %description -Temporary packaging +RDMA core userspace infrastructure and documentation. + +%package devel +Summary: RDMA core development libraries and headers +Provides: libibcm-devel = %{version}-%{release} +Provides: libibumad-devel = %{version}-%{release} +Provides: libibverbs-devel = %{version}-%{release} +Provides: librdmacm-devel = %{version}-%{release} + +%description devel +RDMA core development libraries and headers. + +%package -n libibverbs +Summary: A library for direct userspace use of RDMA (InfiniBand/iWARP) hardware +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +Requires: rdma-core + +%description -n libibverbs +libibverbs is a library that allows userspace processes to use RDMA +"verbs" as described in the InfiniBand Architecture Specification and +the RDMA Protocol Verbs Specification. This includes direct hardware +access from userspace to InfiniBand/iWARP adapters (kernel bypass) for +fast path operations. + +For this library to be useful, a device-specific plug-in module should +also be installed. + +%package -n libibverbs-utils +Summary: Examples for the libibverbs library +Requires: libibverbs%{?_isa} = %{version}-%{release} +Requires: libibverbs-driver.%{_arch} + +%description -n libibverbs-utils +Useful libibverbs example programs such as ibv_devinfo, which +displays information about RDMA devices. + +%package -n ibacm +Summary: InfiniBand Communication Manager Assistant +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n ibacm +The ibacm daemon helps reduce the load of managing path record lookups on +large InfiniBand fabrics by providing a user space implementation of what +is functionally similar to an ARP cache. The use of ibacm, when properly +configured, can reduce the SA packet load of a large IB cluster from O(n^2) +to O(n). The ibacm daemon is started and normally runs in the background, +user applications need not know about this daemon as long as their app +uses librdmacm to handle connection bring up/tear down. The librdmacm +library knows how to talk directly to the ibacm daemon to retrieve data. + +%package -n iwpmd +Summary: iWarp Port Mapper userspace daemon +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n iwpmd +iwpmd provides a userspace service for iWarp drivers to claim +tcp ports through the standard socket interface. + +%package -n libibcm +Summary: Userspace InfiniBand Connection Manager +ExcludeArch: s390 s390x +Requires: rdma-core + +%description -n libibcm +libibcm provides a userspace library that handles the majority of the low +level work required to open an RDMA connection between two machines. + +%package -n libibumad +Summary: OpenFabrics Alliance InfiniBand umad (userspace management datagram) library +Requires: rdma-core + +%description -n libibumad +libibumad provides the userspace management datagram (umad) library +functions, which sit on top of the umad modules in the kernel. These +are used by the IB diagnostic and management tools, including OpenSM. + +%package -n librdmacm +Summary: Userspace RDMA Connection Manager +Requires: rdma-core + +%description -n librdmacm +librdmacm provides a userspace RDMA Communication Managment API. + +%package -n librdmacm-utils +Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release} + +%description -n librdmacm-utils +Example test programs for the librdmacm library. + +%package -n srp_daemon +Summary: Tools for using the InfiniBand SRP protocol devices +Obsoletes: srptools <= 1.0.3 +Provides: srptools = %{version}-%{release} +Obsoletes: openib-srptools <= 0.0.6 +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n srp_daemon +In conjunction with the kernel ib_srp driver, srptools allows you to +discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. + +%package -n libcxgb3 +Summary: Chelsio T3 iWARP HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libcxgb3 +Userspace hardware driver for use with the libibverbs InfiniBand/iWARP verbs +library. This driver enables Chelsio iWARP capable ethernet devices. + +%package -n libcxgb4 +Summary: Chelsio T4 iWARP HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libcxgb4 +Userspace hardware driver for use with the libibverbs InfiniBand/iWARP verbs +library. This driver enables Chelsio T4 based iWARP capable Ethernet devices. + +%package -n libhfi1 +Summary: Intel Omni-Path HFI Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libhfi1 +libhfi1 provides a device-specific userspace driver for Intel Host +Fabric interface cards. This driver is designed for use with the +libibverbs library. + +%package -n libi40iw +Summary: Intel Ethernet Connection X722 RDMA Userspace Library +Provides: libibverbs-driver.%{_arch} + +%description -n libi40iw +libi40iw provides a device-specific RDMA userspace library for Intel +Ethernet Connection X722 for use with the libibverbs library. + +%package -n libipathverbs +Summary: QLogic InfiniPath HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libipathverbs +QLogic hardware driver for use with libibverbs user space verbs access +library. This driver supports QLogic InfiniPath based cards. + +%package -n libmlx4 +Summary: Mellanox ConnectX-3 InfiniBand HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libmlx4 +libmlx4 provides a device-specific userspace driver for Mellanox +ConnectX-3 HCAs for use with the libibverbs library. + +%package -n libmlx5 +Summary: Mellanox Connect-IB/X-4+ InfiniBand HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libmlx5 +bmlx5 provides a device-specific userspace driver for Mellanox +Connect-IB/X-4+ HCAs for use with the libibverbs library. + +%package -n libmthca +Summary: Mellanox InfiniBand HCA Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libmthca +libmthca provides a device-specific userspace driver for Mellanox HCAs +(MT23108 InfiniHost and MT25208 InfiniHost III Ex) for use with the +libibverbs library. -This is a simple example without the split sub packages to get things started. +%package -n libnes +Summary: NetEffect RNIC Userspace Driver +Provides: libibverbs-driver.%{_arch} + +%description -n libnes +Userspace hardware driver for use with the libibverbs InfiniBand/iWARP verbs +library. This driver enables NetEffect iWARP capable ethernet devices. + +%package -n libocrdma +Summary: Userspace Library for Emulex OneConnect RDMA/RoCE Device +Provides: libibverbs-driver.%{_arch} + +%description -n libocrdma +libocrdma provides a device-specific userspace driver for Emulex OneConnect +RDMA/RoCE Adapters for use with the libibverbs library. + +%package -n librxe +Summary: A software implementation of the RoCE protocol +Provides: libibverbs-driver.%{_arch} + +%description -n librxe +This is a software implementation of the RoCE protocol, which transports the +full OFED RDMA protocol set (kernel and user mode) over layer 2 Ethernet. +Infiniband (IB) transport and GRH headers are encapsulated in Ethernet packets +of ether type 0x8915. + +Once a RXE instance has been created, communicating via RXE is the same as +communicating via any OFED compatible Infiniband HCA, albeit in some cases with +addressing implications. + +In particular, while the use of a GRH header is optional within IB subnets, it +is mandatory with RoCE. Verbs applications written over IB verbs should work +seamlessly, but they require provisioning of GRH information when creating address +vectors. The library and driver are modified to provide for mapping from GID to +MAC addresses required by the hardware. %prep %setup
@@ -91,8 +300,55 @@ This is a simple example without the split sub packages to get things started. %install %cmake_install +mkdir -p %{buildroot}/%{_sysconfdir}/rdma mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version} -install -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 README.md %{buildroot}/%{_docdir}/%{name}-%{version}/ + +# Red Hat specific glue +%global dracutlibdir %{_prefix}/lib/dracut +%global sysmodprobedir %{_prefix}/lib/modprobe.d +mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts +mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d +mkdir -p %{buildroot}%{_libexecdir} +mkdir -p %{buildroot}%{_udevrulesdir} +mkdir -p %{buildroot}%{dracutlibdir}/modules.d/05rdma +mkdir -p %{buildroot}%{sysmodprobedir} +install -D -m0644 glue/redhat/rdma.conf %{buildroot}/%{_sysconfdir}/rdma/rdma.conf +install -D -m0644 glue/redhat/rdma.sriov-vfs %{buildroot}/%{_sysconfdir}/rdma/sriov-vfs +install -D -m0644 glue/redhat/rdma.mlx4.conf %{buildroot}/%{_sysconfdir}/rdma/mlx4.conf +install -D -m0755 glue/redhat/rdma.ifup-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifup-ib +install -D -m0755 glue/redhat/rdma.ifdown-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ib +install -D -m0644 glue/redhat/rdma.service %{buildroot}%{_unitdir}/rdma.service +install -D -m0644 glue/redhat/rdma.udev-ipoib-naming.rules %{buildroot}%{_sysconfdir}/udev/rules.d/70-persistent-ipoib.rules +install -D -m0644 glue/redhat/rdma.mlx4.user.modprobe %{buildroot}%{_sysconfdir}/modprobe.d/mlx4.conf +install -D -m0755 glue/redhat/rdma.modules-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh +install -D -m0644 glue/redhat/rdma.udev-rules %{buildroot}%{_udevrulesdir}/98-rdma.rules +install -D -m0644 glue/redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/libmlx4.conf +install -D -m0644 glue/redhat/rdma.cxgb3.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb3.conf +install -D -m0644 glue/redhat/rdma.cxgb4.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb4.conf +install -D -m0755 glue/redhat/rdma.kernel-init %{buildroot}%{_libexecdir}/rdma-init-kernel +install -D -m0755 glue/redhat/rdma.sriov-init %{buildroot}%{_libexecdir}/rdma-set-sriov-vf +install -D -m0644 glue/redhat/rdma.fixup-mtrr.awk %{buildroot}%{_libexecdir}/rdma-fixup-mtrr.awk +install -D -m0755 glue/redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh + +# ibacm +%{buildroot}/%{_bindir}/ib_acme -D . -O +# Fixup a multilib conflict in ibacm_opts.cfg: +sed -i -e '/^# Specifies the directory of the provider libraries$/ a\ +# Use /usr/lib64/ibacm on 64bit, /usr/lib/libacm on 32bit. +' -e 's%^\(# provider_lib_path /usr/\)lib\(64\)\?/ibacm$%\1lib64/ibacm%' ibacm_opts.cfg +install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/ +install -D -m0644 glue/redhat/ibacm.service %{buildroot}%{_unitdir}/ +install -D -m0644 ibacm/man/*.1 %{buildroot}/%{_mandir}/man1/ +install -D -m0644 ibacm/man/*.7 %{buildroot}/%{_mandir}/man7/ +sed -e 's|@ACM_PROVIDER_DIR@|%{libdir}/%{name}/|g' -e 's|@CMAKE_INSTALL_FULL_LOCALSTATEDIR@|%{_localstatedir}|g' ibacm/man/ibacm_prov.7.in > %{buildroot}/%{_mandir}/man7/ibacm_prov.7 + +# iwpmd +install -D -m0644 glue/redhat/iwpmd.service %{buildroot}%{_unitdir}/ + +# srp_daemon +install -D -m0644 glue/redhat/srp_daemon.service %{buildroot}%{_unitdir}/ %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/
@@ -103,25 +359,176 @@ rm -rf %{buildroot}/%{my_unitdir}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post -n ibacm +%systemd_post ibacm.service + +%preun -n ibacm +%systemd_preun ibacm.service + +%postun -n ibacm +%systemd_postun_with_restart ibacm.service + +%post -n libibcm -p /sbin/ldconfig +%postun -n libibcm -p /sbin/ldconfig + %files -%doc %{_mandir}/man*/* -%{_bindir}/* +%dir %{_sysconfdir}/rdma +%doc %{_docdir}/%{name}-%{version}/README.md +%config(noreplace) %{_sysconfdir}/rdma/* +%config(noreplace) %{_sysconfdir}/udev/rules.d/* +%config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf +%{_sysconfdir}/sysconfig/network-scripts/* +%{_unitdir}/rdma.service +%dir %{dracutlibdir}/modules.d/05rdma +%{dracutlibdir}/modules.d/05rdma/module-setup.sh +%{_udevrulesdir}/* +%{sysmodprobedir}/libmlx4.conf +%{sysmodprobedir}/cxgb3.conf +%{sysmodprobedir}/cxgb4.conf +%{_libexecdir}/rdma-init-kernel +%{_libexecdir}/rdma-set-sriov-vf +%{_libexecdir}/rdma-fixup-mtrr.awk +%{_libexecdir}/mlx4-setup.sh +%license COPYING.* + +%files devel %{_includedir}/* -%{_libdir}/lib*.so* -%{_libdir}/libibverbs/* +%{_libdir}/lib*.so +%{_libdir}/rsocket/*.so +%{_mandir}/man3/ibv_* +%{_mandir}/man3/rdma* +%{_mandir}/man3/umad* +%{_mandir}/man3/*_to_ibv_rate.* +%{_mandir}/man7/rdma_cm.* +%{_mandir}/man7/rsocket.* + +%files -n libibverbs +%dir %{_sysconfdir}/libibverbs.d +%{_libdir}/libibverbs*.so.* +%dir %{_libdir}/libibverbs +%doc %{_docdir}/%{name}-%{version}/libibverbs.md + +%files -n libibverbs-utils +%{_bindir}/ibv_* +%{_mandir}/man1/ibv_* + +%files -n ibacm +%config(noreplace) %{_sysconfdir}/rdma/ibacm_opts.cfg +%{_bindir}/ib_acme +%{_sbindir}/ibacm +%{_mandir}/man1/ibacm.* +%{_mandir}/man1/ib_acme.* +%{_mandir}/man7/ibacm.* +%{_mandir}/man7/ibacm_prov.* +%{_unitdir}/ibacm.service +%dir %{_libdir}/ibacm %{_libdir}/ibacm/* -%{_libdir}/rsocket/* -%{_sbindir}/* -%{_libexecdir}/* -%{_docdir}/%{name}-%{version}/* -%if 0%{?_unitdir:1} -%{_unitdir}/* -%else -%config %{_initrddir}/* -%endif -%config %{_sysconfdir}/iwpmd.conf -%config %{_sysconfdir}/srp_daemon.conf -%config %{_sysconfdir}/libibverbs.d/* -%config %{_sysconfdir}/logrotate.d/srp_daemon -%{_sysconfdir}/modprobe.d/* -%config %{_sysconfdir}/rsyslog.d/srp_daemon.conf +%doc %{_docdir}/%{name}-%{version}/ibacm.md + +%files -n iwpmd +%{_bindir}/iwpmd +%{_unitdir}/iwpmd.service +%config(noreplace) %{_sysconfdir}/iwpmd.conf +%{_mandir}/man1/iwpmd.* +%{_mandir}/man5/iwpmd.* + +%files -n libibcm +%{_libdir}/libibcm*.so.* +%doc %{_docdir}/%{name}-%{version}/libibcm.md + +%files -n libibumad +%{_libdir}/libibumad*.so.* + +%files -n librdmacm +%{_libdir}/librdmacm*.so.* +%{_libdir}/rsocket/*.so.* +%doc %{_docdir}/%{name}-%{version}/librdmacm.md + +%files -n librdmacm-utils +%{_bindir}/cmtime +%{_bindir}/mckey +%{_bindir}/rcopy +%{_bindir}/rdma_client +%{_bindir}/rdma_server +%{_bindir}/rdma_xclient +%{_bindir}/rdma_xserver +%{_bindir}/riostream +%{_bindir}/rping +%{_bindir}/rstream +%{_bindir}/ucmatose +%{_bindir}/udaddy +%{_bindir}/udpong +%{_mandir}/man1/mckey.* +%{_mandir}/man1/rcopy.* +%{_mandir}/man1/rdma_client.* +%{_mandir}/man1/rdma_server.* +%{_mandir}/man1/rdma_xclient.* +%{_mandir}/man1/rdma_xserver.* +%{_mandir}/man1/riostream.* +%{_mandir}/man1/rping.* +%{_mandir}/man1/rstream.* +%{_mandir}/man1/ucmatose.* +%{_mandir}/man1/udaddy.* + +%files -n srp_daemon +%config(noreplace) %{_sysconfdir}/srp_daemon.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/srp_daemon +%config(noreplace) %{_sysconfdir}/rsyslog.d/srp_daemon.conf +%{_unitdir}/srp_daemon.service +%{_sbindir}/ibsrpdm +%{_sbindir}/srp_daemon +%{_sbindir}/srp_daemon.sh +%{_sbindir}/run_srp_daemon +%{_mandir}/man1/ibsrpdm.1* +%{_mandir}/man1/srp_daemon.1* +%doc %{_docdir}/%{name}-%{version}/ibsrpdm.md + +%files -n libcxgb3 +%{_libdir}/libibverbs/libcxgb3-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/cxgb3.driver + +%files -n libcxgb4 +%{_libdir}/libibverbs/libcxgb4-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/cxgb4.driver + +%files -n libhfi1 +%{_libdir}/libibverbs/libhfi1verbs-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/hfi1verbs.driver + +%files -n libi40iw +%{_libdir}/libibverbs/libi40iw-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/i40iw.driver + +%files -n libipathverbs +%{_libdir}/libibverbs/libipathverbs-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/ipathverbs.driver +%config(noreplace) %{_sysconfdir}/modprobe.d/truescale.conf +%{_libexecdir}/truescale-serdes.cmds + +%files -n libmlx4 +%{_libdir}/libibverbs/libmlx4-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/mlx4.driver + +%files -n libmlx5 +%{_libdir}/libibverbs/libmlx5-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/mlx5.driver + +%files -n libmthca +%{_libdir}/libibverbs/libmthca-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/mthca.driver + +%files -n libnes +%{_libdir}/libibverbs/libnes-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/nes.driver + +%files -n libocrdma +%{_libdir}/libibverbs/libocrdma-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/ocrdma.driver + +%files -n librxe +%{_bindir}/rxe_cfg +%{_mandir}/man7/rxe* +%{_mandir}/man8/rxe* +%{_libdir}/libibverbs/librxe-rdmav2.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/rxe.driver +%doc %{_docdir}/%{name}-%{version}/rxe.md
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014192136.11731-5-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages
Quoted 1 line · Jarod Wilson
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/iwpmd-11-1.el7.x86_64.rpm
FC used to call this libiwpm for some reason..
Quoted 1 line
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libibcm-11-1.el7.x86_64.rpm
Do you want to try and do as I did with debian and put the SONAME data into the package version for the libraries? eg
libibcm1_1.0.11-1_amd64.deb
Quoted 11 lines
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb3-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libhfi1-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libi40iw-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libipathverbs-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx5-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmthca-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libnes-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libocrdma-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/librxe-11-1.el7.x86_64.rpm
Does this mean RH is not going to do a single package for the providers? You know another 5 or so are coming..
Any feedback if things build on your supported arches? I'd be interested to see compiler log if it isn't silent.
glue/redhat/rdma-core.spec This is a simple example without the split sub packages to get things started. · line 306
Quoted 2 lines
glue/redhat/rdma-core.spec +2
-0+install -D -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 README.md %{buildroot}/%{_docdir}/%{name}-%{version}/
I guess README should go in that patch I sent you..
Quoted 6 lines
+%{buildroot}/%{_bindir}/ib_acme -D . -O
glue/redhat/rdma-core.spec +4
-0+# Fixup a multilib conflict in ibacm_opts.cfg: +sed -i -e '/^# Specifies the directory of the provider libraries$/ a\ +# Use /usr/lib64/ibacm on 64bit, /usr/lib/libacm on 32bit. +' -e 's%^\(# provider_lib_path/usr/\)lib\(64\)\?/ibacm$%\1lib64/ibacm%' ibacm_opts.cfg
Hum? I'm pretty sure this is basically fixed in the code now, was done here 5eebdb9baaaae420a4bb16e586a96807823916a0
Adjusting the comment like that doesn't really make sense, the acm daemon has a fixed endianness and looks in a single place to load the plugin. If someone wants to use 32 bit plugins they have to install the 32 bit acm daemon, which would have the 32 bit path in the sample conf file...
glue/redhat/rdma-core.spec This is a simple example without the split sub packages to get things started. · line 345
Quoted 3 lines
glue/redhat/rdma-core.spec +3
-0+install -D -m0644 ibacm/man/*.1 %{buildroot}/%{_mandir}/man1/ +install -D -m0644 ibacm/man/*.7 %{buildroot}/%{_mandir}/man7/ +sed -e 's|@ACM_PROVIDER_DIR@|%{libdir}/%{name}/|g' -e 's|@CMAKE_INSTALL_FULL_LOCALSTATEDIR@|%{_localstatedir}|g' ibacm/man/ibacm_prov.7.in > %{buildroot}/%{_mandir}/man7/ibacm_prov.7
?? cmake is supposed to install these.. Looks like it works. What did you need done here to open code it?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014233904.GD16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages
Quoted 5 lines · Jason Gunthorpe
Quoted 1 line · Jarod Wilson
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/iwpmd-11-1.el7.x86_64.rpmFC used to call this libiwpm for some reason..
Ah. I may need to add an Obsoletes: for that particular case then.
Quoted 6 lines
Quoted 1 line
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libibcm-11-1.el7.x86_64.rpmDo you want to try and do as I did with debian and put the SONAME data into the package version for the libraries? eg
libibcm1_1.0.11-1_amd64.deb
No, that's a debian-ism that Red Hat has never really followed. The soname data is already captured in the rpm metadata.
Quoted 12 lines
Quoted 11 lines
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb3-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libhfi1-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libi40iw-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libipathverbs-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx5-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmthca-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libnes-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libocrdma-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/librxe-11-1.el7.x86_64.rpm
Quoted 2 lines
Does this mean RH is not going to do a single package for the providers? You know another 5 or so are coming..
Putting all the providers in a single sub-package is certainly something we could do. With rpm virtual Provides and Obsoletes, we could make the upgrade path transparent to at least yum/dnf/rpm, but it might still confuse people who go looking for the same package they've always had installed, so it could be something we do in Fedora and the next RHEL major release, rather than in a current RHEL minor update.
Quoted 7 lines
Any feedback if things build on your supported arches? I'd be interested to see compiler log if it isn't silent.
glue/redhat/rdma-core.spec This is a simple example without the split sub packages to get things started. · line 306
Quoted 2 lines
glue/redhat/rdma-core.spec +2
-0+install -D -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 README.md %{buildroot}/%{_docdir}/%{name}-%{version}/I guess README should go in that patch I sent you..
D'oh, yeah, I'll mix that in here locally.
Quoted 10 lines
Quoted 6 lines
+%{buildroot}/%{_bindir}/ib_acme -D . -O
glue/redhat/rdma-core.spec +4
-0+# Fixup a multilib conflict in ibacm_opts.cfg: +sed -i -e '/^# Specifies the directory of the provider libraries$/ a\ +# Use /usr/lib64/ibacm on 64bit, /usr/lib/libacm on 32bit. +' -e 's%^\(# provider_lib_path/usr/\)lib\(64\)\?/ibacm$%\1lib64/ibacm%' ibacm_opts.cfg
Hum? I'm pretty sure this is basically fixed in the code now, was done here
5eebdb9baaaae420a4bb16e586a96807823916a0
Quoted 5 lines
Adjusting the comment like that doesn't really make sense, the acm daemon has a fixed endianness and looks in a single place to load the plugin. If someone wants to use 32 bit plugins they have to install the 32 bit acm daemon, which would have the 32 bit path in the sample conf file...
This was just copy and paste from our existing libacm spec, might well be something that was fixed and I just missed it.
Quoted 6 lines
glue/redhat/rdma-core.spec This is a simple example without the split sub packages to get things started. · line 345
Quoted 3 lines
glue/redhat/rdma-core.spec +3
-0+install -D -m0644 ibacm/man/*.1 %{buildroot}/%{_mandir}/man1/ +install -D -m0644 ibacm/man/*.7 %{buildroot}/%{_mandir}/man7/ +sed -e 's|@ACM_PROVIDER_DIR@|%{libdir}/%{name}/|g' -e 's|@CMAKE_INSTALL_FULL_LOCALSTATEDIR@|%{_localstatedir}|g' ibacm/man/ibacm_prov.7.in > %{buildroot}/%{_mandir}/man7/ibacm_prov.7?? cmake is supposed to install these.. Looks like it works. What did you need done here to open code it?
They weren't getting installed, so I threw that hack in, meant to actually say something about that, got lost in the shuffle. I'll double-check if they're still not getting installed... Okay, they're getting installed now. May have just been a transient error with an earlier tarball, or something else I did wrong. I'll drop that bit.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages
Quoted 15 lines · Jarod Wilson
Quoted 12 lines
Quoted 11 lines
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb3-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libhfi1-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libi40iw-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libipathverbs-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx5-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmthca-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libnes-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libocrdma-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/librxe-11-1.el7.x86_64.rpmQuoted 2 lines
Does this mean RH is not going to do a single package for the providers? You know another 5 or so are coming..
Quoted 6 lines
Putting all the providers in a single sub-package is certainly something we could do. With rpm virtual Provides and Obsoletes, we could make the upgrade path transparent to at least yum/dnf/rpm, but it might still confuse people who go looking for the same package they've always had installed, so it could be something we do in Fedora and the next RHEL major release, rather than in a current RHEL minor update.
I would strongly encoruage this - the current scheme is silly, you need to know to look for the right provider to get things working (which is very much unlike the way the kernel modules work).
Suggest to dump the providers in libiverbs or add a ibverbs-providers package..
Or at least start adding new providers (Eg rxe,hfi) to a -providers package.
Quoted 6 lines
Quoted 4 lines
glue/redhat/rdma-core.spec This is a simple example without the split sub packages to get things started. · line 306
Quoted 2 lines
glue/redhat/rdma-core.spec +2
-0+install -D -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 README.md %{buildroot}/%{_docdir}/%{name}-%{version}/I guess README should go in that patch I sent you..
D'oh, yeah, I'll mix that in here locally.
I think you can just add ../README.md to theDocumentation/CMakeFile.txt
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
+%{buildroot}/%{_bindir}/ib_acme -D . -O
glue/redhat/rdma-core.spec +4
-0+# Fixup a multilib conflict in ibacm_opts.cfg: +sed -i -e '/^# Specifies the directory of the provider libraries$/ a\ +# Use /usr/lib64/ibacm on 64bit, /usr/lib/libacm on 32bit. +' -e 's%^\(# provider_lib_path/usr/\)lib\(64\)\?/ibacm$%\1lib64/ibacm%' ibacm_opts.cfg
Hum? I'm pretty sure this is basically fixed in the code now, was done here
5eebdb9baaaae420a4bb16e586a96807823916a0
Quoted 8 lines
Quoted 5 lines
Adjusting the comment like that doesn't really make sense, the acm daemon has a fixed endianness and looks in a single place to load the plugin. If someone wants to use 32 bit plugins they have to install the 32 bit acm daemon, which would have the 32 bit path in the sample conf file...
This was just copy and paste from our existing libacm spec, might well be something that was fixed and I just missed it.
It looks OK as-is to me, I'd drop it now.
Quoted 5 lines
They weren't getting installed, so I threw that hack in, meant to actually say something about that, got lost in the shuffle. I'll double-check if they're still not getting installed... Okay, they're getting installed now. May have just been a transient error with an earlier tarball, or something else I did wrong. I'll drop that bit.
How strange.. FWIW, the tarball should be built with git-archive ..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161017190705.GB8122-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages
Quoted 24 lines · Jason Gunthorpe
Quoted 15 lines · Jarod Wilson
Quoted 12 lines
Quoted 11 lines
Wrote:
/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb3-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libcxgb4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libhfi1-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libi40iw-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libipathverbs-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx4-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmlx5-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libmthca-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libnes-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/libocrdma-11-1.el7.x86_64.rpm
Wrote:/home/jwilson/rpmbuild/RPMS/x86_64/librxe-11-1.el7.x86_64.rpmQuoted 2 lines
Does this mean RH is not going to do a single package for the providers? You know another 5 or so are coming..
Quoted 6 lines
Putting all the providers in a single sub-package is certainly something we could do. With rpm virtual Provides and Obsoletes, we could make the upgrade path transparent to at least yum/dnf/rpm, but it might still confuse people who go looking for the same package they've always had installed, so it could be something we do in Fedora and the next RHEL major release, rather than in a current RHEL minor update.
Quoted 6 lines
I would strongly encoruage this - the current scheme is silly, you need to know to look for the right provider to get things working (which is very much unlike the way the kernel modules work).
Suggest to dump the providers in libiverbs or add a ibverbs-providers package..
I'm playing with a setup where libibverbs includes all the providers now. I think I like it. It'd require some documentation to explain where libfoo went, but it doesn't look too bad:
$ sudo rpm -Uvh libibverbs-11-1.el7.x86_64.rpm libibverbs-utils-11-1.el7.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:libibverbs-11-1.el7 ################################# [ 14%] 2:libibverbs-utils-11-1.el7 ################################# [ 29%] Cleaning up / removing... 3:libibverbs-utils-1.2.1-1.el7 ################################# [ 43%] 4:libi40iw-0.5.227-2.el7 ################################# [ 57%] 5:libocrdma-1.0.8-1.el7 ################################# [ 71%] 6:libmlx5-1.2.1-8.el7 ################################# [ 86%] 7:libibverbs-1.2.1-1.el7 ################################# [100%]
Seems I have the Provides/Obsoletes correct at least. This also eliminates the somewhat gross libibverbs-driver Provides from each driver and the matching Requires in libibverbs-utils, which I like...
Doug, any thoughts from you on this front?
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+install -D -m0644 Documentation/{ibacm,ibsrpdm,libibcm,libibverbs,librdmacm,rxe}.md %{buildroot}/%{_docdir}/%{name}-%{version}/ +install -D -m0644 README.md %{buildroot}/%{_docdir}/%{name}-%{version}/I guess README should go in that patch I sent you..
D'oh, yeah, I'll mix that in here locally.
I think you can just add
../README.mdto theDocumentation/CMakeFile.txt
First cut, I added a Files line to the root CMakeLists.txt. Would the above be preferred over that? Both seem to work.
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 6 lines
+%{buildroot}/%{_bindir}/ib_acme -D . -O
(quoted diff) +4
-0+# Fixup a multilib conflict in ibacm_opts.cfg: +sed -i -e '/^# Specifies the directory of the provider libraries$/ a\ +# Use /usr/lib64/ibacm on 64bit, /usr/lib/libacm on 32bit. +' -e 's%^\(# provider_lib_path/usr/\)lib\(64\)\?/ibacm$%\1lib64/ibacm%' ibacm_opts.cfg
Hum? I'm pretty sure this is basically fixed in the code now, was done here
5eebdb9baaaae420a4bb16e586a96807823916a0Adjusting the comment like that doesn't really make sense, the acm daemon has a fixed endianness and looks in a single place to load the plugin. If someone wants to use 32 bit plugins they have to install the 32 bit acm daemon, which would have the 32 bit path in the sample conf file...
Quoted 4 lines
Quoted 2 lines
This was just copy and paste from our existing libacm spec, might well be something that was fixed and I just missed it.
It looks OK as-is to me, I'd drop it now.
Dropped, things do look fine w/o that.
Quoted 7 lines
Quoted 5 lines
They weren't getting installed, so I threw that hack in, meant to actually say something about that, got lost in the shuffle. I'll double-check if they're still not getting installed... Okay, they're getting installed now. May have just been a transient error with an earlier tarball, or something else I did wrong. I'll drop that bit.
How strange.. FWIW, the tarball should be built with git-archive ..
There was a ton of churn from what I was doing, I blame me. ;) All good now, and yes, creating tarballs with git archive:
$ git archive --prefix=rdma-core-11/ -o ~/rpmbuild/SOURCES/rdma-core-11.tgz --format tar.gz HEAD
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core 4/4] glue/redhat/spec: build split rpm packages
Quoted 5 lines · Jarod Wilson
Quoted 2 lines
I think you can just add
../README.mdto theDocumentation/CMakeFile.txtFirst cut, I added a Files line to the root CMakeLists.txt. Would the above be preferred over that? Both seem to work.
It is nitpicky, but I'd put it in the Documentation/CMakelists as currently the top level is all setup and doesn't build or install anything.
eg the top level plays a role like configure.ac
Might be more familiar for people..
Quoted 1 line
$ git archive --prefix=rdma-core-11/ -o ~/rpmbuild/SOURCES/rdma-core-11.tgz --format tar.gz HEAD
Yah, that is the right thing, it should match the tar file what github will autogenerate when we make a tag.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Jarod Wilson
This is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split.
Is this just for EL7, or do you plan to keep going this way indefinitely in EL8 and FC25?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161014223308.GA16509-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Quoted 9 lines · Jason Gunthorpe
Quoted 5 lines · Jarod Wilson
This is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split.
Is this just for EL7, or do you plan to keep going this way indefinitely in EL8 and FC25?
Kind of TBD at the moment. We could probably go either way for Fedora and a new EL major release.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Jarod Wilson
This is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split.
Jarod,
I'm far a way from packaging, so I have very general questions.
1. You mentioned FC, but used glue/redhat/. Is it applicable for Centos?
2. Do FC and Centos need similar files in structure?
3. Does it make sense to rename glue/ to be packages/ and move debian there?
Quoted 59 lines
Jarod Wilson (4):
rpm spec: install documentation too glue/redhat: add udev/systemd/etc infrastructure bits glue/redhat: copy stock spec for RH customization glue/redhat/spec: build split rpm packagesglue/redhat/ibacm.service | 12 + glue/redhat/iwpmd.service | 12 + glue/redhat/rdma-core.spec | 534 +++++++++++++++++++++++++++++++ glue/redhat/rdma.conf | 25 ++ glue/redhat/rdma.cxgb3.sys.modprobe | 1 + glue/redhat/rdma.cxgb4.sys.modprobe | 1 + glue/redhat/rdma.fixup-mtrr.awk | 160 +++++++++ glue/redhat/rdma.ifdown-ib | 183 +++++++++++ glue/redhat/rdma.ifup-ib | 308 ++++++++++++++++++ glue/redhat/rdma.kernel-init | 262 +++++++++++++++ glue/redhat/rdma.mlx4-setup.sh | 91 ++++++ glue/redhat/rdma.mlx4.conf | 27 ++ glue/redhat/rdma.mlx4.sys.modprobe | 5 + glue/redhat/rdma.mlx4.user.modprobe | 21 ++ glue/redhat/rdma.modules-setup.sh | 30 ++ glue/redhat/rdma.service | 15 + glue/redhat/rdma.sriov-init | 137 ++++++++ glue/redhat/rdma.sriov-vfs | 41 +++ glue/redhat/rdma.udev-ipoib-naming.rules | 13 + glue/redhat/rdma.udev-rules | 18 ++ glue/redhat/srp_daemon.service | 17 + rdma-core.spec | 4 + 22 files changed, 1917 insertions(+) create mode 100644 glue/redhat/ibacm.service create mode 100644 glue/redhat/iwpmd.service create mode 100644 glue/redhat/rdma-core.spec create mode 100644 glue/redhat/rdma.conf create mode 100644 glue/redhat/rdma.cxgb3.sys.modprobe create mode 100644 glue/redhat/rdma.cxgb4.sys.modprobe create mode 100644 glue/redhat/rdma.fixup-mtrr.awk create mode 100644 glue/redhat/rdma.ifdown-ib create mode 100644 glue/redhat/rdma.ifup-ib create mode 100644 glue/redhat/rdma.kernel-init create mode 100644 glue/redhat/rdma.mlx4-setup.sh create mode 100644 glue/redhat/rdma.mlx4.conf create mode 100644 glue/redhat/rdma.mlx4.sys.modprobe create mode 100644 glue/redhat/rdma.mlx4.user.modprobe create mode 100644 glue/redhat/rdma.modules-setup.sh create mode 100644 glue/redhat/rdma.service create mode 100644 glue/redhat/rdma.sriov-init create mode 100644 glue/redhat/rdma.sriov-vfs create mode 100644 glue/redhat/rdma.udev-ipoib-naming.rules create mode 100644 glue/redhat/rdma.udev-rules create mode 100644 glue/redhat/srp_daemon.service--
2.10.0--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161015092619.GJ9282-2ukJVAZIZ/[email protected]
Quoted 11 lines · Leon Romanovsky
Quoted 5 lines · Jarod Wilson
This is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split.
Jarod,
I'm far a way from packaging, so I have very general questions.
1. You mentioned FC, but used glue/redhat/. Is it applicable for Centos?
Red Hat is the driving force behind Red Hat Enterprise Linux, CentOS (or any other clone) and Fedora, so it would generally be applicable for all of them, similar to how the 'debian' stuff is generally applicable to derivatives like ubuntu as well.
Quoted 1 line
2. Do FC and Centos need similar files in structure?
For the most part, they should be identical.
Quoted 1 line
3. Does it make sense to rename glue/ to be packages/ and move debian there?
That, or as Jason has suggested, just have a top-level redhat directory, same as the debian one. Don't really care much what it's called, just as long as we can get (at least most of) this stuff into the tree, rather than having it lingering in our own special package.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Jarod Wilson
Quoted 1 line
3. Does it make sense to rename glue/ to be packages/ and move debian there?
That, or as Jason has suggested, just have a top-level redhat directory, same as the debian one. Don't really care much what it's called, just as long as we can get (at least most of) this stuff into the tree, rather than having it lingering in our own special package.
The debian/ directory has to be top level for debian tools, so I'm inclined to just follow the pattern and go with redhat/.
I think it is no problem to take what you have right away, but lets try to move as much as is trivial/sensible into common places.
Maybe we can tackle the larger questions (eg systemd) later..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161017161154.GB5679-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Quoted 11 lines · Jason Gunthorpe
Quoted 6 lines · Jarod Wilson
Quoted 1 line
3. Does it make sense to rename glue/ to be packages/ and move debian there?
That, or as Jason has suggested, just have a top-level redhat directory, same as the debian one. Don't really care much what it's called, just as long as we can get (at least most of) this stuff into the tree, rather than having it lingering in our own special package.
The debian/ directory has to be top level for debian tools, so I'm inclined to just follow the pattern and go with redhat/.
Okay, good, my vague recollection of that was correct.
Quoted 2 lines
I think it is no problem to take what you have right away, but lets try to move as much as is trivial/sensible into common places.
I'm shuffling things around locally to redhat/ and have pulled in your Docs install change. Want me to finish cleaning up, double-check that it all builds, and ship a v2 set?
Quoted 1 line
Maybe we can tackle the larger questions (eg systemd) later..
Some of these issues might be better addressed once more distros have had a chance to digest the new package and see what they still need. Entirely possible others have a similar pile of glue for their distro, including generic parts, and their generic parts are more polished than ours.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
v2 cover rdma-core redhat/ infrastructure
In reply to a message not in the archiveThis is a set of patches to make some minor changes to the stock spec file, add a bunch of userspace glue that Red Hat has been shipping on it's own in Red Hat Enterprise Linux and Fedora for a while now, and a revised split package spec file that we're likely to use in at least RHEL, to preserve the current packaging split, save a change that merges all libibverbs providers into the libibverbs package itself (with appropriate Obsoletes/Provides).
This second spin incorporates changes that hopefully address all feedback from the first version of the patchset.
Jarod Wilson (4):
Install end user focused documentation files
redhat: add udev/systemd/etc infrastructure bits
redhat: copy stock spec for RH customization redhat/spec: build split rpm packages
CMakeLists.txt | 3 +- Documentation/CMakeLists.txt | 10 + debian/ibacm.install | 1 + debian/ibverbs-providers.install | 1 + debian/libibcm1.install | 1 + debian/libibverbs1.install | 1 + debian/librdmacm1.install | 1 + debian/srptools.install | 1 + rdma-core.spec | 6 +- redhat/ibacm.service | 12 ++ redhat/rdma-core.spec | 417 ++++++++++++++++++++++++++++++++++++ redhat/rdma.conf | 25 +++ redhat/rdma.cxgb3.sys.modprobe | 1 + redhat/rdma.cxgb4.sys.modprobe | 1 + redhat/rdma.fixup-mtrr.awk | 160 ++++++++++++++ redhat/rdma.ifdown-ib | 183 ++++++++++++++++ redhat/rdma.ifup-ib | 308 ++++++++++++++++++++++++++ redhat/rdma.kernel-init | 262 ++++++++++++++++++++++ redhat/rdma.mlx4-setup.sh | 91 ++++++++ redhat/rdma.mlx4.conf | 27 +++ redhat/rdma.mlx4.sys.modprobe | 5 + redhat/rdma.mlx4.user.modprobe | 21 ++ redhat/rdma.modules-setup.sh | 30 +++ redhat/rdma.service | 15 ++ redhat/rdma.sriov-init | 137 ++++++++++++ redhat/rdma.sriov-vfs | 41 ++++ redhat/rdma.udev-ipoib-naming.rules | 13 ++ redhat/rdma.udev-rules | 18 ++ redhat/srp_daemon.service | 17 ++ 29 files changed, 1807 insertions(+), 2 deletions(-) create mode 100644 Documentation/CMakeLists.txt create mode 100644 redhat/ibacm.service create mode 100644 redhat/rdma-core.spec create mode 100644 redhat/rdma.conf create mode 100644 redhat/rdma.cxgb3.sys.modprobe create mode 100644 redhat/rdma.cxgb4.sys.modprobe create mode 100644 redhat/rdma.fixup-mtrr.awk create mode 100644 redhat/rdma.ifdown-ib create mode 100644 redhat/rdma.ifup-ib create mode 100644 redhat/rdma.kernel-init create mode 100644 redhat/rdma.mlx4-setup.sh create mode 100644 redhat/rdma.mlx4.conf create mode 100644 redhat/rdma.mlx4.sys.modprobe create mode 100644 redhat/rdma.mlx4.user.modprobe create mode 100644 redhat/rdma.modules-setup.sh create mode 100644 redhat/rdma.service create mode 100644 redhat/rdma.sriov-init create mode 100644 redhat/rdma.sriov-vfs create mode 100644 redhat/rdma.udev-ipoib-naming.rules create mode 100644 redhat/rdma.udev-rules create mode 100644 redhat/srp_daemon.service
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161020153357.27286-1-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
PATCH v2 1/4 Install end user focused documentation files
We recommend that all distros ship these.
v2: installing README.md and MAINTAINERS as well.
--- CMakeLists.txt | 3 ++- Documentation/CMakeLists.txt | 10 ++++++++++ debian/ibacm.install | 1 + debian/ibverbs-providers.install | 1 + debian/libibcm1.install | 1 + debian/libibverbs1.install | 1 + debian/librdmacm1.install | 1 + debian/srptools.install | 1 + rdma-core.spec | 6 +++++- 9 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Documentation/CMakeLists.txt
CMakeLists.txt +2 -1
@@ -21,7 +21,7 @@ # Use the historical search path for providers, in the standard system library. cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR) -project(RDMA C) +project(rdma-core C) # CMake likes to use -rdynamic too much, they fixed it in 3.4. if(POLICY CMP0065)
@@ -259,6 +259,7 @@ configure_file("${BUILDLIB}/config.h.in" "${BUILD_INCLUDE}/config.h" ESCAPE_QUOT # Sub-directories add_subdirectory(ccan) add_subdirectory(util) +add_subdirectory(Documentation) # Libraries add_subdirectory(libibumad) add_subdirectory(libibumad/man)
Documentation/CMakeLists.txt new file +10 -0
@@ -0,0 +1,10 @@ +install(FILES + ibacm.md + ibsrpdm.md + libibcm.md + libibverbs.md + librdmacm.md + rxe.md + ../README.md + ../MAINTAINERS + DESTINATION "${CMAKE_INSTALL_DOCDIR}")
debian/ibacm.install +1 -0
@@ -8,3 +8,4 @@ usr/share/man/man1/ib_acme.1 usr/share/man/man1/ibacm.1 usr/share/man/man7/ibacm.7 usr/share/man/man7/ibacm_prov.7 +usr/share/doc/rdma-core/ibacm.md usr/share/doc/ibacm/
debian/ibverbs-providers.install +1 -0
@@ -5,3 +5,4 @@ usr/lib/truescale-serdes.cmds usr/share/man/man8/rxe_cfg.8 usr/share/man/man7/rxe.7 usr/bin/rxe_cfg +usr/share/doc/rdma-core/rxe.md usr/share/doc/ibverbs-providers/
debian/libibcm1.install +1 -0
@@ -1 +1,2 @@ usr/lib/*/libibcm*.so.* +usr/share/doc/rdma-core/libibcm.md usr/share/doc/libibcm1/
debian/libibverbs1.install +1 -0
@@ -1 +1,2 @@ usr/lib/*/libibverbs*.so.* +usr/share/doc/rdma-core/libibverbs.md usr/share/doc/libibverbs1/
debian/librdmacm1.install +1 -0
@@ -1,2 +1,3 @@ usr/lib/*/librdmacm*.so.* usr/lib/*/rsocket/librspreload*.so* +usr/share/doc/rdma-core/librdmacm.md usr/share/doc/librdmacm1/
debian/srptools.install +1 -0
@@ -6,3 +6,4 @@ usr/sbin/ibsrpdm usr/sbin/srp_daemon usr/share/man/man1/ibsrpdm.1 usr/share/man/man1/srp_daemon.1 +usr/share/doc/rdma-core/ibsrpdm.md usr/share/doc/srptools/
rdma-core.spec +5 -1
@@ -85,7 +85,8 @@ This is a simple example without the split sub packages to get things started. -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ - -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} + -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} %make_jobs %install
@@ -102,6 +103,8 @@ rm -rf %{buildroot}/%{my_unitdir}/ %files %doc %{_mandir}/man*/* +%doc %{_docdir}/%{name}-%{version}/README.md +%doc %{_docdir}/%{name}-%{version}/MAINTAINERS %{_bindir}/* %{_includedir}/* %{_libdir}/lib*.so*
@@ -110,6 +113,7 @@ rm -rf %{buildroot}/%{my_unitdir}/ %{_libdir}/rsocket/* %{_sbindir}/* %{_libexecdir}/* +%{_docdir}/%{name}-%{version}/* %if 0%{?_unitdir:1} %{_unitdir}/* %else
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 2/4 redhat: add udev/systemd/etc infrastructure bits
In reply to a message not in the archiveRed Hat has been shipping an "rdma" package, as well as it's own systemd unit files for some daemons for a while now, in both Fedora and Red Hat Enterprise Linux. Some of these are fairly RH-specific, but might be of use to others, so we'd like to move them into the upstream source tree.
Most of these were authored by Doug Ledford, though I'm currently the one that maintains (most of) them in RHEL.
--- redhat/ibacm.service | 12 ++ redhat/rdma.conf | 25 +++ redhat/rdma.cxgb3.sys.modprobe | 1 + redhat/rdma.cxgb4.sys.modprobe | 1 + redhat/rdma.fixup-mtrr.awk | 160 +++++++++++++++++++ redhat/rdma.ifdown-ib | 183 +++++++++++++++++++++ redhat/rdma.ifup-ib | 308 ++++++++++++++++++++++++++++++++++++ redhat/rdma.kernel-init | 262 ++++++++++++++++++++++++++++++ redhat/rdma.mlx4-setup.sh | 91 +++++++++++ redhat/rdma.mlx4.conf | 27 ++++ redhat/rdma.mlx4.sys.modprobe | 5 + redhat/rdma.mlx4.user.modprobe | 21 +++ redhat/rdma.modules-setup.sh | 30 ++++ redhat/rdma.service | 15 ++ redhat/rdma.sriov-init | 137 ++++++++++++++++ redhat/rdma.sriov-vfs | 41 +++++ redhat/rdma.udev-ipoib-naming.rules | 13 ++ redhat/rdma.udev-rules | 18 +++ redhat/srp_daemon.service | 17 ++ 19 files changed, 1367 insertions(+) create mode 100644 redhat/ibacm.service create mode 100644 redhat/rdma.conf create mode 100644 redhat/rdma.cxgb3.sys.modprobe create mode 100644 redhat/rdma.cxgb4.sys.modprobe create mode 100644 redhat/rdma.fixup-mtrr.awk create mode 100644 redhat/rdma.ifdown-ib create mode 100644 redhat/rdma.ifup-ib create mode 100644 redhat/rdma.kernel-init create mode 100644 redhat/rdma.mlx4-setup.sh create mode 100644 redhat/rdma.mlx4.conf create mode 100644 redhat/rdma.mlx4.sys.modprobe create mode 100644 redhat/rdma.mlx4.user.modprobe create mode 100644 redhat/rdma.modules-setup.sh create mode 100644 redhat/rdma.service create mode 100644 redhat/rdma.sriov-init create mode 100644 redhat/rdma.sriov-vfs create mode 100644 redhat/rdma.udev-ipoib-naming.rules create mode 100644 redhat/rdma.udev-rules create mode 100644 redhat/srp_daemon.service
redhat/ibacm.service new file +12 -0
@@ -0,0 +1,12 @@ +[Unit] +Description=Starts the InfiniBand Address Cache Manager daemon +Documentation=man:ibacm +Requires=rdma.service +After=rdma.service opensm.service + +[Service] +Type=forking +ExecStart=/usr/sbin/ibacm + +[Install] +WantedBy=network.target
redhat/rdma.conf new file +25 -0
@@ -0,0 +1,25 @@ +# Load IPoIB +IPOIB_LOAD=yes +# Load SRP (SCSI Remote Protocol initiator support) module +SRP_LOAD=yes +# Load SRPT (SCSI Remote Protocol target support) module +SRPT_LOAD=yes +# Load iSER (iSCSI over RDMA initiator support) module +ISER_LOAD=yes +# Load iSERT (iSCSI over RDMA target support) module +ISERT_LOAD=yes +# Load RDS (Reliable Datagram Service) network protocol +RDS_LOAD=no +# Load NFSoRDMA client transport module +XPRTRDMA_LOAD=yes +# Load NFSoRDMA server transport module +SVCRDMA_LOAD=no +# Load Tech Preview device driver modules +TECH_PREVIEW_LOAD=no +# Should we modify the system mtrr registers? We may need to do this if you +# get messages from the ib_ipath driver saying that it couldn't enable +# write combining for the PIO buffs on the card. +# +# Note: recent kernels should do this for us, but in case they don't, we'll +# leave this option +FIXUP_MTRR_REGS=no
redhat/rdma.cxgb3.sys.modprobe new file +1 -0
@@ -0,0 +1 @@ +install cxgb3 /sbin/modprobe --ignore-install cxgb3 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb3
redhat/rdma.cxgb4.sys.modprobe new file +1 -0
@@ -0,0 +1 @@ +install cxgb4 /sbin/modprobe --ignore-install cxgb4 $CMDLINE_OPTS && /sbin/modprobe iw_cxgb4
redhat/rdma.fixup-mtrr.awk new file +160 -0
160 lines not on this page · raw message
redhat/rdma.ifdown-ib new file +183 -0
183 lines not on this page · raw message
redhat/rdma.ifup-ib new file +308 -0
308 lines not on this page · raw message
redhat/rdma.kernel-init new file +262 -0
262 lines not on this page · raw message
redhat/rdma.mlx4-setup.sh new file +91 -0
91 lines not on this page · raw message
redhat/rdma.mlx4.conf new file +27 -0
@@ -0,0 +1,27 @@ +# Config file for mlx4 hardware port settings +# This file is read when the mlx4_core module is loaded and used to +# set the port types for any hardware found. If a card is not listed +# in this file, then its port types are left alone. +# +# Format: +# <pci_device_of_card> <port1_type> [port2_type] +# +# @port1 and @port2: +# One of auto, ib, or eth. No checking is performed to make sure that +# combinations are valid. Invalid inputs will result in the driver +# not setting the port to the type requested. port1 is required at +# all times, port2 is required for dual port cards. +# +# Example: +# 0000:0b:00.0 eth eth +# +# You can find the right pci device to use for any given card by loading +# the mlx4_core module, then going to /sys/bus/pci/drivers/mlx4_core and +# seeing what possible PCI devices are listed there. The possible values +# for ports are: ib, eth, and auto. However, not all cards support all +# types, so if you get messages from the kernel that your selected port +# type isn't supported, there's nothing this script can do about it. Also, +# some cards don't support using different types on the two ports (aka, +# both ports must be either eth or ib). Again, we can't set what the kernel +# or hardware won't support. +#
redhat/rdma.mlx4.sys.modprobe new file +5 -0
@@ -0,0 +1,5 @@ +# WARNING! - This file is overwritten any time the rdma rpm package is +# updated. Please do not make any changes to this file. Instead, make +# changes to the mlx4.conf file. It's contents are preserved if they +# have been changed from the default values. +install mlx4_core /sbin/modprobe --ignore-install mlx4_core $CMDLINE_OPTS && (if [ -f /usr/libexec/mlx4-setup.sh -a -f /etc/rdma/mlx4.conf ]; then /usr/libexec/mlx4-setup.sh < /etc/rdma/mlx4.conf; fi; /sbin/modprobe mlx4_en; if /sbin/modinfo mlx4_ib > /dev/null 2>&1; then /sbin/modprobe mlx4_ib; fi)
redhat/rdma.mlx4.user.modprobe new file +21 -0
@@ -0,0 +1,21 @@ +# This file is intended for users to select the various module options +# they need for the mlx4 driver. On upgrade of the rdma package, +# any user made changes to this file are preserved. Any changes made +# to the libmlx4.conf file in this directory are overwritten on +# pacakge upgrade. +# +# Some sample options and what they would do +# Enable debugging output, device managed flow control, and disable SRIOV +#options mlx4_core debug_level=1 log_num_mgm_entry_size=-1 probe_vf=0 num_vfs=0 +# +# Enable debugging output and create SRIOV devices, but don't attach any of +# the child devices to the host, only the parent device +#options mlx4_core debug_level=1 probe_vf=0 num_vfs=7 +# +# Enable debugging output, SRIOV, and attach one of the SRIOV child devices +# in addition to the parent device to the host +#options mlx4_core debug_level=1 probe_vf=1 num_vfs=7 +# +# Enable per priority flow control for send and receive, setting both priority +# 1 and 2 as no drop priorities +#options mlx4_en pfctx=3 pfcrx=3
redhat/rdma.modules-setup.sh new file +30 -0
@@ -0,0 +1,30 @@ +#!/bin/bash + +check() { + [ -n "$hostonly" -a -c /sys/class/infiniband_verbs/uverbs0 ] && return 0 + [ -n "$hostonly" ] && return 255 + return 0 +} + +depends() { + return 0 +} + +install() { + inst /etc/rdma/rdma.conf + inst /etc/rdma/mlx4.conf + inst /etc/rdma/sriov-vfs + inst /usr/libexec/rdma-init-kernel + inst /usr/libexec/rdma-fixup-mtrr.awk + inst /usr/libexec/mlx4-setup.sh + inst /usr/libexec/rdma-set-sriov-vf + inst /usr/lib/modprobe.d/libmlx4.conf + inst_multiple lspci setpci awk sleep + inst_multiple -o /etc/modprobe.d/mlx4.conf + inst_rules 98-rdma.rules 70-persistent-ipoib.rules +} + +installkernel() { + hostonly='' instmods =drivers/infiniband =drivers/net/ethernet/mellanox =drivers/net/ethernet/chelsio =drivers/net/ethernet/cisco =drivers/net/ethernet/emulex =drivers/target + hostonly='' instmods crc-t10dif crct10dif_common +}
redhat/rdma.service new file +15 -0
@@ -0,0 +1,15 @@ +[Unit] +Description=Initialize the iWARP/InfiniBand/RDMA stack in the kernel +Documentation=file:/etc/rdma/rdma.conf +RefuseManualStop=true +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Before=network.target remote-fs-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/rdma-init-kernel + +[Install] +WantedBy=sysinit.target
redhat/rdma.sriov-init new file +137 -0
137 lines not on this page · raw message
redhat/rdma.sriov-vfs new file +41 -0
41 lines not on this page · raw message
redhat/rdma.udev-ipoib-naming.rules new file +13 -0
@@ -0,0 +1,13 @@ +# This is a sample udev rules file that demonstrates how to get udev to +# set the name of IPoIB interfaces to whatever you wish. There is a +# 16 character limit on network device names though, so don't go too nuts +# +# Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the +# ATTR{address} match must start with ?* and only reference the last 8 +# bytes of the address or else the address might not match on any given +# start of the IPoIB stack +# +# Note: as of rhel7, udev is case sensitive on the address field match +# and all addresses need to be in lower case. +# +# ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3"
redhat/rdma.udev-rules new file +18 -0
@@ -0,0 +1,18 @@ +# We list all the various kernel modules that drive hardware in the +# InfiniBand stack (and a few in the network stack that might not actually +# be RDMA capable, but we don't know that at this time and it's safe to +# enable the IB stack, so do so unilaterally) and on load of any of that +# hardware, we trigger the rdma.service load in systemd + +SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" +SUBSYSTEM=="module", KERNEL=="enic", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service" + +# When we detect a new verbs device is added to the system, set the node +# description on that device +# If rdma-ndd is installed, defer the setting of the node description to it. +SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'" +
redhat/srp_daemon.service new file +17 -0
@@ -0,0 +1,17 @@ +[Unit] +Description=Start or stop the daemon that attaches to SRP devices +Documentation=file:///etc/rdma/rdma.conf file:///etc/srp_daemon.conf +DefaultDependencies=false +Conflicts=emergency.target emergency.service +Requires=rdma.service +Wants=opensm.service +After=rdma.service opensm.service +After=network.target +Before=remote-fs-pre.target + +[Service] +Type=simple +ExecStart=/usr/sbin/srp_daemon.sh + +[Install] +WantedBy=remote-fs-pre.target
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/4 redhat: copy stock spec for RH customization
In reply to a message not in the archiveWe're going to need to do a bit of majorly invasive surgery, and we're not sure everyone else is going to want to package things this way, so we'll make a copy of our own spec here, starting from the one in the tree.
--- redhat/rdma-core.spec | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 redhat/rdma-core.spec
redhat/rdma-core.spec new file +125 -0
@@ -0,0 +1,125 @@ +Name: rdma-core +Version: 11 +Release: 1%{?dist} +Summary: RDMA core userspace libraries and daemons + +# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license +# providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause +# providers/rxe/ Incorporates code from ipathverbs and contains the patent clause +# providers/hfi1verbs Uses the 3 Clause BSD license +License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +Url: http://openfabrics.org/ +Source: rdma-core-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +BuildRequires: binutils +BuildRequires: cmake >= 2.8.11 +BuildRequires: gcc +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libnl-3.0) +BuildRequires: pkgconfig(libnl-route-3.0) +BuildRequires: valgrind-devel + +# Since we recommend developers use Ninja, so should packagers, for consistency. +%define CMAKE_FLAGS %{nil} +%if 0%{?suse_version} +# SuSE releases have it, and sometime around cmake 3.3.2-1.2 the macros learned to use it. +BuildRequires: ninja,make +%define __builder ninja +# cmake_install,make_jobs is specified by opensuse + +# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags +# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style +# module libraries (eg ibacmp). +%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS="" +%else +%if 0%{?fedora} >= 23 +# Ninja was introduced in FC23 +BuildRequires: ninja-build +%define CMAKE_FLAGS -GNinja +%define make_jobs ninja -v %{?_smp_mflags} +%define cmake_install DESTDIR=%{buildroot} ninja-build install +%else +# Fallback to make otherwise +BuildRequires: make +%define make_jobs make -v %{?_smp_mflags} +%define cmake_install DESTDIR=%{buildroot} make install +%endif +%endif + +%description +Temporary packaging + +This is a simple example without the split sub packages to get things started. + +%prep +%setup + +%build + +# Detect if systemd is supported on this system +%if 0%{?_unitdir:1} +%define my_unitdir %{_unitdir} +%else +%define my_unitdir /tmp/ +%endif + +# New RPM defines _rundir, usually as /run +%if 0%{?_rundir:1} +%else +%define _rundir /var/run +%endif + +# Pass all of the rpm paths directly to GNUInstallDirs and our other defines. +%cmake %{CMAKE_FLAGS} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \ + -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ + -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ + -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ + -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ + -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ + -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} +%make_jobs + +%install +%cmake_install + +%if 0%{?_unitdir:1} +rm -rf %{buildroot}/%{_initrddir}/ +%else +rm -rf %{buildroot}/%{my_unitdir}/ +%endif + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%doc %{_mandir}/man*/* +%{_bindir}/* +%{_includedir}/* +%{_libdir}/lib*.so* +%{_libdir}/libibverbs/* +%{_libdir}/ibacm/* +%{_libdir}/rsocket/* +%{_sbindir}/* +%{_libexecdir}/* +%{_docdir}/%{name}-%{version}/* +%if 0%{?_unitdir:1} +%{_unitdir}/* +%else +%config %{_initrddir}/* +%endif +%config %{_sysconfdir}/iwpmd.conf +%config %{_sysconfdir}/srp_daemon.conf +%config %{_sysconfdir}/libibverbs.d/* +%config %{_sysconfdir}/logrotate.d/srp_daemon +%{_sysconfdir}/modprobe.d/* +%config %{_sysconfdir}/rsyslog.d/srp_daemon.conf
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 4/4 redhat/spec: build split rpm packages
In reply to a message not in the archiveWe're thinking that the upgrade path for our users will be simpler and less surprising if we take rdma-core and split out the end result into the same packages we currently ship in our distributions, save the libibverbs providers, which are all merged into libibverbs. End result with this spec:
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-devel-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibverbs-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibverbs-utils-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/ibacm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/iwpmd-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibcm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/libibumad-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/librdmacm-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/librdmacm-utils-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/srp_daemon-11-1.el7.x86_64.rpm
Wrote: /home/jwilson/rpmbuild/RPMS/x86_64/rdma-core-debuginfo-11-1.el7.x86_64.rpm
--- redhat/rdma-core.spec | 360 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 326 insertions(+), 34 deletions(-)
redhat/rdma-core.spec +326 -34
@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSD Url: http://openfabrics.org/ Source: rdma-core-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/linux-rdma/rdma-core +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: binutils BuildRequires: cmake >= 2.8.11
@@ -19,20 +20,15 @@ BuildRequires: pkgconfig BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel +BuildRequires: libnl3-devel + +# Red Hat/Fedora previously shipped redhat/ as a stand-alone +# package called 'rdma', which we're supplanting here. +Provides: rdma = %{version}-%{release} +Obsoletes: rdma < %{version}-%{release} # Since we recommend developers use Ninja, so should packagers, for consistency. %define CMAKE_FLAGS %{nil} -%if 0%{?suse_version} -# SuSE releases have it, and sometime around cmake 3.3.2-1.2 the macros learned to use it. -BuildRequires: ninja,make -%define __builder ninja -# cmake_install,make_jobs is specified by opensuse - -# Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags -# which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style -# module libraries (eg ibacmp). -%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS="" -%else %if 0%{?fedora} >= 23 # Ninja was introduced in FC23 BuildRequires: ninja-build
@@ -45,12 +41,161 @@ BuildRequires: make %define make_jobs make -v %{?_smp_mflags} %define cmake_install DESTDIR=%{buildroot} make install %endif + +%define systemd_dep systemd-units +%if 0%{?fedora} >= 18 +%define systemd_dep systemd %endif %description -Temporary packaging +RDMA core userspace infrastructure and documentation. + +%package devel +Summary: RDMA core development libraries and headers +Provides: libibverbs-devel = %{version}-%{release} +Obsoletes: libibverbs-devel < %{version}-%{release} +Provides: libibcm-devel = %{version}-%{release} +Obsoletes: libibcm-devel < %{version}-%{release} +Provides: libibumad-devel = %{version}-%{release} +Obsoletes: libibumad-devel < %{version}-%{release} +Provides: librdmacm-devel = %{version}-%{release} +Obsoletes: librdmacm-devel < %{version}-%{release} +Provides: ibacm-devel = %{version}-%{release} +Obsoletes: ibacm-devel < %{version}-%{release} + +%description devel +RDMA core development libraries and headers. + +%package -n libibverbs +Summary: A library and drivers for direct userspace use of RDMA (InfiniBand/iWARP) hardware +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig +Requires: rdma-core +Provides: libcxgb3 = %{version}-%{release} +Obsoletes: libcxgb3 < %{version}-%{release} +Provides: libcxgb4 = %{version}-%{release} +Obsoletes: libcxgb4 < %{version}-%{release} +Provides: libhfi1 = %{version}-%{release} +Obsoletes: libhfi1 < %{version}-%{release} +Provides: libi40iw = %{version}-%{release} +Obsoletes: libi40iw < %{version}-%{release} +Provides: libipathverbs = %{version}-%{release} +Obsoletes: libipathverbs < %{version}-%{release} +Provides: libmlx4 = %{version}-%{release} +Obsoletes: libmlx4 < %{version}-%{release} +Provides: libmlx5 = %{version}-%{release} +Obsoletes: libmlx5 < %{version}-%{release} +Provides: libmthca = %{version}-%{release} +Obsoletes: libmthca < %{version}-%{release} +Provides: libnes = %{version}-%{release} +Obsoletes: libnes < %{version}-%{release} +Provides: libocrdma = %{version}-%{release} +Obsoletes: libocrdma < %{version}-%{release} +Provides: librxe = %{version}-%{release} +Obsoletes: librxe < %{version}-%{release} + +%description -n libibverbs +libibverbs is a library that allows userspace processes to use RDMA +"verbs" as described in the InfiniBand Architecture Specification and +the RDMA Protocol Verbs Specification. This includes direct hardware +access from userspace to InfiniBand/iWARP adapters (kernel bypass) for +fast path operations. + +Device-specific plug-in ibverbs userspace drivers are included: + +- libcxgb3: Chelsio T3 iWARP HCA +- libcxgb4: Chelsio T4 iWARP HCA +- libhfi1: Intel Omni-Path HFI +- libi40iw: Intel Ethernet Connection X722 RDMA +- libipathverbs: QLogic InfiniPath HCA +- libmlx4: Mellanox ConnectX-3 InfiniBand HCA +- libmlx5: Mellanox Connect-IB/X-4+ InfiniBand HCA +- libmthca: Mellanox InfiniBand HCA +- libnes: NetEffect RNIC +- libocrdma: Emulex OneConnect RDMA/RoCE Device +- librxe: A software implementation of the RoCE protocol + +%package -n libibverbs-utils +Summary: Examples for the libibverbs library +Requires: libibverbs%{?_isa} = %{version}-%{release} + +%description -n libibverbs-utils +Useful libibverbs example programs such as ibv_devinfo, which +displays information about RDMA devices. + +%package -n ibacm +Summary: InfiniBand Communication Manager Assistant +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n ibacm +The ibacm daemon helps reduce the load of managing path record lookups on +large InfiniBand fabrics by providing a user space implementation of what +is functionally similar to an ARP cache. The use of ibacm, when properly +configured, can reduce the SA packet load of a large IB cluster from O(n^2) +to O(n). The ibacm daemon is started and normally runs in the background, +user applications need not know about this daemon as long as their app +uses librdmacm to handle connection bring up/tear down. The librdmacm +library knows how to talk directly to the ibacm daemon to retrieve data. + +%package -n iwpmd +Summary: iWarp Port Mapper userspace daemon +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n iwpmd +iwpmd provides a userspace service for iWarp drivers to claim +tcp ports through the standard socket interface. + +%package -n libibcm +Summary: Userspace InfiniBand Connection Manager +ExcludeArch: s390 s390x +Requires: rdma-core + +%description -n libibcm +libibcm provides a userspace library that handles the majority of the low +level work required to open an RDMA connection between two machines. + +%package -n libibumad +Summary: OpenFabrics Alliance InfiniBand umad (userspace management datagram) library +Requires: rdma-core + +%description -n libibumad +libibumad provides the userspace management datagram (umad) library +functions, which sit on top of the umad modules in the kernel. These +are used by the IB diagnostic and management tools, including OpenSM. + +%package -n librdmacm +Summary: Userspace RDMA Connection Manager +Requires: rdma-core + +%description -n librdmacm +librdmacm provides a userspace RDMA Communication Managment API. + +%package -n librdmacm-utils +Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release} + +%description -n librdmacm-utils +Example test programs for the librdmacm library. -This is a simple example without the split sub packages to get things started. +%package -n srp_daemon +Summary: Tools for using the InfiniBand SRP protocol devices +Obsoletes: srptools <= 1.0.3 +Provides: srptools = %{version}-%{release} +Obsoletes: openib-srptools <= 0.0.6 +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep} +Requires: rdma-core + +%description -n srp_daemon +In conjunction with the kernel ib_srp driver, srptools allows you to +discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. %prep %setup
@@ -92,6 +237,43 @@ This is a simple example without the split sub packages to get things started. %install %cmake_install +mkdir -p %{buildroot}/%{_sysconfdir}/rdma + +# Red Hat specific glue +%global dracutlibdir %{_prefix}/lib/dracut +%global sysmodprobedir %{_prefix}/lib/modprobe.d +mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts +mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d +mkdir -p %{buildroot}%{_libexecdir} +mkdir -p %{buildroot}%{_udevrulesdir} +mkdir -p %{buildroot}%{dracutlibdir}/modules.d/05rdma +mkdir -p %{buildroot}%{sysmodprobedir} +install -D -m0644 redhat/rdma.conf %{buildroot}/%{_sysconfdir}/rdma/rdma.conf +install -D -m0644 redhat/rdma.sriov-vfs %{buildroot}/%{_sysconfdir}/rdma/sriov-vfs +install -D -m0644 redhat/rdma.mlx4.conf %{buildroot}/%{_sysconfdir}/rdma/mlx4.conf +install -D -m0755 redhat/rdma.ifup-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifup-ib +install -D -m0755 redhat/rdma.ifdown-ib %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ib +install -D -m0644 redhat/rdma.service %{buildroot}%{_unitdir}/rdma.service +install -D -m0644 redhat/rdma.udev-ipoib-naming.rules %{buildroot}%{_sysconfdir}/udev/rules.d/70-persistent-ipoib.rules +install -D -m0644 redhat/rdma.mlx4.user.modprobe %{buildroot}%{_sysconfdir}/modprobe.d/mlx4.conf +install -D -m0755 redhat/rdma.modules-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh +install -D -m0644 redhat/rdma.udev-rules %{buildroot}%{_udevrulesdir}/98-rdma.rules +install -D -m0644 redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/libmlx4.conf +install -D -m0644 redhat/rdma.cxgb3.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb3.conf +install -D -m0644 redhat/rdma.cxgb4.sys.modprobe %{buildroot}%{sysmodprobedir}/cxgb4.conf +install -D -m0755 redhat/rdma.kernel-init %{buildroot}%{_libexecdir}/rdma-init-kernel +install -D -m0755 redhat/rdma.sriov-init %{buildroot}%{_libexecdir}/rdma-set-sriov-vf +install -D -m0644 redhat/rdma.fixup-mtrr.awk %{buildroot}%{_libexecdir}/rdma-fixup-mtrr.awk +install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh + +# ibacm +%{buildroot}/%{_bindir}/ib_acme -D . -O +install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/ +install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/ + +# srp_daemon +install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/ + %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/ %else
@@ -101,25 +283,135 @@ rm -rf %{buildroot}/%{my_unitdir}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post -n ibacm +%systemd_post ibacm.service + +%preun -n ibacm +%systemd_preun ibacm.service + +%postun -n ibacm +%systemd_postun_with_restart ibacm.service + +%post -n libibcm -p /sbin/ldconfig +%postun -n libibcm -p /sbin/ldconfig + %files -%doc %{_mandir}/man*/* -%{_bindir}/* +%dir %{_sysconfdir}/rdma +%doc %{_docdir}/%{name}-%{version}/README.md +%config(noreplace) %{_sysconfdir}/rdma/* +%config(noreplace) %{_sysconfdir}/udev/rules.d/* +%config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf +%config(noreplace) %{_sysconfdir}/modprobe.d/truescale.conf +%{_sysconfdir}/sysconfig/network-scripts/* +%{_unitdir}/rdma.service +%dir %{dracutlibdir}/modules.d/05rdma +%{dracutlibdir}/modules.d/05rdma/module-setup.sh +%{_udevrulesdir}/* +%{sysmodprobedir}/libmlx4.conf +%{sysmodprobedir}/cxgb3.conf +%{sysmodprobedir}/cxgb4.conf +%{_libexecdir}/rdma-init-kernel +%{_libexecdir}/rdma-set-sriov-vf +%{_libexecdir}/rdma-fixup-mtrr.awk +%{_libexecdir}/mlx4-setup.sh +%{_libexecdir}/truescale-serdes.cmds +%license COPYING.* + +%files devel +%doc %{_docdir}/%{name}-%{version}/MAINTAINERS %{_includedir}/* -%{_libdir}/lib*.so* -%{_libdir}/libibverbs/* +%{_libdir}/lib*.so +%{_libdir}/rsocket/*.so +%{_mandir}/man3/ibv_* +%{_mandir}/man3/rdma* +%{_mandir}/man3/umad* +%{_mandir}/man3/*_to_ibv_rate.* +%{_mandir}/man7/rdma_cm.* +%{_mandir}/man7/rsocket.* + +%files -n libibverbs +%dir %{_sysconfdir}/libibverbs.d +%dir %{_libdir}/libibverbs +%{_libdir}/libibverbs*.so.* +%{_libdir}/libibverbs/*.so +%config(noreplace) %{_sysconfdir}/libibverbs.d/*.driver +%doc %{_docdir}/%{name}-%{version}/libibverbs.md +%doc %{_docdir}/%{name}-%{version}/rxe.md +%{_bindir}/rxe_cfg +%{_mandir}/man7/rxe* +%{_mandir}/man8/rxe* + +%files -n libibverbs-utils +%{_bindir}/ibv_* +%{_mandir}/man1/ibv_* + +%files -n ibacm +%config(noreplace) %{_sysconfdir}/rdma/ibacm_opts.cfg +%{_bindir}/ib_acme +%{_sbindir}/ibacm +%{_mandir}/man1/ibacm.* +%{_mandir}/man1/ib_acme.* +%{_mandir}/man7/ibacm.* +%{_mandir}/man7/ibacm_prov.* +%{_unitdir}/ibacm.service +%dir %{_libdir}/ibacm %{_libdir}/ibacm/* -%{_libdir}/rsocket/* -%{_sbindir}/* -%{_libexecdir}/* -%{_docdir}/%{name}-%{version}/* -%if 0%{?_unitdir:1} -%{_unitdir}/* -%else -%config %{_initrddir}/* -%endif -%config %{_sysconfdir}/iwpmd.conf -%config %{_sysconfdir}/srp_daemon.conf -%config %{_sysconfdir}/libibverbs.d/* -%config %{_sysconfdir}/logrotate.d/srp_daemon -%{_sysconfdir}/modprobe.d/* -%config %{_sysconfdir}/rsyslog.d/srp_daemon.conf +%doc %{_docdir}/%{name}-%{version}/ibacm.md + +%files -n iwpmd +%{_bindir}/iwpmd +%{_unitdir}/iwpmd.service +%config(noreplace) %{_sysconfdir}/iwpmd.conf +%{_mandir}/man1/iwpmd.* +%{_mandir}/man5/iwpmd.* + +%files -n libibcm +%{_libdir}/libibcm*.so.* +%doc %{_docdir}/%{name}-%{version}/libibcm.md + +%files -n libibumad +%{_libdir}/libibumad*.so.* + +%files -n librdmacm +%{_libdir}/librdmacm*.so.* +%{_libdir}/rsocket/*.so.* +%doc %{_docdir}/%{name}-%{version}/librdmacm.md + +%files -n librdmacm-utils +%{_bindir}/cmtime +%{_bindir}/mckey +%{_bindir}/rcopy +%{_bindir}/rdma_client +%{_bindir}/rdma_server +%{_bindir}/rdma_xclient +%{_bindir}/rdma_xserver +%{_bindir}/riostream +%{_bindir}/rping +%{_bindir}/rstream +%{_bindir}/ucmatose +%{_bindir}/udaddy +%{_bindir}/udpong +%{_mandir}/man1/mckey.* +%{_mandir}/man1/rcopy.* +%{_mandir}/man1/rdma_client.* +%{_mandir}/man1/rdma_server.* +%{_mandir}/man1/rdma_xclient.* +%{_mandir}/man1/rdma_xserver.* +%{_mandir}/man1/riostream.* +%{_mandir}/man1/rping.* +%{_mandir}/man1/rstream.* +%{_mandir}/man1/ucmatose.* +%{_mandir}/man1/udaddy.* + +%files -n srp_daemon +%config(noreplace) %{_sysconfdir}/srp_daemon.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/srp_daemon +%config(noreplace) %{_sysconfdir}/rsyslog.d/srp_daemon.conf +%{_unitdir}/srp_daemon.service +%{_sbindir}/ibsrpdm +%{_sbindir}/srp_daemon +%{_sbindir}/srp_daemon.sh +%{_sbindir}/run_srp_daemon +%{_mandir}/man1/ibsrpdm.1* +%{_mandir}/man1/srp_daemon.1* +%doc %{_docdir}/%{name}-%{version}/ibsrpdm.md
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161020153357.27286-5-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
Review Summary: RDMA core userspace libraries and daemons · line 10
Quoted 6 lines · Jarod Wilson
(quoted diff) +1
-1@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSD
Is this Ok? The Fedora guidelines I read suggested the PathScale license would need to be assigned a short tag, and I'd be surprised if 'BSD' is the right tag due to the patent stuff..
Review Summary: RDMA core userspace libraries and daemons · line 11
Quoted 1 line
(quoted diff) +0
-0Url: http://openfabrics.org/
I guess we should change this url to
https://github.com/linux-rdma/rdma-core ?
Review Summary: RDMA core userspace libraries and daemons · line 14
Quoted 4 lines
(quoted diff) +2
-1Source: rdma-core-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/linux-rdma/rdma-core +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
I always wondered why there was so much variability in spec files here.. I followed the Fedora guidelines, should we copy the above into the other spec file?
Review BuildRequires: pkgconfig · line 23
Quoted 5 lines
(quoted diff) +1
-0@@ -19,20 +20,15 @@ BuildRequires: pkgconfig BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel +BuildRequires: libnl3-devel
?
Isn't pkgconfig(libnl-3.0) the same thing?
Quoted 4 lines
%define
systemd_depsystemd-units
%if 0%{?fedora} >= 18
%definesystemd_depsystemd
%endif
The source package probably doesn't even build on FC 18.. can probably remove this
Review
Quoted 4 lines
(quoted diff) +4
-0+Summary: InfiniBand Communication Manager Assistant +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep}
I suppose we need these and related in the other spec file too? Looks like this spec file isn't going to work on C6, so you can probably drop the other systemd compat stuff:
redhat/rdma-core.spec +1 -10
@@ -202,13 +202,6 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. %build -# Detect if systemd is supported on this system -%if 0%{?_unitdir:1} -%define my_unitdir %{_unitdir} -%else -%define my_unitdir /tmp/ -%endif - # New RPM defines _rundir, usually as /run %if 0%{?_rundir:1} %else
@@ -228,7 +221,7 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ - -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{_unitdir} \ -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \ -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version}
@@ -276,8 +269,6 @@ install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/ %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/ -%else -rm -rf %{buildroot}/%{my_unitdir}/ %endif %post -p /sbin/ldconfig
Review
Quoted 3 lines
+%package -n librdmacm-utils
(quoted diff) +2
-0+Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release}
Why the requires? Shouldn't auto shlib dependencies take care of that?
Anyhow, this all looks fine to me, I put a branch here, with one change to make the debian packaging work after the README.md change:
https://github.com/jgunthorpe/rdma-plumbing/tree/redhat-packaging
If you want to make any final adjustments let me know, otherwise I will send this on..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161027211059.GA7224-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
Quoted 11 lines · Jason Gunthorpe
Review Summary: RDMA core userspace libraries and daemons · line 10
Quoted 6 lines · Jarod Wilson
(quoted diff) +1
-1@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSDIs this Ok? The Fedora guidelines I read suggested the PathScale license would need to be assigned a short tag, and I'd be surprised if 'BSD' is the right tag due to the patent stuff..
Our standalone libipathverbs has just "GPLv2 or BSD", and I didn't see anything specific about PathScale, but I may not have been looking hard enough or in the right place in the Fedora packaging guidelines. Where did you see that?
Quoted 4 lines
Review Summary: RDMA core userspace libraries and daemons · line 11
Quoted 1 line
(quoted diff) +0
-0Url: http://openfabrics.org/I guess we should change this url to
https://github.com/linux-rdma/rdma-core ?
Either one works for me.
Quoted 8 lines
Review Summary: RDMA core userspace libraries and daemons · line 14
Quoted 4 lines
(quoted diff) +2
-1Source: rdma-core-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/linux-rdma/rdma-core +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)I always wondered why there was so much variability in spec files here.. I followed the Fedora guidelines, should we copy the above into the other spec file?
I believe the current Fedora guidelines actually say "just omit BuildRoot", because rpm will figure out a sane default by itself. The one with mktemp was introduced by the security-conscious/paranoid, I just copied it over from another of the specs I was merging together here, not sure what the "best" route is here now.
Quoted 9 lines
Review BuildRequires: pkgconfig · line 23
Quoted 5 lines
(quoted diff) +1
-0@@ -19,20 +20,15 @@ BuildRequires: pkgconfig BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel +BuildRequires: libnl3-devel?
Isn't pkgconfig(libnl-3.0) the same thing?
Oops, probably. Another copy-paste addition from another spec.
Quoted 7 lines
Quoted 4 lines
%define
systemd_depsystemd-units
%if 0%{?fedora} >= 18
%definesystemd_depsystemd
%endifThe source package probably doesn't even build on FC 18.. can probably remove this
Works for me. FC18 is 3-4 years old now, and nobody sane should be running it for anything useful that they want to deploy new software on.
Quoted 8 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+Summary: InfiniBand Communication Manager Assistant +Requires(post): %{systemd_dep} +Requires(preun): %{systemd_dep} +Requires(postun): %{systemd_dep}I suppose we need these and related in the other spec file too? Looks like this spec file isn't going to work on C6, so you can probably drop the other systemd compat stuff:
Ah, yes, probably a good idea to add these there too. I'd meant to add all the stuff that should go in both specs *before* the split/copy, but alas, I failed. :)
Quoted 26 lines
redhat/rdma-core.spec +1
-8@@ -202,13 +202,6 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. %build -# Detect if systemd is supported on this system -%if 0%{?_unitdir:1} -%define my_unitdir %{_unitdir} -%else -%define my_unitdir /tmp/ -%endif - # New RPM defines _rundir, usually as /run %if 0%{?_rundir:1} %else@@ -228,7 +221,7 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand. -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ - -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{_unitdir} \ -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \ -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \ -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version}
redhat/rdma-core.spec install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/ · line 274
Quoted 8 lines
redhat/rdma-core.spec +0
-2@@ -276,8 +269,6 @@ install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/ %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/ -%else -rm -rf %{buildroot}/%{my_unitdir}/ %endif %post -p /sbin/ldconfig
Looks good to me. And yeah, we have no plans to update the el6 rdma stack with rdma-core and driver refreshes at this stage in it's lifecycle, so there's really no sense in pretending to maybe support it.
Quoted 5 lines
Review
Quoted 3 lines
+%package -n librdmacm-utils
(quoted diff) +2
-0+Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release}Why the requires? Shouldn't auto shlib dependencies take care of that?
Probably. I think this was another legacy bit copied over from a stand-alone spec file.
Quoted 7 lines
Anyhow, this all looks fine to me, I put a branch here, with one change to make the debian packaging work after the README.md change:
https://github.com/jgunthorpe/rdma-plumbing/tree/redhat-packaging
If you want to make any final adjustments let me know, otherwise I will send this on..
Nah, I think things look good, and we can always keep tweaking as needed, this is a solid update to work on top of.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
Quoted 13 lines · Jarod Wilson
Quoted 11 lines · Jason Gunthorpe
Review Summary: RDMA core userspace libraries and daemons · line 10
Quoted 6 lines · Jarod Wilson
(quoted diff) +1
-1@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSDIs this Ok? The Fedora guidelines I read suggested the PathScale license would need to be assigned a short tag, and I'd be surprised if 'BSD' is the right tag due to the patent stuff..
Quoted 1 line
Our standalone libipathverbs has just "GPLv2 or BSD",
I suspect that was a mistake, the difference in the pathscale license is subtle and several other people assumed it was the cannonical 'BSD' text...
Quoted 3 lines
and I didn't see anything specific about PathScale, but I may not have been looking hard enough or in the right place in the Fedora packaging guidelines. Where did you see that?
https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing
'All software in Fedora must be under licenses in the Fedora licensing list.'
The Pathscale license is not in the licensing list. The patent clause seems legally significant enough to at least ask what tag is OK.
Also, we now have CC0 and MIT licensed files, so I guess a 'and CC0 and MIT' is appropriate too?
Quoted 2 lines
Nah, I think things look good, and we can always keep tweaking as needed, this is a solid update to work on top of.
Okay, I'll patch in the changes from this discussion and send the pull.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161028172503.GA28451-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
Quoted 5 lines · Jason Gunthorpe
Quoted 2 lines
Nah, I think things look good, and we can always keep tweaking as needed, this is a solid update to work on top of.
Okay, I'll patch in the changes from this discussion and send the pull.
I added two commits:
https://github.com/linux-rdma/rdma-core/pull/30
This bit seems important:
redhat/rdma-core.spec +1 -2
@@ -267,7 +267,7 @@ install -D -m0644 redhat/rdma.fixup-mtrr.awk %{buildroot}%{_libexecdir}/rdma-fix install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh # ibacm -%{buildroot}/%{_bindir}/ib_acme -D . -O +bin/ib_acme -D . -O install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/ install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/ --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
In reply to a message not in the archiveQuoted 14 lines · Jason Gunthorpe
Quoted 13 lines · Jarod Wilson
Quoted 11 lines · Jason Gunthorpe
Review Summary: RDMA core userspace libraries and daemons · line 10
Quoted 6 lines · Jarod Wilson
(quoted diff) +1
-1@@ -7,10 +7,11 @@ Summary: RDMA core userspace libraries and daemons # providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause # providers/rxe/ Incorporates code from ipathverbs and contains the patent clause # providers/hfi1verbs Uses the 3 Clause BSD license -License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD) +License: GPLv2 or BSDIs this Ok? The Fedora guidelines I read suggested the PathScale license would need to be assigned a short tag, and I'd be surprised if 'BSD' is the right tag due to the patent stuff..
Quoted 5 lines
Quoted 1 line
Our standalone libipathverbs has just "GPLv2 or BSD",
I suspect that was a mistake, the difference in the pathscale license is subtle and several other people assumed it was the cannonical 'BSD' text...
I sent something off to the Fedora legal mailing list, we'll see what they have to say. I didn't find anything interesting in the initial package review, nobody questioned the license there, but that could easily have been an oversight.
Signature · 7 lines
Jarod Wilson [email protected] -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
In reply to a message not in the archiveQuoted 9 lines · Jarod Wilson
Quoted 6 lines · Jason Gunthorpe
Quoted 1 line · Jarod Wilson
I guess we should change this url to
https://github.com/linux-rdma/rdma-core ?Either one works for me.
We should get the github url in.
Quoted 9 lines
Quoted 8 lines
Review
Quoted 4 lines
Source: rdma-core-%{version}.tgz
(quoted diff) +2
-1-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/linux-rdma/rdma-core +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)I always wondered why there was so much variability in spec files here.. I followed the Fedora guidelines, should we copy the above into the other spec file?
Quoted 5 lines
I believe the current Fedora guidelines actually say "just omit BuildRoot", because rpm will figure out a sane default by itself. The one with mktemp was introduced by the security-conscious/paranoid, I just copied it over from another of the specs I was merging together here, not sure what the "best" route is here now.
We won't be putting this anywhere that requires the buildroot be specified, so I would leave it out.
Quoted 8 lines
Quoted 5 lines
Review
Quoted 3 lines
+%package -n librdmacm-utils
(quoted diff) +2
-0+Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release}Why the requires? Shouldn't auto shlib dependencies take care of that?
Probably. I think this was another legacy bit copied over from a stand-alone spec file.
Actually, no. When you have a -utils package that goes with a library package, standard procedure is to tie them directly like this. The auto dependency stuff will allow, say, librdmacm-1.1.17-1 and librdmacm-utils-1.1.16-1 to happily satisfy each other since the later librdmacm provides all of the sonames and apis that the -utils package needs. This is as designed as you want a librdamcm update to not trigger a required update of, say, openmpi, unless there is truly a change that requires it. But, for the utils that go with the library, even though we don't *have* to update them with the library, we want that to happen automatically, so the explicit requires makes that happen even if librdmacm-utils was excluded from the update command.
Signature · 4 lines
Doug Ledford <[email protected]> GPG Key ID: 0E572FDD Red Hat, Inc. 100 E. Davie St Raleigh, NC 27601 USA
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH rdma-core v2 4/4] redhat/spec: build split rpm packages
Quoted 9 lines · Doug Ledford
Quoted 8 lines
Quoted 5 lines
Review
Quoted 3 lines
+%package -n librdmacm-utils
(quoted diff) +2
-0+Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release}Why the requires? Shouldn't auto shlib dependencies take care of that?
Probably. I think this was another legacy bit copied over from a stand-alone spec file.
Quoted 11 lines
Actually, no. When you have a -utils package that goes with a library package, standard procedure is to tie them directly like this. The auto dependency stuff will allow, say, librdmacm-1.1.17-1 and librdmacm-utils-1.1.16-1 to happily satisfy each other since the later librdmacm provides all of the sonames and apis that the -utils package needs. This is as designed as you want a librdamcm update to not trigger a required update of, say, openmpi, unless there is truly a change that requires it. But, for the utils that go with the library, even though we don't *have* to update them with the library, we want that to happen automatically, so the explicit requires makes that happen even if librdmacm-utils was excluded from the update command.
Okay, Jarod you will need to send a patch to put this back, because I applied all the changes discussed in this email when I made the pull request.
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20161104004213.GA28485-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
PATCH 1/1 redhat/spec: add back strict librdmacm Requires
Per discussion on list with Doug and Jason, add back the strict librdmacm Requires so that librdmacm and librdmacm-utils are as tightly coupled as possible.
--- redhat/rdma-core.spec | 1 + 1 file changed, 1 insertion(+)
redhat/rdma-core.spec +1 -0
@@ -170,6 +170,7 @@ librdmacm provides a userspace RDMA Communication Managment API. %package -n librdmacm-utils Summary: Examples for the librdmacm library +Requires: librdmacm%{?_isa} = %{version}-%{release} %description -n librdmacm-utils Example test programs for the librdmacm library.
Signature · 6 lines
2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html