[ofa-general] [ipoib][patch] handle pkey input to create_child and delete_child consistently

Al Chu chu11 at llnl.gov
Wed Jan 28 10:41:49 PST 2009


(Didn't get a response from an earlier post, this is a repost w/ a
rebased patch)

I noticed that the pkey is handled differently between ipoib's
create_child and delete_child functions.  So a user can create a
interface with a pkey, but not delete it with the same pkey.  Sort of
makes it confusing for the average person.

# sys/class/net/ib0 > echo 0x6fff > create_child
# /sys/class/net/ib0 > echo 0x6fff > delete_child
-bash: echo: write error: No such file or directory
# /sys/class/net/ib0 > echo 0xefff > delete_child
# /sys/class/net/ib0 >

The attached patch simply bitwise-ORs the full membership bit into the
delete_child function for consistency.  A check for a valid full-
membership bit on the create_child function would be fine as well, but
IMO this is the lesser confusing option (and is backwards compatible to
any scripts people have already written).

Al

-- 
Albert Chu
chu11 at llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-the-pkey-full-membership-bit-so-the-input-to-del.patch
Type: application/mbox
Size: 1148 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090128/eadc10eb/attachment.mbox>


More information about the general mailing list