Skip to content

Commit 9466828

Browse files
author
Stefan Raspl
committed
Release: Prepare v1.2.0
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
1 parent 8a976a0 commit 9466828

14 files changed

Lines changed: 456 additions & 61 deletions

Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
# http://www.eclipse.org/legal/epl-v10.html
1010
#
1111

12-
SMC_TOOLS_RELEASE = 1.1.0
12+
SMC_TOOLS_RELEASE = 1.2.0
1313
VER_MAJOR = $(shell echo $(SMC_TOOLS_RELEASE) | cut -d '.' -f 1)
1414

1515
ARCHTYPE = $(shell uname -m)
1616
ARCH := $(shell getconf LONG_BIT)
17+
DISTRO := $(shell lsb_release -si 2>/dev/null)
1718

1819
ifneq ("${V}","1")
1920
MAKEFLAGS += --quiet
@@ -39,14 +40,22 @@ STUFF_32BIT = 0
3940
# Check that 31/32-bit build tools are available.
4041
#
4142
ifeq ($(ARCH),64)
43+
ifeq ($(DISTRO),Ubuntu)
44+
LIBDIR = ${PREFIX}/lib/s390x-linux-gnu
45+
else
4246
LIBDIR = ${PREFIX}/lib64
47+
endif
4348
ifneq ("$(wildcard ${PREFIX}/include/gnu/stubs-32.h)","")
4449
STUFF_32BIT = 1
4550
LIBDIR32 = ${PREFIX}/lib
4651
endif
4752
else
53+
ifeq ($(DISTRO),Ubuntu)
54+
LIBDIR = ${PREFIX}/lib/s390-linux-gnu
55+
else
4856
LIBDIR = ${PREFIX}/lib
4957
endif
58+
endif
5059

5160
all: libsmc-preload.so libsmc-preload32.so smcss smc_pnet
5261

@@ -59,6 +68,9 @@ else
5968
MACHINE_OPT32="-m32"
6069
endif
6170

71+
%: %.in
72+
$(GEN) -e "s#x.x.x#$(SMC_TOOLS_RELEASE)#g" < $< > $@
73+
6274
smc-preload.o: smc-preload.c
6375
${CCC} ${CFLAGS} -fPIC -c smc-preload.c
6476

@@ -114,8 +126,13 @@ endif
114126
install $(INSTALL_FLAGS_BIN) smc_run $(DESTDIR)$(BINDIR)
115127
install $(INSTALL_FLAGS_BIN) smcss $(DESTDIR)$(BINDIR)
116128
install $(INSTALL_FLAGS_BIN) smc_pnet $(DESTDIR)$(BINDIR)
129+
install $(INSTALL_FLAGS_BIN) smc_dbg $(DESTDIR)$(BINDIR)
130+
ifeq ($(shell uname -m | cut -c1-4),s390)
131+
install $(INSTALL_FLAGS_BIN) smc_rnics $(DESTDIR)$(BINDIR)
132+
endif
117133
install $(INSTALL_FLAGS_MAN) af_smc.7 $(DESTDIR)$(MANDIR)/man7
118134
install $(INSTALL_FLAGS_MAN) smc_run.8 $(DESTDIR)$(MANDIR)/man8
135+
install $(INSTALL_FLAGS_MAN) smc_rnics.8 $(DESTDIR)$(MANDIR)/man8
119136
install $(INSTALL_FLAGS_MAN) smc_pnet.8 $(DESTDIR)$(MANDIR)/man8
120137
install $(INSTALL_FLAGS_MAN) smcss.8 $(DESTDIR)$(MANDIR)/man8
121138

README.smctools

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SMC Tools (1.1.0)
1+
SMC Tools (1.2.0)
22
===================
33

44
The SMC Tools provided in this package allow execution of existing TCP
@@ -12,6 +12,7 @@ This package consists of the tools:
1212
- smc_pnet : C program for PNET Table handling
1313
- smcss : C program for displaying the information about active
1414
SMC sockets.
15+
- smc_rnics : List available RDMA NICs
1516

1617
The preload shared library libsmc-preload.so provides mapping of TCP socket
1718
operations to SMC sockets.
@@ -45,6 +46,14 @@ For enhancements, please describe the proposed change and its benefits.
4546
Release History:
4647
================
4748

49+
1.2.0 (2019-02-08)
50+
Changes:
51+
- smc_rnics: Initial version added
52+
- smc_dbg: Initial version added
53+
54+
Bug fixes:
55+
- smcss: Parse address family of ip address
56+
4857
1.1.0 (2018-06-29)
4958
Changes:
5059
- smcss: Add IPv6 support
@@ -87,6 +96,7 @@ af_smc.7 manpage for AF_SMC sockets
8796
smc_pnet.8 manpage for smc_pnet
8897
smcss.8 manpage for smcss
8998
smc_run.8 manpage for preload library usage
99+
smc_dbg collect debugging data
90100

91101

92102
Requirements:

af_smc.7

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\"
22
.\" Copyright IBM Corp. 2016, 2018
3-
.\" Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
4-
.\" Thomas Richter <tmricht@linux.vnet.ibm.com>
3+
.\" Author(s): Ursula Braun <ubraun@linux.ibm.com>
4+
.\" Thomas Richter <tmricht@linux.ibm.com>
55
.\" ----------------------------------------------------------------------
66
.TH AF_SMC 7 "January 2017" "smc-tools" "Linux Programmer's Manual"
77
.SH NAME
@@ -129,14 +129,6 @@ SMC determines the configured MTU size of the RoCE Ethernet port,
129129
announces this MTU size to the peer during connection start, and chooses
130130
the minimum MTU size of both peers.
131131

132-
.SH "AUTHOR"
133-
.nf
134-
Copyright IBM Corp. 2016, 2018
135-
136-
Published under the terms and conditions of the EPL
137-
(Eclipse Public License).
138-
.fi
139-
140132
.SH "SEE ALSO"
141133
.BR socket (2),
142134
.BR ip (7),

smc-preload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* SMC Tools - Shared Memory Communication Tools
33
*
4-
* Copyright (c) IBM Corp. 2016, 2018
4+
* Copyright IBM Corp. 2016, 2018
55
*
66
* All rights reserved. This program and the accompanying materials
77
* are made available under the terms of the Eclipse Public License v1.0

smc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright IBM Corp. 2017
77
*
8-
* Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
8+
* Author(s): Thomas Richter <tmricht@linux.ibm.com>
99
*/
1010

1111
#ifndef _UAPI_LINUX_SMC_H_

smc_dbg

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/bin/bash
2+
3+
# Copyright IBM Corp. 2019
4+
5+
function usage() {
6+
echo;
7+
echo "Usage: smc_dbg [ OPTIONS ]";
8+
echo;
9+
echo "Collect debug information";
10+
echo;
11+
echo " -h, --help display this message";
12+
echo " -t, --tgz generate .tgz file";
13+
echo " -v, --version display version info";
14+
echo;
15+
}
16+
17+
18+
function redirect() {
19+
if [ "$tgz" == "on" ]; then
20+
exec &>$tmpdir/$1;
21+
else
22+
echo;
23+
fi
24+
}
25+
26+
tgz="off";
27+
ARCH=`uname -m | cut -c1-4`;
28+
args=`getopt -u -o hvt -l help,version,tgz -- $*`;
29+
[ $? -ne 0 ] && exit 1;
30+
set -- $args;
31+
while [ $# -gt 0 ]; do
32+
case $1 in
33+
"-h" | "--help" )
34+
usage;
35+
exit 0;;
36+
"-t" | "--tgz" )
37+
tgz="on";;
38+
"-v" | "--version" )
39+
echo "smc_dbg utility, smc-tools-1.2.0 (8a2dae6)";
40+
exit 0;;
41+
* )
42+
esac
43+
shift;
44+
done
45+
if [ "$tgz" == "on" ]; then
46+
exec 3>&1 4>&2
47+
tmpdir=`mktemp -d /tmp/smc_dbg-XXXXXX`;
48+
fi
49+
50+
redirect version.txt;
51+
smcss -v
52+
smc_dbg -v
53+
smc_pnet -v
54+
smc_rnics -v
55+
56+
if [ "$ARCH" == "s390" ]; then
57+
redirect devices.txt;
58+
echo "CCW Devices:"
59+
printf " Device CHPID PNET ID\n";
60+
echo " -------------------------------------------";
61+
for device in `ls -1 /sys/bus/ccwgroup/devices`; do
62+
chpid=`cat /sys/bus/ccwgroup/devices/$device/chpid | tr [A-F] [a-f]`;
63+
pnetid="`cat /sys/devices/css0/chp0.$chpid/util_string | iconv -f IBM-1047 -t ASCII 2>/dev/null | tr -d '\000' | sed 's/^/ /'`";
64+
printf " %8s %4s %s\n" $device 0x$chpid $pnetid;
65+
done
66+
echo;
67+
68+
echo "PCI Devices:"
69+
smc_rnics | sed 's/^/ /';
70+
71+
redirect smcss_smcd;
72+
smcss --smcd;
73+
fi
74+
75+
redirect smcss_all.txt;
76+
smcss --all --debug;
77+
78+
redirect smcss_smcr;
79+
smcss --smcr;
80+
81+
redirect pnet_table.txt;
82+
smc_pnet --show;
83+
84+
if [ "$tgz" == "on" ]; then
85+
exec >&3 2>&4
86+
cd /tmp;
87+
tar cvfz $tmpdir.tgz `basename $tmpdir` >/dev/null 2>&1;
88+
rm -rf $tmpdir;
89+
echo "Debug output written to $tmpdir.tgz";
90+
fi
91+
exit 0;

smc_pnet.8

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
.\"
33
.\"
44
.\" Copyright IBM Corp. 2017
5-
.\" Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
6-
.\" Ursula Braun <ubraun@linux.vnet.ibm.com>
5+
.\" Author(s): Thomas Richter <tmricht@linux.ibm.com>
6+
.\" Ursula Braun <ubraun@linux.ibm.com>
77
.\" ----------------------------------------------------------------------
88
.\"
99

@@ -129,18 +129,8 @@ If an error occurs,
129129
writes a message to stderr and completes with a return code
130130
other than 0.
131131
.P
132-
.SH AUTHOR
133-
.nf
134-
This man page was written by
135-
Ursula Braun <ubraun@linux.vnet.ibm.com>
136-
137-
Copyright (c) IBM Corp. 2017
138-
139-
Published under the terms and conditions of the EPL
140-
(Eclipse Public License).
141-
.fi
142-
143132
.SH SEE ALSO
144133
.BR af_smc (7),
145-
.BR smc_run (8)
134+
.BR smc_rnics (8),
135+
.BR smc_run (8),
146136
.BR smcss (8)

smc_pnet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright IBM Corp. 2017
55
*
6-
* Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
6+
* Author(s): Thomas Richter <tmricht@linux.ibm.com>
77
*
88
* User space program for SMC-R PNET Table manipulation with generic netlink.
99
*

0 commit comments

Comments
 (0)