NDK_ADAPTER_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Version | NDK_VERSION | 4 | +0 | +0 | NDK インターフェイスのメジャー バージョンおよびマイナー バージョン(NDK_VERSION)。 | ||||||||||||||||
| VendorId | DWORD | 4 | +4 | +4 | ベンダーの組織固有識別子(OUI)。 | ||||||||||||||||
| DeviceId | DWORD | 4 | +8 | +8 | ベンダー定義のデバイス識別子。 | ||||||||||||||||
| MaxRegistrationSize | UINT_PTR | 8/4 | +16 | +12 | アダプターがアドレス指定できる単一のメモリ登録の最大サイズ(バイト単位)。 | ||||||||||||||||
| MaxWindowSize | UINT_PTR | 8/4 | +24 | +16 | 単一のメモリ ウィンドウの最大サイズ(バイト単位)。 | ||||||||||||||||
| FRMRPageCount | DWORD | 4 | +32 | +20 | アダプターがサポートする FRMR の数が最も多くなる高速登録メモリ領域(FRMR)のサイズ(PAGE_SIZE ページ単位)。プロバイダーは少なくとも 16 の FRMR ページをサポートしなければなりません。この値は通常、FRMR ベースの同時 I/O 操作を最適化する FRMR サイズとして上位層で使用されます。したがって、16 より大きい値を通知するのは、そのサイズでサポートされる FRMR の総数が結果として大幅に減少しない場合に限るべきです。 | ||||||||||||||||
| MaxInitiatorRequestSge | DWORD | 4 | +36 | +24 | イニシエーター キューに対する単一の要求で指定できるスキャッター/ギャザー エントリ(SGE)の最大数。 | ||||||||||||||||
| MaxReceiveRequestSge | DWORD | 4 | +40 | +28 | 受信キューに対する単一の要求で指定できる SGE の最大数。 | ||||||||||||||||
| MaxReadRequestSge | DWORD | 4 | +44 | +32 | 読み取り要求で指定できる SGE の最大数。 注 読み取り要求では、この値が MaxInitiatorRequestSge の値をオーバーライドします。
| ||||||||||||||||
| MaxTransferLength | DWORD | 4 | +48 | +36 | 単一の送信、受信、読み取り、または書き込み要求内のすべての SGE によって参照できる最大合計長。 | ||||||||||||||||
| MaxInlineDataSize | DWORD | 4 | +52 | +40 | 単一の送信要求または書き込み要求で送信できるインライン データの最大量(バイト単位)。 | ||||||||||||||||
| MaxInboundReadLimit | DWORD | 4 | +56 | +44 | 各 QP における進行中の着信読み取り操作の最大数。 | ||||||||||||||||
| MaxOutboundReadLimit | DWORD | 4 | +60 | +48 | 各 QP における進行中の発信読み取り操作の最大数。 | ||||||||||||||||
| MaxReceiveQueueDepth | DWORD | 4 | +64 | +52 | 各受信キューにおける未処理要求の最大数。 | ||||||||||||||||
| MaxInitiatorQueueDepth | DWORD | 4 | +68 | +56 | 各イニシエーター キューにおける未処理要求の最大数。 | ||||||||||||||||
| MaxSrqDepth | DWORD | 4 | +72 | +60 | 各共有受信キュー(SRQ)における未処理要求の最大数。値が 0 の場合は SRQ がサポートされていないことを意味します。 | ||||||||||||||||
| MaxCqDepth | DWORD | 4 | +76 | +64 | 各完了キュー(CQ)における完了エントリの最大数。 | ||||||||||||||||
| LargeRequestThreshold | DWORD | 4 | +80 | +68 | このサイズを超えると読み取りおよび書き込み操作が送信および受信操作よりも良好な結果をもたらす、というデータ サイズのヒント(バイト単位)。 | ||||||||||||||||
| MaxCallerData | DWORD | 4 | +84 | +72 | 接続要求と共に送信できるプライベート データの最大サイズ(バイト単位)。 | ||||||||||||||||
| MaxCalleeData | DWORD | 4 | +88 | +76 | 受け入れ要求または拒否要求と共に送信できるプライベート データの最大サイズ(バイト単位)。 | ||||||||||||||||
| AdapterFlags | DWORD | 4 | +92 | +80 | アダプターのプロパティを決定するフラグのセットです。現在定義されているフラグは次のとおりです。
| ||||||||||||||||
| RdmaTechnology | NDK_RDMA_TECHNOLOGY | 4 | +96 | +84 | アダプタが採用するRDMA技術(iWARP/RoCE等)の種別。 |
公式ドキュメント
NDK_ADAPTER_INFO 構造体は、NDK アダプターの制限と機能に関する情報を指定します。
解説(Remarks)
NDK_FN_QUERY_ADAPTER_INFO 関数は、アダプターのさまざまな制限と機能に関する情報を含む NDK_ADAPTER_INFO を取得します。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// NDK_VERSION (x64 4 / x86 4 バイト)
typedef struct NDK_VERSION {
WORD Major;
WORD Minor;
} NDK_VERSION;
// NDK_ADAPTER_INFO (x64 104 / x86 88 バイト)
typedef struct NDK_ADAPTER_INFO {
NDK_VERSION Version;
DWORD VendorId;
DWORD DeviceId;
UINT_PTR MaxRegistrationSize;
UINT_PTR MaxWindowSize;
DWORD FRMRPageCount;
DWORD MaxInitiatorRequestSge;
DWORD MaxReceiveRequestSge;
DWORD MaxReadRequestSge;
DWORD MaxTransferLength;
DWORD MaxInlineDataSize;
DWORD MaxInboundReadLimit;
DWORD MaxOutboundReadLimit;
DWORD MaxReceiveQueueDepth;
DWORD MaxInitiatorQueueDepth;
DWORD MaxSrqDepth;
DWORD MaxCqDepth;
DWORD LargeRequestThreshold;
DWORD MaxCallerData;
DWORD MaxCalleeData;
DWORD AdapterFlags;
NDK_RDMA_TECHNOLOGY RdmaTechnology;
} NDK_ADAPTER_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDK_VERSION
{
public ushort Major;
public ushort Minor;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDK_ADAPTER_INFO
{
public NDK_VERSION Version;
public uint VendorId;
public uint DeviceId;
public UIntPtr MaxRegistrationSize;
public UIntPtr MaxWindowSize;
public uint FRMRPageCount;
public uint MaxInitiatorRequestSge;
public uint MaxReceiveRequestSge;
public uint MaxReadRequestSge;
public uint MaxTransferLength;
public uint MaxInlineDataSize;
public uint MaxInboundReadLimit;
public uint MaxOutboundReadLimit;
public uint MaxReceiveQueueDepth;
public uint MaxInitiatorQueueDepth;
public uint MaxSrqDepth;
public uint MaxCqDepth;
public uint LargeRequestThreshold;
public uint MaxCallerData;
public uint MaxCalleeData;
public uint AdapterFlags;
public int RdmaTechnology;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDK_VERSION
Public Major As UShort
Public Minor As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDK_ADAPTER_INFO
Public Version As NDK_VERSION
Public VendorId As UInteger
Public DeviceId As UInteger
Public MaxRegistrationSize As UIntPtr
Public MaxWindowSize As UIntPtr
Public FRMRPageCount As UInteger
Public MaxInitiatorRequestSge As UInteger
Public MaxReceiveRequestSge As UInteger
Public MaxReadRequestSge As UInteger
Public MaxTransferLength As UInteger
Public MaxInlineDataSize As UInteger
Public MaxInboundReadLimit As UInteger
Public MaxOutboundReadLimit As UInteger
Public MaxReceiveQueueDepth As UInteger
Public MaxInitiatorQueueDepth As UInteger
Public MaxSrqDepth As UInteger
Public MaxCqDepth As UInteger
Public LargeRequestThreshold As UInteger
Public MaxCallerData As UInteger
Public MaxCalleeData As UInteger
Public AdapterFlags As UInteger
Public RdmaTechnology As Integer
End Structureimport ctypes
from ctypes import wintypes
class NDK_VERSION(ctypes.Structure):
_fields_ = [
("Major", ctypes.c_ushort),
("Minor", ctypes.c_ushort),
]
class NDK_ADAPTER_INFO(ctypes.Structure):
_fields_ = [
("Version", NDK_VERSION),
("VendorId", wintypes.DWORD),
("DeviceId", wintypes.DWORD),
("MaxRegistrationSize", ctypes.c_size_t),
("MaxWindowSize", ctypes.c_size_t),
("FRMRPageCount", wintypes.DWORD),
("MaxInitiatorRequestSge", wintypes.DWORD),
("MaxReceiveRequestSge", wintypes.DWORD),
("MaxReadRequestSge", wintypes.DWORD),
("MaxTransferLength", wintypes.DWORD),
("MaxInlineDataSize", wintypes.DWORD),
("MaxInboundReadLimit", wintypes.DWORD),
("MaxOutboundReadLimit", wintypes.DWORD),
("MaxReceiveQueueDepth", wintypes.DWORD),
("MaxInitiatorQueueDepth", wintypes.DWORD),
("MaxSrqDepth", wintypes.DWORD),
("MaxCqDepth", wintypes.DWORD),
("LargeRequestThreshold", wintypes.DWORD),
("MaxCallerData", wintypes.DWORD),
("MaxCalleeData", wintypes.DWORD),
("AdapterFlags", wintypes.DWORD),
("RdmaTechnology", ctypes.c_int),
]#[repr(C)]
pub struct NDK_VERSION {
pub Major: u16,
pub Minor: u16,
}
#[repr(C)]
pub struct NDK_ADAPTER_INFO {
pub Version: NDK_VERSION,
pub VendorId: u32,
pub DeviceId: u32,
pub MaxRegistrationSize: usize,
pub MaxWindowSize: usize,
pub FRMRPageCount: u32,
pub MaxInitiatorRequestSge: u32,
pub MaxReceiveRequestSge: u32,
pub MaxReadRequestSge: u32,
pub MaxTransferLength: u32,
pub MaxInlineDataSize: u32,
pub MaxInboundReadLimit: u32,
pub MaxOutboundReadLimit: u32,
pub MaxReceiveQueueDepth: u32,
pub MaxInitiatorQueueDepth: u32,
pub MaxSrqDepth: u32,
pub MaxCqDepth: u32,
pub LargeRequestThreshold: u32,
pub MaxCallerData: u32,
pub MaxCalleeData: u32,
pub AdapterFlags: u32,
pub RdmaTechnology: i32,
}import "golang.org/x/sys/windows"
type NDK_VERSION struct {
Major uint16
Minor uint16
}
type NDK_ADAPTER_INFO struct {
Version NDK_VERSION
VendorId uint32
DeviceId uint32
MaxRegistrationSize uintptr
MaxWindowSize uintptr
FRMRPageCount uint32
MaxInitiatorRequestSge uint32
MaxReceiveRequestSge uint32
MaxReadRequestSge uint32
MaxTransferLength uint32
MaxInlineDataSize uint32
MaxInboundReadLimit uint32
MaxOutboundReadLimit uint32
MaxReceiveQueueDepth uint32
MaxInitiatorQueueDepth uint32
MaxSrqDepth uint32
MaxCqDepth uint32
LargeRequestThreshold uint32
MaxCallerData uint32
MaxCalleeData uint32
AdapterFlags uint32
RdmaTechnology int32
}type
NDK_VERSION = record
Major: Word;
Minor: Word;
end;
NDK_ADAPTER_INFO = record
Version: NDK_VERSION;
VendorId: DWORD;
DeviceId: DWORD;
MaxRegistrationSize: NativeUInt;
MaxWindowSize: NativeUInt;
FRMRPageCount: DWORD;
MaxInitiatorRequestSge: DWORD;
MaxReceiveRequestSge: DWORD;
MaxReadRequestSge: DWORD;
MaxTransferLength: DWORD;
MaxInlineDataSize: DWORD;
MaxInboundReadLimit: DWORD;
MaxOutboundReadLimit: DWORD;
MaxReceiveQueueDepth: DWORD;
MaxInitiatorQueueDepth: DWORD;
MaxSrqDepth: DWORD;
MaxCqDepth: DWORD;
LargeRequestThreshold: DWORD;
MaxCallerData: DWORD;
MaxCalleeData: DWORD;
AdapterFlags: DWORD;
RdmaTechnology: Integer;
end;const NDK_VERSION = extern struct {
Major: u16,
Minor: u16,
};
const NDK_ADAPTER_INFO = extern struct {
Version: NDK_VERSION,
VendorId: u32,
DeviceId: u32,
MaxRegistrationSize: usize,
MaxWindowSize: usize,
FRMRPageCount: u32,
MaxInitiatorRequestSge: u32,
MaxReceiveRequestSge: u32,
MaxReadRequestSge: u32,
MaxTransferLength: u32,
MaxInlineDataSize: u32,
MaxInboundReadLimit: u32,
MaxOutboundReadLimit: u32,
MaxReceiveQueueDepth: u32,
MaxInitiatorQueueDepth: u32,
MaxSrqDepth: u32,
MaxCqDepth: u32,
LargeRequestThreshold: u32,
MaxCallerData: u32,
MaxCalleeData: u32,
AdapterFlags: u32,
RdmaTechnology: i32,
};type
NDK_VERSION {.bycopy.} = object
Major: uint16
Minor: uint16
NDK_ADAPTER_INFO {.bycopy.} = object
Version: NDK_VERSION
VendorId: uint32
DeviceId: uint32
MaxRegistrationSize: uint
MaxWindowSize: uint
FRMRPageCount: uint32
MaxInitiatorRequestSge: uint32
MaxReceiveRequestSge: uint32
MaxReadRequestSge: uint32
MaxTransferLength: uint32
MaxInlineDataSize: uint32
MaxInboundReadLimit: uint32
MaxOutboundReadLimit: uint32
MaxReceiveQueueDepth: uint32
MaxInitiatorQueueDepth: uint32
MaxSrqDepth: uint32
MaxCqDepth: uint32
LargeRequestThreshold: uint32
MaxCallerData: uint32
MaxCalleeData: uint32
AdapterFlags: uint32
RdmaTechnology: int32struct NDK_VERSION
{
ushort Major;
ushort Minor;
}
struct NDK_ADAPTER_INFO
{
NDK_VERSION Version;
uint VendorId;
uint DeviceId;
size_t MaxRegistrationSize;
size_t MaxWindowSize;
uint FRMRPageCount;
uint MaxInitiatorRequestSge;
uint MaxReceiveRequestSge;
uint MaxReadRequestSge;
uint MaxTransferLength;
uint MaxInlineDataSize;
uint MaxInboundReadLimit;
uint MaxOutboundReadLimit;
uint MaxReceiveQueueDepth;
uint MaxInitiatorQueueDepth;
uint MaxSrqDepth;
uint MaxCqDepth;
uint LargeRequestThreshold;
uint MaxCallerData;
uint MaxCalleeData;
uint AdapterFlags;
int RdmaTechnology;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NDK_ADAPTER_INFO サイズ: 88 バイト(x86)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; Version : NDK_VERSION (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; VendorId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DeviceId : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MaxRegistrationSize : UINT_PTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; MaxWindowSize : UINT_PTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; FRMRPageCount : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; MaxInitiatorRequestSge : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; MaxReceiveRequestSge : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; MaxReadRequestSge : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; MaxTransferLength : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; MaxInlineDataSize : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; MaxInboundReadLimit : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; MaxOutboundReadLimit : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; MaxReceiveQueueDepth : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; MaxInitiatorQueueDepth : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; MaxSrqDepth : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; MaxCqDepth : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; LargeRequestThreshold : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; MaxCallerData : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; MaxCalleeData : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; AdapterFlags : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; RdmaTechnology : NDK_RDMA_TECHNOLOGY (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NDK_ADAPTER_INFO サイズ: 104 バイト(x64)
dim st, 26 ; 4byte整数×26(構造体サイズ 104 / 4 切り上げ)
; Version : NDK_VERSION (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; VendorId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DeviceId : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MaxRegistrationSize : UINT_PTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; MaxWindowSize : UINT_PTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; FRMRPageCount : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; MaxInitiatorRequestSge : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; MaxReceiveRequestSge : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; MaxReadRequestSge : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; MaxTransferLength : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; MaxInlineDataSize : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; MaxInboundReadLimit : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; MaxOutboundReadLimit : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; MaxReceiveQueueDepth : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; MaxInitiatorQueueDepth : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; MaxSrqDepth : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; MaxCqDepth : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; LargeRequestThreshold : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; MaxCallerData : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; MaxCalleeData : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; AdapterFlags : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; RdmaTechnology : NDK_RDMA_TECHNOLOGY (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NDK_VERSION
#field short Major
#field short Minor
#endstruct
#defstruct global NDK_ADAPTER_INFO
#field NDK_VERSION Version
#field int VendorId
#field int DeviceId
#field intptr MaxRegistrationSize
#field intptr MaxWindowSize
#field int FRMRPageCount
#field int MaxInitiatorRequestSge
#field int MaxReceiveRequestSge
#field int MaxReadRequestSge
#field int MaxTransferLength
#field int MaxInlineDataSize
#field int MaxInboundReadLimit
#field int MaxOutboundReadLimit
#field int MaxReceiveQueueDepth
#field int MaxInitiatorQueueDepth
#field int MaxSrqDepth
#field int MaxCqDepth
#field int LargeRequestThreshold
#field int MaxCallerData
#field int MaxCalleeData
#field int AdapterFlags
#field int RdmaTechnology
#endstruct
stdim st, NDK_ADAPTER_INFO ; NSTRUCT 変数を確保
st->VendorId = 100
mes "VendorId=" + st->VendorId