예제 #1
0
        /// <summary>
        /// Connection to server over RDMA, use the default parameters
        /// </summary>
        /// <param name="clientIp">Clinet IP address</param>
        /// <param name="serverIp">Server IP address</param>
        /// <param name="port">Port</param>
        /// <param name="ipFamily">IP Family</param>
        /// <param name="nInboundEntries">RDMA inbound entries</param>
        /// <param name="nOutboundEntries">RDMA outbound entries</param>
        /// <param name="inboundReadLimit">RDMA inbound read size</param>
        /// <param name="inboundDataSize">Max Size of RDMA inbound data</param>
        /// <returns>Status of RMDA connection</returns>
        public NtStatus ConnectToServerOverRdma(
            string clientIp,
            string serverIp,
            int port,
            AddressFamily ipFamily,
            uint nInboundEntries,
            uint nOutboundEntries,
            uint inboundReadLimit,
            uint inboundDataSize
            )
        {
            Connection = new SmbdConnection();

            // initialize parameters
            Connection.Role = SmbdRole.ACTIVE;

            // reset value
            Connection.Protocol       = SmbdVersion.NONE;
            Connection.SendCredits    = 0;
            Connection.ReceiveCredits = 0;
            Connection.FragmentReassemblyRemaining = 0;

            Connection.SendQueue = new Queue <SmbdDataTransferMessage>();
            Connection.FragmentReassemblyBuffer = null;

            // do connection
            Connection.Endpoint = new SmbdConnectionEndpoint(
                nInboundEntries,
                nOutboundEntries,
                INBOUND_SEGMENTS,
                OUTBOUND_SEGMENTS,
                inboundReadLimit,
                OUTBOUND_READLIMIT,
                inboundDataSize,
                logEvent
                );
            NtStatus ret = (NtStatus)Connection.Endpoint.ConnectToServerOverRdma(
                clientIp,
                serverIp,
                (ushort)port,
                ipFamily
                );

            return(ret);
        }
        /// <summary>
        /// Connection to server over RDMA, use the default parameters
        /// </summary>
        /// <param name="clientIp">Clinet IP address</param>
        /// <param name="serverIp">Server IP address</param>
        /// <param name="port">Port</param>
        /// <param name="ipFamily">IP Family</param>
        /// <param name="nInboundEntries">RDMA inbound entries</param>
        /// <param name="nOutboundEntries">RDMA outbound entries</param>
        /// <param name="inboundReadLimit">RDMA inbound read size</param>
        /// <param name="inboundDataSize">Max Size of RDMA inbound data</param>
        /// <returns>Status of RMDA connection</returns>
        public NtStatus ConnectToServerOverRdma(
            string clientIp,
            string serverIp,
            int port,
            AddressFamily ipFamily,
            uint nInboundEntries,
            uint nOutboundEntries,
            uint inboundReadLimit,
            uint inboundDataSize
            )
        {
            Connection = new SmbdConnection();

            // initialize parameters
            Connection.Role = SmbdRole.ACTIVE;

            // reset value
            Connection.Protocol = SmbdVersion.NONE;
            Connection.SendCredits = 0;
            Connection.ReceiveCredits = 0;
            Connection.FragmentReassemblyRemaining = 0;

            Connection.SendQueue = new Queue<SmbdDataTransferMessage>();
            Connection.FragmentReassemblyBuffer = null;

            // do connection
            Connection.Endpoint = new SmbdConnectionEndpoint(
                nInboundEntries,
                nOutboundEntries,
                INBOUND_SEGMENTS,
                OUTBOUND_SEGMENTS,
                inboundReadLimit,
                OUTBOUND_READLIMIT,
                inboundDataSize,
                logEvent
                );
            NtStatus ret = (NtStatus)Connection.Endpoint.ConnectToServerOverRdma(
                clientIp,
                serverIp,
                (ushort)port,
                ipFamily
                );
            return ret;
        }