[PATCH 0/2] mstflint:
Hi, this tiny series addresses 2 things: - Fix the various dist-xxx Makefile targets - Install the mflash and mtcr libraries and headers so that applications can use them. Sebastien Dugue (2): mstflint: Fix make dist-xx mstflint: Install mflash/mtcr libraries headers cmdif/Makefile.am | 2 +- mflash/Makefile.am| 10 -- mft_utils/Makefile.am | 3 ++- mstflint.spec.in | 4 ++-- mtcr_ul/Makefile.am | 5 +++-- reg_access/Makefile.am| 5 +++-- tools_layouts/Makefile.am | 4 +++- 7 files changed, 22 insertions(+), 11 deletions(-) -- 1.8.4 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] mstflint: Install mflash/mtcr libraries headers
This is necessary to be able to use libmflash libmtcr from external programs. This also installs the needed libreg_access.a and libtools_layouts.a. Signed-off-by: Sébastien Dugué sebastien.du...@bull.net --- mflash/Makefile.am| 8 +++- mstflint.spec.in | 4 ++-- mtcr_ul/Makefile.am | 5 +++-- reg_access/Makefile.am| 3 ++- tools_layouts/Makefile.am | 4 +++- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/mflash/Makefile.am b/mflash/Makefile.am index 632539c..68099e3 100644 --- a/mflash/Makefile.am +++ b/mflash/Makefile.am @@ -35,8 +35,14 @@ INCLUDES= -I. -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -I$(top_src AM_CFLAGS = -MD -pipe -Wall -W -DMST_UL -g ${MFLASH_INBAND_FLAG} -noinst_LIBRARIES = libmflash.a + +libmflash_adir = $(libdir)/mstflint +libmflash_a_LIBRARIES = libmflash.a libmflash_a_SOURCES = mflash.c mflash.h\ mflash_pack_layer.c mflash_pack_layer.h mflash_access_layer.c mflash_access_layer.h\ mflash_types.h mflash_common_structs.h + +libraryincludedir=$(includedir)/mstflint +libraryinclude_HEADERS = mflash.h mflash_types.h mflash_common_structs.h \ +$(top_srcdir)/common/compatibility.h diff --git a/mstflint.spec.in b/mstflint.spec.in index 0d9281b..966224c 100644 --- a/mstflint.spec.in +++ b/mstflint.spec.in @@ -78,8 +78,8 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/mstmcra %{_bindir}/mstconfig %{_bindir}/hca_self_test.ofed -%{_includedir}/mtcr_ul/mtcr.h -%{_libdir}/libmtcr_ul.a +%{_includedir}/mstflint +%{_libdir}/mstflint/* %{_datadir}/mstflint %{_mandir}/man1/* diff --git a/mtcr_ul/Makefile.am b/mtcr_ul/Makefile.am index dd1b68d..59fc6c5 100644 --- a/mtcr_ul/Makefile.am +++ b/mtcr_ul/Makefile.am @@ -33,7 +33,8 @@ # Makefile.am -- Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir)/include/mtcr_ul -I$(top_srcdir)/common -lib_LIBRARIES = libmtcr_ul.a +libmtcr_ul_adir = $(libdir)/mstflint +libmtcr_ul_a_LIBRARIES = libmtcr_ul.a libmtcr_ul_a_SOURCES = mtcr_ul.c mtcr_ib.h mtcr_int_defs.h\ mtcr_tools_cif.c mtcr_tools_cif.h\ @@ -48,6 +49,6 @@ else libmtcr_ul_a_CFLAGS += -DNO_INBAND endif -libraryincludedir=$(includedir)/mtcr_ul +libraryincludedir=$(includedir)/mstflint libraryinclude_HEADERS = $(top_srcdir)/include/mtcr_ul/mtcr.h diff --git a/reg_access/Makefile.am b/reg_access/Makefile.am index 7f78060..99a83af 100644 --- a/reg_access/Makefile.am +++ b/reg_access/Makefile.am @@ -40,7 +40,8 @@ INCLUDES = -I. -I$(USER_DIR) -I$(srcdir) -I$(LAYOUTS_DIR) -I$(USER_DIR)/include/ AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) -noinst_LIBRARIES = libreg_access.a +libreg_access_adir = $(libdir)/mstflint +libreg_access_a_LIBRARIES = libreg_access.a libreg_access_a_SOURCES = reg_access.c reg_access.h libreg_access_a_DEPENDENCIES = $(USER_DIR)/tools_layouts/libtools_layouts.a diff --git a/tools_layouts/Makefile.am b/tools_layouts/Makefile.am index 17bdf6c..8880907 100644 --- a/tools_layouts/Makefile.am +++ b/tools_layouts/Makefile.am @@ -33,7 +33,9 @@ # Makefile.am -- Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir)/mtcr_ul -I$(top_srcdir)/common AM_CFLAGS = -Wall -W -g -MP -MD -pipe $(COMPILER_FPIC) -noinst_LIBRARIES = libtools_layouts.a + +libtools_layouts_adir = $(libdir)/mstflint +libtools_layouts_a_LIBRARIES = libtools_layouts.a libtools_layouts_a_SOURCES = cibfw_layouts.c adb_to_c_utils.c adb_to_c_utils.h cibfw_layouts.h \ register_access_open_layouts.h register_access_open_layouts.c \ -- 1.8.4 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] mstflint: Fix make dist-xx Makefile targets
Add some needed headers that make dist-xx left out of the generated archive. Signed-off-by: Sébastien Dugué sebastien.du...@bull.net --- cmdif/Makefile.am | 2 +- mflash/Makefile.am | 2 +- mft_utils/Makefile.am | 3 ++- reg_access/Makefile.am | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmdif/Makefile.am b/cmdif/Makefile.am index b3ac612..60be402 100644 --- a/cmdif/Makefile.am +++ b/cmdif/Makefile.am @@ -40,5 +40,5 @@ AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) -DCMDIF_EXPORTS CMDIF_VERSION = 1 noinst_LIBRARIES = libcmdif.a -libcmdif_a_SOURCES = tools_cif.c +libcmdif_a_SOURCES = tools_cif.c tools_cif.h diff --git a/mflash/Makefile.am b/mflash/Makefile.am index b4a87cf..632539c 100644 --- a/mflash/Makefile.am +++ b/mflash/Makefile.am @@ -39,4 +39,4 @@ noinst_LIBRARIES = libmflash.a libmflash_a_SOURCES = mflash.c mflash.h\ mflash_pack_layer.c mflash_pack_layer.h mflash_access_layer.c mflash_access_layer.h\ - mflash_types.h mlash_common_structs.h + mflash_types.h mflash_common_structs.h diff --git a/mft_utils/Makefile.am b/mft_utils/Makefile.am index ad9ad8e..4cd121c 100644 --- a/mft_utils/Makefile.am +++ b/mft_utils/Makefile.am @@ -40,5 +40,6 @@ noinst_HEADERS = mft_sig_handler.h errmsg.h noinst_LIBRARIES = libmftutils.a -libmftutils_a_SOURCES = mft_sig_handler.c errmsg.cpp +libmftutils_a_SOURCES = mft_sig_handler.c errmsg.cpp \ + $(top_srcdir)/common/tools_utils.h diff --git a/reg_access/Makefile.am b/reg_access/Makefile.am index 3e56406..7f78060 100644 --- a/reg_access/Makefile.am +++ b/reg_access/Makefile.am @@ -42,7 +42,7 @@ AM_CFLAGS = -W -Wall -Werror -g -MP -MD $(COMPILER_FPIC) noinst_LIBRARIES = libreg_access.a -libreg_access_a_SOURCES = reg_access.c +libreg_access_a_SOURCES = reg_access.c reg_access.h libreg_access_a_DEPENDENCIES = $(USER_DIR)/tools_layouts/libtools_layouts.a libreg_access_a_LIBADD = $(libreg_access_a_DEPENDENCIES) -- 1.8.4 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH infiniband-diags] ibtracert.c: Remove checking the port 0 state for BasePort0 switches
From: Dan Ben Yosef da...@mellanox.com The port 0 state check is needed only for HCA/Routers and EnhancedPort0 switches. For BasePort0 switches, the PortState field in the PortInfo attribute for port0 is undefined (not used). Signed-off-by: Dan Ben Yosef da...@mellanox.com --- src/ibtracert.c | 47 --- 1 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/ibtracert.c b/src/ibtracert.c index d32968b..326200b 100644 --- a/src/ibtracert.c +++ b/src/ibtracert.c @@ -92,6 +92,7 @@ struct Switch { int mccap; int linearFDBtop; int fdb_base; + int enhsp0; int8_t fdb[64]; char switchinfo[64]; }; @@ -114,6 +115,17 @@ struct Node { Node *nodesdist[MAXHOPS]; uint64_t target_portguid; +static int is_route_inactive_port0(Node * node, Port * port, Switch * sw) +{ + int res = 0; + /* not active for HCA and for enhanced port0 Switches */ + if (port-state != 4 + (node-type != IB_NODE_SWITCH || +(node-type == IB_NODE_SWITCH sw-enhsp0))) + res = 1; + return res; +} + static int get_node(Node * node, Port * port, ib_portid_t * portid) { void *pi = port-portinfo, *ni = node-nodeinfo, *nd = node-nodedesc; @@ -164,6 +176,7 @@ static int switch_lookup(Switch * sw, ib_portid_t * portid, int lid) mad_decode_field(si, IB_SW_LINEAR_FDB_CAP_F, sw-linearcap); mad_decode_field(si, IB_SW_LINEAR_FDB_TOP_F, sw-linearFDBtop); + mad_decode_field(si, IB_SW_ENHANCED_PORT0_F, sw-enhsp0); if (lid = sw-linearcap lid sw-linearFDBtop) return -1; @@ -248,7 +261,7 @@ static int find_route(ib_portid_t * from, ib_portid_t * to, int dump) Port *port, fromport, toport, nextport; Switch sw; int maxhops = MAXHOPS; - int portnum, outport; + int portnum, outport = 255, next_sw_outport = 255; memset(fromnode,0,sizeof(Node)); memset(tonode,0,sizeof(Node)); @@ -274,20 +287,28 @@ static int find_route(ib_portid_t * from, ib_portid_t * to, int dump) portnum = port-portnum; dump_endnode(dump, From, node, port); + if (node-type == IB_NODE_SWITCH) { + next_sw_outport = switch_lookup(sw, from, to-lid); + if (next_sw_outport 0 || next_sw_outport node-numports) { + /* needed to print the port in badtbl */ + outport = next_sw_outport; + goto badtbl; + } + } while (maxhops--) { - if (port-state != 4) + /* checking if the port state isn't active. +* The sw argument is only relevant when the port is a +* switch port for HCAs this argument is ignored */ + if (is_route_inactive_port0(node, port, sw)) goto badport; if (sameport(port, toport)) break; /* found */ - outport = portnum; if (node-type == IB_NODE_SWITCH) { DEBUG(switch node); - if ((outport = switch_lookup(sw, from, to-lid)) 0 || - outport node-numports) - goto badtbl; + outport = next_sw_outport; if (extend_dpath(from-drpath, outport) 0) goto badpath; @@ -307,6 +328,7 @@ static int find_route(ib_portid_t * from, ib_portid_t * to, int dump) (node-type == IB_NODE_ROUTER)) { int ca_src = 0; + outport = portnum; DEBUG(ca or router node); if (!sameport(port, fromport)) { IBWARN @@ -335,8 +357,19 @@ static int find_route(ib_portid_t * from, ib_portid_t * to, int dump) nextport.portnum = from-drpath.p[from-drpath.cnt + 1]; } + /* only if the next node is a switch, get switch info */ + if (nextnode.type == IB_NODE_SWITCH) { + next_sw_outport = switch_lookup(sw, from, to-lid); + if (next_sw_outport 0 || + next_sw_outport nextnode.numports) { + /* needed to print the port in badtbl */ + outport = next_sw_outport; + goto badtbl; + } + } + port = nextport; - if (port-state != 4) + if (is_route_inactive_port0(nextnode, port, sw)) goto badoutport; node = nextnode; portnum = port-portnum; -- 1.7.8.2 -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of
RE: [PATCH] rping: create persistent server threads in DETACHED state
Does this patch look ok? It looks okay at a glance. Sorry, I haven't lost this, but just haven't had time to apply it. N�r��yb�X��ǧv�^�){.n�+{��ٚ�{ay�ʇڙ�,j��f���h���z��w��� ���j:+v���w�j�mzZ+�ݢj��!�i
Re: [PATCH] rping: create persistent server threads in DETACHED state
Hey Sean, Does this patch look ok? -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 16/20] IB/mad: Add Intel Omni-Path Architecture defines
On Mon, Jan 19, 2015 at 10:50:38PM +, Weiny, Ira wrote: On Mon, Jan 19, 2015 at 07:57:22PM +, Weiny, Ira wrote: Perhaps you can give us an example of where the current code would work without modifications if the IBTA were to define any new base or smp class version? I think the point here is that every check for OPA_MIN_CLASS_VERSION must also be combined with a check if the device in question is OPA or not. This contradicts what you say below How so? if (mad_reg_req-mgmt_class_version = OPA_MIN_CLASS_VERSION !port_priv-qp_info[qpn].supports_jumbo_mads) { Sorry, I got a bit confused because this is not the latest version of the patch. Should be: if (port_is_opa mad_reg_req-mgmt_class_version = OPA_MIN_CLASS_VERSION !port_priv-qp_info[qpn].supports_jumbo_mads) { And since port_is_opa = true implies port_priv-qp_info[qpn].supports_jumbo_mads = true the above if can never evaluate to true and can just be removed. Right there is no need to check for supports_jumbo_mads. The latest version was: + if (mad_reg_req-mgmt_class_version = OPA_MIN_CLASS_VERSION + !(port_priv-device-attributes.device_cap_flags2 IB_DEVICE_OPA_MAD_SUPPORT)) { The bug in the patch is that any class version should be allowed on IB devices. This check prevented class versions = 0x80 for IB devices. NOTE however that the current code already limits users to a class version 8. (due to the implementation.) -#define MAX_MGMT_VERSION 8 +#define MAX_MGMT_VERSION 0x83 ... if (mad_reg_req-mgmt_class_version = MAX_MGMT_VERSION) { dev_notice(device-dev, ib_register_mad_agent: invalid Class Version %u\n, mad_reg_req-mgmt_class_version); goto error1; } Therefore I did not see this as limiting the IB implementation we already have. I will remove the patch as I agree with Jason and Hal it is technically more correct. Ira -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH FIX For-3.19 v4 0/7] IB/ipoib: follow fixes for multicast handling
On Tue, 2015-01-20 at 18:16 +0200, Erez Shitrit wrote: On 1/20/2015 5:58 AM, Doug Ledford wrote: These patches are to resolve issues created by my previous patch set. While that set worked fine in my testing, there were problems with multicast joins after the initial set of joins had completed. Since my testing relied upon the normal set of multicast joins that happen when the interface is first brought up, I missed those problems. Symptoms vary from failure to send packets due to a failed join, to loss of connectivity after a subnet manager restart, to failure to properly release multicast groups on shutdown resulting in hangs when the mlx4 driver attempts to unload itself via its reboot notifier handler. This set of patches has passed a number of tests above and beyond my original tests. As suggested by Or Gerlitz I added IPv6 and IPv4 multicast tests. I also added both subnet manager restarts and manual shutdown/restart of individual ports at the switch in order to ensure that the ENETRESET path was properly tested. I included testing, then a subnet manager restart, then a quiescent period for caches to expire, then restarting testing to make sure that arp and neighbor discovery work after the subnet manager restart. All in all, I have not been able to trip the multicast joins up any longer. Additionally, the original impetus for my first 8 patch set was that it was simply too easy to break the IPoIB subsystem with this simple loop: while true; do ifconfig ib0 up ifconfig ib0 down done Just to be safe, I made sure this problem did not resurface. Roland, the 3.19-rc code is broken. We either need to revert my original patchset, or grab these, but I would not recommend leaving it as it currently stands. Doug Ledford (7): IB/ipoib: Fix failed multicast joins/sends IB/ipoib: Add a helper to restart the multicast task IB/ipoib: make delayed tasks not hold up everything IB/ipoib: Handle -ENETRESET properly in our callback IB/ipoib: don't restart our thread on ENETRESET IB/ipoib: remove unneeded locks IB/ipoib: fix race between mcast_dev_flush and mcast_join drivers/infiniband/ulp/ipoib/ipoib.h | 1 + drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 204 +++-- 2 files changed, 121 insertions(+), 84 deletions(-) Hi Doug, After trying your V4 patch series, I can tell that first, the endless scheduling of the mcast task is indeed over, Good. but still, the multicast functionality in ipoib is unstable. I'm not seeing that here. Let's try to figure out what's different. I see that there are times that ping6 works good, and sometimes it doesn't, to make it clear I always use the link-local address assigned by the stack to the IPoIB device, see [1] below for how I run it. As do I. I'll attach the scripts I used to run it for your reference. I also see that send-only mcast stops working from time to time, see [2] below for how I run this. I can narrow the problem to be on the sender (client) side, since I work with a peer node which has well functioning IPoIB multicast code. I don't think the peer side really denotes a conclusive argument ;-) One more phenomena, that in some cases I can see that the driver (after the mcast_debug_level is set) prints endless message: ib0: no address vector, but multicast join already started OK, this is to be expected from your tests I think. In particular, this is generated by mcast_send() if it's called by your program while the send only join has not yet completed. The flow goes like this: First packet after interface comes up: mcast_send() - ipoib_mcast_alloc() - ipoib_mcast_add() - schedule join task thread In a different thread: mcast_join_task() find unjoined mcast group mark mcast-flags with IPOIB_MCAST_FLAG BUSY - mcast_join() send join request over the wire Back on original thread context: mcast_send() this time we find a matching mcast entry but mcast-ah is NULL queue packet, unless backlog is full and then drop packet if mcast-flags IPOIB_MCAST_FLAG_BUSY, emit notice that you see In a different thread: mcast_sendonly_join_complete() - mcast_join_finish() set mcast-ah send skb backlog queue clear IPOIB_MCAST_FLAG_BUSY Back on original thread context: mcast_send() now we find the mcast entry, and we find the mcast-ah entry, so sends now proceed as expected with no messages, and any lost packets while waiting on mcast-ah
Re: [PATCH 16/20] IB/mad: Add Intel Omni-Path Architecture defines
On Mon, Jan 19, 2015 at 10:50:38PM +, Weiny, Ira wrote: On Mon, Jan 19, 2015 at 07:57:22PM +, Weiny, Ira wrote: Perhaps you can give us an example of where the current code would work without modifications if the IBTA were to define any new base or smp class version? I think the point here is that every check for OPA_MIN_CLASS_VERSION must also be combined with a check if the device in question is OPA or not. This contradicts what you say below How so? if (mad_reg_req-mgmt_class_version = OPA_MIN_CLASS_VERSION !port_priv-qp_info[qpn].supports_jumbo_mads) { Should be: if (port_is_opa mad_reg_req-mgmt_class_version = OPA_MIN_CLASS_VERSION !port_priv-qp_info[qpn].supports_jumbo_mads) { And since port_is_opa = true implies port_priv-qp_info[qpn].supports_jumbo_mads = true the above if can never evaluate to true and can just be removed. Jason -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status
Hi Nicholas, On Fri, 2015-01-16 at 12:20 +0100, Nicholas Mc Guire wrote: Signed-off-by: Nicholas Mc Guire der.h...@hofr.at --- Patch is against 3.19.0-rc3 -next-20150109 Patch was compiletested only with x86_64_defconfig + CONFIG_TARGET_CORE=m, CONFIG_INFINIBAND=m, CONFIG_INFINIBAND_SRPT=m drivers/infiniband/ulp/srpt/ib_srpt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index eb694dd..4e58c76 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess) spin_unlock_irq(sdev-spinlock); res = wait_for_completion_timeout(release_done, 60 * HZ); - WARN_ON(res = 0); + WARN_ON(res == 0); } /** Notice that 'res' here is still incorrectly defined as an 'int', instead of 'unsigned long'. I've updated your patch to use the proper type for res, and added a short commit log to describe what it's doing. Merged into target-pending/for-next. Thanks! --nab -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html