Compare commits

..

No commits in common. "c8" and "imports/c9/rdma-core-44.0-2.el9" have entirely different histories.

11 changed files with 373 additions and 1245 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/rdma-core-48.0.tar.gz
SOURCES/rxe_cfg.8.gz
SOURCES/rdma-core-44.0.tar.gz

View File

@ -1,2 +1 @@
b5e5f57b1f5269213cbd088f83212e0f03b17a60 SOURCES/rdma-core-48.0.tar.gz
9187638355d9bee854989bbfc6c2956301fd52aa SOURCES/rxe_cfg.8.gz
f1ff3710270ad7920626f73e955aae2b1a043136 SOURCES/rdma-core-44.0.tar.gz

View File

@ -1,39 +0,0 @@
From 91b414f645b0fdca914151280bb14a12258a56e7 Mon Sep 17 00:00:00 2001
From: Honggang Li <honli@redhat.com>
Date: Wed, 13 Jan 2021 11:51:04 +0800
Subject: [PATCH] ibacm: acm.c load plugin while it is soft link
NOTE: THIS ONE IS RHEL SPECIFIC WORKAROUND COMMIT.
https://github.com/linux-rdma/rdma-core/pull/923
Because of commit ad5d934d688911149d795aee1d3b9fa06bf171a9,
the provider libdsap.so.1.0.0 was not opened/used for address resolution
for OPA device.
As discussed in this closed PR:
https://github.com/linux-rdma/rdma-core/pull/848
I create a soft link for libdsap.so => libdsap.so.1.0.0 . The soft link
was ignored because it is a not regular file.
Signed-off-by: Honggang Li <honli@redhat.com>
---
ibacm/src/acm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
index f1c8a2fabfb4..77ffda316b0c 100644
--- a/ibacm/src/acm.c
+++ b/ibacm/src/acm.c
@@ -2878,7 +2878,7 @@ static int acm_open_providers(void)
acm_log(0, "Error - could not stat: %s\n", file_name);
continue;
}
- if (!S_ISREG(buf.st_mode))
+ if (!(S_ISREG(buf.st_mode) || S_ISLNK(buf.st_mode)))
continue;
acm_log(2, "Loading provider %s...\n", file_name);
--
2.25.4

View File

@ -0,0 +1,85 @@
From 5075b961a29ff9c418e1fefe78432e95dd0a5fcc Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 1 Feb 2023 22:41:06 +0100
Subject: [PATCH 1/3] util: fix overflow in remap_node_name()
The function remap_node_name() assumes the parameter 'nodedesc' is at
least IB_SMP_DATA_SIZE + 1 (i.e. 65) bytes long, because it passes it to
clean_nodedesc() that writes a nul-terminator to it at offset
IB_SMP_DATA_SIZE. Callers in infiniband-diags/saquery.c pass
a (struct ib_node_desc_t).description as the argument, which is only
IB_NODE_DESCRIPTION_SIZE (i.e. 64) bytes long. This is an overflow.
An odd thing about remap_node_name() is that it may (but does not
always) rewrite the nodedesc in-place. Callers do not appear to
appreciate this behavior. Most of them are various print_* and dump_*
functions where rewriting the input makes no sense. Some callers make a
local copy of the nodedesc first, possibly to protect the original.
One caller (infiniband-diags/saquery.c:print_node_records()) checks if
either the original description or the remapped one matches a given
requested_name - so it looks like it prefers the original to be
not rewritten.
Let's make remap_node_name() a bit safer and more convenient to use.
Allocate a fixed-sized copy first. Then use strncpy to copy from
'nodedesc', never reading more than IB_SMP_DATA_SIZE (64) bytes.
Apply clean_nodedesc() on the correctly-sized copy. This solves the
overflow bug. Also, the in-place rewrite of 'nodedesc' is gone and it
can become a (const char*).
The overflow was found by a static checker (covscan).
Fixes: d974c4e398d2 ("Fix max length of node description (ibnetdiscover and smpquery)")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
util/node_name_map.c | 12 +++++++++---
util/node_name_map.h | 3 +--
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/util/node_name_map.c b/util/node_name_map.c
index 30b73eb1448e..511cb92ef19c 100644
--- a/util/node_name_map.c
+++ b/util/node_name_map.c
@@ -95,7 +95,7 @@ void close_node_name_map(nn_map_t * map)
free(map);
}
-char *remap_node_name(nn_map_t * map, uint64_t target_guid, char *nodedesc)
+char *remap_node_name(nn_map_t * map, uint64_t target_guid, const char *nodedesc)
{
char *rc = NULL;
name_map_item_t *item = NULL;
@@ -108,8 +108,14 @@ char *remap_node_name(nn_map_t * map, uint64_t target_guid, char *nodedesc)
rc = strdup(item->name);
done:
- if (rc == NULL)
- rc = strdup(clean_nodedesc(nodedesc));
+ if (rc == NULL) {
+ rc = malloc(IB_SMP_DATA_SIZE + 1);
+ if (rc) {
+ strncpy(rc, nodedesc, IB_SMP_DATA_SIZE);
+ rc[IB_SMP_DATA_SIZE] = '\0';
+ clean_nodedesc(rc);
+ }
+ }
return (rc);
}
diff --git a/util/node_name_map.h b/util/node_name_map.h
index e78d274b116e..d83d672782c4 100644
--- a/util/node_name_map.h
+++ b/util/node_name_map.h
@@ -12,8 +12,7 @@ typedef struct nn_map nn_map_t;
nn_map_t *open_node_name_map(const char *node_name_map);
void close_node_name_map(nn_map_t *map);
-/* NOTE: parameter "nodedesc" may be modified here. */
-char *remap_node_name(nn_map_t *map, uint64_t target_guid, char *nodedesc);
+char *remap_node_name(nn_map_t *map, uint64_t target_guid, const char *nodedesc);
char *clean_nodedesc(char *nodedesc);
#endif
--
2.39.1

View File

@ -0,0 +1,95 @@
From d5723a0f69577fd3022024ca17c27e273a29695b Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 1 Feb 2023 22:41:16 +0100
Subject: [PATCH 2/3] infiniband-diags: drop unnecessary nodedesc local copies
Now that remap_node_name() never rewrites nodedesc in-place, some
copying can be avoided.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
infiniband-diags/dump_fts.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/infiniband-diags/dump_fts.c b/infiniband-diags/dump_fts.c
index ce6bfb9ecc33..acef9efe692d 100644
--- a/infiniband-diags/dump_fts.c
+++ b/infiniband-diags/dump_fts.c
@@ -109,7 +109,6 @@ static void dump_multicast_tables(ibnd_node_t *node, unsigned startl,
unsigned endl, struct ibmad_port *mad_port)
{
ib_portid_t *portid = &node->path_portid;
- char nd[IB_SMP_DATA_SIZE + 1] = { 0 };
char str[512];
char *s;
uint64_t nodeguid;
@@ -119,7 +118,6 @@ static void dump_multicast_tables(ibnd_node_t *node, unsigned startl,
char *mapnd = NULL;
int n = 0;
- memcpy(nd, node->nodedesc, strlen(node->nodedesc));
nports = node->numports;
nodeguid = node->guid;
@@ -149,7 +147,7 @@ static void dump_multicast_tables(ibnd_node_t *node, unsigned startl,
endl = IB_MAX_MCAST_LID;
}
- mapnd = remap_node_name(node_name_map, nodeguid, nd);
+ mapnd = remap_node_name(node_name_map, nodeguid, node->nodedesc);
printf("Multicast mlids [0x%x-0x%x] of switch %s guid 0x%016" PRIx64
" (%s):\n", startl, endl, portid2str(portid), nodeguid,
@@ -224,8 +222,6 @@ static int dump_lid(char *str, int str_len, int lid, int valid,
ibnd_fabric_t *fabric, int *last_port_lid,
int *base_port_lid, uint64_t *portguid)
{
- char nd[IB_SMP_DATA_SIZE + 1] = { 0 };
-
ibnd_port_t *port = NULL;
char ntype[50], sguid[30];
@@ -276,14 +272,12 @@ static int dump_lid(char *str, int str_len, int lid, int valid,
baselid = port->base_lid;
lmc = port->lmc;
- memcpy(nd, port->node->nodedesc, strlen(port->node->nodedesc));
-
if (lmc > 0) {
*base_port_lid = baselid;
*last_port_lid = baselid + (1 << lmc) - 1;
}
- mapnd = remap_node_name(node_name_map, nodeguid, nd);
+ mapnd = remap_node_name(node_name_map, nodeguid, port->node->nodedesc);
rc = snprintf(str, str_len, ": (%s portguid %s: '%s')",
mad_dump_val(IB_NODE_TYPE_F, ntype, sizeof ntype,
@@ -302,7 +296,6 @@ static void dump_unicast_tables(ibnd_node_t *node, int startl, int endl,
{
ib_portid_t * portid = &node->path_portid;
char lft[IB_SMP_DATA_SIZE] = { 0 };
- char nd[IB_SMP_DATA_SIZE + 1] = { 0 };
char str[200];
uint64_t nodeguid;
int block, i, e, top;
@@ -315,7 +308,6 @@ static void dump_unicast_tables(ibnd_node_t *node, int startl, int endl,
mad_decode_field(node->switchinfo, IB_SW_LINEAR_FDB_TOP_F, &top);
nodeguid = node->guid;
nports = node->numports;
- memcpy(nd, node->nodedesc, strlen(node->nodedesc));
if (!endl || endl > top)
endl = top;
@@ -326,7 +318,7 @@ static void dump_unicast_tables(ibnd_node_t *node, int startl, int endl,
endl = IB_MAX_UCAST_LID;
}
- mapnd = remap_node_name(node_name_map, nodeguid, nd);
+ mapnd = remap_node_name(node_name_map, nodeguid, node->nodedesc);
printf("Unicast lids [0x%x-0x%x] of switch %s guid 0x%016" PRIx64
" (%s):\n", startl, endl, portid2str(portid), nodeguid,
--
2.39.1

View File

@ -1,52 +0,0 @@
From 30f781482122db14f7bf89cb31db1c6aba30bba8 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 8 Feb 2023 15:19:17 +0100
Subject: [PATCH 2/2] systemd: drop Protect* options not supported in RHEL 8
systemd
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
ibacm/ibacm.service.in | 2 --
iwpmd/iwpmd.service.in | 2 --
rdma-ndd/rdma-ndd.service.in | 1 -
3 files changed, 5 deletions(-)
diff --git a/ibacm/ibacm.service.in b/ibacm/ibacm.service.in
index 56538beb2b15..535e1aeae326 100644
--- a/ibacm/ibacm.service.in
+++ b/ibacm/ibacm.service.in
@@ -19,8 +19,6 @@ Type=notify
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/ibacm --systemd
ProtectSystem=full
ProtectHome=true
-ProtectHostname=true
-ProtectKernelLogs=true
[Install]
Also=ibacm.socket
diff --git a/iwpmd/iwpmd.service.in b/iwpmd/iwpmd.service.in
index 47afebd8ad02..dd4dc750c26c 100644
--- a/iwpmd/iwpmd.service.in
+++ b/iwpmd/iwpmd.service.in
@@ -26,7 +26,5 @@ ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/iwpmd --systemd
LimitNOFILE=102400
ProtectSystem=full
ProtectHome=true
-ProtectHostname=true
-ProtectKernelLogs=true
# iwpmd is automatically wanted by udev when an iWarp RDMA device is present
diff --git a/rdma-ndd/rdma-ndd.service.in b/rdma-ndd/rdma-ndd.service.in
index 368deec00b2c..9cbe93fb6900 100644
--- a/rdma-ndd/rdma-ndd.service.in
+++ b/rdma-ndd/rdma-ndd.service.in
@@ -22,6 +22,5 @@ Restart=always
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/rdma-ndd --systemd
ProtectSystem=full
ProtectHome=true
-ProtectKernelLogs=true
# rdma-ndd is automatically wanted by udev when an RDMA device with a node description is present
--
2.39.1

View File

@ -1,8 +1,8 @@
From 214c673b2a66a0ceb86a21ddb8cd7beba86cc6f3 Mon Sep 17 00:00:00 2001
From eff6b07e92a1674818c5d8c9993651dbbeabccf4 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 1 Feb 2023 15:24:23 +0100
Subject: [PATCH] CMakeLists: disable providers that were not enabled in RHEL
9.1
Subject: [PATCH 3/5] CMakeLists: disable providers that were not enabled in
RHEL 9.1
Doing a package rebase, but don't want to enable additional drivers
unless explicitly requested.
@ -11,14 +11,14 @@ Upstream Status: RHEL only
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
CMakeLists.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b7462861012..cfe79bcfacf3 100644
index bac10516bb85..b7eca65f0fe2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -711,7 +711,7 @@ add_subdirectory(providers/bnxt_re)
@@ -711,23 +711,23 @@ add_subdirectory(providers/bnxt_re)
add_subdirectory(providers/cxgb4) # NO SPARSE
add_subdirectory(providers/efa)
add_subdirectory(providers/efa/man)
@ -26,8 +26,11 @@ index 9b7462861012..cfe79bcfacf3 100644
+#add_subdirectory(providers/erdma)
add_subdirectory(providers/hns)
add_subdirectory(providers/irdma)
add_subdirectory(providers/mana)
@@ -720,14 +720,14 @@ add_subdirectory(providers/mlx4)
-add_subdirectory(providers/mana)
-add_subdirectory(providers/mana/man)
+#add_subdirectory(providers/mana)
+#add_subdirectory(providers/mana/man)
add_subdirectory(providers/mlx4)
add_subdirectory(providers/mlx4/man)
add_subdirectory(providers/mlx5)
add_subdirectory(providers/mlx5/man)
@ -46,5 +49,5 @@ index 9b7462861012..cfe79bcfacf3 100644
add_subdirectory(providers/rxe/man)
add_subdirectory(providers/siw)
--
2.40.1
2.39.1

View File

@ -0,0 +1,38 @@
From 45fcc7ad41216a93bafb452f7d7a4507d52722cd Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 1 Feb 2023 23:30:52 +0100
Subject: [PATCH 3/3] libibnetdisc: fix printing a possibly non-NUL-terminated
string
Found by a static check (covscan).
Fixes: d974c4e398d2 ("Fix max length of node description (ibnetdiscover and smpquery)")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
libibnetdisc/chassis.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libibnetdisc/chassis.c b/libibnetdisc/chassis.c
index a3ec1d82807c..bc1a8aff8acb 100644
--- a/libibnetdisc/chassis.c
+++ b/libibnetdisc/chassis.c
@@ -597,7 +597,7 @@ static int fill_mellanox_chassis_record(ibnd_node_t * node)
int p = 0;
ibnd_port_t *port;
- char node_desc[IB_SMP_DATA_SIZE];
+ char node_desc[IB_SMP_DATA_SIZE + 1];
char *system_name;
char *system_type;
char *system_slot_name;
@@ -617,6 +617,7 @@ static int fill_mellanox_chassis_record(ibnd_node_t * node)
*/
memcpy(node_desc, node->nodedesc, IB_SMP_DATA_SIZE);
+ node_desc[IB_SMP_DATA_SIZE] = '\0';
IBND_DEBUG("fill_mellanox_chassis_record: node_desc:%s \n",node_desc);
--
2.39.1

View File

@ -1,203 +0,0 @@
#! /bin/bash
usage()
{
echo "$(basename $0) <options>"
echo "-h, --help print help message"
echo "-v, --verbose print more info"
}
case $1 in
"-h" | "--help")
usage
exit 0
;;
esac
if (( $# > 1 )); then
usage
exit -1
fi
if (( $# == 1 )) && [ "$1" != "-v" ]; then
usage
exit -1
fi
ibdevs=$(ls /sys/class/infiniband/)
devs=''
for netdev in $(/bin/ls /sys/class/net/); do
if [ -e /sys/class/net/${netdev}/device/infiniband ]; then
devs="${devs} ${netdev}"
fi
done
if [ "x$devs" == "x" ]; then
# no relevant devices - quit immediately
exit
fi
for d in $devs; do
if [ -f /sys/class/net/$d/dev_id ]; then
oldstyle=n
break
fi
done
function print_line()
{
echo "$1 port $2 <===> $3"
}
function find_guid()
{
ibdevs=$(ls /sys/class/infiniband/)
for ibdev in $ibdevs; do
ports=$(ls /sys/class/infiniband/$ibdev/ports/)
for port in $ports; do
gids=$(ls /sys/class/infiniband/$ibdev/ports/$port/gids)
for gid in $gids; do
pguid=$(cat /sys/class/infiniband/$ibdev/ports/$port/gids/$gid | cut -b 21- | sed -e 's/://g')
if [ x$pguid == x$1 ]; then
print_line $ibdev $port $2
fi
done
done
done
}
function find_mac()
{
ibdevs=$(ls /sys/class/infiniband/)
for ibdev in $ibdevs; do
type=$(cat /sys/class/infiniband/$ibdev/node_type|cut -d ' ' -f 2)
ports=$(ls /sys/class/infiniband/$ibdev/ports/)
for port in $ports; do
gids=$(ls /sys/class/infiniband/$ibdev/ports/$port/gids)
for gid in $gids; do
if [[ "$type" = "RNIC" ]]; then
pmac=$(cat /sys/class/infiniband/$ibdev/ports/$port/gids/$gid | cut -b 1-14|sed -e 's/://g')
else
first=$(cat /sys/class/infiniband/$ibdev/ports/$port/gids/$gid | cut -b 21-22)
first=$(( first ^ 2 ))
first=$(printf "%02x" $first)
second=$(cat /sys/class/infiniband/$ibdev/ports/$port/gids/$gid | cut -b 21- | sed -e 's/://g' | cut -b 3-6)
third=$(cat /sys/class/infiniband/$ibdev/ports/$port/gids/$gid | cut -b 21- | sed -e 's/://g' | cut -b 11-)
pmac=$first$second$third
fi
if [ x$pmac == x$1 ]; then
print_line $ibdev $port $2
fi
done
done
done
}
if [ "x$oldstyle" == "xn" ]; then
for d in $ibdevs; do
ibrsc=$(cat /sys/class/infiniband/$d/device/resource)
eths=$(ls /sys/class/net/)
for eth in $eths; do
filepath_resource=/sys/class/net/$eth/device/resource
if [ -f $filepath_resource ]; then
ethrsc=$(cat $filepath_resource)
if [ "x$ethrsc" == "x$ibrsc" ]; then
filepath_devid=/sys/class/net/$eth/dev_id
filepath_devport=/sys/class/net/$eth/dev_port
if [ -f $filepath_devid ]; then
port1=0
if [ -f $filepath_devport ]; then
port1=$(cat $filepath_devport)
port1=$(printf "%d" $port1)
fi
port=$(cat $filepath_devid)
port=$(printf "%d" $port)
if [ $port1 -gt $port ]; then
port=$port1
fi
port=$(( port + 1 ))
filepath_carrier=/sys/class/net/$eth/carrier
if [ -f $filepath_carrier ]; then
link_state=$(cat $filepath_carrier 2> /dev/null)
if (( link_state == 1 )); then
link_state="Up"
else
link_state="Down"
fi
else
link_state="NA"
fi
if [ "$1" == "-v" ]; then
filepath_portstate=/sys/class/infiniband/$d/ports/$port/state
filepath_deviceid=/sys/class/infiniband/$d/device/device
filepath_fwver=/sys/class/infiniband/$d/fw_ver
filepath_vpd=/sys/class/infiniband/$d/device/vpd
# read port state
if [ -f $filepath_portstate ]; then
ibstate=$(printf "%-6s" "$(cat $filepath_portstate | gawk '{print $2}')")
else
ibstate="na"
fi
# read device
if [ -f $filepath_deviceid ]; then
devid=$(printf "mt%d" "$(cat $filepath_deviceid)")
else
devid="na"
fi
# read fw version
if [ -f $filepath_fwver ]; then
fwver=$(cat $filepath_fwver)
else
fwver="na"
fi
# read device description and part id from the vpd
if [ -f $filepath_vpd ]; then
tmp=$ifs
ifs=":"
vpd_content=`cat $filepath_vpd | tr -d '\0'`
devdesc=$(printf "%-15s" "$(echo $vpd_content | strings | head -1)")
partid=$(printf "%-11s" "$(echo $vpd_content | strings | head -4 | tail -1 | gawk '{print $1}')")
ifs=$tmp
else
devdesc=""
partid="na"
fi
echo "$d ($devid - $partid) $devdesc fw $fwver port $port ($ibstate) ==> $eth ($link_state)"
else
echo "$d port $port ==> $eth ($link_state)"
fi
fi
fi
fi
done
done
else
##########################
### old style
##########################
ifcs=$(ifconfig -a | egrep '^eth|^ib' | gawk '{print $1}')
for ifc in $ifcs; do
len=$(cat /sys/class/net/$ifc/addr_len)
if (( len == 20 )); then
guid=$(cat /sys/class/net/$ifc/address | cut -b 37- | sed -e 's/://g')
find_guid $guid $ifc
elif (( len == 6)); then
mac=$(cat /sys/class/net/$ifc/address | sed -e 's/://g')
find_mac $mac $ifc
fi
done
fi

View File

@ -1,677 +0,0 @@
#!/usr/bin/perl
# * Copyright (c) 2009-2011 Mellanox Technologies Ltd. All rights reserved.
# * Copyright (c) 2009-2011 System Fabric Works, Inc. All rights reserved.
# *
# * This software is available to you under a choice of one of two
# * licenses. You may choose to be licensed under the terms of the GNU
# * General Public License (GPL) Version 2, available from the file
# * COPYING in the main directory of this source tree, or the
# * OpenIB.org BSD license below:
# *
# * Redistribution and use in source and binary forms, with or
# * without modification, are permitted provided that the following
# * conditions are met:
# *
# * - Redistributions of source code must retain the above
# * copyright notice, this list of conditions and the following
# * disclaimer.
# *
# * - Redistributions in binary form must reproduce the above
# * copyright notice, this list of conditions and the following
# * disclaimer in the documentation and/or other materials
# * provided with the distribution.
# *
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# * SOFTWARE.
#
use warnings;
use strict;
use File::Basename;
use File::Path qw(make_path);
use Getopt::Long;
my $help = 0;
my $no_persist = 0;
my $debug = 0;
my $force = 0;
my $linkonly = 0;
my $parms = "/sys/module/rdma_rxe/parameters";
my $modprobe_opt = "";
my $modprobe_checked = "0";
my $persistence_path = "/var/lib/rxe";
my $persistence_file = "${persistence_path}/rxe";
my $num_persistent = 0;
my $sys = "/sys/module/rdma_rxe/parameters";
my %rxe_names;
my @rxe_array;
my %eth_names;
my @eth_list;
my %eth_driver;
my %link_state;
my %link_speed;
my %eth_mtu;
my %ipv4_addr;
my %rxe_mtu;
my @persistence_array;
my %persistence_hash;
my @mlx4_port;
my @mlx4_ether;
my @roce_list;
# Read a file and return its contents as a string.
sub read_file {
my $filename = shift;
my $result = "";
if (open(FILE, $filename)) {
$result = <FILE>;
close FILE;
}
return $result;
}
#get mapping between rxe and eth devices
sub get_names {
my $i = 0;
foreach my $rxe (glob("/sys/class/infiniband/rxe*")) {
$rxe = basename($rxe);
my $eth = read_file("/sys/class/infiniband/$rxe/parent");
chomp($eth);
if (($eth =~ /[\w]+[\d]/)
&& ($rxe =~ /rxe[0123456789]/)) {
# hash ethername to rxename
$rxe_names{$eth} = $rxe;
$rxe_array[$i++] = $rxe;
# hash rxename to ethername
$eth_names{$rxe} = $eth;
}
}
}
# get list of Mellanox RoCE ports
sub get_mlx4_list {
my $i = 0;
foreach my $mlx4 (glob("/sys/class/infiniband/mlx4_*")) {
$mlx4 = basename($mlx4);
foreach my $port (glob("/sys/class/infiniband/$mlx4/ports/*")) {
$port = basename($port);
my $link = read_file("$port/link_layer");
chomp($link);
if ($link =~ "Ethernet") {
$roce_list[$i++] = "$mlx4:$port";
}
}
}
}
#collect per device information
sub get_dev_info {
my @list;
my @fields;
my @lines;
my $line;
my $eth;
my $drv;
my $np;
my $i = 0;
my $j = 0;
get_mlx4_list();
my @my_eth_list = ();
foreach my $my_eth_dev (glob("/sys/class/net/*")) {
$my_eth_dev = basename($my_eth_dev);
if ($my_eth_dev ne "bonding_masters"){
my $my_dev_type = read_file("/sys/class/net/${my_eth_dev}/type");
chomp($my_dev_type);
if ($my_dev_type == "1") {
push(@my_eth_list, "$my_eth_dev");
}
}
}
@list = @my_eth_list;
foreach $eth (@list) {
chomp($eth);
$eth_list[$i++] = $eth;
@lines = `ethtool -i $eth`;
foreach $line (@lines) {
chomp($line);
@fields = split(/\s+/, $line);
chomp($fields[0]);
if ($fields[0] =~ /driver:/) {
$drv = $fields[1];
$eth_driver{$eth} = $drv;
if ($drv =~ /mlx4_en/ && scalar(@roce_list) > 0 ) {
$eth_names{$roce_list[$j++]} = $eth;
}
}
}
# get link status
$link_state{$eth} = "";
$link_speed{$eth} = "";
@lines = `ethtool $eth`;
foreach $line (@lines) {
chomp($line);
@fields = split(/:/, $line);
if (defined($fields[1])) {
$fields[1] =~ s/^\s+//g;
if ($fields[0] =~ "Link detected") {
$link_state{$eth} = $fields[1];
}
}
elsif ($line =~ "10000baseT") {
$link_speed{$eth} = "10GigE";
}
}
$ipv4_addr{$eth} = " ";
$eth_mtu{$eth} = "";
@lines = `ip addr show $eth`;
foreach $line (@lines) {
# get IP address
if ($line =~ /inet /) {
$line =~ s/^\s+inet ([0-9.]+)\//$1 /g;
@fields = split(/\s+/, $line);
$ipv4_addr{$eth} = $fields[0];
}
# get ethernet mtu
if ($line =~ /mtu /) {
$line =~ s/^.*mtu //g;
@fields = split(/\s+/, $line);
$eth_mtu{$eth} = $fields[0];
}
}
}
# get rxe mtu
foreach my $rxe (@rxe_array) {
@lines = `ibv_devinfo -d $rxe`;
foreach $line (@lines) {
if ($line =~ "active_mtu") {
$line =~ s/^\s+active_mtu:\s+//g;
chomp($line);
$rxe_mtu{$rxe} = $line;
}
}
$rxe_mtu{$rxe} = "(?)" if (!$rxe_mtu{$rxe});
}
}
# return string or the string "###" if string is all whitespace
sub set_field {
my $fld = $_[0];
if (defined($fld) && $fld =~ /\S/) {
return $fld;
} else {
return "###";
}
}
# format status output into fixed width columns
sub status_print {
my @fields;
my $field;
my @flen = ();
my $num_fields = 0;
my $i;
my $pad;
my $line;
# one pass to size the columns
foreach $line (@_) {
@fields = split(/\s+/, $line);
$i = 0;
foreach $field (@fields) {
if (!defined($flen[$i])) {
$flen[$i] = length($field);
}
else {
$flen[$i] = max($flen[$i], length($field));
}
$i++;
}
if ($i > $num_fields) {
$num_fields = $i;
}
}
# one pass to print
foreach $line (@_) {
print " ";
@fields = split(/\s+/, $line);
for ($i = 0; $i < $num_fields; $i++) {
if (defined($fields[$i])) {
$pad = $flen[$i] - length($fields[$i]) + 2;
}
else {
$pad = $flen[$i] + 2;
}
if (defined($fields[$i]) && ($fields[$i] ne "###")) {
print "$fields[$i]";
}
else {
print " ";
}
printf("%*s", $pad, "");
}
print "\n";
}
}
# check driver load status
sub check_module_status {
if (-e $sys) {
return 0;
} else {
return 1;
}
}
# print driver load status and ethertype for rdma_rxe and rdma_rxe_net
sub show_module_status {
print "rdma_rxe module not loaded\n" if (!(-e $sys));
}
# print rxe status
sub do_status {
my $instance = $_[0];
my $ln = 0;
my @outp;
my $rxe;
my $rmtu;
get_names();
get_dev_info();
show_module_status();
$outp[$ln++] = "Name\tLink\tDriver\t\tSpeed\tNMTU\tIPv4_addr\tRDEV\tRMTU";
foreach my $eth (@eth_list) {
# handle case where rxe_drivers are not loaded
if (defined($rxe_names{$eth})) {
$rxe = $rxe_names{$eth};
$rmtu = $rxe_mtu{$rxe};
}
else {
$rxe = "";
$rmtu = "";
}
if ((!defined($instance)
&& (($linkonly == 0) || ($link_state{$eth} =~ "yes")))
|| (defined($instance) && ($rxe =~ "$instance"))) {
$outp[$ln] = set_field("$eth");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$link_state{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field(exists($eth_driver{$eth}) ? $eth_driver{$eth} : "");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$link_speed{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$eth_mtu{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$ipv4_addr{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$rxe");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$rmtu");
$ln++;
}
}
status_print(@outp);
}
# read file containing list of ethernet devices into a list
sub populate_persistence {
my $i = 0;
open FILE, $persistence_file;
while(<FILE>) {
my $line = $_;
chomp($line);
$line =~ s/^\s+//g;
if ($line =~ /[\w]+[\d]/) {
# in case we add fields later
my ($eth, $cruft) = split(/\s+/, $line, 2);
if ($eth =~ /^[\w]+[\d]/) {
$persistence_array[$i] = $eth;
$persistence_hash{$eth} = $i++;
}
}
}
close FILE;
$num_persistent = $i;
}
# print out list of ethernet devices to file
sub commit_persistent {
my $i;
my $eth;
open(PF, ">$persistence_file");
for ($i = 0; $i < $num_persistent; $i++) {
$eth = $persistence_array[$i];
if ($eth =~ /[\w]+[\d]/) {
print(PF "$persistence_array[$i]\n");
}
}
close(PF);
}
sub delete_persistent {
my $eth = $_[0];
if (defined($persistence_hash{$eth})) {
$persistence_array[$persistence_hash{$eth}] = "";
}
}
sub add_persistent {
my $eth = $_[0];
# Is this one already in the persistence list?
if (!defined($persistence_hash{$eth})) {
$persistence_array[$num_persistent] = $eth;
$persistence_hash{$eth} = $num_persistent;
$num_persistent++;
}
}
# add new rxe device to eth if not already up
sub rxe_add {
my $eth = $_[0];
if (!($eth =~ /[\w]+[\d]/)) {
print "eth_name ($eth) looks bogus\n";
return;
}
if (!defined($rxe_names{$eth})) {
system("echo '$eth' > $parms/add");
}
if (!$no_persist) {
add_persistent($eth);
commit_persistent();
}
}
sub rxe_remove {
my $arg2 = $_[0];
my $rxe;
my $eth;
print "remove $arg2\n" if ($debug > 0);
if ($arg2 =~ /[\w]+[\d]/) {
$eth = $arg2;
$rxe = $rxe_names{$eth};
}
elsif ($arg2 =~ /rxe[0123456789]/) {
$rxe = $arg2;
$eth = $eth_names{$rxe};
}
elsif ($arg2 eq "all") {
$rxe = "all";
}
if (($rxe eq "all") || ($rxe =~ /^rxe[0123456789]/)) {
my $cmd = "echo '$rxe' > $parms/remove";
#print "$cmd\n";
system($cmd);
if (!$no_persist) {
if ($rxe eq "all") {
unlink($persistence_file);
}
elsif ($eth =~/[\w]+[\d]/) {
delete_persistent($eth);
commit_persistent();
}
else {
print "Warning: Unable to resolve ethname; "
. "instance may persist on restart\n";
}
}
}
else {
print "rxe instance $rxe not found\n";
}
}
sub get_devinfo {
my $rxe = $_[0];
my $cmd = "ibv_devinfo -d $rxe";
return `$cmd`;
}
# allow unsupported modules to load in SLES11 if allowed
sub modprobe {
my $module = $_[0];
my $opts = $_[1];
my @lines;
my $line;
if ($modprobe_checked == "0") {
@lines = `modprobe -c`;
foreach $line (@lines) {
if ($line =~ /^allow_unsupported_modules *0/) {
$modprobe_opt = " --allow-unsupported-modules ";
last;
}
}
$modprobe_checked = "1";
}
if (!defined($opts)) {
$opts = "";
}
system("modprobe $modprobe_opt $module $opts");
}
# bring up rxe
sub do_start {
my $proto_str = "";
system("mkdir -p $persistence_path");
system("touch $persistence_file");
modprobe("ib_core");
modprobe("ib_uverbs");
modprobe("rdma_ucm");
modprobe("rdma_rxe");
populate_persistence();
system("udevadm control --reload");
foreach my $eth (@persistence_array) {
rxe_add($eth);
}
get_names();
foreach my $rxe (@rxe_array) {
my $stat = get_devinfo($rxe);
if ($stat =~ "PORT_DOWN") {
my $cmd = "ip link set $eth_names{$rxe} up";
system($cmd);
}
}
}
# check if argument is an integer
sub is_integer {
defined $_[0] && $_[0] =~ /^[+-]?\d+$/;
}
# remove all rxe devices and unload drivers
sub do_stop {
my $rxe;
foreach $rxe (@rxe_array) {
system("echo '$rxe' > $sys/remove");
}
if (-e $sys) {
system("rmmod rdma_rxe");
}
if (-e $sys) {
print "unable to unload drivers, reboot required\n";
}
}
sub do_debug {
my $arg2 = $_[0];
my $debugfile = "$parms/debug";
chomp($arg2);
if (!(-e "$debugfile")) {
print "Error: debug is compiled out of this rxe driver\n";
return;
}
if ($arg2 eq "on") { system("echo '31' > $debugfile"); }
elsif ($arg2 eq "off") { system("echo '0' > $debugfile"); }
elsif ($arg2 eq "0") { system("echo '0' > $debugfile"); }
elsif ($arg2 eq "") { }
elsif ($arg2 ge "0" && $arg2 le "31") {
system("echo '$arg2' > $debugfile");
}
else {
print "unrecognized debug cmd ($arg2)\n";
}
my $current = read_file($debugfile);
chomp($current);
if ($current > 0) {
print "Debug is ON ($current)\n";
}
elsif ($current == 0) {
print "Debug is OFF\n";
}
else {
print "Unrecognized debug value\n";
}
}
sub max {
my $a = $_[0];
my $b = $_[1];
return $a if ($a > $b);
return $b;
}
# show usage for rxe_cfg
sub usage {
print " Usage:\n";
print " rxe_cfg [options] start|stop|status|persistent\n";
print " rxe_cfg debug on|off|<num>\n";
print " rxe_cfg [-n] add <ndev>\n";
print " rxe_cfg [-n] remove <ndev>|<rdev>\n";
print "\n";
print " <ndev> = network device e.g. eth3\n";
print " <rdev> = rdma device e.g. rxe1\n";
print "\n";
print " Options:\n";
print " -h: print this usage information\n";
print " -n: do not make the configuration action persistent\n";
print " -v: print additional debug output\n";
print " -l: show status for interfaces with link up\n";
print " -p <num>: (start command only) - set ethertype\n";
}
sub main {
GetOptions(
"-h" => \$help,
"--help" => \$help,
"-n" => \$no_persist,
"-v:+" => \$debug,
"-f" => \$force,
"-l" => \$linkonly,
);
my $arg1 = $ARGV[0];
my $arg2 = $ARGV[1];
my $arg3 = $ARGV[2];
# status is the default
if (!defined($arg1) || ($arg1 =~ /status/)) {
do_status($arg2);
exit;
}
if ($help) {
usage();
exit;
}
# stuff that does not require modules to be loaded
if ($arg1 eq "help") { usage(); exit; }
elsif ($arg1 eq "start") { do_start(); do_status(); exit; }
elsif ($arg1 eq "persistent") { system("cat $persistence_file"); exit; }
# can't do much else, bail if modules aren't loaded
if (check_module_status()) {
exit;
}
# create persistence file if necessary
make_path($persistence_path);
if (!(-e $persistence_file)) {
`touch $persistence_file`;
}
# Get full context of the configuration
populate_persistence();
get_names();
get_dev_info();
# Stuff that requires the rdma_rxe module to be loaded
if ($arg1 eq "stop") { do_stop(); exit; }
elsif ($arg1 eq "debug") { do_debug($arg2); exit; }
elsif ($arg1 eq "add") { rxe_add($arg2); exit; }
elsif ($arg1 eq "remove") { rxe_remove($arg2); exit; }
elsif ($arg1 eq "help") { usage(); exit; }
}
main();
exit;

View File

@ -1,6 +1,6 @@
Name: rdma-core
Version: 48.0
Release: 1%{?dist}
Version: 44.0
Release: 2%{?dist}
Summary: RDMA core userspace libraries and daemons
# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license
@ -10,15 +10,10 @@ Summary: RDMA core userspace libraries and daemons
License: GPLv2 or BSD
Url: https://github.com/linux-rdma/rdma-core
Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: ibdev2netdev
# Upstream had removed rxe_cfg from upstream git repo. RHEL-8.X has
# to keep it for backward compatibility. 'rxe_cfg' and 'rxe_cfg.8.gz'
# are extracted from libibverbs-26.0-8.el8 .
Source2: rxe_cfg
Source3: rxe_cfg.8.gz
# RHEL specific patch for OPA ibacm plugin
Patch300: 0001-ibacm-acm.c-load-plugin-while-it-is-soft-link.patch
Patch301: 0002-systemd-drop-Protect-options-not-supported-in-RHEL-8.patch
# 0001-0003: https://github.com/linux-rdma/rdma-core/pull/1308
Patch1: 0001-util-fix-overflow-in-remap_node_name.patch
Patch2: 0002-infiniband-diags-drop-unnecessary-nodedesc-local-cop.patch
Patch3: 0003-libibnetdisc-fix-printing-a-possibly-non-NUL-termina.patch
Patch9000: 0003-CMakeLists-disable-providers-that-were-not-enabled-i.patch
Patch9998: 9998-kernel-boot-Do-not-perform-device-rename-on-OPA-devi.patch
Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch
@ -35,10 +30,8 @@ BuildRequires: libudev-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-route-3.0)
BuildRequires: python3-docutils
%ifarch %{valgrind_arches}
BuildRequires: /usr/bin/rst2man
BuildRequires: valgrind-devel
%endif
BuildRequires: systemd
BuildRequires: systemd-devel
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8
@ -57,17 +50,21 @@ BuildRequires: python
%endif
%endif
BuildRequires: sed
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30 || %{with_pyverbs}
BuildRequires: python3-docutils
%else
BuildRequires: python-docutils
%endif
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
BuildRequires: perl-generators
%endif
Requires: pciutils
# 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}
Provides: rdma-ndd = %{version}-%{release}
Obsoletes: rdma-ndd < %{version}-%{release}
# the ndd utility moved from infiniband-diags to rdma-core
Conflicts: infiniband-diags <= 1.6.7
# Since we recommend developers use Ninja, so should packagers, for consistency.
@ -76,8 +73,13 @@ Conflicts: infiniband-diags <= 1.6.7
# Ninja was introduced in FC23
BuildRequires: ninja-build
%define CMAKE_FLAGS -GNinja
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%define make_jobs ninja-build -C %{_vpath_builddir} -v %{?_smp_mflags}
%define cmake_install DESTDIR=%{buildroot} ninja-build -C %{_vpath_builddir} install
%else
%define make_jobs ninja-build -v %{?_smp_mflags}
%define cmake_install DESTDIR=%{buildroot} ninja-build install
%endif
%else
# Fallback to make otherwise
BuildRequires: make
@ -85,7 +87,15 @@ BuildRequires: make
%define cmake_install DESTDIR=%{buildroot} make install
%endif
%if 0%{?fedora} >= 25 || 0%{?rhel} == 8
# pandoc was introduced in FC25, Centos8
BuildRequires: pandoc
%endif
%if 0%{?fedora} >= 34
# self obsoletes to remove i686 multilib package when updating to F34
Obsoletes: rdma-core < 34.0-3
%endif
%description
RDMA core userspace infrastructure and documentation, including initialization
@ -145,16 +155,15 @@ Provides: libhfi1 = %{version}-%{release}
Obsoletes: libhfi1 < %{version}-%{release}
Provides: libirdma = %{version}-%{release}
Obsoletes: libirdma < %{version}-%{release}
Provides: libmana = %{version}-%{release}
Obsoletes: libmana < %{version}-%{release}
Provides: libmlx4 = %{version}-%{release}
Obsoletes: libmlx4 < %{version}-%{release}
%ifnarch s390
Provides: libmlx5 = %{version}-%{release}
Obsoletes: libmlx5 < %{version}-%{release}
%endif
Provides: librxe = %{version}-%{release}
Obsoletes: librxe < %{version}-%{release}
%if 0%{?fedora} == 34
Obsoletes: libibverbs-core < %{version}-%{release}
%endif
%description -n libibverbs
libibverbs is a library that allows userspace processes to use RDMA
@ -165,13 +174,11 @@ fast path operations.
Device-specific plug-in ibverbs userspace drivers are included:
- libbxnt_re: Broadcom NetXtreme-E RoCE HCA
- libcxgb4: Chelsio T4 iWARP HCA
- libefa: Amazon Elastic Fabric Adapter
- libhfi1: Intel Omni-Path HFI
- libhns: HiSilicon Hip06 SoC
- libirdma: Intel Ethernet Connection RDMA
- libmana: Microsoft Azure Network Adapter
- libmlx4: Mellanox ConnectX-3 InfiniBand HCA
- libmlx5: Mellanox Connect-IB/X-4+ InfiniBand HCA
- libqedr: QLogic QL4xxx RoCE HCA
@ -182,9 +189,6 @@ Device-specific plug-in ibverbs userspace drivers are included:
%package -n libibverbs-utils
Summary: Examples for the libibverbs library
Requires: libibverbs%{?_isa} = %{version}-%{release}
# rxe_cfg uses commands provided by these packages
Requires: iproute
Requires: ethtool
%description -n libibverbs-utils
Useful libibverbs example programs such as ibv_devinfo, which
@ -264,8 +268,9 @@ easy, object-oriented access to IB verbs.
%prep
%setup -q
%patch300 -p1
%patch301 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if 0%{?fedora}
%patch9998 -p1
%endif
@ -315,7 +320,7 @@ easy, object-oriented access to IB verbs.
%if %{with_pyverbs}
-DNO_PYVERBS=0
%else
-DNO_PYVERBS=1
-DNO_PYVERBS=1
%endif
%make_jobs
@ -337,22 +342,15 @@ install -D -m0644 redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/li
install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh
rm -f %{buildroot}%{_sysconfdir}/rdma/modules/rdma.conf
install -D -m0644 redhat/rdma.conf %{buildroot}%{_sysconfdir}/rdma/modules/rdma.conf
# ibdev2netdev helper script
install -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/
# rxe_cfg
install -D -m0755 %{SOURCE2} %{buildroot}%{_bindir}/
install -D -m0644 %{SOURCE3} %{buildroot}%{_mandir}/man8/
# ibacm
bin/ib_acme -D . -O
# multi-lib conflict resolution hacks (bug 1429362)
sed -i -e 's|%{_libdir}|/usr/lib|' %{buildroot}%{_mandir}/man7/ibacm_prov.7
sed -i -e 's|%{_libdir}|/usr/lib|' ibacm_opts.cfg
install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
(if [ -d %{__cmake_builddir} ]; then cd %{__cmake_builddir}; fi
./bin/ib_acme -D . -O &&
install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/)
# Delete the package's init.d scripts
rm -rf %{buildroot}/%{_initrddir}/
rm -f %{buildroot}/%{_sbindir}/srp_daemon.sh
%ldconfig_scriptlets -n libibverbs
@ -403,9 +401,7 @@ fi
%config(noreplace) %{_sysconfdir}/rdma/modules/rdma.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/roce.conf
%dir %{_sysconfdir}/modprobe.d
%ifnarch s390
%config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf
%endif
%{_unitdir}/rdma-hw.target
%{_unitdir}/rdma-load-modules@.service
%dir %{dracutlibdir}
@ -424,7 +420,6 @@ fi
%{sysmodprobedir}/libmlx4.conf
%{_libexecdir}/mlx4-setup.sh
%{_sbindir}/rdma-ndd
%{_bindir}/ibdev2netdev
%{_unitdir}/rdma-ndd.service
%{_mandir}/man7/rxe*
%{_mandir}/man8/rdma-ndd.*
@ -447,15 +442,11 @@ fi
%{_mandir}/man3/umad*
%{_mandir}/man3/*_to_ibv_rate.*
%{_mandir}/man7/rdma_cm.*
%ifnarch s390
%{_mandir}/man3/mlx5dv*
%{_mandir}/man3/mlx4dv*
%{_mandir}/man3/manadv*
%{_mandir}/man7/efadv*
%{_mandir}/man7/mlx5dv*
%{_mandir}/man7/mlx4dv*
%{_mandir}/man7/manadv*
%endif
%{_mandir}/man3/ibnd_*
%files -n infiniband-diags
@ -532,19 +523,14 @@ fi
%{_libdir}/libefa.so.*
%{_libdir}/libibverbs*.so.*
%{_libdir}/libibverbs/*.so
%ifnarch s390
%{_libdir}/libmlx5.so.*
%{_libdir}/libmlx4.so.*
%{_libdir}/libmana.so.*
%endif
%config(noreplace) %{_sysconfdir}/libibverbs.d/*.driver
%doc %{_docdir}/%{name}/libibverbs.md
%files -n libibverbs-utils
%{_bindir}/ibv_*
%{_mandir}/man1/ibv_*
%{_bindir}/rxe_cfg
%{_mandir}/man8/rxe*
%files -n ibacm
%config(noreplace) %{_sysconfdir}/rdma/ibacm_opts.cfg
@ -615,7 +601,6 @@ fi
%{_unitdir}/srp_daemon_port@.service
%{_sbindir}/ibsrpdm
%{_sbindir}/srp_daemon
%{_sbindir}/srp_daemon.sh
%{_sbindir}/run_srp_daemon
%{_udevrulesdir}/60-srp_daemon.rules
%{_mandir}/man5/srp_daemon.service.5*
@ -631,211 +616,148 @@ fi
%endif
%changelog
* Thu Sep 21 2023 Kamal Heib <kheib@redhat.com> - 48.0-1
- Rebase to upstream release v48.0
- Resolves: RHEL-930, RHEL-4240, RHEL-6281, RHEL-6078
* Wed Feb 01 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-2
- Fix covscan-found issues.
- Resolves: rhbz#2112984, rhbz#2142687
* Tue May 30 2023 Kamal Heib <kheib@redhat.com> - 46.0-1.1
- Add gating tests
- Resolves: rhbz#2170066
* Wed Feb 01 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-1
- Rebase to upstream release v44.0
- Resolves: rhbz#2112984, rhbz#2142687
* Thu May 25 2023 Kamal Heib <kheib@redhat.com> - 46.0-1
- Rebase to upstream release v46.0
- Resolves: rhbz#2170066, rhbz#2209685, rhbz#2159635, rhbz#2167517
* Tue Aug 02 2022 Michal Schmidt <mschmidt@redhat.com> - 41.0-3
- Rebase to upstream release v41.0
- Resolves: rhbz#2049521
* Wed Feb 08 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-2.1
- Do not use unsupported Protect* options in systemd unit files.
- Resolves: rhbz#2141462
* Tue Jan 18 2022 Honggang Li <honli@redhat.com> - 37.2-1
- Rebase to upstream release v37.2
- Resolves: rhbz#2035043, rhbz#2034948
* Wed Feb 08 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-2
- Update to upstream release v44.0
- Resolves: rhbz#2110934, rhbz#2112931, rhbz#2142691
* Wed Oct 20 2021 Honggang Li <honli@redhat.com> - 37.1-1
- Rebase to upstream release v37.1
- Resolves: rhbz#1994803
* Fri Aug 05 2022 Michal Schmidt <mschmidt@redhat.com> - 41.0-1
- Update to upstream release v41.0
- Resolves: rhbz#2049518
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 35.0-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Jan 06 2022 Honggang Li <honli@redhat.com> - 37.2-1
- Update to upstream v37.2 release for fixes
- Resolves: bz2008509, bz2024865, bz1915555
* Wed Jun 16 2021 Honggang Li <honli@redhat.com> - 35.0-2
- Bump the version tag and rebuild because of brew system issue
- Related: rhbz#1858568
* Tue Nov 09 2021 Honggang Li <honli@redhat.com> - 37.1-1
- Update to upstream v37.1 release for features and fixes
- Resolves: bz1982200, bz1990120, bz1982131
* Tue May 25 2021 Honggang Li <honli@redhat.com> - 35.0-1
- Rebase to upstream release v35.0
- Resolves: rhbz#1858568, rhbz#1877133, rhbz#1869457
* Fri May 14 2021 Honggang Li <honli@redhat.com> - 35.0-1
- Update to upstream v35 release for features and fixes
- Resolves: bz1915311
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 34.0-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jan 28 2021 Honggang Li <honli@redhat.com> - 32.0-4
- Update to upstream stable release v32.1
- Fix mlx5 pyverbs CQ test
- Resolves: bz1915745, bz1907377
* Tue Mar 30 2021 Pete Walter <pwalter@fedoraproject.org> - 34.0-3
- Add self obsoletes to remove i686 multilib package when updating to F34
* Tue Dec 22 2020 Honggang Li <honli@redhat.com> - 32.0-3
- libqedr: Set XRC functions only in RoCE mode
- Resolves: bz1894516
* Mon Mar 08 2021 Honggang Li <honli@redhat.com> - 34.0-2
- RHEL9 will use prebuild doc
* Tue Dec 08 2020 Honggang Li <honli@redhat.com> - 32.0-2
- Backport bug fixes applied after upstream v32.0
- Resolves: bz1902613, bz1875265
* Wed Mar 03 2021 Honggang Li <honli@redhat.com> - 34.0-1
- Rebase to upstream release v34.0
* Tue Nov 03 2020 Honggang Li <honli@redhat.com> - 32.0-1
- Update to upstream v32 release for features and fixes
- Support Amazon Elastic Fabric Adapter
- Enable pyverbs
- Add a check for udevadm in the specfile
- Resolves: bz1851721, bz1856076, bz1887396, bz1868804
* Mon Feb 01 2021 Honggang Li <honli@redhat.com> - 33.0-5
- Disable HCA rename for ELN
* Tue Jun 09 2020 Honggang Li <honli@redhat.com> - 29.0-3
- BuildRequires perl-generators
- Backport upstream stable-v29 commits
- Resolves: bz1845420
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 33.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon May 18 2020 Honggang Li <honli@redhat.com> - 29.0-2
- Suppress ibdev2netdev warning messgae
- Unversioned documentation directory
- Resolves: bz1794904, bz1824853
* Mon Jan 25 2021 Honggang Li <honli@redhat.com> - 33.0-3
- Fix ELN build issue
* Tue Apr 14 2020 Honggang Li <honli@redhat.com> - 29.0-1
- Update to upstream v29 release for features and fixes
- Resolves: bz1790624
* Thu Jan 21 2021 Honggang Li <honli@redhat.com> - 33.0-2
- libibverbs obsoletes libibverbs-core for fedora-34
* Fri Feb 07 2020 Honggang Li <honli@redhat.com> - 26.0-8
- Fix an ibacm segfault issue for dual port HCA support IB and Ethernet
- Resolves: bz1793736
* Mon Jan 18 2021 Honggang Li <honli@redhat.com> - 33.0-1
- Rebase to upstream release v33.0
* Tue Dec 17 2019 Honggang Li <honli@redhat.com> - 26.0-7
- Build with Ninja.
- Resolves: bz1783254
* Mon Jan 18 2021 Honggang Li <honli@redhat.com> - 32.0-2
- Remove base package dependency from all sub-packages
- Resolves: bz1901086
* Fri Dec 13 2019 Honggang Li <honli@redhat.com> - 26.0-6
- Remove dangling symlink
- Resolves: bz1782828
* Thu Oct 29 2020 Honggang Li <honli@redhat.com> - 32.0-1
- Rebase to upstream release v32.0
* Wed Dec 11 2019 Honggang Li <honli@redhat.com> - 26.0-5
- Remove EFA driver
- Fix rpm dependency issue
- Resolves: bz1781454, bz1781457
* Mon Sep 14 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 31.0-2
- Split out libibverbs to sub package for libpcap
* Mon Dec 09 2019 Honggang Li <honli@redhat.com> - 26.0-4
- libbnxt_re support for some new device ids and generation id
- Resolves: bz1779948
* Wed Aug 19 2020 Honggang Li <honli@redhat.com> - 31.0-1
- Rebase to upstream release v31.0
* Tue Nov 19 2019 Jarod Wilson <jarod@redhat.com> - 26.0-3
- Make rdma-core-devel Obsoletes infiniband-diags due to man3/ibnd_*
- Related: rhbz#1722257
* Thu Jul 30 2020 Honggang Li <honli@redhat.com> - 30.0-6
- Update cmake options
* Thu Nov 14 2019 Jarod Wilson <jarod@redhat.com> - 26.0-2
- Add Obsoletes/Provides pair for infiniband-diags-devel
- Pull in upstream stable-v26 branch patches
- Fix %%postun scriptlet failures by removing superfluous -p options
- Add new BuildRequires: on pandoc
- Related: rhbz#1722257
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 30.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Nov 14 2019 Jarod Wilson <jarod@redhat.com> - 26.0-1
- Update to upstream v26 release for features and fixes
- Resolves: rhbz#1722257
* Thu Jul 02 2020 Stephen Gallagher <sgallagh@redhat.com> - 30.0-4
- Don't throw script errors if udev is not installed
* Tue Jul 23 2019 Jarod Wilson <jarod@redhat.com> - 24.0-1
- Update to upstream v24 release for features and fixes
* Wed Jul 1 2020 Jeff Law <law@redhat.com> - 30.0-3
- Disable LTO
* Mon Jun 24 2019 Jarod Wilson <jarod@redhat.com> - 22.3-1
- Update to upstream v22.3 stable release for fixes
- Enable support for Broadcom 57500 hardware
- Enable support for Mellanox ConnectX-6 DX hardware
- Resolves: rhbz#1678276
- Resolves: rhbz#1687435
* Thu Jun 25 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 30.0-2
- Drop dependencies on systemd (#1837812)
* Thu Jan 10 2019 Jarod Wilson <jarod@redhat.com> - 22-2
- Fix up covscan shellcheck warnings in ibdev2netdev
- Related: rhbz#1643904
* Mon Jun 15 2020 Honggang Li <honli@redhat.com> - 30.0-1
- Rebase to upstream release v30.0
* Thu Jan 10 2019 Jarod Wilson <jarod@redhat.com> - 22-1
- Update to upstream v22 release for features and fixes
- Include legacy ibdev2netdev helper script
- Resolves: rhbz#1643904
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 29.0-2
- Rebuilt for Python 3.9
* Tue Nov 27 2018 Jarod Wilson <jarod@redhat.com> - 19.1-1
- Update to v19.1 stable branch release
- Fix SRQ support in libi40iw
- Backport libqedr support for SRQ
- Resolves: rhbz#1639692
- Switch rxe_cfg from ifconfig to iproute2
- Resolves: rhbz#1640637
* Mon Apr 13 2020 Honggang Li <honli@redhat.com> - 29.0-1
- Rebase to upstream release v29.0
* Thu Aug 30 2018 Jarod Wilson <jarod@redhat.com> - 19-3
- Drop R: initscripts, since we've removed initscripts
- Resolves: rhbz#1610284
* Wed Feb 12 2020 Honggang Li <honli@redhat.com> - 28.0-1
- Rebase to upstream release v28.0
* Fri Aug 3 2018 Florian Weimer <fweimer@redhat.com> - 19-2
- Honor %%{valgrind_arches}
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 27.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 19 2018 Jarod Wilson <jarod@redhat.com> 19-1
- Rebase to upstream rdma-core v19 release
* Sun Jan 19 2020 Orion Poplawski <orion@nwra.com> - 27.0-3
- Fix typo in requires
* Mon Jul 02 2018 Jarod Wilson <jarod@redhat.com> 18.1-3
- Adjust python deps for python3-only world
* Sun Jan 19 2020 Honggang Li <honli@redhat.com> - 27.0-2
- Backport some spec improvement from upstream
* Thu Jun 21 2018 Jarod Wilson <jarod@redhat.com> 18.1-2
- Disable nes, mthca and ipath libibverbs providers, this
old hardware is no longer supported, and fix disabling
of cxgb3 and ocrdma
* Thu Dec 12 2019 Honggang Li <honli@redhat.com> - 27.0-1
- Rebase to upstream release v27.0
* Fri Jun 15 2018 Jarod Wilson <jarod@redhat.com> 18.1-1
- Rebase to upstream rdma-core v18.1 stable release
* Thu Nov 28 2019 Honggang Li <honli@redhat.com> - 26.1-1
- Rebase to upstream release v26.1
* Thu May 03 2018 Jarod Wilson <jarod@redhat.com> 17.1-2
- Match kernel ABI with kernel v4.17 for 32-on-64bit compatibility
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Apr 16 2018 Jarod Wilson <jarod@redhat.com> 17.1-1
- Rebase to upstream rdma-core v17.1 stable release
- No more libibcm or ib sysv initscripts
- Remove ibverbs provider for unsupported CXGB3 devices
- Remove ibverbs provider for unsupported OCRDMA devices
- Resolves: rhbz#1492324
- Resolves: rhbz#1492924
- Resolves: rhbz#1503621
- Resolves: rhbz#1504528
- Resolves: rhbz#1504581
- Resolves: rhbz#1503723
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Feb 27 2018 Jarod Wilson <jarod@redhat.com> 15-7
- i40iw: revoke systemd udev rules auto-load on i40e hardware, due to
causing problems with suspend and resume, and fall back to load via
systemd rdma initscript.
- Resolves: rhbz#1561566
* Wed Jan 23 2019 Björn Esser <besser82@fedoraproject.org> - 20.1-2
- Append curdir to CMake invokation. (#1668512)
* Mon Feb 19 2018 Jarod Wilson <jarod@redhat.com> 15-6
- libbnxt_re: fix lat test failure in event mode
- Resolves: rhbz#1545248
* Fri Oct 19 2018 Jarod Wilson <jarod@redhat.com> - 20.1-1
- Long overdue update to upstream v20.1 stable release
* Tue Feb 06 2018 Jarod Wilson <jarod@redhat.com> 15-5
- libmlx4: report RSS caps for improved DPDK support
- Fix double mutex unlock in iwpmd
- Resolves: rhbz#1527350
- Resolves: rhbz#1542362
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jan 15 2018 Jarod Wilson <jarod@redhat.com> 15-4
- Add support for extended join multicast API in librdmacm
- Add support for striding RQ on mlx5
- Resolves: rhbz#1515487, rhbz#1516571
* Sun Mar 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 16.2-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Tue Dec 26 2017 Honggang Li <honli@redhat.com> 15-3
- srp_daemon: Don't create async_ev_thread if only run once
- srp_daemon: Remove unsupported systemd configurations
- srp_daemon: Start srp_daemon service after network target
- Resolves: bz1525193
- Resolves: bz1528671
* Tue Feb 06 2018 Orion Poplawski <orion@nwra.com> - 16.2-3
- Build for s390/x
* Mon Nov 13 2017 Jarod Wilson <jarod@redhat.com> 15-2
- Fix ibacm segfault and improper multicast handling
- Resolves: rhbz#1502745
- Resolves: rhbz#1502759
* Tue Feb 06 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 16.2-2
- Fix escaped macro
* Fri Sep 22 2017 Jarod Wilson <jarod@redhat.com> 15-1
- Update to upstream v15 release
- Resolves: rhbz#1494607
* Sun Feb 04 2018 Doug Ledford <dledford@redhat.com> - 16.2-1
- Update to rdma-core-16.2
- Drop the old sysv initscript files
* Wed Aug 09 2017 Jarod Wilson <jarod@redhat.com> - 14-4
- Make use of systemd_requires, own srp_daemon dir
@ -851,50 +773,8 @@ fi
- Update to upstream v14 release
- Sync packaging updates from RHEL and upstream
* Tue May 30 2017 Jarod Wilson <jarod@redhat.com> 13-7
- Add support for mlx5 Expand raw packet capabilities
- Resolves: rhbz#1456561
* Mon May 22 2017 Jarod Wilson <jarod@redhat.com> 13-6
- Clean up htonll/ntohll handling for opa-ff/infiniband-diags compile
- Add necessary Provides/Obsoletes for old -static packages
- Remove ibverbs providers that we aren't currently able to support
- Resolves: rhbz#1453096, rhbz#1451607
* Wed Apr 26 2017 Honggang Li <honli@redhat.com> 13-5
- rdma-ndd: Fix a busy loop for aarch64 platform
- Resolves: bz1442789
* Thu Apr 13 2017 Honggang Li <honli@redhat.com> 13-4
- srp_daemon: Don't rely on attribute offset in get_shared_pkeys
- Resolves: bz1432964
* Mon Apr 03 2017 Jarod Wilson <jarod@redhat.com> - 13-3
- Add necessary Provides/Obsoletes for rdma-ndd (rhbz 1437804)
* Mon Mar 27 2017 Jarod Wilson <jarod@redhat.com> - 13-2
- Build what we can on s390, don't exclude it entirely (rhbz 1434029)
* Tue Mar 21 2017 Jarod Wilson <jarod@redhat.com> - 13-1
- Update to rdma-core v13 release (rhbz 1404035)
- Mellanox mlx5 Direct Verbs support (rhbz 1426430)
- Get build working on s390x, less mlx5 (rhbz 1434029)
* Mon Mar 20 2017 Jarod Wilson <jarod@redhat.com> - 12-5
- Fix up multi-lib conflicts in ibacm files (rhbz 1429362)
* Mon Mar 13 2017 Jarod Wilson <jarod@redhat.com> - 12-4
- Clean up devel files list
- Fix up a few dependencies rpmdiff complained about (rhbz 1404035)
- Add Requires: pciutils for dracut to behave in minimalist cases (rhbz 1429046)
- Adjust Conflicts: on infiniband-diags to match RHEL packaging (rhbz 1428785)
* Mon Mar 06 2017 Jarod Wilson <jarod@redhat.com> - 12-3
- Take libi40iw out of tech-preview state (rhbz 1428930)
- Add ibv_*_pingpong man pages (rhbz 1416541)
* Thu Feb 09 2017 Jarod Wilson <jarod@redhat.com> - 12-2
- Make sure ocrdma module is classified as tech-preview (rhbz 1418224)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 27 2017 Jarod Wilson <jarod@redhat.com> - 12-1
- Update to upstream final v12 release