NAME
ibv_query_pkey - InfiniBand ポートの Partition Key Table を取得する
SYNOPSIS
#include <infiniband/verbs.h> int ibv_query_pkey(struct ibv_context *context, uint8_t port_num, int index, uint16_t *pkey);
DESCRIPTION
ibv_query_pkey()
は context で指定される RDMA デバイスの port_num で指定されるポートの Parition Key Table の index 番目の P_Key を取り出し pkey が指す領域にコピーする。
取り出した P_Key はネットワークバイトオーダーで記録される。
context は ibv_open_device() でオープンした RDMA デバイスを指定する。
port_num は 1 からはじまるポート番号を指定する。 RDMA デバイスにいくつポートがあるかは ibv_query_device() で得られる phys_port_cnt を参照すること。
index は 0 からはじまる Partition Key Table のインデックス番号を指定すること。 Parition Key Table の最大数は ibv_query_port() で得られる pkey_tbl_len で確認できる。 index には pkey_tbl_len 未満のインデックス番号を指定すること。
RETURN VALUE
ibv_query_pkey()
が成功すれば 0 を返す。
失敗すれば -1 を返す。
NOTES
Subnet Manager がサブネットを構成後は、index が 0 の P_Key は Default Partition Key であり 0xFFFF に指定されている。
P_Key が 0x0000 の場合、それは無効な P_Key である。
SEE ALSO
InfiniBand Verbs API Reference、ibv_open_device(3)、ibv_query_device(3)、ibv_query_port(3)、ibv_query_gid(3)
AUTHORS