Giter VIP home page Giter VIP logo

networkdirect's Introduction

NetworkDirect SPI

The NetworkDirect architecture provides application developers with a networking interface that enables zero-copy data transfers between applications, kernel-bypass I/O generation and completion processing, and one-sided data transfer operations. The NetworkDirect service provider interface (SPI) defines the interface that NetworkDirect providers implement to expose their hardware capabilities to applications.

Please find additional documentation in docs/ folder.

NetworkDirect SDK is available in Nuget also.

Building

Prerequisites

  • Visial Studio 2017

    Please make sure to select the following workloads during installation:

    • .NET desktop development (required for CBT/Nuget packages)
    • Desktop development with C++
  • Windows SDK

  • Windows WDK

Based on the installed VS/SDK/WDK versions, update VCToolsVersion and WindowsTargetPlatformVersion in Directory.Build.props

Note that the build system uses CommonBuildToolSet(CBT). You may need to unblock CBT.core.dll (under .build/CBT) depending on your security configurations. Please refer to CBT documentation for additional details.

Build

To build, open a Native Tools Command Prompt for Visual Studio and run msbuild from root folder.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

networkdirect's People

Contributors

jithinjosepkl avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

networkdirect's Issues

QP create issues on asymetrically reported QP sizes

Hi,

Some of the sample applications seem to assume that the reported RQ size is always greater or equal than SQ size. This is not required. The call to create QP uses the same value for RQ and SQ.
Coming from min(maxCQ, maxRQ), which may fail if SQ turned out to be reported in adapter info as smaller than maxCQ and maxRQ.

Please find below a potential fix for ndping.
Thanks.

Fix to asymetrically reported QP sizes

  This patch incorporates the Initiator queue depth reported through
  AdapterInfo.

  When reported sizes for SQ are smaller than RQ, createQP uses
  min(CQDepth,RQDepth) for both SQ and RQ causing QP creation errors.

diff --git a/src/examples/ndping/ndping.cpp b/src/examples/ndping/ndping.cpp
index 8a08a12..deac1fb 100644
--- a/src/examples/ndping/ndping.cpp
+++ b/src/examples/ndping/ndping.cpp
@@ -62,7 +62,8 @@ public:

       ND2_ADAPTER_INFO adapterInfo = { 0 };
       NdTestBase::GetAdapterInfo(&adapterInfo);
-        m_queueDepth = min(adapterInfo.MaxCompletionQueueDepth, adapterInfo.MaxReceiveQueueDepth);
+        m_queueDepth = min(adapterInfo.MaxReceiveQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+        m_queueDepth = min(m_queueDepth, adapterInfo.MaxCompletionQueueDepth);
       m_queueDepth = (queueDepth != 0) ? min(queueDepth, m_queueDepth) : m_queueDepth;
       m_inlineSizeThreshold = adapterInfo.InlineRequestThreshold;

@@ -195,7 +196,8 @@ public:

       ND2_ADAPTER_INFO adapterInfo;
       NdTestBase::GetAdapterInfo(&adapterInfo);
-        m_queueDepth = min(adapterInfo.MaxCompletionQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+        m_queueDepth = min(adapterInfo.MaxReceiveQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+        m_queueDepth = min(m_queueDepth, adapterInfo.MaxCompletionQueueDepth);
       m_queueDepth = (queueDepth != 0) ? min(queueDepth, m_queueDepth) : m_queueDepth;
       m_inlineSizeThreshold = adapterInfo.InlineRequestThreshold;


RDMA RegisterMemory Problem

HI, I am an engineer working on the RDMA IWARP protocol.

I use chelsio t6225-cr NIC Adapter and connect 2 pc back to back.

Development environment is Window10, and i use NDSPI( NDSPI Interfaces (Windows) ).

i want to register 1TB Memory to my adapter by using INDAdapter::RegisterMemory Method.

But I can't register more than 128GB of memory ,I use this function in the following way.

for (int i = 0; i < memCount; i++)
{
  hr = pAdapter->RegisterMemory(Buffers, BuffSize, pOv, &hMrs);
  if (hr == ND_PENDING)
  {
   SIZE_T BytesRet;
   hr = pAdapter->GetOverlappedResult(pOv, &BytesRet, TRUE);
  }
  if (FAILED(hr))
  {
   printf("RegisterMemory Failed with %08x\n", hr);
   exit(__LINE__);
  }
}

BuffSize = 65000 * 65000 โ‰’ 4GB, and memCount = 32

When i = 0~30, hr return S_OK , But i = 31 hr returns 0x0000009A (insufficient system resources exist to complete the api)

Even if the buffer size is reduced and the number of registrations is increased, the same problem occurs near 128GB

Is there a limit to registering memory above a certain number?

How can i register over 128GB?? i must regist 1TB memory to achieve My goal.

If anyone has tried something similar using the Celsio T6 adapter or another NIC, can you tell me how?

Provider derived class destruction uses static binding instead of dynamic binding

VS 2022 complains with warning C5205 because Provider abstract class defines a non virtual destructor, which may lead to undefined behaviour as objects destruction in ndfrmwrk.cpp use static binding instead of dynamic binding.

Suggested correction :

  • To ensure all destructors are called, nedd to change ~Provider(void); to virtual ~Provider(void); in ndprov.h
  • Should also comment (or delete) ~NdV1Provider(); and ~NdProvider(); definitions, since these derived constructors are not implemented.
  • Finally, suppress AdditionalOptions /Wv:18 added by PR ADD AdditionalOptions Wv:18

"$(_NT_TARGET_VERSION)" evaluates to ""

freshly installed visual studio 2017 and windows driver kit 10

  • pull code from github
  • opening solution 'netdirect'
  • projects ndutil and ndtestutil fail to load.
    If asking to reload the projects, a dialog box is shown saying that something went wrong in WindowsDriver.UserMode.Default.props: a numeric comparison was attempted on "$(_NT_TARGET_VERSION)" that evaluates to "" instead of a number, in condition "$(_NT_TARGET_VERSION) >= $(_NT_TARGET_VERSION_WIN10)"

Why use NetworkDirte when the client fails to communicate with the linux server corresponding to rdma_verbs

Windows platform and linux platform use rdma communication, linux use rdma_verbs as server, windows use ndspi communication, server receives remoteaddress and remoteToken sent by peer post_send operation, and performs IBV_WR_RDMA_READ operation, and the error code received when poll cq is IBV_WC_REM_ACCESS_ERR, observed The client-side memory permission is set to ND_MR_FLAG_ALLOW_REMOTE_READ | ND_MR_FLAG_ALLOW_REMOTE_WRITE, and the MW is set to ND_OP_FLAG_ALLOW_READ | ND_OP_FLAG_ALLOW_WRITE.

Issue in applications to connect with ND 1.0 providers

Tried multiple applications(like ndping, ndpingpong, ndrping etc..) to connect with ND 1.0 supported providers and is failing with below errors.

PS C:\Users\Administrator> .\ndrping.exe -c -p 102.1.1.134
Beginning test: ndrping.exe
Test Failed.
Failed open adapter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.