⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reqtable.h

📁 Vitual Ring Routing 管你知不知道
💻 H
字号:
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
//
// (c) Microsoft Corporation. All rights reserved. 
//
// This file is part of the Microsoft Virtual Ring Routing distribution.
// You should have received a copy of the Microsoft Research Shared Source
// license agreement (MSR-SSLA) for this software; see the file "license.txt".
// If not, please see http://research.microsoft.com/vrr/license.htm,
// or write to Microsoft Research, One Microsoft Way, Redmond, WA 98052-6399.
//
// This file is derived from the Microsoft Research Mesh Connectivity Layer,
// available under the MSR-SSLA license, and downloadable from
// http://research.microsoft.com/mesh/.
//

#define NUM_DUPLICATE_SUPPRESS  64

typedef struct duplicateSuppress_t {
    VirtualAddress Target;
    VRRReqId Id;
    Time LastUsed;              // For statistics gathering.
} DuplicateSuppress;

typedef struct requestTableElement_t {
    VirtualAddress Addr;
    Time LastUsed;              // For statistics gathering.

    //
    // These fields are used when sending Route Requests for a Target.
    //
    Time LastReq;
    uint Backoff;               // How many Requests since last Reply.
    VRRReqId NextID;

    //
    // These fields are used when suppressing Route Requests from a Source.
    //
    uint Victim;
    DuplicateSuppress Suppress[NUM_DUPLICATE_SUPPRESS];
} RequestTableElement;

typedef struct forwardedRequestTable_t {
    KSPIN_LOCK Lock;
    uint Victim;
    uint MaxSize;
    uint CurSize;
    RequestTableElement *RTE;

    Time MinElementReuse;
    Time MinSuppressReuse;
} ForwardedRequestTable;

extern NDIS_STATUS
ReqTableNew(MiniportAdapter *VA, uint Size);

extern void 
ReqTableFree(MiniportAdapter *VA);

extern boolint
ReqTableSuppress(MiniportAdapter *VA,
                 const VirtualAddress Source,
                 const VirtualAddress Target,
                 VRRReqId Identifier);

extern VRRReqId
ReqTableIdentifier(MiniportAdapter *VA,
                   const VirtualAddress Target);

extern boolint
ReqTableSendP(MiniportAdapter *VA, const VirtualAddress Target,
              VRRReqId *Identifier);

extern void
ReqTableReceivedReply(MiniportAdapter *VA, const VirtualAddress Target);

extern void
ReqTableResetStatistics(MiniportAdapter *VA);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -