[ofw] [PATCH 1/12] nd2: update provider APIs to match latest spec
Hefty, Sean
sean.hefty at intel.com
Tue Jul 27 00:57:47 PDT 2010
This updates the implementation to match the latest ndspi.h header file.
Changes include:
- Functions that return an interface take a REFIID as input and return
VOID** rather than IND**
- Functions that take an interface as input use IUnknown* rather than IND*
- SGE became Sge
- A few acronyms are now spelled out.
- A couple new functions were defined, and parameters added in a couple places.
No significant functionality is added.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
trunk/ulp/netdirect2/user/nd_adapter.cpp | 92 ++++++++++++++++++++---------
trunk/ulp/netdirect2/user/nd_adapter.h | 40 ++++++-------
trunk/ulp/netdirect2/user/nd_connect.cpp | 8 +--
trunk/ulp/netdirect2/user/nd_connect.h | 10 ++-
trunk/ulp/netdirect2/user/nd_cq.cpp | 6 ++
trunk/ulp/netdirect2/user/nd_cq.h | 3 +
trunk/ulp/netdirect2/user/nd_ep.h | 2 -
trunk/ulp/netdirect2/user/nd_listen.cpp | 2 -
trunk/ulp/netdirect2/user/nd_listen.h | 4 +
trunk/ulp/netdirect2/user/nd_mw.cpp | 12 ++++
trunk/ulp/netdirect2/user/nd_mw.h | 8 ++-
trunk/ulp/netdirect2/user/nd_provider.cpp | 6 ++
trunk/ulp/netdirect2/user/nd_provider.h | 2 -
trunk/ulp/netdirect2/user/nd_qp.cpp | 6 +-
trunk/ulp/netdirect2/user/nd_qp.h | 10 ++-
trunk/ulp/netdirect2/user/nd_srq.cpp | 9 ++-
trunk/ulp/netdirect2/user/nd_srq.h | 9 ++-
17 files changed, 147 insertions(+), 82 deletions(-)
diff --git a/trunk/ulp/netdirect2/user/nd_adapter.cpp b/trunk/ulp/netdirect2/user/nd_adapter.cpp
index 475c1e6..34e9fc7 100644
--- a/trunk/ulp/netdirect2/user/nd_adapter.cpp
+++ b/trunk/ulp/netdirect2/user/nd_adapter.cpp
@@ -135,16 +135,16 @@ Query(ND_ADAPTER_INFO* pInfo, SIZE_T* pcbInfo)
pInfo->AdapterId = m_DeviceGuid;
pInfo->MaxRegistrationSize = attr.MaxMrSize;
pInfo->MaxWindowSize = attr.MaxMrSize;
- pInfo->MaxReceiveSGE = (DWORD) attr.MaxSge;
- pInfo->MaxInitiatorSGE = (DWORD) attr.MaxSge;
- pInfo->MaxReadSGE = (DWORD) attr.MaxSge;
+ pInfo->MaxReceiveSge = (DWORD) attr.MaxSge;
+ pInfo->MaxInitiatorSge = (DWORD) attr.MaxSge;
+ pInfo->MaxReadSge = (DWORD) attr.MaxSge;
pInfo->MaxTransferLength = 1 << 31;
pInfo->MaxInboundReadLimit = (DWORD) attr.MaxQpResponderResources;
pInfo->MaxOutboundReadLimit = (DWORD) attr.MaxQpInitiatorDepth;
- pInfo->MaxRQDepth = (DWORD) attr.MaxQpWr;
- pInfo->MaxIQDepth = (DWORD) attr.MaxQpWr;
- pInfo->MaxSRQDepth = (DWORD) attr.MaxSrqWr;
- pInfo->MaxCQDepth = (DWORD) attr.MaxCqEntries;
+ pInfo->MaxReceiveQueueDepth = (DWORD) attr.MaxQpWr;
+ pInfo->MaxInitiatorQueueDepth = (DWORD) attr.MaxQpWr;
+ pInfo->MaxSharedReceiveQueueDepth = (DWORD) attr.MaxSrqWr;
+ pInfo->MaxCompletionQueueDepth = (DWORD) attr.MaxCqEntries;
pInfo->InlineRequestThreshold = m_MaxInlineSend;
pInfo->LargeRequestThreshold = 0;
pInfo->MaxCallerData = ND_PRIVATE_DATA_SIZE;
@@ -167,80 +167,112 @@ QueryAddressList(SOCKET_ADDRESS_LIST* pAddressList, SIZE_T* pcbAddressList)
}
STDMETHODIMP CNDAdapter::
-CreateCompletionQueue(DWORD queueDepth, GROUP_AFFINITY* pAffinity,
- INDCompletionQueue** ppCompletionQueue)
+CreateCompletionQueue(REFIID iid, DWORD queueDepth, USHORT group, KAFFINITY affinity,
+ VOID** ppCompletionQueue)
{
return CNDCompletionQueue::CreateInstance(this, queueDepth, ppCompletionQueue);
}
STDMETHODIMP CNDAdapter::
-CreateMemoryRegion(INDMemoryRegion** ppMemoryRegion)
+CreateMemoryRegion(REFIID iid, VOID** ppMemoryRegion)
{
+ if (iid != IID_INDMemoryRegion) {
+ return E_NOINTERFACE;
+ }
+
return CNDMemoryRegion::CreateInstance(this, ppMemoryRegion);
}
STDMETHODIMP CNDAdapter::
-CreateMemoryWindow(INDMemoryWindow** ppMemoryWindow)
+CreateMemoryWindow(REFIID iid, VOID** ppMemoryWindow)
{
+ if (iid != IID_INDMemoryWindow) {
+ return E_NOINTERFACE;
+ }
+
return CNDMemoryWindow::CreateInstance(this, ppMemoryWindow);
}
STDMETHODIMP CNDAdapter::
-CreateSharedReceiveQueue(DWORD queueDepth, DWORD maxSGE,
- DWORD notifyThreshold, GROUP_AFFINITY* pAffinity,
- INDSharedReceiveQueue** ppSharedReceiveQueue)
+CreateSharedReceiveQueue(REFIID iid, DWORD queueDepth, DWORD maxSge,
+ DWORD notifyThreshold, USHORT group,
+ KAFFINITY affinity, VOID** ppSharedReceiveQueue)
{
- return CNDSharedReceiveQueue::CreateInstance(this, queueDepth, maxSGE,
- notifyThreshold, pAffinity,
+ if (iid != IID_INDSharedReceiveQueue) {
+ return E_NOINTERFACE;
+ }
+
+ return CNDSharedReceiveQueue::CreateInstance(this, queueDepth, maxSge,
+ notifyThreshold, affinity,
ppSharedReceiveQueue);
}
STDMETHODIMP CNDAdapter::
-CreateQueuePair(INDCompletionQueue* pReceiveCompletionQueue,
- INDCompletionQueue* pInitiatorCompletionQueue, VOID* context,
+CreateQueuePair(REFIID iid, IUnknown* pReceiveCompletionQueue,
+ IUnknown* pInitiatorCompletionQueue, VOID* context,
DWORD receiveQueueDepth, DWORD initiatorQueueDepth,
- DWORD maxReceiveRequestSGE, DWORD maxInitiatorRequestSGE,
- INDQueuePair** ppQueuePair)
+ DWORD maxReceiveRequestSge, DWORD maxInitiatorRequestSge,
+ VOID** ppQueuePair)
{
CNDCompletionQueue *rcq = (CNDCompletionQueue *) pReceiveCompletionQueue;
CNDCompletionQueue *icq = (CNDCompletionQueue *) pInitiatorCompletionQueue;
+ if (iid != IID_INDQueuePair) {
+ return E_NOINTERFACE;
+ }
+
return CNDQueuePair::CreateInstance(this, rcq, icq, NULL,
context, receiveQueueDepth, initiatorQueueDepth,
- maxReceiveRequestSGE, maxInitiatorRequestSGE,
+ maxReceiveRequestSge, maxInitiatorRequestSge,
ppQueuePair);
}
STDMETHODIMP CNDAdapter::
-CreateQueuePairWithSRQ(INDCompletionQueue* pReceiveCompletionQueue,
- INDCompletionQueue* pInitiatorCompletionQueue,
- INDSharedReceiveQueue* pSharedReceiveQueue, VOID* context,
- DWORD initiatorQueueDepth, DWORD maxInitiatorRequestSGE,
- INDQueuePair** ppQueuePair)
+CreateQueuePairWithSrq(REFIID iid, IUnknown* pReceiveCompletionQueue,
+ IUnknown* pInitiatorCompletionQueue,
+ IUnknown* pSharedReceiveQueue, VOID* context,
+ DWORD initiatorQueueDepth, DWORD maxInitiatorRequestSge,
+ VOID** ppQueuePair)
{
CNDCompletionQueue *rcq = (CNDCompletionQueue *) pReceiveCompletionQueue;
CNDCompletionQueue *icq = (CNDCompletionQueue *) pInitiatorCompletionQueue;
CNDSharedReceiveQueue *srq = (CNDSharedReceiveQueue *) pSharedReceiveQueue;
+ if (iid != IID_INDQueuePair) {
+ return E_NOINTERFACE;
+ }
+
return CNDQueuePair::CreateInstance(this, rcq, icq, srq,
context, 0, initiatorQueueDepth, 0,
- maxInitiatorRequestSGE, ppQueuePair);
+ maxInitiatorRequestSge, ppQueuePair);
}
STDMETHODIMP CNDAdapter::
-CreateSharedEndpoint(INDSharedEndpoint** ppSharedEndpoint)
+CreateSharedEndpoint(REFIID iid, VOID** ppSharedEndpoint)
{
+ if (iid != IID_INDSharedEndpoint) {
+ return E_NOINTERFACE;
+ }
+
return CNDSharedEndpoint::CreateInstance(this, ppSharedEndpoint);
}
STDMETHODIMP CNDAdapter::
-CreateConnector(INDConnector** ppConnector)
+CreateConnector(REFIID iid, VOID** ppConnector)
{
+ if (iid != IID_INDConnector) {
+ return E_NOINTERFACE;
+ }
+
return CNDConnector::CreateInstance(this, ppConnector);
}
STDMETHODIMP CNDAdapter::
-CreateListen(INDListen** ppListen)
+CreateListen(REFIID iid, VOID** ppListen)
{
+ if (iid != IID_INDListen) {
+ return E_NOINTERFACE;
+ }
+
return CNDListen::CreateInstance(this, ppListen);
}
diff --git a/trunk/ulp/netdirect2/user/nd_adapter.h b/trunk/ulp/netdirect2/user/nd_adapter.h
index 9821570..941f80a 100644
--- a/trunk/ulp/netdirect2/user/nd_adapter.h
+++ b/trunk/ulp/netdirect2/user/nd_adapter.h
@@ -49,32 +49,32 @@ public:
STDMETHODIMP_(HANDLE) GetFileHandle();
STDMETHODIMP Query(ND_ADAPTER_INFO* pInfo, SIZE_T* pcbInfo);
STDMETHODIMP QueryAddressList(SOCKET_ADDRESS_LIST* pAddressList, SIZE_T* pcbAddressList);
- STDMETHODIMP CreateCompletionQueue(DWORD queueDepth, GROUP_AFFINITY* pAffinity,
- INDCompletionQueue** ppCompletionQueue);
- STDMETHODIMP CreateMemoryRegion(INDMemoryRegion** ppMemoryRegion);
- STDMETHODIMP CreateMemoryWindow(INDMemoryWindow** ppMemoryWindow);
- STDMETHODIMP CreateSharedReceiveQueue(DWORD queueDepth, DWORD maxSGE,
- DWORD notifyThreshold, GROUP_AFFINITY* pAffinity,
- INDSharedReceiveQueue** ppSharedReceiveQueue);
- STDMETHODIMP CreateQueuePair(INDCompletionQueue* pReceiveCompletionQueue,
- INDCompletionQueue* pInitiatorCompletionQueue, VOID* context,
+ STDMETHODIMP CreateCompletionQueue(REFIID iid, DWORD queueDepth, USHORT group,
+ KAFFINITY affinity, VOID** ppCompletionQueue);
+ STDMETHODIMP CreateMemoryRegion(REFIID iid, VOID** ppMemoryRegion);
+ STDMETHODIMP CreateMemoryWindow(REFIID iid, VOID** ppMemoryWindow);
+ STDMETHODIMP CreateSharedReceiveQueue(REFIID iid, DWORD queueDepth, DWORD maxSge,
+ DWORD notifyThreshold, USHORT group,
+ KAFFINITY affinity, VOID** ppSharedReceiveQueue);
+ STDMETHODIMP CreateQueuePair(REFIID iid, IUnknown* pReceiveCompletionQueue,
+ IUnknown* pInitiatorCompletionQueue, VOID* context,
DWORD receiveQueueDepth, DWORD initiatorQueueDepth,
- DWORD maxReceiveRequestSGE, DWORD maxInitiatorRequestSGE,
- INDQueuePair** ppQueuePair);
- STDMETHODIMP CreateQueuePairWithSRQ(INDCompletionQueue* pReceiveCompletionQueue,
- INDCompletionQueue* pInitiatorCompletionQueue,
- INDSharedReceiveQueue* pSharedReceiveQueue, VOID* context,
- DWORD initiatorQueueDepth, DWORD maxInitiatorRequestSGE,
- INDQueuePair** ppQueuePair);
- STDMETHODIMP CreateSharedEndpoint(INDSharedEndpoint** ppSharedEndpoint);
- STDMETHODIMP CreateConnector(INDConnector** ppConnector);
- STDMETHODIMP CreateListen(INDListen** ppListen);
+ DWORD maxReceiveRequestSge, DWORD maxInitiatorRequestSge,
+ VOID** ppQueuePair);
+ STDMETHODIMP CreateQueuePairWithSrq(REFIID, IUnknown* pReceiveCompletionQueue,
+ IUnknown* pInitiatorCompletionQueue,
+ IUnknown* pSharedReceiveQueue, VOID* context,
+ DWORD initiatorQueueDepth, DWORD maxInitiatorRequestSge,
+ VOID** ppQueuePair);
+ STDMETHODIMP CreateSharedEndpoint(REFIID iid, VOID** ppSharedEndpoint);
+ STDMETHODIMP CreateConnector(REFIID iid, VOID** ppConnector);
+ STDMETHODIMP CreateListen(REFIID iid, VOID** ppListen);
CNDAdapter(CNDProvider *pProvider);
~CNDAdapter();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDProvider *pProvider, UINT64 adapterId, INDAdapter** ppAdapter)
+ CreateInstance(CNDProvider *pProvider, UINT64 adapterId, VOID** ppAdapter)
{
HRESULT hr;
CNDAdapter *adapter;
diff --git a/trunk/ulp/netdirect2/user/nd_connect.cpp b/trunk/ulp/netdirect2/user/nd_connect.cpp
index 579fd11..7d9f71d 100644
--- a/trunk/ulp/netdirect2/user/nd_connect.cpp
+++ b/trunk/ulp/netdirect2/user/nd_connect.cpp
@@ -113,7 +113,7 @@ GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)
}
STDMETHODIMP CNDConnector::
-ConnectQp(INDQueuePair* pQueuePair, BOOL SharedAddress,
+ConnectQp(IUnknown* pQueuePair, BOOL SharedAddress,
const struct sockaddr* pSrcAddress, SIZE_T cbSrcAddress,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
@@ -167,7 +167,7 @@ out:
}
STDMETHODIMP CNDConnector::
-Connect(INDQueuePair* pQueuePair,
+Connect(IUnknown* pQueuePair,
const struct sockaddr* pSrcAddress, SIZE_T cbSrcAddress,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
@@ -179,7 +179,7 @@ Connect(INDQueuePair* pQueuePair,
}
STDMETHODIMP CNDConnector::
-ConnectSharedEndpoint(INDQueuePair* pQueuePair, INDSharedEndpoint* pSharedEndpoint,
+ConnectSharedEndpoint(IUnknown* pQueuePair, IUnknown* pSharedEndpoint,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
const VOID* pPrivateData, DWORD cbPrivateData,
@@ -204,7 +204,7 @@ CompleteConnect(OVERLAPPED* pOverlapped)
}
STDMETHODIMP CNDConnector::
-Accept(INDQueuePair* pQueuePair, DWORD inboundReadLimit, DWORD outboundReadLimit,
+Accept(IUnknown* pQueuePair, DWORD inboundReadLimit, DWORD outboundReadLimit,
const VOID* pPrivateData, DWORD cbPrivateData, OVERLAPPED* pOverlapped)
{
CNDQueuePair *qp = (CNDQueuePair *) pQueuePair;
diff --git a/trunk/ulp/netdirect2/user/nd_connect.h b/trunk/ulp/netdirect2/user/nd_connect.h
index dd1e142..0140430 100644
--- a/trunk/ulp/netdirect2/user/nd_connect.h
+++ b/trunk/ulp/netdirect2/user/nd_connect.h
@@ -54,18 +54,18 @@ public:
STDMETHODIMP GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait);
// INDConnector methods
- STDMETHODIMP Connect(INDQueuePair* pQueuePair,
+ STDMETHODIMP Connect(IUnknown* pQueuePair,
const struct sockaddr* pSrcAddress, SIZE_T cbSrcAddress,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
const VOID* pPrivateData, DWORD cbPrivateData, OVERLAPPED* pOverlapped);
- STDMETHODIMP ConnectSharedEndpoint(INDQueuePair* pQueuePair, INDSharedEndpoint* pSharedEndpoint,
+ STDMETHODIMP ConnectSharedEndpoint(IUnknown* pQueuePair, IUnknown* pSharedEndpoint,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
const VOID* pPrivateData, DWORD cbPrivateData,
OVERLAPPED* pOverlapped);
STDMETHODIMP CompleteConnect(OVERLAPPED* pOverlapped);
- STDMETHODIMP Accept(INDQueuePair* pQueuePair, DWORD inboundReadLimit, DWORD outboundReadLimit,
+ STDMETHODIMP Accept(IUnknown* pQueuePair, DWORD inboundReadLimit, DWORD outboundReadLimit,
const VOID* pPrivateData, DWORD cbPrivateData, OVERLAPPED* pOverlapped);
STDMETHODIMP Reject(const VOID* pPrivateData, DWORD cbPrivateData);
STDMETHODIMP GetConnectionData(DWORD* pInboundReadLimit, DWORD* pOutboundReadLimit,
@@ -79,7 +79,7 @@ public:
~CNDConnector();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, INDConnector** ppConnector)
+ CreateInstance(CNDAdapter *pAdapter, VOID** ppConnector)
{
HRESULT hr;
CNDConnector *conn;
@@ -110,7 +110,7 @@ public:
protected:
STDMETHODIMP Init();
- STDMETHODIMP ConnectQp(INDQueuePair* pQueuePair, BOOL SharedAddress,
+ STDMETHODIMP ConnectQp(IUnknown* pQueuePair, BOOL SharedAddress,
const struct sockaddr* pSrcAddress, SIZE_T cbSrcAddress,
const struct sockaddr* pDestAddress, SIZE_T cbDestAddress,
DWORD inboundReadLimit, DWORD outboundReadLimit,
diff --git a/trunk/ulp/netdirect2/user/nd_cq.cpp b/trunk/ulp/netdirect2/user/nd_cq.cpp
index 9f8fdb6..be4b4bd 100644
--- a/trunk/ulp/netdirect2/user/nd_cq.cpp
+++ b/trunk/ulp/netdirect2/user/nd_cq.cpp
@@ -98,6 +98,12 @@ GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)
}
STDMETHODIMP CNDCompletionQueue::
+GetNotifyAffinity(USHORT* pGroup, KAFFINITY* pAffinity)
+{
+ return ND_NOT_SUPPORTED;
+}
+
+STDMETHODIMP CNDCompletionQueue::
Resize(DWORD queueDepth)
{
HRESULT hr;
diff --git a/trunk/ulp/netdirect2/user/nd_cq.h b/trunk/ulp/netdirect2/user/nd_cq.h
index 1f6af0e..fdadd98 100644
--- a/trunk/ulp/netdirect2/user/nd_cq.h
+++ b/trunk/ulp/netdirect2/user/nd_cq.h
@@ -50,6 +50,7 @@ public:
STDMETHODIMP GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait);
// INDCompletionQueue methods
+ STDMETHODIMP GetNotifyAffinity(USHORT* pGroup, KAFFINITY* pAffinity);
STDMETHODIMP Resize(DWORD queueDepth);
STDMETHODIMP Notify(DWORD type, OVERLAPPED* pOverlapped);
STDMETHODIMP_(DWORD) GetResults(ND_RESULT results[], DWORD nResults);
@@ -58,7 +59,7 @@ public:
~CNDCompletionQueue();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, DWORD queueDepth, INDCompletionQueue** ppCq)
+ CreateInstance(CNDAdapter *pAdapter, DWORD queueDepth, VOID** ppCq)
{
HRESULT hr;
CNDCompletionQueue *cq;
diff --git a/trunk/ulp/netdirect2/user/nd_ep.h b/trunk/ulp/netdirect2/user/nd_ep.h
index e33df94..81ec189 100644
--- a/trunk/ulp/netdirect2/user/nd_ep.h
+++ b/trunk/ulp/netdirect2/user/nd_ep.h
@@ -54,7 +54,7 @@ public:
~CNDSharedEndpoint();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, INDSharedEndpoint** ppSharedEndpoint)
+ CreateInstance(CNDAdapter *pAdapter, VOID** ppSharedEndpoint)
{
HRESULT hr;
CNDSharedEndpoint *ep;
diff --git a/trunk/ulp/netdirect2/user/nd_listen.cpp b/trunk/ulp/netdirect2/user/nd_listen.cpp
index 80d1725..ee22540 100644
--- a/trunk/ulp/netdirect2/user/nd_listen.cpp
+++ b/trunk/ulp/netdirect2/user/nd_listen.cpp
@@ -144,7 +144,7 @@ GetLocalAddress(struct sockaddr* pAddress, SIZE_T* pcbAddress)
}
STDMETHODIMP CNDListen::
-GetConnectionRequest(INDConnector* pConnector, OVERLAPPED* pOverlapped)
+GetConnectionRequest(IUnknown* pConnector, OVERLAPPED* pOverlapped)
{
CNDConnector *conn = (CNDConnector *) pConnector;
HRESULT hr;
diff --git a/trunk/ulp/netdirect2/user/nd_listen.h b/trunk/ulp/netdirect2/user/nd_listen.h
index d077a3e..08f2d01 100644
--- a/trunk/ulp/netdirect2/user/nd_listen.h
+++ b/trunk/ulp/netdirect2/user/nd_listen.h
@@ -52,13 +52,13 @@ public:
// INDListen methods
STDMETHODIMP Listen(const struct sockaddr* pAddress, SIZE_T cbAddress, SIZE_T backlog);
STDMETHODIMP GetLocalAddress(struct sockaddr* pAddress, SIZE_T* pcbAddress);
- STDMETHODIMP GetConnectionRequest(INDConnector* pConnector, OVERLAPPED* pOverlapped);
+ STDMETHODIMP GetConnectionRequest(IUnknown* pConnector, OVERLAPPED* pOverlapped);
CNDListen(CNDAdapter *pAdapter);
~CNDListen();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, INDListen** ppListen)
+ CreateInstance(CNDAdapter *pAdapter, VOID** ppListen)
{
HRESULT hr;
CNDListen *listener;
diff --git a/trunk/ulp/netdirect2/user/nd_mw.cpp b/trunk/ulp/netdirect2/user/nd_mw.cpp
index be5446d..89ed1a7 100644
--- a/trunk/ulp/netdirect2/user/nd_mw.cpp
+++ b/trunk/ulp/netdirect2/user/nd_mw.cpp
@@ -67,6 +67,18 @@ Release(void)
return CNDBase::Release();
}
+STDMETHODIMP CNDMemoryRegion::
+CancelOverlappedRequests(void)
+{
+ return ND_NOT_SUPPORTED;
+}
+
+STDMETHODIMP CNDMemoryRegion::
+GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)
+{
+ return ND_NOT_SUPPORTED;
+}
+
DWORD ConvertAccessFlags(DWORD Flags)
{
DWORD opts = 0;
diff --git a/trunk/ulp/netdirect2/user/nd_mw.h b/trunk/ulp/netdirect2/user/nd_mw.h
index 8409a0e..f4b9fb3 100644
--- a/trunk/ulp/netdirect2/user/nd_mw.h
+++ b/trunk/ulp/netdirect2/user/nd_mw.h
@@ -45,6 +45,10 @@ public:
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
+ // INDOverlapped methods
+ STDMETHODIMP CancelOverlappedRequests();
+ STDMETHODIMP GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait);
+
// INDMemoryRegion methods
STDMETHODIMP Register(const VOID* pBuffer, SIZE_T cbBuffer, DWORD flags,
OVERLAPPED* pOverlapped);
@@ -56,7 +60,7 @@ public:
~CNDMemoryRegion();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, INDMemoryRegion** ppMemoryRegion)
+ CreateInstance(CNDAdapter *pAdapter, VOID** ppMemoryRegion)
{
HRESULT hr;
CNDMemoryRegion *mr;
@@ -97,7 +101,7 @@ public:
~CNDMemoryWindow();
void Delete() {delete this;}
static STDMETHODIMP
- CreateInstance(CNDAdapter *pAdapter, INDMemoryWindow** ppMemoryWindow)
+ CreateInstance(CNDAdapter *pAdapter, VOID** ppMemoryWindow)
{
HRESULT hr;
CNDMemoryWindow *mw;
diff --git a/trunk/ulp/netdirect2/user/nd_provider.cpp b/trunk/ulp/netdirect2/user/nd_provider.cpp
index 92835fd..968193d 100644
--- a/trunk/ulp/netdirect2/user/nd_provider.cpp
+++ b/trunk/ulp/netdirect2/user/nd_provider.cpp
@@ -148,8 +148,12 @@ ResolveAddress(const struct sockaddr* pAddress, SIZE_T cbAddress, UINT64* pAdapt
}
STDMETHODIMP CNDProvider::
-OpenAdapter(UINT64 adapterId, INDAdapter** ppAdapter)
+OpenAdapter(REFIID iid, UINT64 adapterId, VOID** ppAdapter)
{
+ if (iid != IID_INDAdapter) {
+ return E_NOINTERFACE;
+ }
+
return CNDAdapter::CreateInstance(this, adapterId, ppAdapter);
}
diff --git a/trunk/ulp/netdirect2/user/nd_provider.h b/trunk/ulp/netdirect2/user/nd_provider.h
index 15a74f6..b0e3709 100644
--- a/trunk/ulp/netdirect2/user/nd_provider.h
+++ b/trunk/ulp/netdirect2/user/nd_provider.h
@@ -49,7 +49,7 @@ public:
SIZE_T* pcbAddressList);
STDMETHODIMP ResolveAddress(const struct sockaddr* pAddress,
SIZE_T cbAddress, UINT64* pAdapterId);
- STDMETHODIMP OpenAdapter(UINT64 adapterId, INDAdapter** ppAdapter);
+ STDMETHODIMP OpenAdapter(REFIID iid, UINT64 adapterId, VOID** ppAdapter);
CNDProvider();
~CNDProvider();
diff --git a/trunk/ulp/netdirect2/user/nd_qp.cpp b/trunk/ulp/netdirect2/user/nd_qp.cpp
index 6473540..746482f 100644
--- a/trunk/ulp/netdirect2/user/nd_qp.cpp
+++ b/trunk/ulp/netdirect2/user/nd_qp.cpp
@@ -192,8 +192,8 @@ Receive(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE)
}
STDMETHODIMP CNDQueuePair::
-Bind(VOID* requestContext, INDMemoryRegion* pMemoryRegion,
- INDMemoryWindow* pMemoryWindow, const VOID* pBuffer, SIZE_T cbBuffer,
+Bind(VOID* requestContext, IUnknown* pMemoryRegion,
+ IUnknown* pMemoryWindow, const VOID* pBuffer, SIZE_T cbBuffer,
DWORD flags)
{
CNDMemoryRegion *mr = (CNDMemoryRegion *) pMemoryRegion;
@@ -211,7 +211,7 @@ Bind(VOID* requestContext, INDMemoryRegion* pMemoryRegion,
}
STDMETHODIMP CNDQueuePair::
-Invalidate(VOID* requestContext, INDMemoryWindow* pMemoryWindow, DWORD flags)
+Invalidate(VOID* requestContext, IUnknown* pMemoryWindow, DWORD flags)
{
CNDMemoryWindow *mw = (CNDMemoryWindow *) pMemoryWindow;
HRESULT hr;
diff --git a/trunk/ulp/netdirect2/user/nd_qp.h b/trunk/ulp/netdirect2/user/nd_qp.h
index 1d09ddc..c110cce 100644
--- a/trunk/ulp/netdirect2/user/nd_qp.h
+++ b/trunk/ulp/netdirect2/user/nd_qp.h
@@ -52,10 +52,10 @@ public:
STDMETHODIMP Flush();
STDMETHODIMP Send(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE, DWORD flags);
STDMETHODIMP Receive(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE);
- STDMETHODIMP Bind(VOID* requestContext, INDMemoryRegion* pMemoryRegion,
- INDMemoryWindow* pMemoryWindow, const VOID* pBuffer, SIZE_T cbBuffer,
+ STDMETHODIMP Bind(VOID* requestContext, IUnknown* pMemoryRegion,
+ IUnknown* pMemoryWindow, const VOID* pBuffer, SIZE_T cbBuffer,
DWORD flags);
- STDMETHODIMP Invalidate(VOID* requestContext, INDMemoryWindow* pMemoryWindow, DWORD flags);
+ STDMETHODIMP Invalidate(VOID* requestContext, IUnknown* pMemoryWindow, DWORD flags);
STDMETHODIMP Read(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE,
UINT64 remoteAddress, UINT32 remoteToken, DWORD flags);
STDMETHODIMP Write(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE,
@@ -71,7 +71,7 @@ public:
CNDSharedReceiveQueue *pSharedReceiveQueue,
VOID* context, DWORD receiveQueueDepth, DWORD initiatorQueueDepth,
DWORD maxReceiveRequestSGE, DWORD maxInitiatorRequestSGE,
- INDQueuePair** ppQueuePair)
+ VOID** ppQueuePair)
{
HRESULT hr;
CNDQueuePair *qp;
@@ -111,7 +111,7 @@ protected:
CNDCompletionQueue* pInitiatorCompletionQueue,
CNDSharedReceiveQueue *pSharedReceiveQueue,
VOID* context, DWORD receiveQueueDepth, DWORD initiatorQueueDepth,
- DWORD maxReceiveRequestSGE, DWORD maxInitiatorRequestSGE);
+ DWORD maxReceiveRequestSge, DWORD maxInitiatorRequestSGE);
STDMETHODIMP_(DWORD) ConvertSendFlags(DWORD Flags);
};
diff --git a/trunk/ulp/netdirect2/user/nd_srq.cpp b/trunk/ulp/netdirect2/user/nd_srq.cpp
index e472757..ab0abd3 100644
--- a/trunk/ulp/netdirect2/user/nd_srq.cpp
+++ b/trunk/ulp/netdirect2/user/nd_srq.cpp
@@ -38,11 +38,10 @@ CNDSharedReceiveQueue::CNDSharedReceiveQueue(CNDAdapter *pAdapter)
}
STDMETHODIMP CNDSharedReceiveQueue::
-Init(DWORD queueDepth, DWORD maxSGE, DWORD notifyThreshold, GROUP_AFFINITY* pAffinity)
+Init(DWORD queueDepth, DWORD maxSGE, DWORD notifyThreshold, KAFFINITY affinity)
{
HRESULT hr;
- //??? pAffinity ignored
hr = m_pAdapter->m_pWvPd->CreateSharedReceiveQueue(queueDepth, maxSGE,
notifyThreshold, &m_pWvSrq);
return NDConvertWVStatus(hr);
@@ -101,6 +100,12 @@ GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)
}
STDMETHODIMP CNDSharedReceiveQueue::
+GetNotifyAffinity(USHORT *pGroup, KAFFINITY* pAffinity)
+{
+ return ND_NOT_SUPPORTED;
+}
+
+STDMETHODIMP CNDSharedReceiveQueue::
Modify(DWORD queueDepth, DWORD notifyThreshold)
{
HRESULT hr;
diff --git a/trunk/ulp/netdirect2/user/nd_srq.h b/trunk/ulp/netdirect2/user/nd_srq.h
index 80f2c4b..79f3dc1 100644
--- a/trunk/ulp/netdirect2/user/nd_srq.h
+++ b/trunk/ulp/netdirect2/user/nd_srq.h
@@ -51,6 +51,7 @@ public:
STDMETHODIMP GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait);
// INDSharedReceiveQueue methods
+ STDMETHODIMP GetNotifyAffinity(USHORT *pGroup, KAFFINITY* pAffinity);
STDMETHODIMP Modify(DWORD queueDepth, DWORD notifyThreshold);
STDMETHODIMP Notify(OVERLAPPED* pOverlapped);
STDMETHODIMP Receive(VOID* requestContext, const ND_SGE* pSGE, DWORD nSGE);
@@ -60,8 +61,8 @@ public:
void Delete() {delete this;}
static STDMETHODIMP
CreateInstance(CNDAdapter *pAdapter, DWORD queueDepth, DWORD maxSGE,
- DWORD notifyThreshold, GROUP_AFFINITY* pAffinity,
- INDSharedReceiveQueue** ppSharedReceiveQueue)
+ DWORD notifyThreshold, KAFFINITY affinity,
+ VOID** ppSharedReceiveQueue)
{
HRESULT hr;
CNDSharedReceiveQueue *srq;
@@ -72,7 +73,7 @@ public:
goto err1;
}
- hr = srq->Init(queueDepth, maxSGE, notifyThreshold, pAffinity);
+ hr = srq->Init(queueDepth, maxSGE, notifyThreshold, affinity);
if (FAILED(hr)) {
goto err2;
}
@@ -93,7 +94,7 @@ protected:
CNDAdapter *m_pAdapter;
STDMETHODIMP Init(DWORD queueDepth, DWORD maxSGE, DWORD notifyThreshold,
- GROUP_AFFINITY* pAffinity);
+ KAFFINITY affinity);
};
#endif // _ND_SRQ_H_
More information about the ofw
mailing list