Re: [ANNOUNCE] librdmacm 1.0.12
Sean Hefty wrote: I've pushed out release 1.0.12 of librdmacm. Hi Sean, below is a tiny patch which will help direct users to the correct mailing list set the mailing list info to be linux-rdma instead of the ofa general list signed-off-by: Or Gerlitz ogerl...@voltaire.com diff --git a/configure.in b/configure.in index d6c4a62..d0f2623 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(librdmacm, 1.0.12, gene...@lists.openfabrics.org) +AC_INIT(librdmacm, 1.0.12, linux-rdma@vger.kernel.org) AC_CONFIG_SRCDIR([src/cma.c]) AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -- 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
git.openfabrics.org out of disk space
Can someone free up some space? Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1151873632 144158864 0 100% / varrun 51302880512948 1% /var/run varlock 513028 8513020 1% /var/lock udev51302884512944 1% /dev devshm 513028 0513028 0% /dev/shm-- 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: sdp and port 0
Stijn Hi, Listening to port 0 is supported and should work. Which OFED version do you use (issue ofed_info to know)? Does it work for you on a simple test application that only listen on a socket? - Amir On 05/18/2010 01:20 PM, Stijn De Weirdt wrote: hi all, (i'm not on the list, please keep me in cc) i am trying SDP with some executable (i don't have the source), but i'm getting errors with the bind step (output from strace): bind(20, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(1.2.3.4)}, 16) = -1 EADDRINUSE (Address already in use) is it possible that a bind to port 0 (ie ask system for free port) is not supported with libsdp? using 'both' as addressfamily in the configfile instead of 'sdp' works but the tcp is used. i also tried to add a portrange to avoid port 0 with sdp (ie tcp for port 0, sdp for the rest), but this doesn't work either (which is not that surprising). thanks a lot, stijn -- 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: sdp and port 0
Hi all, Hi Stijn, I would like to integrate Amir's information about an old discussion. In April I have tested SDP with Neteffect cards with OFED 1.5.1 and OFED 1.5.2 without success. I have open two bug on Bugzilla (number 2027 and 2028 -- LINK:https://bugs.openfabrics.org/). The first is closed thanks to Amir. On the second one, Steve will work in July. Stijn, you can find our old discussion about SDP under the subject-title Socket Direct Protocol: help(2) and BUG 2027 / 2028 (something like that). I have also posted some information on the blog link below: http://nixcraft.com/linux-software/14686-socket-direct-protocol-netperf.html#post25324 I don't know if those information help you, but I think it's important read and understand more about SDP. Can I ask you why do you use SDP in your activity? Thanks again to Amir. Regards, Andrea Andrea Gozzelino INFN - Laboratori Nazionali di Legnaro (LNL) Viale dell'Universita' 2 I-35020 - Legnaro (PD)- ITALIA Tel: +39 049 8068346 Fax: +39 049 641925 Mail: andrea.gozzel...@lnl.infn.it On May 25, 2010 10:34 AM, Amir Vadai am...@mellanox.co.il wrote: Stijn Hi, Listening to port 0 is supported and should work. Which OFED version do you use (issue ofed_info to know)? Does it work for you on a simple test application that only listen on a socket? - Amir On 05/18/2010 01:20 PM, Stijn De Weirdt wrote: hi all, (i'm not on the list, please keep me in cc) i am trying SDP with some executable (i don't have the source), but i'm getting errors with the bind step (output from strace): bind(20, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(1.2.3.4)}, 16) = -1 EADDRINUSE (Address already in use) is it possible that a bind to port 0 (ie ask system for free port) is not supported with libsdp? using 'both' as addressfamily in the configfile instead of 'sdp' works but the tcp is used. i also tried to add a portrange to avoid port 0 with sdp (ie tcp for port 0, sdp for the rest), but this doesn't work either (which is not that surprising). thanks a lot, stijn -- 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 -- 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: sdp and port 0
hi andrea, I would like to integrate Amir's information about an old discussion. In April I have tested SDP with Neteffect cards with OFED 1.5.1 and OFED 1.5.2 without success. I have open two bug on Bugzilla (number 2027 and 2028 -- LINK:https://bugs.openfabrics.org/). The first is closed thanks to Amir. On the second one, Steve will work in July. Stijn, you can find our old discussion about SDP under the subject-title Socket Direct Protocol: help(2) and BUG 2027 / 2028 (something like that). I have also posted some information on the blog link below: http://nixcraft.com/linux-software/14686-socket-direct-protocol-netperf.html#post25324 I don't know if those information help you, but I think it's important read and understand more about SDP. i read the thread and both bug reports, but at first sight i seems unrelated. the hardware i'm trying it on is IB DDR ConnectX (mlx4) Can I ask you why do you use SDP in your activity? we have some legacy binary-only code that we are trying to speedup. it uses TCP to exchange large amounts of data between processes, so we are trying sdp if it can help with this. thanks a lot, stijn Thanks again to Amir. Regards, Andrea Andrea Gozzelino INFN - Laboratori Nazionali di Legnaro(LNL) Viale dell'Universita' 2 I-35020 - Legnaro (PD)- ITALIA Tel: +39 049 8068346 Fax: +39 049 641925 Mail: andrea.gozzel...@lnl.infn.it On May 25, 2010 10:34 AM, Amir Vadai am...@mellanox.co.il wrote: Stijn Hi, Listening to port 0 is supported and should work. Which OFED version do you use (issue ofed_info to know)? Does it work for you on a simple test application that only listen on a socket? - Amir On 05/18/2010 01:20 PM, Stijn De Weirdt wrote: hi all, (i'm not on the list, please keep me in cc) i am trying SDP with some executable (i don't have the source), but i'm getting errors with the bind step (output from strace): bind(20, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(1.2.3.4)}, 16) = -1 EADDRINUSE (Address already in use) is it possible that a bind to port 0 (ie ask system for free port) is not supported with libsdp? using 'both' as addressfamily in the configfile instead of 'sdp' works but the tcp is used. i also tried to add a portrange to avoid port 0 with sdp (ie tcp for port 0, sdp for the rest), but this doesn't work either (which is not that surprising). thanks a lot, stijn -- 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 -- http://hasthelhcdestroyedtheearth.com/ -- 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: sdp and port 0
hello amir, Listening to port 0 is supported and should work. Which OFED version do you use (issue ofed_info to know)? OFED 1.5.1 on rhel5.3 clone. (so libsdp 1.1.100-0.1.g920ea31). i tried to compile the ost recent version of libsdp, but i couldn't build it separately, and i haen't tried any 1.5.2 prereleases Does it work for you on a simple test application that only listen on a socket? i'll try that asap thanks a lot, stijn - Amir On 05/18/2010 01:20 PM, Stijn De Weirdt wrote: hi all, (i'm not on the list, please keep me in cc) i am trying SDP with some executable (i don't have the source), but i'm getting errors with the bind step (output from strace): bind(20, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr(1.2.3.4)}, 16) = -1 EADDRINUSE (Address already in use) is it possible that a bind to port 0 (ie ask system for free port) is not supported with libsdp? using 'both' as addressfamily in the configfile instead of 'sdp' works but the tcp is used. i also tried to add a portrange to avoid port 0 with sdp (ie tcp for port 0, sdp for the rest), but this doesn't work either (which is not that surprising). thanks a lot, stijn -- http://hasthelhcdestroyedtheearth.com/ -- 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] opensm/complib use portable macro syntax
Hi Stan, On 09:45 Fri 21 May , Smith, Stan wrote: Use portable macro argument syntax. signed-of-by: stan smith stan.sm...@intel.com Signed-off-by: The patch below is malformed - whitespaces are mangled (please check your mailer). Applied by hands. Thanks. Sasha diff --git a/opensm/complib/cl_event_wheel.c b/opensm/complib/cl_event_wheel.c index ef6d598..eb894a6 100644 --- a/opensm/complib/cl_event_wheel.c +++ b/opensm/complib/cl_event_wheel.c @@ -42,7 +42,7 @@ #include complib/cl_event_wheel.h #include complib/cl_debug.h -#define CL_DBG(fmt, arg...) +#define CL_DBG(fmt, ...) static cl_status_t __event_will_age_before(IN const cl_list_item_t * const p_list_item, IN void *context) -- 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] use macro for tmp file path
On 09:51 Fri 21 May , Smith, Stan wrote: Use defined macro for tmp file path signed-off-by: stan smith stan.sm...@intel.com The patch is whitespece-mangled. diff --git a/opensm/opensm/st.c b/opensm/opensm/st.c index ea76038..2d39117 100644 --- a/opensm/opensm/st.c +++ b/opensm/opensm/st.c @@ -174,7 +174,7 @@ static int init_st = 0; static void stat_col() { - FILE *f = fopen(/var/log/osm_st_col, w); + FILE *f = fopen( OSM_DEFAULT_TMP_DIR osm_st_col, w); I think it was discussed somehow in the past. Shouldn't this be: OSM_DEFAULT_TMP_DIR /osm_st_col , so that trailing '/' will not be mandatory in directory define? Sasha fprintf(f, collision: %d\n, collision); fclose(f); } -- 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 -- 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] osmtest - use helper function
On 10:23 Fri 21 May , Smith, Stan wrote: Use defined inline helper function instead of actual implementation. Separate implementation from use. signed-off-by: stan smith stan.sm...@intel.com Applied by hands (the patch is broken too). Thanks. Sasha diff --git a/opensm/osmtest/osmtest.c b/opensm/osmtest/osmtest.c index 50f94db..5d9c54c 100644 --- a/opensm/osmtest/osmtest.c +++ b/opensm/osmtest/osmtest.c @@ -719,7 +719,7 @@ osmtest_get_node_rec(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.comp_mask = IB_NR_COMPMASK_NODEGUID; user.attr_id = IB_MAD_ATTR_NODE_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -793,7 +793,7 @@ osmtest_get_node_rec_by_lid(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.comp_mask = IB_NR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_NODE_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -1057,7 +1057,7 @@ osmtest_get_port_rec(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.comp_mask = IB_PIR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_PORTINFO_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4171,7 +4171,7 @@ osmtest_get_link_rec_by_lid(IN osmtest_t * const p_osmt, if (to_lid) user.comp_mask |= IB_LR_COMPMASK_TO_LID; user.attr_id = IB_MAD_ATTR_LINK_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4249,7 +4249,7 @@ osmtest_get_guidinfo_rec_by_lid(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.comp_mask = IB_GIR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_GUIDINFO_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4328,7 +4328,7 @@ osmtest_get_pkeytbl_rec_by_lid(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.comp_mask = IB_PKEY_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_PKEY_TBL_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4407,7 +4407,7 @@ osmtest_get_sw_info_rec_by_lid(IN osmtest_t * const p_osmt, if (lid) user.comp_mask = IB_SWIR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_SWITCH_INFO_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4486,7 +4486,7 @@ osmtest_get_lft_rec_by_lid(IN osmtest_t * const p_osmt, if (lid) user.comp_mask = IB_LFTR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_LFT_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4565,7 +4565,7 @@ osmtest_get_mft_rec_by_lid(IN osmtest_t * const p_osmt, if (lid) user.comp_mask = IB_MFTR_COMPMASK_LID; user.attr_id = IB_MAD_ATTR_MFT_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); user.p_attr = record; req.query_type = OSMV_QUERY_USER_DEFINED; @@ -4637,7 +4637,7 @@ osmtest_sminfo_record_request(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt; user.attr_id = IB_MAD_ATTR_SMINFO_RECORD; - user.attr_offset = cl_ntoh16((uint16_t) (sizeof(record) 3)); + user.attr_offset = ib_get_attr_offset((uint16_t) (sizeof(record))); p_sm_info_opt = p_options; if (p_sm_info_opt-sm_guid != 0) { record.sm_info.guid = p_sm_info_opt-sm_guid; @@ -4737,7 +4737,7 @@ osmtest_informinfo_request(IN osmtest_t * const p_osmt, p_context-p_osmt = p_osmt;
Re: [PATCH] ib_types.h add debug assert
On 10:49 Fri 21 May , Smith, Stan wrote: Add a debug assert to catch incorrect MAD attr offset size. This proved to be useful in catching incorrect struct sizes as MAD attrs need to be a multiple of 8 bytes. Could you clarify where was it useful and where such errors were seen? signed-off-by: stan smith stan.sm...@intel.com Applied (again - by hands). Thanks. Sasha diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h index e1bc102..203c319 100644 --- a/opensm/include/iba/ib_types.h +++ b/opensm/include/iba/ib_types.h @@ -4395,6 +4395,7 @@ static inline uint32_t OSM_API ib_get_attr_size(IN const ib_net16_t attr_offset) static inline ib_net16_t OSM_API ib_get_attr_offset(IN const uint32_t attr_size) { + CL_ASSERT((attr_size 0x07) == 0); return (cl_hton16((uint16_t) (attr_size 3))); } -- 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] opensm/libvendor Reduce stack consumption
On 10:37 Fri 21 May , Smith, Stan wrote: Reduce stack consumption by using a union of structs instead of individual struct allocations. Code borrowed from osm_vendor_ibumad_sa.c signed-off-by: stan smith stan.sm...@intel.com This patch is malformed too. And unlike others it has more lines to mistype - I will not be able to test mlx vendor. Please repost in appliable form. Sasha diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c index 91f82fa..0cc3f19 100644 --- a/opensm/libvendor/osm_vendor_mlx_sa.c +++ b/opensm/libvendor/osm_vendor_mlx_sa.c @@ -576,14 +576,19 @@ ib_api_status_t osmv_query_sa(IN osm_bind_handle_t h_bind, IN const osmv_query_req_t * const p_query_req) { - osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; + union { + ib_service_record_t svc_rec; + ib_node_record_t node_rec; + ib_portinfo_record_t port_info; + ib_path_rec_t path_rec; +#ifdef DUAL_SIDED_RMPP + ib_multipath_rec_t multipath_rec; +#endif + ib_class_port_info_t class_port_info; + } u; osmv_sa_mad_data_t sa_mad_data; + osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; osmv_user_query_t *p_user_query; - ib_service_record_t svc_rec; - ib_node_record_t node_rec; - ib_portinfo_record_t port_info; - ib_path_rec_t path_rec; - ib_class_port_info_t class_port_info; osm_log_t *p_log = p_bind-p_log; ib_api_status_t status; @@ -617,7 +622,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = svc_rec; + sa_mad_data.p_attr = u.svc_rec; break; case OSMV_QUERY_SVC_REC_BY_NAME: @@ -628,8 +633,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SNAME; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - memcpy(svc_rec.service_name, p_query_req-p_query_input, + sa_mad_data.p_attr = u.svc_rec; + memcpy(u.svc_rec.service_name, p_query_req-p_query_input, sizeof(ib_svc_name_t)); break; @@ -640,8 +645,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SID; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - svc_rec.service_id = + sa_mad_data.p_attr = u.svc_rec; + u.svc_rec.service_id = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -653,7 +658,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_class_port_info_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = class_port_info; + sa_mad_data.p_attr = u.class_port_info; break; @@ -665,8 +670,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_node_record_t)); sa_mad_data.comp_mask = IB_NR_COMPMASK_NODEGUID; - sa_mad_data.p_attr = node_rec; - node_rec.node_info.node_guid = + sa_mad_data.p_attr = u.node_rec; + u.node_rec.node_info.node_guid = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -678,8 +683,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_portinfo_record_t)); sa_mad_data.comp_mask = IB_PIR_COMPMASK_LID; - sa_mad_data.p_attr = port_info; - port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); + sa_mad_data.p_attr = u.port_info; + u.port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); break; case OSMV_QUERY_PORT_REC_BY_LID_AND_NUM: @@ -729,19 +734,19 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, case OSMV_QUERY_PATH_REC_BY_PORT_GUIDS: osm_log(p_log, OSM_LOG_DEBUG, osmv_query_sa DBG:001 %s, PATH_REC_BY_PORT_GUIDS\n); - memset(path_rec, 0, sizeof(ib_path_rec_t)); + memset(u.path_rec, 0, sizeof(ib_path_rec_t)); sa_mad_data.attr_id = IB_MAD_ATTR_PATH_RECORD; sa_mad_data.attr_offset =
Re: [ANNOUNCE] librdmacm 1.0.12
On May 22, 2010 01:06 AM, Sean Hefty sean.he...@intel.com wrote: I've pushed out release 1.0.12 of librdmacm. This incorporates several new APIs that should make connecting and transferring data over RDMA devices simpler for user applications, plus adds support for user space path record caching. New APIs include simple wrappers for common verbs operations, such as memory registration, posting of work requests, and retrieving completions. Support for synchronous connection establishment was added, along with newer calls that combine the work done using multiple existing calls. To help address MPI scaling issues, this release provides support for IB ACM path record caching capabilities, enabled through the use of a compile time option. New client and server test applications were also added to demonstrate the use of the new APIs. (Note that the source code includes changes for AF_IB support, but AF_IB has been disabled in the code to avoid potential ABI compatibility issues until the kernel changes have been accepted upstream.) This version wants the soon to be released version of libibverbs, but will work with older versions installed. Please pull this release into OFED 1.5.2. I will provide a set of release notes next week. - Sean -- 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 Hi Sean, Hi Arlin, I'm very interesting about librdmacm. I'm working on Intel Net Effect NE020 cards from February 2010 for an INFN experimental proposal, called REDIGO (Read out at 10 Gbits/s), about the data acquisition and movement systems. The covergence of storage protocols around 10 Gigabits/s Ethernet protocols shows that one way could be the Remote Direct Memory Access (RDMA). The goals are the investigations of latency time, the throughput, the buffer size schemes and finally the global event building bandwidth. I explore different ways as TCP, SDP, RDMA, FCoE, MPI, excluded Infiniband. Actually I transfer data (read/write) in a server/client system with RDMA. The transfer speed measured is about 1.17 Mbytes/s (93% of designed bandwith). I try to measure the latency, but I have a TCP socket as syncronization actor and the measure is not clean. The card nominal latency value is 6 us. I'm not an expert of code, but I read this thread and I understand that new librdmacm version will be easier for users. I will wait your release notes to know if librdmacm 1.0.12 is better for my test configuration and simplier in performance evaluation. Thank you very much. Keep in touch, Andrea Andrea Gozzelino INFN - Laboratori Nazionali di Legnaro (LNL) Viale dell'Universita' 2 I-35020 - Legnaro (PD)- ITALIA Tel: +39 049 8068346 Fax: +39 049 641925 Mail: andrea.gozzel...@lnl.infn.it -- 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] mlx4_en: show device's port used
Add a sysfs file under /sys/class/net/ethx to show the port number within the device that this network interface is using. This is needed as ConnectX devices have two ports and it is useful to know which port the ethernet devices uses. Signed-off-by: Eli Cohen e...@mellanox.co.il --- drivers/net/mlx4/en_netdev.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 73c3d20..5d6f811 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c @@ -871,6 +871,16 @@ err: return -ENOMEM; } +static ssize_t show_port(struct device *d, struct device_attribute *attr, +char *buf) +{ + struct mlx4_en_priv *priv = netdev_priv(to_net_dev(d)); + + return sprintf(buf, %d\n, priv-port); + return 0; +} + +static DEVICE_ATTR(port, S_IRUGO, show_port, NULL); void mlx4_en_destroy_netdev(struct net_device *dev) { @@ -1067,6 +1077,12 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, en_warn(priv, Using %d TX rings\n, prof-tx_ring_num); en_warn(priv, Using %d RX rings\n, prof-rx_ring_num); + err = device_create_file(dev-dev, dev_attr_port); + if (err) { + mlx4_err(mdev, failed to create sysfs file\n); + goto out; + } + priv-registered = 1; queue_delayed_work(mdev-workqueue, priv-stats_task, STATS_DELAY); return 0; -- 1.7.1 -- 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] RDMA/nes: fix incorrect unlock in nes_process_mac_intr
commit ce6e74f2 introduced a problem where unlock took place only within an if statement. sparse warning: drivers/infiniband/hw/nes/nes_hw.c:2643:9: warning: context imbalance in 'nes_process_mac_intr' - different lock contexts for basic block Reported-by: Roland Dreier rdre...@cisco.com Signed-off-by: Chien Tung chien.tin.t...@intel.com --- drivers/infiniband/hw/nes/nes_hw.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index bb9c775..57874a1 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) break; } } - spin_unlock_irqrestore(nesadapter-phy_lock, flags); if (phy_data 0x0004) { if (wide_ppm_offset @@ -2639,6 +2638,8 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) } } + spin_unlock_irqrestore(nesadapter-phy_lock, flags); + nesadapter-mac_sw_state[mac_number] = NES_MAC_SW_IDLE; } -- 1.6.4.2 -- 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] opensm/complib use portable macro syntax
Sasha Khapyorsky wrote: Hi Stan, On 09:45 Fri 21 May , Smith, Stan wrote: Use portable macro argument syntax. signed-of-by: stan smith stan.sm...@intel.com Signed-off-by: oops. The patch below is malformed - whitespaces are mangled (please check your mailer). Applied by hands. Thanks. Sorry, will investigate. Perhaps I should resend once I've figured out the story. Sasha diff --git a/opensm/complib/cl_event_wheel.c b/opensm/complib/cl_event_wheel.c index ef6d598..eb894a6 100644 --- a/opensm/complib/cl_event_wheel.c +++ b/opensm/complib/cl_event_wheel.c @@ -42,7 +42,7 @@ #include complib/cl_event_wheel.h #include complib/cl_debug.h -#define CL_DBG(fmt, arg...) +#define CL_DBG(fmt, ...) static cl_status_t __event_will_age_before(IN const cl_list_item_t * const p_list_item, IN void *context) -- 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] use macro for tmp file path
Sasha Khapyorsky wrote: On 09:51 Fri 21 May , Smith, Stan wrote: Use defined macro for tmp file path signed-off-by: stan smith stan.sm...@intel.com The patch is whitespece-mangled. diff --git a/opensm/opensm/st.c b/opensm/opensm/st.c index ea76038..2d39117 100644 --- a/opensm/opensm/st.c +++ b/opensm/opensm/st.c @@ -174,7 +174,7 @@ static int init_st = 0; static void stat_col() { - FILE *f = fopen(/var/log/osm_st_col, w); + FILE *f = fopen( OSM_DEFAULT_TMP_DIR osm_st_col, w); I think it was discussed somehow in the past. Shouldn't this be: OSM_DEFAULT_TMP_DIR /osm_st_col , so that trailing '/' will not be mandatory in directory define? Currently OSM_DEFAULT_TMP_DIR is defined with a trailing directory delimiter. Having the delimiter in the OSM_DEFAULT_TMP_DIR makes it easier to be consistent with \ or /. Will resend this patch as I think I've figured out the mangled email story. Sasha fprintf(f, collision: %d\n, collision); fclose(f); } -- 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 -- 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] opensm/libvendor Reduce stack consumption
Resend, as I realized the mangled email problem; sorry about the extra work. stan. Reduce stack consumption by using a union of structs instead of individual struct allocations. Code borrowed from osm_vendor_ibumad_sa.c signed-off-by: stan smith stan.sm...@intel.com diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c index 91f82fa..0cc3f19 100644 --- a/opensm/libvendor/osm_vendor_mlx_sa.c +++ b/opensm/libvendor/osm_vendor_mlx_sa.c @@ -576,14 +576,19 @@ ib_api_status_t osmv_query_sa(IN osm_bind_handle_t h_bind, IN const osmv_query_req_t * const p_query_req) { - osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; + union { + ib_service_record_t svc_rec; + ib_node_record_t node_rec; + ib_portinfo_record_t port_info; + ib_path_rec_t path_rec; +#ifdef DUAL_SIDED_RMPP + ib_multipath_rec_t multipath_rec; +#endif + ib_class_port_info_t class_port_info; + } u; osmv_sa_mad_data_t sa_mad_data; + osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; osmv_user_query_t *p_user_query; - ib_service_record_t svc_rec; - ib_node_record_t node_rec; - ib_portinfo_record_t port_info; - ib_path_rec_t path_rec; - ib_class_port_info_t class_port_info; osm_log_t *p_log = p_bind-p_log; ib_api_status_t status; @@ -617,7 +622,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = svc_rec; + sa_mad_data.p_attr = u.svc_rec; break; case OSMV_QUERY_SVC_REC_BY_NAME: @@ -628,8 +633,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SNAME; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - memcpy(svc_rec.service_name, p_query_req-p_query_input, + sa_mad_data.p_attr = u.svc_rec; + memcpy(u.svc_rec.service_name, p_query_req-p_query_input, sizeof(ib_svc_name_t)); break; @@ -640,8 +645,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SID; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - svc_rec.service_id = + sa_mad_data.p_attr = u.svc_rec; + u.svc_rec.service_id = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -653,7 +658,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_class_port_info_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = class_port_info; + sa_mad_data.p_attr = u.class_port_info; break; @@ -665,8 +670,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_node_record_t)); sa_mad_data.comp_mask = IB_NR_COMPMASK_NODEGUID; - sa_mad_data.p_attr = node_rec; - node_rec.node_info.node_guid = + sa_mad_data.p_attr = u.node_rec; + u.node_rec.node_info.node_guid = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -678,8 +683,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_portinfo_record_t)); sa_mad_data.comp_mask = IB_PIR_COMPMASK_LID; - sa_mad_data.p_attr = port_info; - port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); + sa_mad_data.p_attr = u.port_info; + u.port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); break; case OSMV_QUERY_PORT_REC_BY_LID_AND_NUM: @@ -729,19 +734,19 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, case OSMV_QUERY_PATH_REC_BY_PORT_GUIDS: osm_log(p_log, OSM_LOG_DEBUG, osmv_query_sa DBG:001 %s, PATH_REC_BY_PORT_GUIDS\n); - memset(path_rec, 0, sizeof(ib_path_rec_t)); + memset(u.path_rec, 0, sizeof(ib_path_rec_t)); sa_mad_data.attr_id = IB_MAD_ATTR_PATH_RECORD; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_path_rec_t)); sa_mad_data.comp_mask = (IB_PR_COMPMASK_DGID | IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUMBPATH); - path_rec.num_path =
Re: [PATCH] opensm/qos.c: Revert port ranges for calls to sl2vl_update_table().
Hi again Jim, On Mon, May 24, 2010 at 5:42 PM, Jim Schutt jasc...@sandia.gov wrote: Hi Hal, On Mon, 2010-05-24 at 12:03 -0600, Hal Rosenstock wrote: Hi Jim, On Fri, May 21, 2010 at 4:29 PM, Jim Schutt jasc...@sandia.gov wrote: Sorry, I somehow got this wrong. Corrected patch below. -- Jim On Fri, 2010-05-21 at 14:18 -0600, Jim Schutt wrote: Before commit 051a1dd5 (opensm/osm_qos.c: split switch external and end ports setup), osm_qos_setup() would end up calling sl2vl_update_table() for output ports 1-N, and inport ports 0-N. Commit 051a1dd5 changed this around to be output ports 0-N, and input ports 1-N, and an InfiniScale IV based fabric would log lots of errors like these: log_rcv_cb_error: ERR 3111: Received MAD with error status = 0x1C SubnGetResp(SLtoVLMappingTable), attr_mod 0x2300, TID 0xad069 Initial path: 0,1,1,4,13 Return path: 0,25,1,7,10 The attr_mod in every such message has 0x00 in the least significant byte. This is the output port. With the port ranges restored to their old values, the above log messages stop. Is this with base or enhanced port 0 ? I'm assuming base. See comment below. See extra patch below. Also, what firmware version is in use ? flint reports the FW version as 7.2.0 Signed-off-by: Jim Schutt jasc...@sandia.gov --- opensm/opensm/osm_qos.c | 8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c index 6bbbfa2..b8c3111 100644 --- a/opensm/opensm/osm_qos.c +++ b/opensm/opensm/osm_qos.c @@ -230,12 +230,12 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node, qcfg-sl2vl); } - for (i = 1; i num_ports; i++) { + for (i = 0; i num_ports; i++) { p = osm_node_get_physp_ptr(node, i); force_update = p-need_update || sm-p_subn-need_update; - for (j = 0; j num_ports; j++) - if (sl2vl_update_table(sm, p, i, i 8 | j, - force_update, qcfg-sl2vl)) + for (j = 1; j num_ports; j++) + if (sl2vl_update_table(sm, p, i, j, force_update, + qcfg-sl2vl)) ret = -1; } diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c index 6bbbfa2..7d76c75 100644 @@ -230,10 +230,10 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node, qcfg-sl2vl); } - for (i = 1; i num_ports; i++) { + for (i = 0; i num_ports; i++) { p = osm_node_get_physp_ptr(node, i); force_update = p-need_update || sm-p_subn-need_update; - for (j = 0; j num_ports; j++) + for (j = 1; j num_ports; j++) if (sl2vl_update_table(sm, p, i, i 8 | j, force_update, qcfg-sl2vl)) ret = -1; I think the start for j depends on whether it is base or enhanced port 0. Start should be 0 for enhanced and 1 for base. Ah. I see now in the IBA 1.2.1 spec, Table 146 PortInfo, p 837, that only an enhanced SP0 supports OperationalVLs. So if a base SP0 doesn't support it, such port also doesn't support VLs, and it makes sense that you shouldn't attempt to program SL2VL maps. Is that what you're thinking? I was basing this on Table 166 SMP AttributeModifier Errors p. 855 for SLtoVLMappingTable which summarizes the related compliances for MAD status handling. I added this patch on top of above, and things still work w/ no error messages. I guess that means our InfiniSwitch IV gear has only base SP0. Yes; you can check this with smpquery switchinfo. --- a/opensm/opensm/osm_qos.c +++ b/opensm/opensm/osm_qos.c @@ -233,7 +233,8 @@ static int qos_extports_setup(osm_sm_t * sm, osm_node_t *node, for (i = 0; i num_ports; i++) { p = osm_node_get_physp_ptr(node, i); force_update = p-need_update || sm-p_subn-need_update; - for (j = 1; j num_ports; j++) + j = ib_switch_info_is_enhanced_port0(node-sw-switch_info) ? 0 : 1; + for (; j num_ports; j++) if (sl2vl_update_table(sm, p, i, i 8 | j, force_update, qcfg-sl2vl)) ret = -1; Does that look OK to you? Yes. -- Hal Thanks -- Jim -- Hal -- 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 v4 11/11] IB/qib: Add qib_verbs.h
On Mon, 2010-05-24 at 21:22 -0700, Roland Dreier wrote: OK, I merged all the qib-related stuff up and put it in my for-next branch. I expect ot send it to Linus soon. Thank you very much! -- 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/RFC] opensm: toggle sweeping V3
Add option to toggle sweeping from opensm console. Signed-off-by: Arthur Kepner akep...@sgi.com --- include/opensm/osm_subnet.h |6 ++ opensm/osm_console.c| 32 opensm/osm_state_mgr.c |8 +++- opensm/osm_subnet.c |1 + 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h index d79ed8f..2a1db99 100644 --- a/opensm/include/opensm/osm_subnet.h +++ b/opensm/include/opensm/osm_subnet.h @@ -532,6 +532,7 @@ typedef struct osm_subn { boolean_t in_sweep_hop_0; boolean_t first_time_master_sweep; boolean_t coming_out_of_standby; + boolean_t sweeping_enabled; unsigned need_update; cl_fmap_t mgrp_mgid_tbl; void *mboxes[IB_LID_MCAST_END_HO - IB_LID_MCAST_START_HO + 1]; @@ -651,6 +652,11 @@ typedef struct osm_subn { * The flag is set true if the SM state was standby and now * changed to MASTER it is reset at the end of the sweep. * +* sweeping_enabled +* FALSE - sweeping is administratively disabled, all +* sweeping is inhibited, TRUE - sweeping is done +* normally +* * need_update * This flag should be on during first non-master heavy * (including pre-master discovery stage) diff --git a/opensm/opensm/osm_console.c b/opensm/opensm/osm_console.c index 968486e..bc7bea3 100644 --- a/opensm/opensm/osm_console.c +++ b/opensm/opensm/osm_console.c @@ -150,6 +150,16 @@ static void help_reroute(FILE * out, int detail) } } +static void help_sweep(FILE * out, int detail) +{ + fprintf(out, sweep [on|off]\n); + if (detail) { + fprintf(out, enable or disable sweeping\n); + fprintf(out,[on] sweep normally\n); + fprintf(out,[off] inhibit all sweeping\n); + } +} + static void help_status(FILE * out, int detail) { fprintf(out, status [loop]\n); @@ -427,11 +437,15 @@ static void print_status(osm_opensm_t * p_osm, FILE * out) p_osm-stats.sa_mads_ignored); fprintf(out, \n Subnet flags\n \n + Sweeping enabled : %d\n + Sweep interval (seconds) : %d\n Ignore existing lfts : %d\n Subnet Init errors : %d\n In sweep hop 0 : %d\n First time master sweep: %d\n Coming out of standby : %d\n, + p_osm-subn.sweeping_enabled, + p_osm-subn.opt.sweep_interval, p_osm-subn.ignore_existing_lfts, p_osm-subn.subnet_initialization_error, p_osm-subn.in_sweep_hop_0, @@ -495,6 +509,23 @@ static void reroute_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) osm_opensm_sweep(p_osm); } +static void sweep_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) +{ + char *p_cmd; + + p_cmd = next_token(p_last); + if (!p_cmd || + (strcmp(p_cmd, on) != 0 strcmp(p_cmd, off) != 0)) { + fprintf(out, Invalid sweep command\n); + help_sweep(out, 1); + } else { + if (strcmp(p_cmd, on) == 0) + p_osm-subn.sweeping_enabled = TRUE; + else + p_osm-subn.sweeping_enabled = FALSE; + } +} + static void logflush_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) { fflush(p_osm-log.out_port); @@ -1332,6 +1363,7 @@ static const struct command console_cmds[] = { {priority, help_priority, priority_parse}, {resweep, help_resweep, resweep_parse}, {reroute, help_reroute, reroute_parse}, + {sweep, help_sweep, sweep_parse}, {status, help_status, status_parse}, {logflush, help_logflush, logflush_parse}, {querylid, help_querylid, querylid_parse}, diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c index e43463f..81c8f54 100644 --- a/opensm/opensm/osm_state_mgr.c +++ b/opensm/opensm/osm_state_mgr.c @@ -1415,7 +1415,13 @@ void osm_state_mgr_process(IN osm_sm_t * sm, IN osm_signal_t signal) switch (signal) { case OSM_SIGNAL_SWEEP: - do_sweep(sm); + if (!sm-p_subn-sweeping_enabled) { + OSM_LOG(sm-p_log, OSM_LOG_DEBUG, sweeping disabled - + ignoring signal %s in state %s\n, + osm_get_sm_signal_str(signal), + osm_get_sm_mgr_state_str(sm-p_subn-sm_state)); + } else + do_sweep(sm); break; case
Re: [PATCH] RDMA/nes: fix incorrect unlock in nes_process_mac_intr
applied, thanks for the quick response! -- Roland Dreier rola...@cisco.com || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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] mlx4_en: show device's port used
Add a sysfs file under /sys/class/net/ethx to show the port number within the device that this network interface is using. This is needed as ConnectX devices have two ports and it is useful to know which port the ethernet devices uses. How do other multi-port ethernet devices handle this? Seems that the cleanest way to handle this would be to add a place for drivers to set the port number, and export it to userspace in generic code (so everyone does it the same way). -- Roland Dreier rola...@cisco.com || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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
[GIT PULL] please pull infiniband.git
Linus, please pull from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus This tree is also available from kernel.org mirrors at: git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus The biggest thing here is the rather huge new qib driver for QLogic PCIe adapters. This is pretty much self-contained (just one small change to the core to allow low-level drivers to create per-port files in sysfs). There are also some fixes to the new iw_cxgb4 driver, as well as a few other miscellaneous fixes. Chien Tung (1): RDMA/nes: Fix incorrect unlock in nes_process_mac_intr() Faisal Latif (2): RDMA/nes: Have ethtool read hardware registers for rx/tx stats RDMA/nes: Async event for closed QP causes crash Ralph Campbell (3): IB/core: Allow device-specific per-port sysfs files IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters IB/ipath: Remove support for QLogic PCIe QLE devices Roland Dreier (3): mlx4_core: Clean up mlx4_alloc_icm() a bit IB/mad: Make needlessly global mad_sendq_size/mad_recvq_size static Merge branches 'cxgb4', 'misc', 'mlx4', 'nes' and 'qib' into for-next Sebastien Dugue (1): mlx4_core: Fix possible chunk sg list overflow in mlx4_alloc_icm() Steve Wise (11): RDMA/cxgb4: Detach from the LLD after unregistering RDMA device RDMA/cxgb4: Register RDMA provider based on LLD state_change events RDMA/cxgb4: CQ size must be IQ size - 2 RDMA/cxgb4: Optimize CQ overflow detection RDMA/cxgb4: Fix overflow bug in CQ arm RDMA/cxgb4: Return proper errors in fastreg mr/pbl allocation RDMA/cxgb4: Don't limit fastreg page list depth RDMA/cxgb4: Update some HW limits RDMA/cxgb4: Set fence flag for inv-local-stag work requests RDMA/cxgb4: Support IB_WR_READ_WITH_INV opcode RDMA/cxgb4: Only insert sq qid in lookup table drivers/infiniband/Kconfig |1 + drivers/infiniband/Makefile|1 + drivers/infiniband/core/core_priv.h|4 +- drivers/infiniband/core/device.c |6 +- drivers/infiniband/core/mad.c |4 +- drivers/infiniband/core/sysfs.c| 21 +- drivers/infiniband/hw/amso1100/c2_provider.c |2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c|2 +- drivers/infiniband/hw/cxgb4/cq.c |6 +- drivers/infiniband/hw/cxgb4/device.c | 50 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h |1 + drivers/infiniband/hw/cxgb4/mem.c | 11 +- drivers/infiniband/hw/cxgb4/provider.c |4 +- drivers/infiniband/hw/cxgb4/qp.c | 33 +- drivers/infiniband/hw/cxgb4/t4.h | 76 +- drivers/infiniband/hw/ehca/ehca_main.c |2 +- drivers/infiniband/hw/ipath/Kconfig|8 +- drivers/infiniband/hw/ipath/Makefile |6 +- drivers/infiniband/hw/ipath/ipath_driver.c | 28 +- drivers/infiniband/hw/ipath/ipath_iba6120.c| 1862 - drivers/infiniband/hw/ipath/ipath_iba7220.c| 2631 --- drivers/infiniband/hw/ipath/ipath_kernel.h |2 - drivers/infiniband/hw/ipath/ipath_verbs.c |2 +- drivers/infiniband/hw/mlx4/main.c |2 +- drivers/infiniband/hw/mthca/mthca_provider.c |2 +- drivers/infiniband/hw/nes/nes_hw.c | 12 +- drivers/infiniband/hw/nes/nes_nic.c| 72 +- drivers/infiniband/hw/nes/nes_verbs.c |2 +- drivers/infiniband/hw/qib/Kconfig |7 + drivers/infiniband/hw/qib/Makefile | 15 + drivers/infiniband/hw/qib/qib.h| 1439 drivers/infiniband/hw/qib/qib_6120_regs.h | 977 +++ drivers/infiniband/hw/qib/qib_7220.h | 156 + drivers/infiniband/hw/qib/qib_7220_regs.h | 1496 drivers/infiniband/hw/qib/qib_7322_regs.h | 3163 drivers/infiniband/hw/qib/qib_common.h | 758 ++ drivers/infiniband/hw/qib/qib_cq.c | 484 ++ drivers/infiniband/hw/qib/qib_diag.c | 894 +++ drivers/infiniband/hw/qib/qib_dma.c| 182 + drivers/infiniband/hw/qib/qib_driver.c | 665 ++ drivers/infiniband/hw/qib/qib_eeprom.c | 451 ++ drivers/infiniband/hw/qib/qib_file_ops.c | 2317 ++ drivers/infiniband/hw/qib/qib_fs.c | 613 ++ drivers/infiniband/hw/qib/qib_iba6120.c| 3588 + drivers/infiniband/hw/qib/qib_iba7220.c| 4618 +++ drivers/infiniband/hw/qib/qib_iba7322.c| 8058 drivers/infiniband/hw/qib/qib_init.c | 1580 drivers/infiniband/hw/qib/qib_intr.c | 236 +
Re: [PATCH] mlx4_en: show device's port used
On Tue, 25 May 2010 09:55:47 -0700 Roland Dreier rdre...@cisco.com wrote: Add a sysfs file under /sys/class/net/ethx to show the port number within the device that this network interface is using. This is needed as ConnectX devices have two ports and it is useful to know which port the ethernet devices uses. How do other multi-port ethernet devices handle this? Seems that the cleanest way to handle this would be to add a place for drivers to set the port number, and export it to userspace in generic code (so everyone does it the same way). There is a rarely used field in net_device called dev_id that looks like it was intended for this. -- -- 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: linux-next: Tree for May 25 (infiniband/hw/qib)
Stephen Rothwell wrote: Hi all, We are in the merge window again. I remind you all not to add stuff for 2.6.36 to your linux-next trees until after 2.6.35-rc1. Changes since 20100524: when CONFIG_PCI_MSI is not enabled: ERROR: qib_init_iba6120_funcs [drivers/infiniband/hw/qib/ib_qib.ko] undefined! fwiw, I would make building iba6120 support dependent on PCI_MSI (i.e., change Kconfig), remove all of the PCI_MSI ifdef-ery in qib_iba6120.c, and add a printk or 2 in qib_init for unsupported devices. -- 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] mlx4_en: show device's port used
On Tue, May 25, 2010 at 09:55:47AM -0700, Roland Dreier wrote: How do other multi-port ethernet devices handle this? I don't think there are many devices out there which have more than one port. Seems that the cleanest way to handle this would be to add a place for drivers to set the port number, So this will require changing all the drivers to put some value there or we would need to use a default value of 1 for drivers that don't explicitly set a value. and export it to userspace in generic code (so everyone does it the same way). Something like ethtool? But we still need an entry under /sys/class/net/ethx/, right? -- 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] ibnetdisc: Separate calls to umad and mad layer to avoid race condition on response MAD's
On Sat, 22 May 2010 07:40:10 -0700 Sasha Khapyorsky sas...@voltaire.com wrote: On 16:48 Tue 11 May , Ira Weiny wrote: From: Ira Weiny wei...@llnl.gov Date: Tue, 11 May 2010 15:36:08 -0700 Subject: [PATCH] ibnetdisc: Separate calls to umad and mad layer to avoid race condition on response MAD's Specify CA/Port to use which allows parallel scanning to other operations. Signed-off-by: Ira Weiny wei...@llnl.gov Applied. Thanks. However see a minor comment below. --- .../libibnetdisc/include/infiniband/ibnetdisc.h| 15 ++-- infiniband-diags/libibnetdisc/src/ibnetdisc.c | 52 +++- infiniband-diags/libibnetdisc/src/internal.h | 11 ++- infiniband-diags/libibnetdisc/src/query_smp.c | 83 infiniband-diags/libibnetdisc/test/testleaks.c | 16 +--- infiniband-diags/src/iblinkinfo.c |8 +- infiniband-diags/src/ibnetdiscover.c | 14 +--- infiniband-diags/src/ibqueryerrors.c | 11 ++- 8 files changed, 134 insertions(+), 76 deletions(-) [snip] diff --git a/infiniband-diags/libibnetdisc/src/internal.h b/infiniband-diags/libibnetdisc/src/internal.h index 2cfde02..d037a60 100644 --- a/infiniband-diags/libibnetdisc/src/internal.h +++ b/infiniband-diags/libibnetdisc/src/internal.h @@ -54,6 +54,8 @@ #define MAXHOPS 63 #define DEFAULT_MAX_SMP_ON_WIRE 2 +#define DEFAULT_TIMEOUT 1000 +#define DEFAULT_RETRIES 3 typedef struct ibnd_scan { ib_portid_t selfportid; @@ -76,16 +78,19 @@ struct ibnd_smp { struct smp_engine { struct ibmad_port *ibmad_port; After this patch ibmad_port is not used by smp_engine, but instead by an upper layer (ibnetdisc). So I would suggest to move this there (for example to be a member of scan struct). Agreed. I was trying to minimize the changes by this patch because it was mainly a bug fix. Ira Sasha [snip] -- 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/vendstat: allow multiple config space records
Allow to use -R and -W options (config space record access) multiple number of times, so that multiple config space records will be reading and/or writing. Using both -R and -W is allowed as well. Example: vendstat -R 0x12345,0x -R 0x12346 -W 0x12347,0,0xfff lid Note that now number of records is effectively limited by 18 (so that it fit single MAD), this could be increased with using multiple MADs. Signed-off-by: Sasha Khapyorsky sas...@voltaire.com --- infiniband-diags/src/vendstat.c | 69 +- 1 files changed, 45 insertions(+), 24 deletions(-) diff --git a/infiniband-diags/src/vendstat.c b/infiniband-diags/src/vendstat.c index 0add06c..92a90c8 100644 --- a/infiniband-diags/src/vendstat.c +++ b/infiniband-diags/src/vendstat.c @@ -144,25 +144,30 @@ static int do_vendor(ib_portid_t *portid, struct ibmad_port *srcport, return 0; } -static unsigned int conf_addr, conf_val, conf_mask; - -static void do_config_space_record(ib_portid_t *portid, unsigned set) +static void do_config_space_records(ib_portid_t *portid, unsigned set, + is3_config_space_t *cs, unsigned records) { - is3_config_space_t cs; - - memset(cs, 0, sizeof(cs)); - cs.record[0].address = htonl(conf_addr); - cs.record[0].data = htonl(conf_val); - cs.record[0].mask = htonl(conf_mask); + unsigned i; + + if (records 18) + records = 18; + for (i = 0; i records; i++) { + cs-record[i].address = htonl(cs-record[i].address); + cs-record[i].data = htonl(cs-record[i].data); + cs-record[i].mask = htonl(cs-record[i].mask); + } if (do_vendor(portid, srcport, IB_MLX_VENDOR_CLASS, set ? IB_MAD_METHOD_SET : IB_MAD_METHOD_GET, - IB_MLX_IS3_CONFIG_SPACE_ACCESS, 2 22 | 1 16, cs)) - IBERROR(cannot %s config space record, set ? set : get); - - printf(Config space record at 0x%x: 0x%x\n, - ntohl(cs.record[0].address), - ntohl(cs.record[0].data cs.record[0].mask)); + IB_MLX_IS3_CONFIG_SPACE_ACCESS, 2 22 | records 16, + cs)) + IBERROR(cannot %s config space records, set ? set : get); + + for (i = 0; i records; i++) { + printf(Config space record at 0x%x: 0x%x\n, + ntohl(cs-record[i].address), + ntohl(cs-record[i].data cs-record[i].mask)); + } } static void counter_groups_info(ib_portid_t * portid, int port) @@ -224,7 +229,9 @@ static void config_counter_groups(ib_portid_t * portid, int port) } static int general_info, xmit_wait, counter_group_info, config_counter_group; -static unsigned int config_space_read, config_space_write; +static is3_config_space_t write_cs, read_cs; +static unsigned write_cs_records, read_cs_records; + static int process_opt(void *context, int ch, char *optarg) { @@ -246,20 +253,29 @@ static int process_opt(void *context, int ch, char *optarg) return -1; break; case 'R': - config_space_read = 1; - ret = sscanf(optarg, %x,%x, conf_addr, conf_mask); + if (read_cs_records = 18) + break; + ret = sscanf(optarg, %x,%x, +read_cs.record[read_cs_records].address, +read_cs.record[read_cs_records].mask); if (ret 1) return -1; else if (ret == 1) - conf_mask = 0x; + read_cs.record[read_cs_records].mask = 0x; + read_cs_records++; break; case 'W': - config_space_write = 1; - ret = sscanf(optarg, %x,%x,%x, conf_addr, conf_val, conf_mask); + if (write_cs_records = 18) + break; + ret = sscanf(optarg, %x,%x,%x, +write_cs.record[write_cs_records].address, +write_cs.record[write_cs_records].data, +write_cs.record[write_cs_records].mask); if (ret 2) return -1; else if (ret == 2) - conf_mask = 0x; + write_cs.record[write_cs_records].mask = 0x; + write_cs_records++; break; default: return -1; @@ -329,8 +345,13 @@ int main(int argc, char **argv) exit(0); } - if (config_space_read || config_space_write) { - do_config_space_record(portid, config_space_write); + if (read_cs_records || write_cs_records) { + if (read_cs_records) + do_config_space_records(portid, 0, read_cs, +
Re: [PATCH/RFC] opensm: toggle sweeping V3
On 09:53 Tue 25 May , Arthur Kepner wrote: Add option to toggle sweeping from opensm console. Signed-off-by: Arthur Kepner akep...@sgi.com Applied. Thanks. Sasha -- 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] opensm/osm_sa_path_record.c: Add error code to newly added log message
On 15:42 Mon 24 May , Hal Rosenstock wrote: added in commit 1010c9c5014d5a6af2db33e27ae7156f239e7254 Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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] opensm/osm_sa_multipath_record.c: livelock in mpr_rcv_get_path_parms
On 15:43 Mon 24 May , Hal Rosenstock wrote: Similar to commit 1010c9c5014d5a6af2db33e27ae7156f239e7254 for opensm/osm_sa_path_record.c:pr_rcv_get_path_parms Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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] infiniband-diags/libibnetdisc/ibnetdisc.c: Fix compile warns on 32 bit archs
On 15:45 Mon 24 May , Hal Rosenstock wrote: src/ibnetdisc.c: In function `query_port_info': src/ibnetdisc.c:216: warning: long unsigned int format, different type arg (arg 5) src/ibnetdisc.c: In function `recv_node_info': src/ibnetdisc.c:311: warning: long unsigned int format, different type arg (arg 5) src/ibnetdisc.c:335: warning: long unsigned int format, different type arg (arg 6) Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied with minor fixes (see below). Thanks. --- infiniband-diags/libibnetdisc/src/ibnetdisc.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c index 98801de..157b866 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c @@ -211,8 +211,8 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t * smp, static int query_port_info(smp_engine_t * engine, ib_portid_t * portid, ibnd_node_t * node, int portnum) { - IBND_DEBUG(Query Port Info; %s (%lx):%d\n, portid2str(portid), -node-guid, portnum); + IBND_DEBUG(Query Port Info; %s (0x% PRIx64 ):%d\n, +portid2str(portid), node-guid, portnum); return issue_smp(engine, portid, IB_ATTR_PORT_INFO, portnum, recv_port_info, node); } @@ -307,8 +307,9 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp, return -1; node_is_new = 1; } - IBND_DEBUG(Found %s node GUID %lx (%s)\n, node_is_new ? new : old, -node-guid, portid2str(smp-path)); + IBND_DEBUG(Found %s node GUID 0x% PRIx64 (%s)\n, The space is missed after GUID value printing and before '(', so adding this back. +node_is_new ? new : old, node-guid, +portid2str(smp-path)); port = node-ports[port_num]; if (!port) { @@ -331,7 +332,8 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp, if (!rem_node-ports[rem_port_num]) { IBND_ERROR(Internal Error; -Node(%p) %lx Port %d no port created!?!?!?\n\n, +Node(%p) 0x% PRIx64 +Port %d no port created!?!?!?\n\n, The space is missed between GUID value and 'Port' word. Adding back. Sasha rem_node, rem_node-guid, rem_port_num); return -1; } -- 1.5.6.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
Re: [PATCH] opensm - address windows env issues
On 09:03 Tue 25 May , Stan C. Smith wrote: Add a Windows version of truncate_log_file(). Use the Windows flavor of vsprintf(). Would you prefer items of this nature as two separate patches? That is fine so. thanks, stan. Signed-off-by: stan smith stan.sm...@intel.com Applied. Thanks. --- a/opensm/osm_log.c2010-05-22 05:49:24.0 -0700 +++ b/opensm/osm_log.c2010-05-24 11:40:07.823895800 -0700 Please next time generate patches at top level of management tree, eg a/opensm/opensm/osm_log.c ... (It took couple of minutes for me to figure out why it doesn't apply this time :)) Sasha -- 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] IB/qib: fix undefined symbol error when CONFIG_PCI_MSI undefined
This patch fixes a compile error saying qib_init_iba6120_funcs() is undefined when CONFIG_PCI_MSI is not defined. Thanks to Randy Dunlap randy.dun...@oracle.com for finding this and suggesting the fix. Signed-off-by: Ralph Campbell ralph.campb...@qlogic.com --- drivers/infiniband/hw/qib/qib_iba6120.c | 12 drivers/infiniband/hw/qib/qib_init.c|6 ++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c index 7b6549f..1eadadc 100644 --- a/drivers/infiniband/hw/qib/qib_iba6120.c +++ b/drivers/infiniband/hw/qib/qib_iba6120.c @@ -3475,14 +3475,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev, struct qib_devdata *dd; int ret; -#ifndef CONFIG_PCI_MSI - qib_early_err(pdev-dev, QLogic PCIE device 0x%x cannot - work if CONFIG_PCI_MSI is not enabled\n, - ent-device); - dd = ERR_PTR(-ENODEV); - goto bail; -#endif - dd = qib_alloc_devdata(pdev, sizeof(struct qib_pportdata) + sizeof(struct qib_chip_specific)); if (IS_ERR(dd)) @@ -3554,10 +3546,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev, if (qib_mini_init) goto bail; -#ifndef CONFIG_PCI_MSI - qib_dev_err(dd, PCI_MSI not configured, NO interrupts\n); -#endif - if (qib_pcie_params(dd, 8, NULL, NULL)) qib_dev_err(dd, Failed to setup PCIe or interrupts; continuing anyway\n); diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index c0139c0..9b40f34 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1237,7 +1237,13 @@ static int __devinit qib_init_one(struct pci_dev *pdev, */ switch (ent-device) { case PCI_DEVICE_ID_QLOGIC_IB_6120: +#ifdef CONFIG_PCI_MSI dd = qib_init_iba6120_funcs(pdev, ent); +#else + qib_early_err(pdev-dev, QLogic PCIE device 0x%x cannot + work if CONFIG_PCI_MSI is not enabled\n, + ent-device); +#endif break; case PCI_DEVICE_ID_QLOGIC_IB_7220: -- 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] opensm/libvendor Reduce stack consumption
On 08:32 Tue 25 May , Stan C. Smith wrote: Resend, as I realized the mangled email problem; sorry about the extra work. This patch still be whitespace mangled... :( Finally fixed this using: sed -e 's/^\([ +-]\) /\1\t/' -e 's//\t/g' stan. Reduce stack consumption by using a union of structs instead of individual struct allocations. Code borrowed from osm_vendor_ibumad_sa.c signed-off-by: stan smith stan.sm...@intel.com Applied. Thanks. Sasha diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c index 91f82fa..0cc3f19 100644 --- a/opensm/libvendor/osm_vendor_mlx_sa.c +++ b/opensm/libvendor/osm_vendor_mlx_sa.c @@ -576,14 +576,19 @@ ib_api_status_t osmv_query_sa(IN osm_bind_handle_t h_bind, IN const osmv_query_req_t * const p_query_req) { - osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; + union { + ib_service_record_t svc_rec; + ib_node_record_t node_rec; + ib_portinfo_record_t port_info; + ib_path_rec_t path_rec; +#ifdef DUAL_SIDED_RMPP + ib_multipath_rec_t multipath_rec; +#endif + ib_class_port_info_t class_port_info; + } u; osmv_sa_mad_data_t sa_mad_data; + osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind; osmv_user_query_t *p_user_query; - ib_service_record_t svc_rec; - ib_node_record_t node_rec; - ib_portinfo_record_t port_info; - ib_path_rec_t path_rec; - ib_class_port_info_t class_port_info; osm_log_t *p_log = p_bind-p_log; ib_api_status_t status; @@ -617,7 +622,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = svc_rec; + sa_mad_data.p_attr = u.svc_rec; break; case OSMV_QUERY_SVC_REC_BY_NAME: @@ -628,8 +633,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SNAME; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - memcpy(svc_rec.service_name, p_query_req-p_query_input, + sa_mad_data.p_attr = u.svc_rec; + memcpy(u.svc_rec.service_name, p_query_req-p_query_input, sizeof(ib_svc_name_t)); break; @@ -640,8 +645,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.comp_mask = IB_SR_COMPMASK_SID; sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_service_record_t)); - sa_mad_data.p_attr = svc_rec; - svc_rec.service_id = + sa_mad_data.p_attr = u.svc_rec; + u.svc_rec.service_id = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -653,7 +658,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_class_port_info_t)); sa_mad_data.comp_mask = 0; - sa_mad_data.p_attr = class_port_info; + sa_mad_data.p_attr = u.class_port_info; break; @@ -665,8 +670,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_node_record_t)); sa_mad_data.comp_mask = IB_NR_COMPMASK_NODEGUID; - sa_mad_data.p_attr = node_rec; - node_rec.node_info.node_guid = + sa_mad_data.p_attr = u.node_rec; + u.node_rec.node_info.node_guid = *(ib_net64_t *) (p_query_req-p_query_input); break; @@ -678,8 +683,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.attr_offset = ib_get_attr_offset(sizeof(ib_portinfo_record_t)); sa_mad_data.comp_mask = IB_PIR_COMPMASK_LID; - sa_mad_data.p_attr = port_info; - port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); + sa_mad_data.p_attr = u.port_info; + u.port_info.lid = *(ib_net16_t *) (p_query_req-p_query_input); break; case OSMV_QUERY_PORT_REC_BY_LID_AND_NUM: @@ -729,19 +734,19 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, case OSMV_QUERY_PATH_REC_BY_PORT_GUIDS: osm_log(p_log, OSM_LOG_DEBUG, osmv_query_sa DBG:001 %s, PATH_REC_BY_PORT_GUIDS\n); - memset(path_rec, 0, sizeof(ib_path_rec_t)); + memset(u.path_rec, 0, sizeof(ib_path_rec_t));
Re: [PATCH] opensm - cleanup
On 20:58 Mon 24 May , Stan C. Smith wrote: Cleanup __WIN__ clauses by using predefined macros. signed-off-by: stan smith stan.sm...@intel.com Applied. Thanks. Sasha -- 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: [ANNOUNCE] librdmacm 1.0.12
Hi Sean, below is a tiny patch which will help direct users to the correct mailing list Thanks - I'll get this applied, so it will be there for the next release. - Sean -- 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] ofa_kernel madeye.c
This is a simple fix. Several of the snoop filters in ./drivers/infiniband/util/madeye.c don't switch the attribute id to host byte order before checking it. Signed-off-by: Michael Heinz michael.he...@qlogic.com diff --git a/drivers/infiniband/util/madeye.c b/drivers/infiniband/util/madeye.c index 0cda06c..2c650a3 100644 --- a/drivers/infiniband/util/madeye.c +++ b/drivers/infiniband/util/madeye.c @@ -401,7 +401,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent, if (!smp hdr-mgmt_class != mgmt_class) return; - if (attr_id hdr-attr_id != attr_id) + if (attr_id be16_to_cpu(hdr-attr_id) != attr_id) return; printk(Madeye:sent SMP\n); @@ -413,7 +413,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent, { if (!smp mad_recv_wc-recv_buf.mad-mad_hdr.mgmt_class != mgmt_class) return; - if (attr_id mad_recv_wc-recv_buf.mad-mad_hdr.attr_id != attr_id) + if (attr_id be16_to_cpu(mad_recv_wc-recv_buf.mad-mad_hdr.attr_id) != attr_id) return; printk(Madeye:recv SMP\n); @@ -446,7 +446,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent, if (!gmp hdr-mgmt_class != mgmt_class) return; - if (attr_id hdr-attr_id != attr_id) + if (attr_id be16_to_cpu(hdr-attr_id) != attr_id) return; printk(Madeye:sent GMP\n); @@ -468,7 +468,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent, if (!gmp hdr-mgmt_class != mgmt_class) return; - if (attr_id mad_recv_wc-recv_buf.mad-mad_hdr.attr_id != attr_id) + if (attr_id be16_to_cpu(mad_recv_wc-recv_buf.mad-mad_hdr.attr_id) != attr_id) return; printk(Madeye:recv GMP\n); -- 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] libibnetdisc: move ibmad_port out of smp_engine
From: Ira Weiny wei...@llnl.gov Date: Tue, 25 May 2010 13:32:18 -0700 Subject: [PATCH] libibnetdisc: move ibmad_port out of smp_engine Signed-off-by: Ira Weiny wei...@llnl.gov --- infiniband-diags/libibnetdisc/src/ibnetdisc.c | 15 ++- infiniband-diags/libibnetdisc/src/internal.h |2 +- infiniband-diags/libibnetdisc/src/query_smp.c | 15 --- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c index 3c374c7..945e02c 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c @@ -100,7 +100,7 @@ static int extend_dpath(smp_engine_t * engine, ib_portid_t * portid, /* If we were LID routed we need to set up the drslid */ if (!scan-selfportid.lid) if (ib_resolve_self_via(scan-selfportid, NULL, NULL, - engine-ibmad_port) 0) { + scan-ibmad_port) 0) { IBND_ERROR(Failed to resolve self\n); return -1; } @@ -474,6 +474,8 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port, ib_portid_t my_portid = { 0 }; smp_engine_t engine; ibnd_scan_t scan; + int nc = 2; + int mc[2] = { IB_SMI_CLASS, IB_SMI_DIRECT_CLASS }; if (set_config(config, cfg)) { IBND_ERROR(Invalid ibnd_config\n); @@ -501,6 +503,15 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port, return (NULL); } + scan.ibmad_port = mad_rpc_open_port(ca_name, ca_port, mc, nc); + if (!scan.ibmad_port) { + IBND_ERROR(can't open MAD port (%s:%d)\n, ca_name, ca_port); + smp_engine_destroy(engine); + return (NULL); + } + mad_rpc_set_timeout(scan.ibmad_port, cfg-timeout_ms); + mad_rpc_set_retries(scan.ibmad_port, cfg-retries); + IBND_DEBUG(from %s\n, portid2str(from)); if (!query_node_info(engine, from, NULL)) @@ -513,9 +524,11 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port, goto error; smp_engine_destroy(engine); + mad_rpc_close_port(scan.ibmad_port); return fabric; error: smp_engine_destroy(engine); + mad_rpc_close_port(scan.ibmad_port); ibnd_destroy_fabric(fabric); return NULL; } diff --git a/infiniband-diags/libibnetdisc/src/internal.h b/infiniband-diags/libibnetdisc/src/internal.h index d037a60..3c599ec 100644 --- a/infiniband-diags/libibnetdisc/src/internal.h +++ b/infiniband-diags/libibnetdisc/src/internal.h @@ -61,6 +61,7 @@ typedef struct ibnd_scan { ib_portid_t selfportid; ibnd_fabric_t *fabric; struct ibnd_config *cfg; + struct ibmad_port *ibmad_port; } ibnd_scan_t; typedef struct ibnd_smp ibnd_smp_t; @@ -77,7 +78,6 @@ struct ibnd_smp { }; struct smp_engine { - struct ibmad_port *ibmad_port; int umad_fd; int smi_agent; int smi_dir_agent; diff --git a/infiniband-diags/libibnetdisc/src/query_smp.c b/infiniband-diags/libibnetdisc/src/query_smp.c index 4dbfa0d..b68e08a 100644 --- a/infiniband-diags/libibnetdisc/src/query_smp.c +++ b/infiniband-diags/libibnetdisc/src/query_smp.c @@ -201,29 +201,16 @@ error: int smp_engine_init(smp_engine_t * engine, char * ca_name, int ca_port, void *user_data, ibnd_config_t *cfg) { - int nc = 2; - int mc[2] = { IB_SMI_CLASS, IB_SMI_DIRECT_CLASS }; - memset(engine, 0, sizeof(*engine)); - engine-ibmad_port = mad_rpc_open_port(ca_name, ca_port, mc, nc); - if (!engine-ibmad_port) { - IBND_ERROR(can't open MAD port (%s:%d)\n, ca_name, ca_port); - return -EIO; - } - mad_rpc_set_timeout(engine-ibmad_port, cfg-timeout_ms); - mad_rpc_set_retries(engine-ibmad_port, cfg-retries); - if (umad_init() 0) { IBND_ERROR(umad_init failed\n); - mad_rpc_close_port(engine-ibmad_port); return -EIO; } engine-umad_fd = umad_open_port(ca_name, ca_port); if (engine-umad_fd 0) { IBND_ERROR(can't open UMAD port (%s:%d)\n, ca_name, ca_port); - mad_rpc_close_port(engine-ibmad_port); return -EIO; } @@ -247,7 +234,6 @@ int smp_engine_init(smp_engine_t * engine, char * ca_name, int ca_port, return (0); eio_close: - mad_rpc_close_port(engine-ibmad_port); umad_close_port(engine-umad_fd); return (-EIO); } @@ -275,7 +261,6 @@ void smp_engine_destroy(smp_engine_t * engine) } umad_close_port(engine-umad_fd); - mad_rpc_close_port(engine-ibmad_port); } int process_mads(smp_engine_t *
Re: [PATCH] IB/qib: fix undefined symbol error when CONFIG_PCI_MSI undefined
thanks, applied. -- Roland Dreier rola...@cisco.com || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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 10/27] drivers/infiniband/core: Use memdup_user
thanks, applied. -- Roland Dreier rola...@cisco.com || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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
linux-next: build warning after merge of the final tree
Hi Roland, After merging the final tree, today's linux-next build (powerpc allyesconfig) produced this warning: drivers/infiniband/hw/qib/qib_fs.c: In function 'portcntrs_2_read': drivers/infiniband/hw/qib/qib_fs.c:203: warning: 'counters' is used uninitialized in this function drivers/infiniband/hw/qib/qib_fs.c: In function 'portcntrs_1_read': drivers/infiniband/hw/qib/qib_fs.c:192: warning: 'counters' is used uninitialized in this function drivers/infiniband/hw/qib/qib_fs.c: In function 'portnames_read': drivers/infiniband/hw/qib/qib_fs.c:181: warning: 'names' is used uninitialized in this function drivers/infiniband/hw/qib/qib_fs.c: In function 'dev_names_read': drivers/infiniband/hw/qib/qib_fs.c:160: warning: 'names' is used uninitialized in this function drivers/infiniband/hw/qib/qib_fs.c: In function 'dev_counters_read': drivers/infiniband/hw/qib/qib_fs.c:149: warning: 'counters' is used uninitialized in this function Introduced by commit f931551bafe1f10ded7f5282e2aa162c267a2e5d (IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters). -- Cheers, Stephen Rothwells...@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ pgpncRgFJQzV1.pgp Description: PGP signature