Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #ifndef HCCLV2_UB_JETTY_ID_LITE_H
11 : #define HCCLV2_UB_JETTY_ID_LITE_H
12 :
13 : #include "hccl/base.h"
14 :
15 : namespace Hccl {
16 :
17 : struct UbJettyLiteId {
18 : u32 dieId_;
19 : u32 funcId_;
20 : u32 jettyId_;
21 :
22 20 : u32 GetDieId() const { return dieId_; }
23 :
24 4 : u32 GetFuncId() const { return funcId_; }
25 :
26 4 : u32 GetJettyId() const { return jettyId_; }
27 :
28 148 : UbJettyLiteId(u32 dieId, u32 funcId, u32 jettyId) : dieId_(dieId), funcId_(funcId), jettyId_(jettyId) {}
29 : };
30 :
31 : struct UbJettyLiteAttr {
32 : const u64 dbAddr_;
33 : const u64 sqVa_;
34 : const u32 sqDepth_;
35 : const u32 tpn_;
36 : const bool dwqeCacheLocked_;
37 : const u32 jfcPollMode_; // 0代表STARS POLL, 1代表软件Poll
38 : const u64 sqCiAddr_; // 预留给 软件poll CQ 的Jetty使用
39 130 : UbJettyLiteAttr(
40 : u64 dbAddr, u64 sqVa, u32 sqDepth, u32 tpn, bool dwqeCacheLocked = false, u32 jfcPollMode = 0, u64 sqCiAddr = 0)
41 130 : : dbAddr_(dbAddr),
42 130 : sqVa_(sqVa),
43 130 : sqDepth_(sqDepth),
44 130 : tpn_(tpn),
45 130 : dwqeCacheLocked_(dwqeCacheLocked),
46 130 : jfcPollMode_(jfcPollMode),
47 130 : sqCiAddr_(sqCiAddr)
48 130 : {}
49 : };
50 :
51 : } // namespace Hccl
52 : #endif
|