aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-08-13Initialize reserved attributes in modify QP commandstable-1.0Dotan Barak1-0/+2
Initialize the reserved attributes in modify QP command to eliminate valgrind warnings like: ==23549== Syscall param write(buf) points to uninitialised byte(s) ==23549== at 0x316B1B933F: (within /lib64/tls/libc-2.3.4.so) ==23549== by 0x4A33AF7: ibv_cmd_modify_qp (cmd.c:782) ==23549== by 0x4F860D8: mlx4_modify_qp (verbs.c:480) ==23549== by 0x4A37A53: ibv_modify_qp@@IBVERBS_1.1 (verbs.c:441) ==23549== by 0x40972E: qp_reset_to_rtr (mr_test_fun.c:1189) ==23549== by 0x403AFC: mr_test_connect_qp (mr_test.c:232) ==23549== by 0x404956: do_test (mr_test.c:85) ==23549== by 0x402DF8: main (main.c:448) ==23549== Address 0x7FEFFF2AE is on thread 1's stack Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit d5052fa0bf8180be9edf1c4c1c014dde01f8a4dd)
2007-07-03Fix Valgrind annotations so they can actually be builtRoland Dreier1-5/+6
The AC_CHECK_HEADER() test for <valgrind/memcheck.h> will never result in HAVE_VALGRIND_MEMCHECK_H being defined, so ibverbs.h will never include <valgrind/memcheck.h> and Valgrind annotations will never actually get built. Fix this by adding an AC_DEFINE() of HAVE_VALGRIND_MEMCHECK_H if the header is found. Pointed out by Jeff Squyres <jsquyres@cisco.com>. Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit e72219d2826cc58e197c5742441440468d99897b)
2007-06-15Roll libibverbs 1.0.5 releaselibibverbs-1.0.5Roland Dreier3-7/+10
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-06-03Initialize QP state to RESETJack Morgenstein1-0/+1
For newly created QPs, set qp->state to IBV_QPS_RESET. At least libmlx4 needs this fix, or else it won't correctly initialize the QP's send queue when transitioning to INIT. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit 796e9fa16c4358e335e778ec790fce9012a46e08)
2007-04-09Fix ibv_srq_pingpong option handlingRoland Dreier1-0/+1
Add missing break statement in command line option handling switch. Without the break statement, setting the 'm' (mtu) command line option fell through to the next case and the same value was used for the 'q' (num-qp) option. Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit 09335ff6377acf90d5ed1c28a6ce69d2aa620e09)
2007-01-31Revert "The ibv_cmd_* create functions need to set context"Roland Dreier2-16/+21
This reverts commit 5eaee85aec025be16e5aeeaac64abc6d8d9c191c. This breaks ibv_destroy_ah() with libmthca, and isn't really appropriate for the stable branch. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-01-29The ibv_cmd_* create functions need to set contextRoland Dreier2-21/+16
If the ibv_cmd_* create function succeeds, then the object context pointer must be set by that function so that the corresponding destroy function will work. This avoids problems in the error cleanup path of a low-level driver's create function that fails after calling an ibv_cmd_* create function. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit 8b3d225476c99ea29a68109a7d40e5ef353d4388)
2007-01-18Fix checks of asprintf() return valueRoland Dreier2-2/+2
asprintf() returns the number of bytes printed, so the way to check for failure is to test if the return value is < 0. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit 2d83a4b522b00ab36ada613920e9cf5594648934)
2007-01-17Check asprintf() return in pingpong examplesDotan Barak4-8/+24
Handle asprintf() allocation failures in pingpong examples. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit db39573253488a800ad3a57bf8846902c090450f)
2007-01-17Check return of calloc() in ibv_get_device_list()Roland Dreier1-0/+4
Don't blindly copy device pointers if calloc() returns NULL. Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from commit 789728f7be1e6c7f22380ae739d7b692d2c08d0f)
2007-01-16Handle asprintf memory allocation failuresDotan Barak2-2/+4
Cherry-picked from dd3d43d89e398f23c4824d26f2698446ff2d120f. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-15Remove svn keywordsRoland Dreier25-50/+0
Now that we're in git, there's no reason to have $Id in files. Signed-off-by: Roland Dreier <rolandd@cisco.com> (cherry picked from d7f11c8805800d3644aa83d1d5f9f708bf9bf585 commit)
2006-11-09Bump version numberRoland Dreier3-5/+14
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add final Debian changelog for libibverbs 1.0.4Roland Dreier1-1/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0.4 releaselibibverbs-1.0.4Roland Dreier1-0/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix previous sq_draining change so it actually buildsRoland Dreier1-1/+1
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Return sq_draining properly from query_qpJack Morgenstein3-2/+10
Return the sq_draining value back to user space for query_qp instead of the en_sqd_async notify value. This last is valid only for modify_qp. For query_qp (according to the IB Spec V1.2), the draining status should returned. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Make device finding work againRoland Dreier2-2/+12
Fix operator precedence issues in how libibverbs-1.0 adds devices to its list. Also change so that devices are reported in the same order as they were in older versions. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix static linking of libibverbs-1.0Roland Dreier4-59/+183
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add rmb() and wmb() to <infiniband/arch.h>Roland Dreier2-2/+36
Update i386/x86_64 versions to use "lock; addl $0"/"lfence" instead of just a compiler barrier, to guard against out-of-order speculative reads. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add README notes about Valgrind memcheck supportJeff Squyres1-0/+33
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add handling of --with-valgrind=<valgrind dir>Roland Dreier1-3/+9
Change libibverbs/libmthca Valgrind support so that --with-valgrind can take an installation directory to look in for Valgrind headers. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update ChangeLogs to give credit for Valgrind annotationsRoland Dreier1-1/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix up configure test for <valgrind/memcheck.h>Roland Dreier1-2/+6
Print a warning if Valgrind annotations are requested but <valgrind/memcheck.h> is not found. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add Valgrind annotationsRoland Dreier4-0/+86
Add basic Valgrind annotations to libibverbs and libmthca (disabled by default, can be enabled by configuring with --with-valgrind). These reduce false positive warnings from the Valgrind memcheck module. Based on work and suggestions from Rainer Keller <keller@hlrs.de> and Jeff Squyres <jsquyres@cisco.com>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update libibverbs man pages so they don't refer to "OpenIB"Roland Dreier7-7/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Debian packaging improvementsRoland Dreier2-12/+29
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix libibverbs definition of mb() for sparcRoland Dreier2-1/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix ibv_get_device_list() to really NULL-terminate the arrayRoland Dreier2-3/+8
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix minor memory leaksRoland Dreier3-0/+8
The result of asprintf needs to be free when no longer needed. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add IBV_EVENT_CLIENT_REREGISTER to libibverbsLeonid Arsh3-1/+13
Signed-off-by: Leonid Arsh <leonida@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix update to Debian policy 3.7.2Roland Dreier2-2/+2
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add a request for ChangeLog entries to the READMERoland Dreier1-0/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Get rid of commas at end of enum listsMichael S. Tsirkin2-2/+7
While comma at end of enumerator list is legal since 1999, some tools (notably gcc versions pre-4.0) seem to default to 1989 mode when running with -pedantic flag, and warn about this usage. Since most of our enums in header files do not have comma at end, its probably easier to fix the remaining two cases than educate all users of libibverbs on virtues of C99. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump version numberRoland Dreier3-4/+13
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update to debian policy 3.7.0Roland Dreier2-2/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Use correct email address in Debian changelogRoland Dreier1-1/+1
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0.3 releaselibibverbs-1.0.3Roland Dreier1-0/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix Debian sparc build failureRoland Dreier3-3/+18
Fix build failure with Debian sparc compiler: membar is only supported under V9 ISA. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix memory leak in ibv_read_sysfs_file()Roland Dreier2-1/+5
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Reduce dependency on libsysfsRoland Dreier8-66/+154
Reduce libibverbs dependency on libsysfs by using local functions for internal sysfs access. libsysfs is still required because of the ABI, which passes a struct sysfs_class_device * to low-level driver init functions. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Deprecate "ib_XXX" namesRoland Dreier6-52/+90
Deprecate various "ib_XXX" names (introduced as part of SA and marshalling code). Preferred versions like "ibv_XXX" are now available. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add ibv_rate_to_mult() and mult_to_ibv_rate() functionsHoang-Nam Nguyen4-0/+54
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add __attribute_const macro for gcc >= 3Roland Dreier2-0/+13
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Minor Debian packaging tweaksRoland Dreier1-2/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Make libsysfs dependency more robust in spec fileRoland Dreier1-2/+2
Depend on %{_includedir}/sysfs/libsysfs.h instead of sysfs-devel to be friendlier to building on SuSE distros. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Revert unreviewed changes made without maintainer approvalRoland Dreier1-7/+6
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update spec file from 1.0 branchBryan O'Sullivan1-6/+7
2006-11-09Print a warning if dlopen() of a driver failsRoland Dreier2-1/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Change Priority field of Debian packages to "extra"Roland Dreier2-1/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Added a print of the event name in string formatDotan Barak2-2/+40
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Improve documentation of ibv_req_notify_cq()Roland Dreier2-1/+12
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add include of <stdlib.h>Roland Dreier5-0/+10
This fixes warnings about implicit declaration of free(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add some missing dependencies in Debian control filesRoland Dreier1-3/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Expand debian/copyrightRoland Dreier1-4/+28
Put more detail about copyright holders and licenses in debian/copyright. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Build-Depend on debhelper (>= 5)Roland Dreier2-2/+2
Debian packaging sets compat to 5, so packages also need to Build-Depend on debhelper (>= 5). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs versionRoland Dreier2-5/+5
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0.2 releaselibibverbs-1.0.2Roland Dreier1-0/+2
Debian packaging fixes only. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Debian packaging fixes based on feedback from debian-mentors mailing listRoland Dreier7-7/+21
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump version in svn, and switch to non-native Debian packagingRoland Dreier3-5/+8
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0.1 releaselibibverbs-1.0.1Roland Dreier1-0/+2
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Use sysfs_open_attribute() and sysfs_read_attribute()Roland Dreier3-16/+49
Use sysfs_open_attribute() and sysfs_read_attribute() instead of the deprecated function sysfs_read_attribute_value(), which is no longer present in libsysfs2 (which is already in Debian and Ubuntu). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs version to 1.0.1Roland Dreier4-6/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0 releaselibibverbs-1.0Roland Dreier1-0/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add enum ibv_rateJack Morgenstein2-0/+19
Add enum ibv_rate to define encoding of static_rate field (based on a patch from Jack Morgenstein <jackm@mellanox.co.il>). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix memory leak in find_drivers()Ralph Campbell2-0/+7
I was browsing through the libibverbs code and found a minor memory leak. Here is the fix. Signed-off-by: Ralph Campbell <ralphc@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Remove copyright notices without license textRoland Dreier8-8/+0
They bugged some silly people. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add support for kernel ABI version 6Dotan Barak3-1/+25
Add support for kernel ABI 6: take SRQ capacity from kernel response to create SRQ. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs versionRoland Dreier3-5/+8
Be optimistic and assume that the next release will be 1.0. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0-rc7 releaselibibverbs-1.0-rc7Roland Dreier1-0/+2
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add support for kernel ABI version 5Roland Dreier3-6/+30
Add support for kernel ABI 5, which properly aligns struct ibv_create_qp_resp. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add response handling to ibv_cmd_create_qp()Roland Dreier3-20/+29
Add resp and resp_size parameters to libibverbs's ibv_cmd_create_qp() function so that kernel low-level drivers can return private data to userspace device drivers. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs version number to 1.0-rc7Roland Dreier3-6/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0-rc6 releaselibibverbs-1.0-rc6Roland Dreier1-0/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add lots more TODO information to the libibverbs READMERoland Dreier1-2/+45
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Report board_id from ibv_devinfo, if presentDotan Barak2-0/+12
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Remove cpu_to_be64/be64_to_cpuRoland Dreier8-29/+19
Remove duplicated cpu_to_be64/be64_to_cpu functions in favor of htonll/ntohll from <infiniband/arch.h>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09libibverbs changes for query QP and query SRQ verbsDotan Barak7-0/+236
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix pingpong examples' handling of specifying device by nameRoland Dreier5-4/+10
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Remove useless "extern" from function declarationsRoland Dreier4-114/+119
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09libibverbs changes to handle resizing CQsRoland Dreier8-4/+72
Essentially just adding API and support for passing the call through to provider plug-ins. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add "extern" to declarations for consistencyRoland Dreier1-6/+6
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix Source: line in spec files to point to new tarball nameRoland Dreier1-1/+1
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Move pp_get_local_lid() to common fileRoland Dreier7-44/+22
Factor out more common pingpong code. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs version number to 1.0-rc6Roland Dreier3-7/+10
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0-rc5 releaselibibverbs-1.0-rc5Roland Dreier1-0/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update TODO section in READMERoland Dreier1-2/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09List all devices in ibv_devinfoDotan Barak2-1/+10
Make ibv_devinfo list all IB devices by default, rather than the first device only. Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Factor out some common code in pingpong examplesRoland Dreier8-39/+162
- Create pingpong.c/pingpong.h to hold common code for pingpong examples. - Add option to set path MTU for connected transport pingpong examples. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Arm CQ early enough in pingpong examplesRalph Campbell5-24/+31
The example pingpong programs have a race when using events where the client sends the first packet but the server hasn't yet armed the CQ by calling ibv_req_notify_cq() thus waiting forever in ibv_get_cq_event(). The fix is to move the call to ibv_req_notify_cq() before signaling the client to "start". Signed-off-by: Ralph Campbell <ralphc@pathscale.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix ibv_srq_pingpong bug with many QPs when using CQ eventsRoland Dreier2-3/+20
Fix SRQ example to avoid problems with many QPs and events. Based on a patch from Dotan Barak (who also found the problem). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix test of return value of ibv_poll_cq() in pingpong examplesRalph Campbell5-20/+22
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Typo fix in the description of ibv_modify_srq()Dotan Barak2-2/+7
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix ibverbs_init for multiple adaptersMichael S. Tsirkin2-1/+6
Noted by Christoph Raisch. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09struct ibv_send_wr.imm_data is in network byte orderMichael S. Tsirkin1-1/+1
verbs.h documents ordering for immediate data in completion, but not in send work request. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Improve ibv_free_device_list() documentationRoland Dreier2-1/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Handle devices that don't support SRQShirley Ma2-1/+11
create_srq is not a mandatory device function, therefore in userspace/libibverbs/src/verbs.c ibv_create_srq should check create_srq() first before calling it, otherwise the caller will cause the segmentation fault on device which doesn't support SRQs. Signed-off-by: Shirley Ma <xma@us.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Change from ibv_get_devices() to ibv_get_device_list()Roland Dreier13-132/+176
Change libibverbs API for listing all known devices from ibv_get_devices() to ibv_get_device_list(), and update all in-tree uses of this API. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix EXTRA_DIST: sa-kern-abi.h path is wrongMichael S. Tsirkin1-1/+1
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Various trivial picayune libibverbs changesRoland Dreier3-8/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add support for userspace RDMA connection management abstraction (CMA)Sean Hefty8-22/+473
Add common user/kernel data structures and copy routines in libibverbs. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
2006-11-09Add changelog entry for previous checkinRoland Dreier1-0/+5
2006-11-09Make ibv_get_devices reentrantMichael S. Tsirkin1-1/+8
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Handle kernel uverbs ABI version 4Jack Morgenstein3-10/+85
Update libibverbs and libmthca to handle new kernel ABI 4, which has the kernel compute exact capabilities for QPs. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix CQ overrun in SRQ pingpong exampleRoland Dreier2-1/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump debian package version to -rc5 as wellRoland Dreier1-1/+1
2006-11-09Bump libibverbs version number to 1.0-rc5Roland Dreier2-4/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Really roll releasesRoland Dreier1-1/+1
Fix version in spec file changelog. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Roll libibverbs 1.0-rc4 releaselibibverbs-1.0-rc4Roland Dreier2-1/+4
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix QP attr masks in ibv_uc_pingpongRoland Dreier2-6/+7
Fix QP attribute masks used in ibv_uc_pingpong -- now that mthca correctly fails if we try to set RDMA/atomic capabilities for UC QPs, the examples need to be fixed as well. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Handle out-of-order completions in pingpong examplesRoland Dreier5-38/+85
Keep track of whether send and/or receive is pending in libibverbs pingpong examples. This avoids failures when the remote side receives data and posts a send very quickly, and the local side completes the receive before the previous send. With the old code, this could result in posting a send before the previous send completed, and therefore overrun the send queue. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix "Source:" line in RPM spec files to be a valid URLRoland Dreier1-1/+1
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix buffer size computation in ibv_cmd_get_context_v2()Roland Dreier2-1/+7
Correct silly mistake in ibv_cmd_get_context_v2() computation of size of buffer for old ABI command: we need to use sizeof *cmd instead of sizeof cmd, since cmd is a pointer. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Move where we set qp->qp_type from cmd.c to verbs.cRoland Dreier2-1/+1
Just to be really anal. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Check write() return value against size we tried to writeRoland Dreier2-15/+22
In libibverbs post send, post recv and post SRQ recv marshalling code, correct value that we check write() return value against so that we check against the size we actually try to write, instead of just sizeof cmd. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Correct sense of solicited_only parameter to ibv_cm_req_notify_cq()Roland Dreier3-3/+8
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Improve comments for ibv_ack_async_event and ibv_ack_async_eventsRoland Dreier1-10/+12
Pointed out by Michael S. Tsirkin. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add support for new datapath kernel commandsRoland Dreier6-2/+514
Add handling for calling into kernel for datapath operations, so that we can handle the PathScale userspace driver. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Avoid potential buffer overrun in ibv_srq_pingpongRoland Dreier2-0/+8
Fix overrun in ibv_srq_pingpong (detected by Fedora Core 4 "FORTIFY_SOURCE"). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Remove unnecessary Debian postrm script, and simplify postinst scriptRoland Dreier3-50/+7
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add Debian postinst/postrm scripts to add/remove "rdma" groupRoland Dreier4-1/+57
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Be a little less verbose if verbose flag is not setRoland Dreier2-2/+9
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Bump libibverbs versionRoland Dreier7-6/+36
Also finish support for modify SRQ verb. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Move formatting of device's firmware version into device-specific codeRoland Dreier5-14/+17
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Minor libibverbs packaging cleanupsRoland Dreier1-2/+2
Add dist to release and require sysfsutils-devel to for -devel package. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Initial attempt at Fedora Extras spec files for libibverbs and libmthcaRoland Dreier1-20/+48
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update libibverbs and libmthca to handle uverbs ABI version 3Roland Dreier19-219/+485
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Debian packaging changes suggested by debian-mentors reviewRoland Dreier5-9/+8
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Print components of firmware version in hexRoland Dreier1-1/+1
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Make command structure sizes the same on 32-bit and 64-bitRoland Dreier1-0/+3
Add 4-byte reserved members to the new destroy CQ, destroy QP and destroy SRQ command structures so that they become a multiple of 8 bytes in size. This fixes the structures so they have the same size on both 32-bit and 64-bit architectures (which is required so that 32-bit userspace on a 64-bit kernel works correctly). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Make sure __BYTE_ORDER is definedRoland Dreier1-0/+2
Fail compilation if __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Include htonll() and nothll() in <infiniband/arch.h>Roland Dreier3-4/+26
Move htonll() and ntohll() from libmthca into libibverb's <infiniband/arch.h>, and use them in ibv_get_device_guid() to avoid pointer aliasing (which some versions of gcc miscompile). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update libibverbs for stale completion event handlingRoland Dreier8-20/+63
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add missing half of change log entryRoland Dreier1-1/+6
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add -dbg packages with debugging symbols to Debian packagesRoland Dreier2-0/+16
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Update for new kernel ABI (stale event handling)Roland Dreier12-30/+260
Update to handle new kernel ABI for avoiding stale asynchronous events. When a CQ, QP or SRQ is destroyed, the kernel reports the number of events it has given to userspace, and we wait until we've handled the same number of events. This does introduce a library API change: consumers are now required to call ibv_put_async_event() to release every asynchronous event that they retrieve via ibv_get_async_event(). Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add man pages for libibverbs example programsRoland Dreier10-1/+340
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix warnings on platforms where uint64_t != unsigned long longRoland Dreier1-3/+3
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Fix up Debian packagingRoland Dreier4-5/+6
- Add bug #s for ITP bugs - Change @topspin.com addresses to @cisco.com - Add Debian-specific package minor version Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Merge Dotan Barak's vstat tool into ibv_devinfoRoland Dreier3-48/+353
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Avoid segv when no IB devices are foundPete Wyckoff9-4/+32
Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add support for SRQsRoland Dreier8-9/+986
Add libibverbs support for SRQs, including ibv_srq_pingpong example. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Make --rx-depth work in pingpong examplesRoland Dreier3-18/+21
Fix option handling in pinpgong examples so that --rx-depth long option actually works. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Lazy initialization of libibverbs on ibv_get_devicesMichael S. Tsirkin3-12/+18
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Add port info dump to devinfo programRoland Dreier1-0/+20
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Move ud-pingpong.c to ud_pingpong.cRoland Dreier2-1/+1
Be consistent with uc_pingpong.c and rc_pingpong.c. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Get ready to receive before other side starts to sendRoland Dreier3-143/+172
Have server side of pingpong get ready to receive before client side starts sending, to close a race condition. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Free context before closing associated file descriptorsRoland Dreier1-2/+2
Free context before closing associated file descriptors. This can avoid some problems acquiring mmap_sem when there is still memory to be released by the kernel. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Always pass 0 for CQ event handlerRoland Dreier2-3/+4
Always pass 0 to the kernel for CQ event handler until multiple handlers are implemented and added to the API. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-11-09Don't follow driver path in user's environment if we're running SUIDRoland Dreier1-5/+13
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Expand libibverbs READMERoland Dreier1-2/+29
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Update for kernel ABI changesRoland Dreier5-29/+34
Update userspace verbs libraries to match kernel ABI changes (required for using "struct ib_udata *" interface). Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Include debian/ directory in distribution tarballsRoland Dreier1-4/+6
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Create new ibv_uc_pinpong exampleRoland Dreier3-3/+678
Create new ibv_uc_pinpong example for using UC transport. Move original RC pingpong to ibv_rc_pingpong for consistency. Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Write up some basics in libibverbs/READMERoland Dreier1-5/+67
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Implement userspace side of query_device verbRoland Dreier9-2/+310
Implement query_device verb and add a "devinfo" example. Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Add generic userspace part of query GID and query P_Key verbsRoland Dreier6-0/+73
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Fix uninitialized AH attributes in pingpong examplesMichael S. Tsirkin2-20/+22
Some address handle attributes (notably static rate flow control) were uninitialized. Fix this by initializing all fields to 0 using designated initializers. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Add userspace side of {attach,detach}_mcast verbsRoland Dreier5-0/+71
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Fix pingpong parameter parsing typosMichael S. Tsirkin2-2/+2
Fix for two obvious typos in pingpong and ud-pingpong parameter parsing (found by Grant in rdma_lat code). Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Update error messagesRoland Dreier1-3/+7
Update error messages in libibverbs init so they're easier to understand, as suggested by Grant Grundler.
2006-11-09Set version number to 0.1.0Roland Dreier9-2/+85
Also add debian/ directories to build libibverbs.
2006-11-09Add documentation for ibv_poll_cq functionRoland Dreier1-0/+10
2006-11-09Add command codes for all verbsRoland Dreier1-0/+74
Add command codes for all verbs to userspace include files. Define parameter structures for query GID, query P_Key, attach multicast and detach multicast commands. Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Load driver statically linked into executableRoland Dreier1-0/+5
Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Commit libibverbs code from roland-uverbs branch back onto trunkRoland Dreier15-104/+2845
2006-11-09Continue implementing verbsRoland Dreier9-20/+460
Add support for opening kernel uverbs file, getting context and event FDs, and reading async events.
2006-11-09Fix library name passed to AC_INIT()Roland Dreier1-1/+1
2006-11-09Fill in more verbs APIRoland Dreier8-3/+358
Start filling in more of the verbs API. Implement tracking for possibly overlapping locked memory ranges.
2006-11-09Remove unused old Makefile.am filesRoland Dreier3-29/+0
2006-11-09Complete rename to ib_devicesRoland Dreier1-2/+2
Fix Makefile.am to build the right executable. Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Change ib_drivers example to ib_devicesRoland Dreier2-2/+2
Rename ib_drivers example program to ib_devices, which is a much more sensible name. Signed-off-by: Roland Dreier <roland@topspin.com>
2006-11-09Initial check-in of libibverbsRoland Dreier24-0/+1083
Signed-off-by: Roland Dreier <roland@topspin.com>