ホーム › NetworkManagement.Ndis › NDK_ADAPTER_INFO
NDK_ADAPTER_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | NDK_VERSION | 4 | +0 | +0 | NDKアダプタ情報のバージョン。 |
| VendorId | DWORD | 4 | +4 | +4 | アダプタのベンダーID。 |
| DeviceId | DWORD | 4 | +8 | +8 | アダプタのデバイスID。 |
| MaxRegistrationSize | UINT_PTR | 8/4 | +16 | +12 | メモリ登録あたりの最大サイズ(バイト)。 |
| MaxWindowSize | UINT_PTR | 8/4 | +24 | +16 | ウィンドウあたりの最大サイズ(バイト)。 |
| FRMRPageCount | DWORD | 4 | +32 | +20 | 高速メモリ登録(FRMR)で扱える最大ページ数。 |
| MaxInitiatorRequestSge | DWORD | 4 | +36 | +24 | イニシエータ要求あたりの最大SGE数。 |
| MaxReceiveRequestSge | DWORD | 4 | +40 | +28 | 受信要求あたりの最大SGE数。 |
| MaxReadRequestSge | DWORD | 4 | +44 | +32 | リード要求あたりの最大SGE数。 |
| MaxTransferLength | DWORD | 4 | +48 | +36 | 1要求で転送可能な最大長(バイト)。 |
| MaxInlineDataSize | DWORD | 4 | +52 | +40 | インライン送信可能なデータの最大サイズ(バイト)。 |
| MaxInboundReadLimit | DWORD | 4 | +56 | +44 | 受信方向の未処理RDMAリードの最大数。 |
| MaxOutboundReadLimit | DWORD | 4 | +60 | +48 | 送信方向の未処理RDMAリードの最大数。 |
| MaxReceiveQueueDepth | DWORD | 4 | +64 | +52 | 受信キューの最大深さ。 |
| MaxInitiatorQueueDepth | DWORD | 4 | +68 | +56 | イニシエータキューの最大深さ。 |
| MaxSrqDepth | DWORD | 4 | +72 | +60 | 共有受信キュー(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等)の種別。 |
各言語での定義
#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