Sean Hefty [Thu, 15 Jul 2010 17:49:16 +0000 (10:49 -0700)]
winverbs: fix memory violation in SRQ code
Problem reported by Shiqing Fan:
"I got a memory violation error in wv_srq.cpp Query() function around
line 202. It seems using uninitialized verbsData.output_size for
memcpy. The verbsData.input_size is initialized in WvPreQueryQp
(wvuverbs.cpp), and it has a similar memcpy in this function too."
wv_uverbs.cpp should initialize the output_size to 0 in all
WvPre* calls.
Sean Hefty [Thu, 15 Jul 2010 17:49:16 +0000 (10:49 -0700)]
winverbs: fix memory violation in SRQ code
Problem reported by Shiqing Fan:
"I got a memory violation error in wv_srq.cpp Query() function around
line 202. It seems using uninitialized verbsData.output_size for
memcpy. The verbsData.input_size is initialized in WvPreQueryQp
(wvuverbs.cpp), and it has a similar memcpy in this function too."
wv_uverbs.cpp should initialize the output_size to 0 in all
WvPre* calls.
Sean Hefty [Tue, 13 Jul 2010 18:51:32 +0000 (11:51 -0700)]
winverbs: add mr interface
The lkey isn't guaranteed to be unique. To ensure that we track
memory registrations properly, associate MRs with their own data
structure. Deregistration will reference the data structure, rather
than just the lkey from the registration.
Sean Hefty [Tue, 13 Jul 2010 18:51:32 +0000 (11:51 -0700)]
winverbs: add mr interface
The lkey isn't guaranteed to be unique. To ensure that we track
memory registrations properly, associate MRs with their own data
structure. Deregistration will reference the data structure, rather
than just the lkey from the registration.
Sean Hefty [Tue, 13 Jul 2010 18:51:32 +0000 (11:51 -0700)]
winverbs: add mr interface
The lkey isn't guaranteed to be unique. To ensure that we track
memory registrations properly, associate MRs with their own data
structure. Deregistration will reference the data structure, rather
than just the lkey from the registration.
Sean Hefty [Tue, 13 Jul 2010 18:51:32 +0000 (11:51 -0700)]
winverbs: add mr interface
The lkey isn't guaranteed to be unique. To ensure that we track
memory registrations properly, associate MRs with their own data
structure. Deregistration will reference the data structure, rather
than just the lkey from the registration.
Sean Hefty [Tue, 13 Jul 2010 18:51:32 +0000 (11:51 -0700)]
winverbs: add mr interface
The lkey isn't guaranteed to be unique. To ensure that we track
memory registrations properly, associate MRs with their own data
structure. Deregistration will reference the data structure, rather
than just the lkey from the registration.
Sean Hefty [Mon, 12 Jul 2010 19:10:08 +0000 (12:10 -0700)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since
_errno.h is a linux header file abstraction, move its use internal
to libibverbs. This avoids issues if the user includes errno.h
directly.
Sean Hefty [Mon, 12 Jul 2010 17:16:26 +0000 (10:16 -0700)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status
values. This causes an error if the ibv_wc_status values are
referenced in a switch statement. Replace the duplicated values
with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library,
the duplicated values are not used anyway.
Sean Hefty [Tue, 13 Jul 2010 17:20:20 +0000 (17:20 +0000)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since _errno.h is a linux header file abstraction, move its use internal to libibverbs. This avoids issues if the user includes errno.h directly and matches the use on Linux.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2847 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 13 Jul 2010 17:15:45 +0000 (17:15 +0000)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status values. This causes an error if the ibv_wc_status values are referenced in a switch statement. Replace the duplicated values with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library, the duplicated values are not used anyway.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2846 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86