ipoib: rfe- enable pkey and device name decoupling
The sysfs "create_child" interface creates
pkey based child interface but derives the
name from parent device name and pkey value.
This makes administration difficult where pkey
values can change but policies encoded with
device names do not.
We add ability to create a child interface with
a user specified name and a specified pkey
with a new sysfs "create_named_child" interface
(and also add a corresponding "delete_named_child"
interface).
We also add a new module api interface to query
pkey from a netdevice so any kernel users of
pkey based child interfaces can query it - since
with device name decoupled from pkey, it can no
longer be deduced from parsing the device name
by other kernel users.
Orabug:
19064704
Ported from UEK2 commits
a101f6037e882b1c12143416d48345fe7ea62979 and
916eb26c32082e241c22fcf8064959d697eabe2b
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Chien-Hua Yen <chien.yen@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>