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

Al Chu chu11 at llnl.gov
Thu Nov 13 09:47:23 PST 2008


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-handle-pkey-in-create_child-and-delete_child-consist.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20081113/20571e13/attachment.bin>


More information about the general mailing list