Skip to content

Commit 910717c

Browse files
author
Stefan Raspl
committed
Release: Prepare v1.2.2
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
1 parent e3e5c20 commit 910717c

8 files changed

Lines changed: 75 additions & 13 deletions

File tree

Makefile

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
#
23
# SMC Tools - Shared Memory Communication Tools
34
#
@@ -9,7 +10,7 @@
910
# http://www.eclipse.org/legal/epl-v10.html
1011
#
1112

12-
SMC_TOOLS_RELEASE = 1.2.1
13+
SMC_TOOLS_RELEASE = 1.2.2
1314
VER_MAJOR = $(shell echo $(SMC_TOOLS_RELEASE) | cut -d '.' -f 1)
1415

1516
ARCHTYPE = $(shell uname -m)
@@ -29,6 +30,7 @@ DESTDIR ?=
2930
PREFIX = /usr
3031
BINDIR = ${PREFIX}/bin
3132
MANDIR = ${PREFIX}/share/man
33+
BASH_AUTODIR = $(shell pkg-config --variable=completionsdir bash-completion 2>/dev/null)
3234
OWNER = $(shell id -un)
3335
GROUP = $(shell id -gn)
3436
INSTALL_FLAGS_BIN = -g $(GROUP) -o $(OWNER) -m755
@@ -107,6 +109,7 @@ smc_pnet: smc_pnet.c smc.h smctools_common.h
107109
printf "* Install package..............: %-45s\n" "devel package for libnl3" >&2; \
108110
printf "* Install package..............: %-45s\n" "devel package for libnl3-genl" >&2; \
109111
printf "* NOTE: Package names might differ by platform\n" >&2; \
112+
printf "* On Ubuntu try libnl-3-dev and libnl-genl-3-dev\n" >&2; \
110113
printf "**************************************************************\n" >&2; \
111114
exit 1; \
112115
fi
@@ -117,12 +120,13 @@ smcss: smcss.c smc_diag.h smctools_common.h
117120

118121
install: all
119122
echo " INSTALL"
120-
install -d -m755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man7 $(DESTDIR)$(MANDIR)/man8
123+
install -d -m755 $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man7 \
124+
$(DESTDIR)$(BASH_AUTODIR) $(DESTDIR)$(MANDIR)/man8
121125
install $(INSTALL_FLAGS_LIB) libsmc-preload.so $(DESTDIR)$(LIBDIR)
122-
ifeq ($(STUFF_32BIT),1)
123-
install -d -m755 $(DESTDIR)$(LIBDIR32)
124-
install $(INSTALL_FLAGS_LIB) libsmc-preload32.so $(DESTDIR)$(LIBDIR32)/libsmc-preload.so
125-
endif
126+
#ifeq ($(STUFF_32BIT),1)
127+
# install -d -m755 $(DESTDIR)$(LIBDIR32)
128+
# install $(INSTALL_FLAGS_LIB) libsmc-preload32.so $(DESTDIR)$(LIBDIR32)/libsmc-preload.so
129+
#endif
126130
install $(INSTALL_FLAGS_BIN) smc_run $(DESTDIR)$(BINDIR)
127131
install $(INSTALL_FLAGS_BIN) smcss $(DESTDIR)$(BINDIR)
128132
install $(INSTALL_FLAGS_BIN) smc_pnet $(DESTDIR)$(BINDIR)
@@ -135,6 +139,13 @@ endif
135139
install $(INSTALL_FLAGS_MAN) smc_run.8 $(DESTDIR)$(MANDIR)/man8
136140
install $(INSTALL_FLAGS_MAN) smc_pnet.8 $(DESTDIR)$(MANDIR)/man8
137141
install $(INSTALL_FLAGS_MAN) smcss.8 $(DESTDIR)$(MANDIR)/man8
142+
ifneq ($(BASH_AUTODIR),)
143+
install $(INSTALL_FLAGS_MAN) smc-tools.autocomplete $(DESTDIR)$(BASH_AUTODIR)/smc-tools
144+
ln -sfr $(DESTDIR)$(BASH_AUTODIR)/smc-tools $(DESTDIR)$(BASH_AUTODIR)/smc_rnics
145+
ln -sfr $(DESTDIR)$(BASH_AUTODIR)/smc-tools $(DESTDIR)$(BASH_AUTODIR)/smc_dbg
146+
ln -sfr $(DESTDIR)$(BASH_AUTODIR)/smc-tools $(DESTDIR)$(BASH_AUTODIR)/smcss
147+
ln -sfr $(DESTDIR)$(BASH_AUTODIR)/smc-tools $(DESTDIR)$(BASH_AUTODIR)/smc_pnet
148+
endif
138149

139150
clean:
140151
echo " CLEAN"

README.smctools

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SMC Tools (1.2.1)
1+
SMC Tools (1.2.2)
22
===================
33

44
The SMC Tools provided in this package allow execution of existing TCP
@@ -46,12 +46,20 @@ For enhancements, please describe the proposed change and its benefits.
4646
Release History:
4747
================
4848

49+
1.2.2 (2019-10-24)
50+
Changes:
51+
- Add bash autocompletion support
52+
53+
Bug fixes:
54+
- smcss: Do not show connection mode for already closed sockets
55+
- smc_rnics: Set interface to "n/a" for ISM devices
56+
4957
1.2.1 (2019-04-15)
5058
Bug fixes:
5159
- smc_rnics: Install man page on s390 only
5260
- smc-preload: Handle behavior flags in type argument to socket() call
5361
- Makefile: Fixed install target on Ubuntu for platforms other than s390
54-
- smc_pnet: changes in support of kernel 5.1
62+
- smc_pnet: Changes in support of kernel 5.1
5563

5664
1.2.0 (2019-02-08)
5765
Changes:

smc-tools.autocomplete

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function _smc_pnet_complete_() {
2+
case "${COMP_WORDS[COMP_CWORD-1]}" in
3+
--interface*|-I*)
4+
COMPREPLY=($(compgen -W "$(ls -1 /sys/class/net/)" -- "${COMP_WORDS[COMP_CWORD]}"))
5+
return;;
6+
--ibdevice*|-D*)
7+
which smc_rnics >/dev/null
8+
if [ $? -eq 0 ]; then
9+
COMPREPLY=($(compgen -W "$(smc_rnics | tail -n +3 | awk '{print($3)}' | uniq)" -- "${COMP_WORDS[COMP_CWORD]}"))
10+
else
11+
COMPREPLY=($(compgen -W "$(ls -1 /sys/bus/pci/devices)" -- "${COMP_WORDS[COMP_CWORD]}"))
12+
fi
13+
return;;
14+
--ibport*|-P*)
15+
;;
16+
esac
17+
18+
COMPREPLY=($(compgen -W "--help --version --add --delete --show --flush --interface --ibdevice --ibport" -- "${COMP_WORDS[COMP_CWORD]}"))
19+
}
20+
21+
function _smc_rnics_complete_() {
22+
case "${COMP_WORDS[COMP_CWORD-1]}" in
23+
--enable|-e)
24+
COMPREPLY=($(compgen -W "$(smc_rnics | grep -e "^ [[:space:]0-9a-f]\{2\} 0" | awk '{print($1)}')" -- "${COMP_WORDS[COMP_CWORD]}"))
25+
return;;
26+
--disable|-d)
27+
COMPREPLY=($(compgen -W "$(smc_rnics | grep -e "^ [[:space:]0-9a-f]\{2\} 1" | awk '{print($1)}')" -- "${COMP_WORDS[COMP_CWORD]}"))
28+
return;;
29+
esac
30+
31+
COMPREPLY=($(compgen -W "--help --version --disable --enable --rawids" -- "${COMP_WORDS[COMP_CWORD]}"))
32+
}
33+
34+
complete -W "--help --tgz --version" smc_dbg
35+
complete -W "--help --version --all --listening --debug --wide --smcd --smcr" smcss
36+
complete -F _smc_pnet_complete_ smc_pnet
37+
complete -F _smc_rnics_complete_ smc_rnics
38+

smc_dbg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ while [ $# -gt 0 ]; do
3636
"-t" | "--tgz" )
3737
tgz="on";;
3838
"-v" | "--version" )
39-
echo "smc_dbg utility, smc-tools-1.2.1 (5ad3088)";
39+
echo "smc_dbg utility, smc-tools-1.2.2 (4335826)";
4040
exit 0;;
4141
* )
4242
esac

smc_rnics

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ while [ $# -gt 0 ]; do
6666
"-r" | "--rawids" )
6767
rawIDs=1;;
6868
"-v" | "--version" )
69-
echo "smc_rnics utility, smc-tools-1.2.1 (5ad3088)";
69+
echo "smc_rnics utility, smc-tools-1.2.2 (4335826)";
7070
exit 0;;
7171
"--" ) ;;
7272
* ) format_fid "$1";
@@ -144,7 +144,8 @@ for fid in `ls -1 /sys/bus/pci/slots`; do
144144
"0x1014" ) # IBM
145145
case "$id" in
146146
"0x04ed") dev_type="ISM";
147-
port="n/a";;
147+
port="n/a";
148+
int="n/a";;
148149
"0x044b") continue;; # zEDC
149150
esac;;
150151
"0x15b3" ) # Mellanox

smc_rnics.8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ on how to enable a device that is offline.
7070
PCI ID in BDF (Bus:Device.Function) notation.
7171

7272
.SS "PCHID"
73-
Physical channel identifier.
73+
Physical channel identifier, or virtual channel identifier (VCHID) for
74+
ISM devices.
7475

7576
.SS "Type"
7677
Device type in human readable form. See option

smcss.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ static void show_one_smc_sock(struct nlmsghdr *nlh)
331331
r->id.idiag_dst, ntohs(r->id.idiag_dport));
332332
printf("%-*s ", (int)MAX(ADDR_LEN_SHORT, strlen(txtbuf)), txtbuf);
333333
printf("%04x ", r->id.idiag_if);
334+
if (r->diag_state == 7) /* CLOSED state */
335+
goto newline;
336+
334337
if (r->diag_mode == SMC_DIAG_MODE_FALLBACK_TCP) {
335338
printf("TCP ");
336339
/* when available print local and peer fallback reason code */

smctools_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define STRINGIFY(x) STRINGIFY_1(x)
2121

2222
#define RELEASE_STRING STRINGIFY (SMC_TOOLS_RELEASE)
23-
#define RELEASE_LEVEL "5ad3088"
23+
#define RELEASE_LEVEL "4335826"
2424

2525
#define PF_SMC 43
2626

0 commit comments

Comments
 (0)