* [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider
@ 2026-10-31 19:25 Doug Ledford
2026-10-31 19:25 ` [PATCH 01/12] libibverbs: add ibv_read_counters_ex() Doug Ledford
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team
Cc: linux-kernel, Doug Ledford, Iraimani P, Mamila Santosh, Terrence Mitchem
This pull request adds cxiverbs, the user space provider for the HPE
Slingshot Cassini NIC, matching the cxiverbs kernel driver. It uses the
UET reliable unconnected (RU) queue pair type from the UET rdma-core
series.
Patches 1-3 extend libibverbs:
- ibv_read_counters_ex(): read selected counters, with per-item
timestamps, using the kernel counters extension
- permit UET jobs without an address table, matching the kernel
change. This relaxes a rule in the UET series and needs agreement
from its authors; the commit message gives the hardware reasons.
- provider-owned completion channels and the Slingshot transport
The new provider ops join the private ABI that the UET series already
raised to 66; since 66.0 is unreleased, IBVERBS_PABI_VERSION is not
bumped again.
Patches 4-11 add the provider:
- the shared native hardware and verbs ABI headers
- the cxidv direct-verbs interface for native resources (services,
LNIs, communication profiles, event and command queues, counting
triggers, CSR access), with explicit ownership
- list entry encoding and VNI-isolated remote keys
- the provider, device discovery and the UET verbs
- model and hardware tests for identity isolation, polling and event
traffic
- cxi_launcher, which a workload manager such as Slurm can use to
grant a job exact VNIs, a traffic class and resource limits before
it starts the application without privileges
- build and packaging (Debian, SUSE and Red Hat), with the provider
library packaged like efa, mana and mlx5 and built only where
coherent DMA is available, and the pyverbs cxidv bindings used by
the RU tests. cxi_launcher ships with the provider library, since
client programs cannot run on CXI hardware without it.
Patch 12 ports the ibv_ru_pingpong and ibv_ru_rma examples to the
explicitly granted resources. On a Slingshot device they run
themselves again under cxi_launcher, so when the CXI provider is built
they use the cxidv API and link against libcxiverbs; that is why they
come after the provider.
Dependencies
------------
This pull request depends on:
- the Cassini NIC driver series for net-next,
net: hpe: add HPE Slingshot NIC drivers
https://lore.kernel.org/netdev/20261030-cxi-netdev-submission-v1-0-8c2c391cc283@hpe.com/
- the UET RDMA kernel series
RDMA/core: Ultra Ethernet transport verbs
https://lore.kernel.org/linux-rdma/20261019-uet-ib-core-v2-0-8bd654f25370@broadcom.com/
- the cxiverbs kernel series,
RDMA/cxi: add the HPE Cassini verbs driver
https://lore.kernel.org/linux-rdma/20261030-cxi-for-next-v1-0-bc6e49e07037@hpe.com/
- the UET rdma-core series
libibverbs: Ultra Ethernet reliable unconnected verbs
https://github.com/linux-rdma/rdma-core/pull/1829
kernel-headers/ carries the UAPI headers from those kernel series.
Known open issues
-----------------
No known functional issues are open in the provider. Where the
kernel's SR-IOV support is involved, the kernel series notes that V2
will include an updated SR-IOV implementation.
One question needs a UET ABI decision: the RU examples and the generic
pyverbs.ru module are still built on platforms without coherent DMA,
where the CXI provider is not. If UET, and so the RU queue pair type,
is not expected to support those platforms, they should instead be
built only where coherent DMA is available (see patch 12).
checkpatch
----------
With rdma-core's CI checkpatch settings (buildlib/azp-checkpatch),
three patches still report warnings; each patch explains its own:
- patch 4: PREFER_DEFINED_ATTRIBUTE_MACRO (27) and VOLATILE (2). The
shared headers use __attribute__((packed)) because the kernel-only
__packed is not available to user space, and the command queue
status and event fields stay volatile because the device writes
them.
- patch 10: VOLATILE (2) for the launcher's volatile sig_atomic_t
signal state.
- patch 11: one REPEATED_WORD false positive in
pyverbs/providers/cxi/cxidv.pyx ("Context context" is a Cython typed
parameter).
These exceptions are documented in providers/cxi/utils/README.md. If
reviewers prefer a different form, it needs coordination with the
internal HPE repositories these headers are synchronized from, and will
be changed in V2.
Review and testing
------------------
Before posting, the provider was reviewed with the Sashiko AI code
review tool and checkpatch.
Tool use: GitHub Copilot, an AI coding assistant, was used under our
direction to write many of the review fixes, to fold them into these
patches, to write commit messages and to run the build and hardware
tests. Every change was reviewed by the submitter, who takes
responsibility for it as for any other patch.
- every patch builds incrementally (with pyverbs enabled) without
compiler warnings, and the series also builds without warnings with
coherent DMA disabled, where the CXI provider is left out
- with exactly this provider and the two kernel series, booted on two
Cassini 2 x86_64 nodes, the full stack passed a full test matrix on
both nodes: the rdma-core Python suite (434 tests; tests that need
features this device lacks are skipped), the provider's model
tests, launcher file descriptor tests, resource and VNI isolation
tests in default and indexed addressing modes, including wrong-VNI
rejection, privileged and unprivileged CSR access tests, and 36
two-node RU ping-pong and RMA traffic cases (polling and event
modes) in each direction, 72 in total.
Co-developed by Iraimani P and Mamila Santosh, as shown by the trailers
on each patch.
Doug Ledford (12):
libibverbs: add ibv_read_counters_ex()
libibverbs: permit jobs without an address table
libibverbs: support provider completion channels and Slingshot transport
cxiverbs: add the synchronized native hardware and verbs headers
cxiverbs: define the native direct-verbs resource interface
cxiverbs: encode list entries and VNI-isolated remote keys
cxiverbs: add the provider and device discovery
cxiverbs: implement UET verbs with explicit native ownership
cxiverbs: cover identity isolation and polling and event traffic
cxiverbs: launch Slurm-style exact VNI TC and resource grants
cxiverbs: wire and package the CXI verbs provider and tests
libibverbs: port RU examples to explicitly granted resources
71 files changed, 32565 insertions(+), 182 deletions(-)
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
Doug Ledford (12):
libibverbs: add ibv_read_counters_ex()
libibverbs: permit jobs without an address table
libibverbs: support provider completion channels and Slingshot transport
cxiverbs: add the synchronized native hardware and verbs headers
cxiverbs: define the native direct-verbs resource interface
cxiverbs: encode list entries and VNI-isolated remote keys
cxiverbs: add the provider and device discovery
cxiverbs: implement UET verbs with explicit native ownership
cxiverbs: cover identity isolation and polling and event traffic
cxiverbs: launch Slurm-style exact VNI TC and resource grants
cxiverbs: wire and package the CXI verbs provider and tests
libibverbs: port RU examples to explicitly granted resources
CMakeLists.txt | 1 +
debian/control | 1 +
debian/copyright | 5 +
debian/ibverbs-providers.install | 3 +
debian/ibverbs-providers.lintian-overrides | 4 +-
debian/ibverbs-providers.symbols | 46 +
debian/ibverbs-utils.install | 1 +
debian/libibverbs-dev.install | 5 +
debian/libibverbs1.symbols | 1 +
debian/rules | 6 +-
kernel-headers/CMakeLists.txt | 8 +
kernel-headers/ethernet/cassini_user_defs.h | 15004 ++++++++++++++++++++++++++
kernel-headers/rdma/cxiverbs-abi.h | 658 ++
kernel-headers/rdma/ib_user_ioctl_cmds.h | 2 +
kernel-headers/rdma/ib_user_ioctl_verbs.h | 2 +
kernel-headers/rdma/rdma_netlink.h | 1 +
libibverbs/cmd_counters.c | 25 +
libibverbs/cmd_device.c | 7 +-
libibverbs/driver.h | 11 +
libibverbs/dummy_ops.c | 25 +
libibverbs/enum_strs.c | 3 +-
libibverbs/examples/CMakeLists.txt | 10 +
libibverbs/examples/devinfo.c | 2 +
libibverbs/examples/ru_cxi_launch.h | 138 +
libibverbs/examples/ru_pingpong.c | 126 +-
libibverbs/examples/ru_rma.c | 112 +-
libibverbs/init.c | 5 +
libibverbs/libibverbs.map.in | 2 +
libibverbs/man/ibv_alloc_job.3.md | 8 +-
libibverbs/man/ibv_query_gid_ex.3.md | 3 +-
libibverbs/verbs.c | 30 +-
libibverbs/verbs.h | 23 +
providers/cxi/CMakeLists.txt | 19 +
providers/cxi/cxi.c | 196 +
providers/cxi/cxi.h | 265 +
providers/cxi/cxi_le.h | 97 +
providers/cxi/cxi_prov_hw.h | 1838 ++++
providers/cxi/cxi_telem.c | 3948 +++++++
providers/cxi/cxi_verbs.h | 56 +
providers/cxi/cxidv.h | 418 +
providers/cxi/cxidv_telem.h | 1984 ++++
providers/cxi/cxiverbs-abi.h | 29 +
providers/cxi/libcxiverbs.map | 49 +
providers/cxi/tests/CMakeLists.txt | 4 +
providers/cxi/tests/cxi_launcher_test.c | 79 +
providers/cxi/tests/cxi_le_test.c | 2014 ++++
providers/cxi/utils/CMakeLists.txt | 5 +
providers/cxi/utils/README.md | 134 +
providers/cxi/utils/cxi_launcher.c | 967 ++
providers/cxi/utils/cxi_telem.c | 201 +
providers/cxi/verbs.c | 3718 +++++++
pyverbs/CMakeLists.txt | 3 +-
pyverbs/device.pxd | 1 +
pyverbs/device.pyx | 3 +-
pyverbs/libibverbs_enums.pxd | 1 +
pyverbs/providers/cxi/CMakeLists.txt | 6 +
pyverbs/providers/cxi/__init__.pxd | 0
pyverbs/providers/cxi/__init__.py | 0
pyverbs/providers/cxi/cxidv.pxd | 23 +
pyverbs/providers/cxi/cxidv.pyx | 64 +
pyverbs/ru.pyx | 2 +-
redhat/rdma-core.spec | 5 +
suse/rdma-core.spec | 23 +
tests/base.py | 47 +
tests/ru_base.py | 33 +-
tests/test_addr.py | 4 +-
tests/test_device.py | 12 +-
tests/test_dmah.py | 70 +-
tests/test_mr.py | 8 +-
tests/test_qp.py | 7 +-
tests/test_ru.py | 136 +-
71 files changed, 32565 insertions(+), 182 deletions(-)
---
base-commit: 8db37d9b02fac926ddd099ba7c05fac66f0e243a
change-id: 20261031-cxi-for-next-742514c31679
Best regards,
--
Doug Ledford <doug.ledford@hpe.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 01/12] libibverbs: add ibv_read_counters_ex()
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:25 ` [PATCH 02/12] libibverbs: permit jobs without an address table Doug Ledford
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford
Expose the counters read extension of the kernel. ibv_read_counters_ex()
reads a caller chosen list of driver defined counter items into a
values array and, optionally, a timestamps array holding the time in
nanoseconds each item was sampled. It is implemented with the
optional ITEMS and TIMESTAMPS attributes of the existing counters read
method, and is dispatched to a new read_counters_ex provider op. It
returns EOPNOTSUPP when the provider or kernel lacks it.
The new provider op and ibv_cmd_read_counters_ex() extend the private
provider ABI. IBVERBS_PABI_VERSION is deliberately not bumped: the UET
series this is based on already raised it to 66 and 66.0 has not been
released, so these additions join that unreleased private ABI.
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
debian/libibverbs1.symbols | 1 +
| 2 ++
libibverbs/cmd_counters.c | 25 +++++++++++++++++++++++++
libibverbs/driver.h | 8 ++++++++
libibverbs/dummy_ops.c | 10 ++++++++++
libibverbs/libibverbs.map.in | 2 ++
libibverbs/verbs.c | 10 ++++++++++
libibverbs/verbs.h | 17 +++++++++++++++++
8 files changed, 75 insertions(+)
diff --git a/debian/libibverbs1.symbols b/debian/libibverbs1.symbols
index 61ee1e16f850..9b7d95924571 100644
--- a/debian/libibverbs1.symbols
+++ b/debian/libibverbs1.symbols
@@ -136,6 +136,7 @@ libibverbs.so.1 libibverbs1 #MINVER#
ibv_rate_to_mbps@IBVERBS_1.1 1.1.8
ibv_rate_to_mult@IBVERBS_1.0 1.1.6
ibv_read_comp_cntr@IBVERBS_1.18 65
+ ibv_read_counters_ex@IBVERBS_1.19 66
ibv_read_err_comp_cntr@IBVERBS_1.18 65
ibv_read_sysfs_file@IBVERBS_1.0 1.1.6
ibv_reg_buf_mr@IBVERBS_1.17 64
--git a/kernel-headers/rdma/ib_user_ioctl_cmds.h b/kernel-headers/rdma/ib_user_ioctl_cmds.h
index 8de110b8db34..9ee083eed044 100644
--- a/kernel-headers/rdma/ib_user_ioctl_cmds.h
+++ b/kernel-headers/rdma/ib_user_ioctl_cmds.h
@@ -404,6 +404,8 @@ enum uverbs_attrs_read_counters_cmd_attr_ids {
UVERBS_ATTR_READ_COUNTERS_HANDLE,
UVERBS_ATTR_READ_COUNTERS_BUFF,
UVERBS_ATTR_READ_COUNTERS_FLAGS,
+ UVERBS_ATTR_READ_COUNTERS_ITEMS,
+ UVERBS_ATTR_READ_COUNTERS_TIMESTAMPS,
};
enum uverbs_methods_actions_counters_ops {
diff --git a/libibverbs/cmd_counters.c b/libibverbs/cmd_counters.c
index 8964fed5ea1b..d6fd18b39429 100644
--- a/libibverbs/cmd_counters.c
+++ b/libibverbs/cmd_counters.c
@@ -76,6 +76,31 @@ int ibv_cmd_destroy_counters(struct verbs_counters *vcounters)
return 0;
}
+int ibv_cmd_read_counters_ex(struct verbs_counters *vcounters,
+ const uint64_t *items, uint64_t *counters_value,
+ uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags, struct ibv_command_buffer *link)
+{
+ DECLARE_COMMAND_BUFFER_LINK(cmd, UVERBS_OBJECT_COUNTERS,
+ UVERBS_METHOD_COUNTERS_READ,
+ 5,
+ link);
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_READ_COUNTERS_HANDLE,
+ vcounters->handle);
+ fill_attr_out_ptr_array(cmd, UVERBS_ATTR_READ_COUNTERS_BUFF,
+ counters_value, ncounters);
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_READ_COUNTERS_FLAGS, flags);
+ if (items)
+ fill_attr_in_ptr_array(cmd, UVERBS_ATTR_READ_COUNTERS_ITEMS,
+ items, ncounters);
+ if (timestamps)
+ fill_attr_out_ptr_array(cmd, UVERBS_ATTR_READ_COUNTERS_TIMESTAMPS,
+ timestamps, ncounters);
+
+ return execute_ioctl(vcounters->counters.context, cmd);
+}
+
int ibv_cmd_read_counters(struct verbs_counters *vcounters,
uint64_t *counters_value,
uint32_t ncounters,
diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index 6c3e73f37037..8327550231f4 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -530,6 +530,10 @@ struct verbs_context_ops {
uint64_t *counters_value,
uint32_t ncounters,
uint32_t flags);
+ int (*read_counters_ex)(struct ibv_counters *counters,
+ const uint64_t *items, uint64_t *counters_value,
+ uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags);
int (*read_err_comp_cntr)(struct ibv_comp_cntr *comp_cntr,
uint64_t *value);
struct ibv_mr *(*reg_dm_mr)(struct ibv_pd *pd, struct ibv_dm *dm,
@@ -819,6 +823,10 @@ int ibv_cmd_read_counters(struct verbs_counters *vcounters,
uint32_t ncounters,
uint32_t flags,
struct ibv_command_buffer *link);
+int ibv_cmd_read_counters_ex(struct verbs_counters *vcounters,
+ const uint64_t *items, uint64_t *counters_value,
+ uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags, struct ibv_command_buffer *link);
/*
* Adjust fork protection for the given range. Return 0 on success, or a
* non-zero value on failure with errno set to indicate the reason.
diff --git a/libibverbs/dummy_ops.c b/libibverbs/dummy_ops.c
index 7a83b1da9d45..fee27c1f6687 100644
--- a/libibverbs/dummy_ops.c
+++ b/libibverbs/dummy_ops.c
@@ -616,6 +616,14 @@ static int read_counters(struct ibv_counters *counters,
return EOPNOTSUPP;
}
+static int read_counters_ex(struct ibv_counters *counters,
+ const uint64_t *items, uint64_t *counters_value,
+ uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags)
+{
+ return EOPNOTSUPP;
+}
+
static int read_err_comp_cntr(struct ibv_comp_cntr *comp_cntr, uint64_t *value)
{
return EOPNOTSUPP;
@@ -846,6 +854,7 @@ const struct verbs_context_ops verbs_dummy_ops = {
query_srq,
read_comp_cntr,
read_counters,
+ read_counters_ex,
read_err_comp_cntr,
reg_dm_mr,
reg_dmabuf_mr,
@@ -1002,6 +1011,7 @@ void verbs_set_ops(struct verbs_context *vctx,
SET_OP(vctx, query_rt_values);
SET_PRIV_OP_IC(vctx, read_comp_cntr);
SET_OP(vctx, read_counters);
+ SET_PRIV_OP_IC(vctx, read_counters_ex);
SET_PRIV_OP_IC(vctx, read_err_comp_cntr);
SET_PRIV_OP(ctx, query_srq);
SET_OP(vctx, reg_dm_mr);
diff --git a/libibverbs/libibverbs.map.in b/libibverbs/libibverbs.map.in
index 51e8b85db478..0301e32d24ab 100644
--- a/libibverbs/libibverbs.map.in
+++ b/libibverbs/libibverbs.map.in
@@ -215,6 +215,7 @@ IBVERBS_1.19 {
ibv_destroy_jkey;
ibv_create_ah_ex;
ibv_ah_to_ah_ex;
+ ibv_read_counters_ex;
} IBVERBS_1.18;
/* If any symbols in this stanza change ABI then the entire staza gets a new symbol
@@ -295,6 +296,7 @@ IBVERBS_PRIVATE_@IBVERBS_PABI_VERSION@ {
ibv_cmd_query_srq;
ibv_cmd_read_comp_cntr;
ibv_cmd_read_counters;
+ ibv_cmd_read_counters_ex;
ibv_cmd_read_err_comp_cntr;
ibv_cmd_reg_dm_mr;
ibv_cmd_reg_dmabuf_mr;
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index 2f73c01fec7f..1df4dbf94dcc 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -1034,6 +1034,16 @@ int ibv_read_comp_cntr(struct ibv_comp_cntr *comp_cntr, uint64_t *value)
return get_ops(comp_cntr->context)->read_comp_cntr(comp_cntr, value);
}
+int ibv_read_counters_ex(struct ibv_counters *counters, const uint64_t *items,
+ uint64_t *counters_value, uint64_t *timestamps,
+ uint32_t ncounters, uint32_t flags)
+{
+ return get_ops(counters->context)->read_counters_ex(counters, items,
+ counters_value,
+ timestamps, ncounters,
+ flags);
+}
+
int ibv_read_err_comp_cntr(struct ibv_comp_cntr *comp_cntr, uint64_t *value)
{
return get_ops(comp_cntr->context)->read_err_comp_cntr(comp_cntr, value);
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index f887dc5bc356..1bb680b7be39 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -3484,6 +3484,23 @@ int ibv_inc_err_comp_cntr(struct ibv_comp_cntr *comp_cntr, uint64_t amount);
*/
int ibv_read_comp_cntr(struct ibv_comp_cntr *comp_cntr, uint64_t *value);
+/**
+ * ibv_read_counters_ex - Read selected counters, with timestamps
+ * @counters: counters object from ibv_create_counters()
+ * @items: counter numbers to read, or NULL to read counters 0..ncounters-1
+ * @counters_value: receives the value of each counter
+ * @timestamps: if not NULL, receives the time in nanoseconds each counter
+ * was read, as defined by the provider
+ * @ncounters: number of entries in each array
+ * @flags: enum ibv_read_counters_flags
+ *
+ * Only providers that implement the extended read support it. Returns 0 on
+ * success, else an errno value.
+ */
+int ibv_read_counters_ex(struct ibv_counters *counters, const uint64_t *items,
+ uint64_t *counters_value, uint64_t *timestamps,
+ uint32_t ncounters, uint32_t flags);
+
/**
* ibv_read_err_comp_cntr - Read the error count value
* @comp_cntr: The completion counter to read.
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 02/12] libibverbs: permit jobs without an address table
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
2026-10-31 19:25 ` [PATCH 01/12] libibverbs: add ibv_read_counters_ex() Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:25 ` [PATCH 03/12] libibverbs: support provider completion channels and Slingshot transport Doug Ledford
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
The job address table stores indexed remote fabric endpoints using
address-handle attributes and a remote QPN. Its entry count is not a
limit on memory regions, mapped pages, or ATU translation contexts.
Cassini transmit commands carry a destination fabric address directly.
The CXI provider currently supports address-handle-based sends, not the
job address-table operations or indexed sends. The documented hardware
transmit interface exposes no equivalent programmable peer table.
Connection/retry state is not a replacement for it. Native memory
translation and resource accounting are separate ATU operations.
Do not reject an address-handle-only job merely because it requests no
peer-table entries. Dispatch allocation to the provider, which supplies
the mandatory MAX_ADDR_ENTRIES uverbs attribute explicitly as zero when
the caller omits it. The companion core change permits zero and retains
the device upper bound and job-allocation privilege checks. Jobs still
carry a JobID and use job keys; CXI indexed sends remain unsupported.
This relaxes the shared libibverbs allocation contract and needs review
together with the corresponding core API policy change.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
libibverbs/man/ibv_alloc_job.3.md | 8 +++++---
libibverbs/verbs.c | 7 -------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/libibverbs/man/ibv_alloc_job.3.md b/libibverbs/man/ibv_alloc_job.3.md
index 2be8e482c4cf..e90f025e5357 100644
--- a/libibverbs/man/ibv_alloc_job.3.md
+++ b/libibverbs/man/ibv_alloc_job.3.md
@@ -97,9 +97,11 @@ struct ibv_job_attr {
*max_addr_entries*
: Number of entries in the job address table. Selected by
- *IBV_JOB_ATTR_MAX_ADDR_ENTRIES*, which allocation requires. It MUST be
- non-zero and MUST NOT exceed the *max_addr_entries* limit reported by
- **ibv_query_device_ex**(3). See **ibv_insert_addr**(3).
+ *IBV_JOB_ATTR_MAX_ADDR_ENTRIES*. Omitting this member or specifying zero
+ creates a job without an address table; work requests must then use
+ explicit address handles. Consumers using indexed addresses must request
+ a positive capacity. The capacity MUST NOT exceed the *max_addr_entries*
+ limit reported by **ibv_query_device_ex**(3). See **ibv_insert_addr**(3).
*port_num*
: Device port the job is associated with. Selected by
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index 1df4dbf94dcc..b2f9f4e3f8c0 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -321,13 +321,6 @@ struct ibv_job *ibv_alloc_job(struct ibv_context *context,
return NULL;
}
- /* the address table is sized once, when the job is allocated */
- if (!(attr->comp_mask & IBV_JOB_ATTR_MAX_ADDR_ENTRIES) ||
- !attr->max_addr_entries) {
- errno = EINVAL;
- return NULL;
- }
-
job = vctx->alloc_job(context, attr, user_context);
if (job) {
job->context = context;
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 03/12] libibverbs: support provider completion channels and Slingshot transport
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
2026-10-31 19:25 ` [PATCH 01/12] libibverbs: add ibv_read_counters_ex() Doug Ledford
2026-10-31 19:25 ` [PATCH 02/12] libibverbs: permit jobs without an address table Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:25 ` [PATCH 04/12] cxiverbs: add the synchronized native hardware and verbs headers Doug Ledford
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Two independent additions the cxiverbs provider needs from libibverbs.
They are kept together because both are small and neither is useful
without the provider.
Slingshot transport: add IBV_NODE_SLINGSHOT, IBV_TRANSPORT_SLINGSHOT
and the IBV_GID_TYPE_SLINGSHOT_UFH GID type, together with the sysfs
name "SLINGSHOT UFH" that the kernel reports for it. The kernel
header mirrors that define the matching RDMA_NODE_SLINGSHOT and
IB_UVERBS_GID_TYPE_SLINGSHOT_UFH values (rdma_netlink.h and
ib_user_ioctl_verbs.h) are updated here, byte for byte from the kernel.
Provider completion channels: add create_comp_channel and
destroy_comp_channel to the provider ops. The default implementation
returns EOPNOTSUPP and libibverbs then falls back to the kernel
uverbs implementation, so existing providers are unaffected. The
CXI hardware delivers completions through its own event queues and
needs to supply the channel itself. As with read_counters_ex, the new
ops join the private ABI that the unreleased UET series already bumped
to 66, so IBVERBS_PABI_VERSION is not bumped again.
The sysfs GID type attribute is read into a 16 byte buffer; the
previous 11 bytes truncated "SLINGSHOT UFH" and made the type
unrecognisable.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
| 2 ++
| 1 +
libibverbs/cmd_device.c | 7 ++++++-
libibverbs/driver.h | 3 +++
libibverbs/dummy_ops.c | 15 +++++++++++++++
libibverbs/enum_strs.c | 3 ++-
libibverbs/init.c | 5 +++++
libibverbs/man/ibv_query_gid_ex.3.md | 3 ++-
libibverbs/verbs.c | 13 +++++++++++++
libibverbs/verbs.h | 5 +++++
10 files changed, 54 insertions(+), 3 deletions(-)
--git a/kernel-headers/rdma/ib_user_ioctl_verbs.h b/kernel-headers/rdma/ib_user_ioctl_verbs.h
index 75cdfdbdb2f7..e8e84aa034ef 100644
--- a/kernel-headers/rdma/ib_user_ioctl_verbs.h
+++ b/kernel-headers/rdma/ib_user_ioctl_verbs.h
@@ -258,6 +258,7 @@ enum rdma_driver_id {
RDMA_DRIVER_ERDMA,
RDMA_DRIVER_MANA,
RDMA_DRIVER_IONIC,
+ RDMA_DRIVER_CXI,
};
enum ib_uverbs_gid_type {
@@ -266,6 +267,7 @@ enum ib_uverbs_gid_type {
IB_UVERBS_GID_TYPE_ROCE_V2,
IB_UVERBS_GID_TYPE_UET_UDP,
IB_UVERBS_GID_TYPE_UET_IP,
+ IB_UVERBS_GID_TYPE_SLINGSHOT_UFH,
};
struct ib_uverbs_gid_entry {
--git a/kernel-headers/rdma/rdma_netlink.h b/kernel-headers/rdma/rdma_netlink.h
index ee11c3bbbae2..69ff1dee2db6 100644
--- a/kernel-headers/rdma/rdma_netlink.h
+++ b/kernel-headers/rdma/rdma_netlink.h
@@ -158,6 +158,7 @@ enum {
RDMA_NODE_USNIC,
RDMA_NODE_USNIC_UDP,
RDMA_NODE_UNSPECIFIED,
+ RDMA_NODE_SLINGSHOT,
};
/*
diff --git a/libibverbs/cmd_device.c b/libibverbs/cmd_device.c
index da7783565d79..ecc58fff66ba 100644
--- a/libibverbs/cmd_device.c
+++ b/libibverbs/cmd_device.c
@@ -283,11 +283,12 @@ static int query_sysfs_gid(struct ibv_context *context, uint8_t port_num, int in
#define V2_TYPE "RoCE v2"
#define UET_UDP_TYPE "UET UDP"
#define UET_IP_TYPE "UET IP"
+#define SLINGSHOT_UFH_TYPE "SLINGSHOT UFH"
static int query_sysfs_gid_type(struct ibv_context *context, uint8_t port_num,
unsigned int index, enum ibv_gid_type_sysfs *type)
{
struct verbs_device *verbs_device = verbs_get_device(context->device);
- char buff[11];
+ char buff[16];
/* Reset errno so that we can rely on its value upon any error flow in
* ibv_read_sysfs_file.
@@ -335,6 +336,8 @@ static int query_sysfs_gid_type(struct ibv_context *context, uint8_t port_num,
*type = IBV_GID_TYPE_SYSFS_UET_UDP;
} else if (!strcmp(buff, UET_IP_TYPE)) {
*type = IBV_GID_TYPE_SYSFS_UET_IP;
+ } else if (!strcmp(buff, SLINGSHOT_UFH_TYPE)) {
+ *type = IBV_GID_TYPE_SYSFS_SLINGSHOT_UFH;
} else {
errno = ENOTSUP;
return -1;
@@ -389,6 +392,8 @@ static int query_sysfs_gid_entry(struct ibv_context *context, uint32_t port_num,
entry->gid_type = IBV_GID_TYPE_UET_UDP;
} else if (gid_type == IBV_GID_TYPE_SYSFS_UET_IP) {
entry->gid_type = IBV_GID_TYPE_UET_IP;
+ } else if (gid_type == IBV_GID_TYPE_SYSFS_SLINGSHOT_UFH) {
+ entry->gid_type = IBV_GID_TYPE_SLINGSHOT_UFH;
} else {
entry->gid_type = IBV_GID_TYPE_ROCE_V2;
}
diff --git a/libibverbs/driver.h b/libibverbs/driver.h
index 8327550231f4..b6f75faf7997 100644
--- a/libibverbs/driver.h
+++ b/libibverbs/driver.h
@@ -173,6 +173,7 @@ enum ibv_gid_type_sysfs {
IBV_GID_TYPE_SYSFS_ROCE_V2,
IBV_GID_TYPE_SYSFS_UET_UDP,
IBV_GID_TYPE_SYSFS_UET_IP,
+ IBV_GID_TYPE_SYSFS_SLINGSHOT_UFH,
};
enum verbs_query_gid_attr_mask {
@@ -409,6 +410,7 @@ struct verbs_context_ops {
struct ibv_cq_ex *(*create_cq_ex)(
struct ibv_context *context,
struct ibv_cq_init_attr_ex *init_attr);
+ struct ibv_comp_channel *(*create_comp_channel)(struct ibv_context *context);
struct ibv_flow *(*create_flow)(struct ibv_qp *qp,
struct ibv_flow_attr *flow_attr);
struct ibv_flow_action *(*create_flow_action_esp)(struct ibv_context *context,
@@ -437,6 +439,7 @@ struct verbs_context_ops {
int (*dealloc_td)(struct ibv_td *td);
int (*dereg_mr)(struct verbs_mr *vmr);
int (*destroy_ah)(struct ibv_ah *ah);
+ int (*destroy_comp_channel)(struct ibv_comp_channel *channel);
int (*destroy_comp_cntr)(struct ibv_comp_cntr *comp_cntr);
int (*destroy_counters)(struct ibv_counters *counters);
int (*destroy_cq)(struct ibv_cq *cq);
diff --git a/libibverbs/dummy_ops.c b/libibverbs/dummy_ops.c
index fee27c1f6687..278a5e768348 100644
--- a/libibverbs/dummy_ops.c
+++ b/libibverbs/dummy_ops.c
@@ -210,6 +210,12 @@ static struct ibv_cq_ex *create_cq_ex(struct ibv_context *context,
return NULL;
}
+static struct ibv_comp_channel *create_comp_channel(struct ibv_context *context)
+{
+ errno = EOPNOTSUPP;
+ return NULL;
+}
+
static struct ibv_flow *create_flow(struct ibv_qp *qp,
struct ibv_flow_attr *flow_attr)
{
@@ -310,6 +316,11 @@ static int destroy_ah(struct ibv_ah *ah)
return EOPNOTSUPP;
}
+static int destroy_comp_channel(struct ibv_comp_channel *channel)
+{
+ return EOPNOTSUPP;
+}
+
static int destroy_comp_cntr(struct ibv_comp_cntr *comp_cntr)
{
return EOPNOTSUPP;
@@ -784,6 +795,7 @@ const struct verbs_context_ops verbs_dummy_ops = {
create_counters,
create_cq,
create_cq_ex,
+ create_comp_channel,
create_flow,
create_flow_action_esp,
create_jkey,
@@ -800,6 +812,7 @@ const struct verbs_context_ops verbs_dummy_ops = {
dealloc_td,
dereg_mr,
destroy_ah,
+ destroy_comp_channel,
destroy_comp_cntr,
destroy_counters,
destroy_cq,
@@ -939,6 +952,7 @@ void verbs_set_ops(struct verbs_context *vctx,
SET_PRIV_OP(ctx, cq_event);
SET_PRIV_OP(ctx, create_ah);
SET_OP(vctx, create_ah_ex);
+ SET_OP(vctx, create_comp_channel);
SET_PRIV_OP(ctx, create_cq);
SET_PRIV_OP_IC(vctx, create_cq_ex);
SET_PRIV_OP_IC(vctx, create_comp_cntr);
@@ -959,6 +973,7 @@ void verbs_set_ops(struct verbs_context *vctx,
SET_OP(vctx, destroy_counters);
SET_PRIV_OP(ctx, dereg_mr);
SET_PRIV_OP(ctx, destroy_ah);
+ SET_OP(vctx, destroy_comp_channel);
SET_PRIV_OP_IC(vctx, destroy_comp_cntr);
SET_PRIV_OP(ctx, destroy_cq);
SET_OP2(vctx, ibv_destroy_flow, destroy_flow);
diff --git a/libibverbs/enum_strs.c b/libibverbs/enum_strs.c
index 54ce7362ab09..735048633366 100644
--- a/libibverbs/enum_strs.c
+++ b/libibverbs/enum_strs.c
@@ -42,9 +42,10 @@ const char *ibv_node_type_str(enum ibv_node_type node_type)
[IBV_NODE_USNIC] = "usNIC",
[IBV_NODE_USNIC_UDP] = "usNIC UDP",
[IBV_NODE_UNSPECIFIED] = "unspecified",
+ [IBV_NODE_SLINGSHOT] = "Slingshot",
};
- if (node_type < IBV_NODE_CA || node_type > IBV_NODE_UNSPECIFIED)
+ if (node_type < IBV_NODE_CA || node_type > IBV_NODE_SLINGSHOT)
return "unknown";
return node_type_str[node_type];
diff --git a/libibverbs/init.c b/libibverbs/init.c
index 5f3d11e2d2d7..99bff6561406 100644
--- a/libibverbs/init.c
+++ b/libibverbs/init.c
@@ -116,6 +116,8 @@ enum ibv_node_type decode_knode_type(unsigned int knode_type)
return IBV_NODE_USNIC_UDP;
case RDMA_NODE_UNSPECIFIED:
return IBV_NODE_UNSPECIFIED;
+ case RDMA_NODE_SLINGSHOT:
+ return IBV_NODE_SLINGSHOT;
}
return IBV_NODE_UNKNOWN;
}
@@ -415,6 +417,9 @@ static struct verbs_device *try_driver(const struct verbs_device_ops *ops,
case IBV_NODE_UNSPECIFIED:
dev->transport_type = IBV_TRANSPORT_UNSPECIFIED;
break;
+ case IBV_NODE_SLINGSHOT:
+ dev->transport_type = IBV_TRANSPORT_SLINGSHOT;
+ break;
default:
dev->transport_type = IBV_TRANSPORT_UNKNOWN;
break;
diff --git a/libibverbs/man/ibv_query_gid_ex.3.md b/libibverbs/man/ibv_query_gid_ex.3.md
index 261249bc4c92..4c7a5e6f76a5 100644
--- a/libibverbs/man/ibv_query_gid_ex.3.md
+++ b/libibverbs/man/ibv_query_gid_ex.3.md
@@ -63,7 +63,8 @@ struct ibv_gid_entry {
*gid_type*
: enum ibv_gid_type, can be one of IBV_GID_TYPE_IB, IBV_GID_TYPE_ROCE_V1,
- IBV_GID_TYPE_ROCE_V2, IBV_GID_TYPE_UET_UDP or IBV_GID_TYPE_UET_IP.
+ IBV_GID_TYPE_ROCE_V2, IBV_GID_TYPE_UET_UDP, IBV_GID_TYPE_UET_IP,
+ or IBV_GID_TYPE_SLINGSHOT_UFH.
*ndev_ifindex*
: The interface index of the net device associated with this GID.
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index b2f9f4e3f8c0..b79e35ce9a0e 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -873,6 +873,11 @@ struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context)
struct ib_uverbs_create_comp_channel_resp resp = {};
struct ibv_comp_channel *channel;
+ /* if the provider doesn't support this, fall back to kernel */
+ channel = get_ops(context)->create_comp_channel(context);
+ if (channel || errno != EOPNOTSUPP)
+ return channel;
+
channel = malloc(sizeof *channel);
if (!channel)
return NULL;
@@ -897,6 +902,12 @@ int ibv_destroy_comp_channel(struct ibv_comp_channel *channel)
int ret;
context = channel->context;
+
+ /* if the provider doesn't support this, fall back to kernel */
+ ret = get_ops(context)->destroy_comp_channel(channel);
+ if (ret != EOPNOTSUPP)
+ return ret;
+
pthread_mutex_lock(&context->mutex);
if (channel->refcnt) {
@@ -1236,6 +1247,8 @@ int ibv_query_gid_type(struct ibv_context *context, uint8_t port_num,
*type = IBV_GID_TYPE_SYSFS_UET_UDP;
else if (entry.gid_type == IBV_GID_TYPE_UET_IP)
*type = IBV_GID_TYPE_SYSFS_UET_IP;
+ else if (entry.gid_type == IBV_GID_TYPE_SLINGSHOT_UFH)
+ *type = IBV_GID_TYPE_SYSFS_SLINGSHOT_UFH;
else
*type = IBV_GID_TYPE_SYSFS_ROCE_V2;
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index 1bb680b7be39..560643b77e35 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -76,6 +76,7 @@ enum ibv_gid_type {
IBV_GID_TYPE_ROCE_V2,
IBV_GID_TYPE_UET_UDP,
IBV_GID_TYPE_UET_IP,
+ IBV_GID_TYPE_SLINGSHOT_UFH,
};
struct ibv_gid_entry {
@@ -103,6 +104,7 @@ enum ibv_node_type {
IBV_NODE_USNIC,
IBV_NODE_USNIC_UDP,
IBV_NODE_UNSPECIFIED,
+ IBV_NODE_SLINGSHOT,
};
enum ibv_transport_type {
@@ -112,6 +114,7 @@ enum ibv_transport_type {
IBV_TRANSPORT_USNIC,
IBV_TRANSPORT_USNIC_UDP,
IBV_TRANSPORT_UNSPECIFIED,
+ IBV_TRANSPORT_SLINGSHOT,
};
enum ibv_qp_msg_order {
@@ -2546,6 +2549,8 @@ struct verbs_context {
int (*remove_addr)(struct ibv_job *job, unsigned int addr_idx);
int (*query_addr)(struct ibv_job *job, unsigned int addr_idx,
struct ibv_ah_attr_ex *ah_attr);
+ struct ibv_comp_channel *(*create_comp_channel)(struct ibv_context *context);
+ int (*destroy_comp_channel)(struct ibv_comp_channel *channel);
void (*free_buf)(struct ibv_buf *buf);
void *(*alloc_buf)(struct ibv_pd *pd, size_t size,
struct ibv_buf **buf);
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 04/12] cxiverbs: add the synchronized native hardware and verbs headers
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (2 preceding siblings ...)
2026-10-31 19:25 ` [PATCH 03/12] libibverbs: support provider completion channels and Slingshot transport Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:25 ` [PATCH 05/12] cxiverbs: define the native direct-verbs resource interface Doug Ledford
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Add the headers the cxiverbs provider is built on.
kernel-headers/rdma/cxiverbs-abi.h and
kernel-headers/ethernet/cassini_user_defs.h are copies of the kernel's
UAPI headers and must be updated together with them. providers/cxi/
cxiverbs-abi.h is a thin wrapper that exposes the ABI under the name
the provider includes.
providers/cxi/cxi_prov_hw.h is a copy of the kernel's
include/linux/hpe/cxi/cxi_prov_hw.h. It differs from it in two
places only: a prologue that supplies the kernel integer types and
errno/string headers for user space, and the include path of
cassini_user_defs.h.
cxi.h holds the provider's private structures and the QPN encoding
and cxi_verbs.h the provider-visible verbs extensions. The provider
is named cxiverbs, not cxi, so that it does not collide with libcxi.so,
which is built from a separate project and links against this
provider's direct verbs API.
checkpatch (rdma-core CI settings) still reports
PREFER_DEFINED_ATTRIBUTE_MACRO (27) and VOLATILE (2) in this patch.
They are intentional, documented in providers/cxi/utils/README.md: the
imported UAPI and hardware headers use portable
__attribute__((packed)) because kernel-private __packed is not
available to userspace, and the command-queue status and event
write-back fields keep volatile because the device updates them. If
reviewers prefer a different form, it needs coordination with the
internal repositories these headers are synchronized from and will be
changed in V2.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
| 15004 ++++++++++++++++++++++++++
| 658 ++
providers/cxi/cxi.h | 265 +
providers/cxi/cxi_prov_hw.h | 1838 ++++
providers/cxi/cxi_verbs.h | 56 +
providers/cxi/cxiverbs-abi.h | 29 +
6 files changed, 17850 insertions(+)
--git a/kernel-headers/ethernet/cassini_user_defs.h b/kernel-headers/ethernet/cassini_user_defs.h
new file mode 100644
index 000000000000..995359850bfd
--- /dev/null
+++ b/kernel-headers/ethernet/cassini_user_defs.h
@@ -0,0 +1,15004 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Cassini hardware definitions
+ * Copyright 2018-2021 Hewlett Packard Enterprise Development LP
+ *
+ * This file is generated. Do not modify.
+ */
+
+#ifndef __CASSINI_USER_DEFS_H
+#define __CASSINI_USER_DEFS_H
+
+#include <asm/byteorder.h>
+
+#ifndef __LITTLE_ENDIAN
+#error "Non-little endian builds not supported"
+#endif
+
+#ifndef __KERNEL__
+#include <endian.h>
+
+/* Provide fallback implementations if endian.h functions aren't available */
+#ifndef be64toh
+#define be64toh(x) __builtin_bswap64(x)
+#endif
+#ifndef htobe64
+#define htobe64(x) __builtin_bswap64(x)
+#endif
+#ifndef be32toh
+#define be32toh(x) __builtin_bswap32(x)
+#endif
+#ifndef htobe32
+#define htobe32(x) __builtin_bswap32(x)
+#endif
+#ifndef be16toh
+#define be16toh(x) __builtin_bswap16(x)
+#endif
+#ifndef htobe16
+#define htobe16(x) __builtin_bswap16(x)
+#endif
+
+#define be64_to_cpu be64toh
+#define be32_to_cpu be32toh
+#define be16_to_cpu be16toh
+#define cpu_to_be64 htobe64
+#define cpu_to_be32 htobe32
+#define cpu_to_be16 htobe16
+#endif
+
+#define C_CQ_BASE 0x00000000
+#define C_PCT_BASE 0x00800000
+#define C_HNI_BASE 0x01000000
+#define C_HNI_PML_BASE 0x01800000
+#define C_RMU_BASE 0x02000000
+#define C_IXE_BASE 0x02800000
+#define C_ATU_BASE 0x08000000
+#define C_EE_BASE 0x08800000
+#define C_PARBS_BASE 0x09000000
+#define C_LPE_BASE 0x09800000
+#define C_MST_BASE 0x0a000000
+#define C_OXE_BASE 0x0a800000
+#define C_MB_BASE 0x10000000
+#define C_PI_BASE 0x10800000
+#define C_PI_IPD_BASE 0x11000000
+#define C_MEMORG_CSR 0x40000000u
+#define C_MEMORG_CSR_SIZE 0x28000000u
+#define C_MEMORG_CQ_LAUNCH 0x00000000u
+#define C_MEMORG_CQ_LAUNCH_SIZE 0x08000000u
+#define C_MEMORG_CQ_TOU 0x08000000u
+#define C_MEMORG_EE 0x10000000u
+#define C_CQ_LAUNCH_TXQ_BASE (C_MEMORG_CQ_LAUNCH + 0x00000000)
+#define C_CQ_LAUNCH_TGT_BASE (C_MEMORG_CQ_LAUNCH + 0x04000000)
+#define C_CQ_LAUNCH_PAGE_SIZE 0x10000
+#define C_TOU_LAUNCH_PAGE_SIZE 0x10000
+#define C_EE_SW_STATE_PAGE_SIZE 0x10000
+#define C_NUM_CTS 2048
+#define C_CT_NONE 0
+#define C_AC_NONE 0
+#define C_CID_NONE 0
+#define C_NUM_EQS 2048
+#define C_EQ_NONE 0
+#define C_NUM_ACS 1024
+#define C_NUM_PTLTES 2048
+#define C_NUM_TRANSMIT_CQS 1024
+#define C_NUM_TARGET_CQS 512
+#define C_NID_ANY 1048575
+#define NICSIM_CONFIG_DUMP 0x27fff008
+#define NICSIM_CONFIG_LOG 0x27fff010
+#define NICSIM_CONFIG_STATE 0x27fff018
+#define NICSIM_NIC_ID 0x27fff060
+#define C_PLATFORM_ASIC 0
+#define C_PLATFORM_NETSIM 1
+#define C_PLATFORM_Z1 2
+#define C_PLATFORM_FPGA 3
+#define C_MST_TABLE_SIMPLE_OFFSET 16
+#define C_PE_COUNT 4
+#define C_COMM_PROF_PER_CQ 16
+#define C_DFA_PID_BITS_MIN 6
+#define C_DFA_PID_BITS_MAX 9
+#define C_PID_ANY ((1 << C_DFA_PID_BITS_MAX) - 1)
+#define C_RANK_ANY ((1 << (32 - C_DFA_PID_BITS_MAX)) - 1)
+#define C_DFA_NIC_BITS 20
+#define C_DFA_MULTICAST_ID_BITS 13
+#define C_DFA_INDEX_EXT_BITS 5
+#define C_CT_SUCCESS_BITS 48
+#define C_CT_FAILURE_BITS 7
+#define C_DFA_ENDPOINT_DEFINED_BITS 12
+#define C_DFA_ENDPOINT_BITS (C_DFA_ENDPOINT_DEFINED_BITS + C_DFA_INDEX_EXT_BITS)
+#define C_NUM_RGIDS 256
+#define C_RESERVED_RGID 0
+#define C_OXE_CQ_MCU_START 0
+#define C_OXE_CQ_MCU_COUNT 48
+#define C_OXE_LPE_MCU_START (C_OXE_CQ_MCU_START + C_OXE_CQ_MCU_COUNT)
+#define C_OXE_LPE_MCU_COUNT 16
+#define C_OXE_IXE_MCU_START (C_OXE_LPE_MCU_START + C_OXE_LPE_MCU_COUNT)
+#define C_OXE_IXE_MCU_COUNT 24
+#define C_OXE_TOU_MCU_START (C_OXE_IXE_MCU_START + C_OXE_IXE_MCU_COUNT)
+#define C_OXE_TOU_MCU_COUNT 8
+#define C_OXE_MCU_COUNT \
+ (C_OXE_CQ_MCU_COUNT + C_OXE_IXE_MCU_COUNT + C_OXE_LPE_MCU_COUNT + C_OXE_TOU_MCU_COUNT)
+#define C_NUM_LACS 8
+#define C_NUM_TLES 2048
+#define C_NUM_VFS 64
+#define C_MAX_IDC_PAYLOAD_RES 224
+#define C_MAX_IDC_PAYLOAD_UNR 192
+#define C_ATU_PRB_ENTRIES 512
+
+enum c_rsp_status {
+ C_RSP_PEND = 0,
+ C_RSP_NACK_RCVD = 1,
+ C_RSP_GET_ACK_RCVD = 2,
+ C_RSP_OP_COMP = 3,
+};
+
+enum c_sct_status {
+ C_SCT_NOT_USED = 0,
+ C_SCT_NORMAL = 1,
+ C_SCT_STALL = 2,
+ C_SCT_CLEAR_PEND = 3,
+ C_SCT_CLOSE_PEND = 4,
+ C_SCT_CLOSE_TIMEOUT = 5,
+ C_SCT_CLOSE_COMP = 6,
+ C_SCT_RETRY = 7,
+};
+
+enum c_port_v4_pkt_type {
+ C_V4_PKT_UNRESTRICTED = 0,
+ C_V4_PKT_SMALLMSG = 1,
+ C_V4_PKT_CONTINUATION = 2,
+ C_V4_PKT_CONN_MGMT = 3,
+ C_V4_PKT_RESTRICTED = 4,
+ C_RESERVED5 = 5,
+ C_RESERVED6 = 6,
+ C_V4_PKT_HRP_ACK = 7,
+};
+
+enum c_port_vs_pkt_type {
+ C_VS_PKT_PUT64 = 0,
+ C_VS_PKT_GET64 = 1,
+ C_VS_PKT_PUT32 = 2,
+ C_VS_PKT_GET32 = 3,
+ C_VS_PKT_AMO64 = 4,
+ C_VS_PKT_FAMO64 = 5,
+ C_VS_PKT_AMO32 = 6,
+ C_VS_PKT_FAMO32 = 7,
+};
+
+enum c_port_rsp_pkt_type {
+ C_RSP_PKT_ANY = 0,
+ C_RSP_PKT_32B = 1,
+};
+
+enum c_format {
+ C_PKT_FORMAT_OPT = 0,
+ C_PKT_FORMAT_STD = 1,
+};
+
+enum c_checksum_ctrl {
+ C_CHECKSUM_CTRL_NONE = 0,
+ C_CHECKSUM_CTRL_ROCE = 1,
+ C_CHECKSUM_CTRL_UDP = 2,
+ C_CHECKSUM_CTRL_TCP = 3,
+};
+
+enum c_cmd_size {
+ C_CMD_SIZE_32B = 0,
+ C_CMD_SIZE_64B = 1,
+ C_CMD_SIZE_128B = 2,
+ C_CMD_SIZE_256B = 3,
+};
+
+enum c_ptl_list {
+ C_PTL_LIST_PRIORITY = 0,
+ C_PTL_LIST_OVERFLOW = 1,
+ C_PTL_LIST_REQUEST = 2,
+ C_PTL_LIST_UNEXPECTED = 3,
+};
+
+enum c_atomic_op {
+ C_AMO_OP_MIN = 0,
+ C_AMO_OP_MAX = 1,
+ C_AMO_OP_SUM = 2,
+ C_AMO_OP_LOR = 4,
+ C_AMO_OP_LAND = 5,
+ C_AMO_OP_BOR = 6,
+ C_AMO_OP_BAND = 7,
+ C_AMO_OP_LXOR = 8,
+ C_AMO_OP_BXOR = 9,
+ C_AMO_OP_SWAP = 10,
+ C_AMO_OP_CSWAP = 11,
+ C_AMO_OP_AXOR = 12,
+};
+
+enum c_cswap_op {
+ C_AMO_OP_CSWAP_EQ = 0,
+ C_AMO_OP_CSWAP_NE = 1,
+ C_AMO_OP_CSWAP_LE = 2,
+ C_AMO_OP_CSWAP_LT = 3,
+ C_AMO_OP_CSWAP_GE = 4,
+ C_AMO_OP_CSWAP_GT = 5,
+};
+
+enum c_atomic_type {
+ C_AMO_TYPE_INT8_T = 0,
+ C_AMO_TYPE_UINT8_T = 1,
+ C_AMO_TYPE_INT16_T = 2,
+ C_AMO_TYPE_UINT16_T = 3,
+ C_AMO_TYPE_INT32_T = 4,
+ C_AMO_TYPE_UINT32_T = 5,
+ C_AMO_TYPE_INT64_T = 6,
+ C_AMO_TYPE_UINT64_T = 7,
+ C_AMO_TYPE_FLOAT_T = 8,
+ C_AMO_TYPE_FLOAT_COMPLEX_T = 9,
+ C_AMO_TYPE_DOUBLE_T = 10,
+ C_AMO_TYPE_DOUBLE_COMPLEX_T = 11,
+ C_AMO_TYPE_UINT128_T = 12,
+};
+
+enum c_ptlte_state {
+ C_PTLTE_RESET = 0,
+ C_PTLTE_DISABLED = 1,
+ C_PTLTE_ENABLED = 2,
+ C_PTLTE_SOFTWARE_MANAGED = 3,
+ C_PTLTE_ETHERNET = 4,
+};
+
+enum c_cmd_type {
+ C_CMD_TYPE_IDC = 0,
+ C_CMD_TYPE_DMA = 1,
+ C_CMD_TYPE_CT = 2,
+ C_CMD_TYPE_CQ = 3,
+};
+
+enum c_dma_op {
+ C_CMD_NOOP = 0,
+ C_CMD_PUT = 1,
+ C_CMD_GET = 2,
+ C_CMD_RENDEZVOUS_PUT = 3,
+ C_CMD_ATOMIC = 4,
+ C_CMD_FETCHING_ATOMIC = 5,
+ C_CMD_ETHERNET_TX = 6,
+ C_CMD_SMALL_MESSAGE = 7,
+ C_CMD_NOMATCH_PUT = 8,
+ C_CMD_NOMATCH_GET = 9,
+ C_CMD_CSTATE = 10,
+ C_CMD_CLOSE = 11,
+ C_CMD_CLEAR = 12,
+ C_CMD_REDUCTION = 13,
+};
+
+enum c_ct_op {
+ C_CMD_CT_NOOP = 0,
+ C_CMD_CT_SET = 1,
+ C_CMD_CT_GET = 2,
+ C_CMD_CT_INC = 3,
+ C_CMD_CT_CANCEL = 4,
+ C_CMD_CT_TRIG_DMA = 5,
+ C_CMD_CT_TRIG_SET = 6,
+ C_CMD_CT_TRIG_INC = 7,
+ C_CMD_CT_TRIG_EVENT = 8,
+};
+
+enum c_cq_op {
+ C_CMD_CQ_NOOP = 0,
+ C_CMD_CQ_FENCE = 1,
+ C_CMD_CQ_LCID = 2,
+};
+
+enum c_tgt_op {
+ C_CMD_TGT_APPEND = 8,
+ C_CMD_TGT_SEARCH = 9,
+ C_CMD_TGT_SEARCH_AND_DELETE = 10,
+ C_CMD_TGT_UNLINK = 11,
+ C_CMD_TGT_SETSTATE = 12,
+};
+
+enum c_event_size {
+ C_EVENT_SIZE_NO_EVENT = 0,
+ C_EVENT_SIZE_16_BYTE = 1,
+ C_EVENT_SIZE_32_BYTE = 2,
+ C_EVENT_SIZE_64_BYTE = 3,
+};
+
+enum c_event_type {
+ C_EVENT_PUT = 0,
+ C_EVENT_GET = 1,
+ C_EVENT_ATOMIC = 2,
+ C_EVENT_FETCH_ATOMIC = 3,
+ C_EVENT_PUT_OVERFLOW = 4,
+ C_EVENT_GET_OVERFLOW = 5,
+ C_EVENT_ATOMIC_OVERFLOW = 6,
+ C_EVENT_FETCH_ATOMIC_OVERFLOW = 7,
+ C_EVENT_SEND = 8,
+ C_EVENT_ACK = 9,
+ C_EVENT_REPLY = 10,
+ C_EVENT_LINK = 11,
+ C_EVENT_SEARCH = 12,
+ C_EVENT_STATE_CHANGE = 13,
+ C_EVENT_UNLINK = 14,
+ C_EVENT_RENDEZVOUS = 15,
+ C_EVENT_ETHERNET = 16,
+ C_EVENT_COMMAND_FAILURE = 17,
+ C_EVENT_TRIGGERED_OP = 18,
+ C_EVENT_ETHERNET_FGFC = 19,
+ C_EVENT_PCT = 20,
+ C_EVENT_MATCH = 21,
+ C_EVENT_ERROR = 28,
+ C_EVENT_TIMESTAMP = 29,
+ C_EVENT_EQ_SWITCH = 30,
+ C_EVENT_NULL_EVENT = 31,
+};
+
+enum c_return_code {
+ C_RC_NO_EVENT = 0,
+ C_RC_OK = 1,
+ C_RC_UNDELIVERABLE = 2,
+ C_RC_PT_DISABLED = 3,
+ C_RC_DROPPED = 4,
+ C_RC_PERM_VIOLATION = 5,
+ C_RC_OP_VIOLATION = 6,
+ C_RC_NO_MATCH = 8,
+ C_RC_UNCOR = 9,
+ C_RC_UNCOR_TRNSNT = 10,
+ C_RC_NO_SPACE = 16,
+ C_RC_ENTRY_NOT_FOUND = 18,
+ C_RC_NO_TARGET_CONN = 19,
+ C_RC_NO_TARGET_MST = 20,
+ C_RC_NO_TARGET_TRS = 21,
+ C_RC_SEQUENCE_ERROR = 22,
+ C_RC_NO_MATCHING_CONN = 23,
+ C_RC_INVALID_DFA_FORMAT = 24,
+ C_RC_VNI_NOT_FOUND = 25,
+ C_RC_PTLTE_NOT_FOUND = 26,
+ C_RC_PTLTE_SW_MANAGED = 27,
+ C_RC_SRC_ERROR = 28,
+ C_RC_MST_CANCELLED = 29,
+ C_RC_HRP_CONFIG_ERROR = 30,
+ C_RC_HRP_RSP_ERROR = 31,
+ C_RC_HRP_RSP_DISCARD = 32,
+ C_RC_INVALID_AC = 33,
+ C_RC_PAGE_PERM_ERROR = 34,
+ C_RC_ATS_ERROR = 35,
+ C_RC_NO_TRANSLATION = 36,
+ C_RC_PAGE_REQ_ERROR = 37,
+ C_RC_PCIE_ERROR_POISONED = 38,
+ C_RC_PCIE_UNSUCCESS_CMPL = 39,
+ C_RC_AMO_INVAL_OP_ERROR = 40,
+ C_RC_AMO_ALIGN_ERROR = 41,
+ C_RC_AMO_FP_INVALID = 42,
+ C_RC_AMO_FP_UNDERFLOW = 43,
+ C_RC_AMO_FP_OVERFLOW = 44,
+ C_RC_AMO_FP_INEXACT = 45,
+ C_RC_ILLEGAL_OP = 46,
+ C_RC_INVALID_ENDPOINT = 47,
+ C_RC_RESTRICTED_UNICAST = 48,
+ C_RC_CMD_ALIGN_ERROR = 49,
+ C_RC_CMD_INVALID_ARG = 50,
+ C_RC_INVALID_EVENT = 51,
+ C_RC_ADDR_OUT_OF_RANGE = 52,
+ C_RC_CONN_CLOSED = 53,
+ C_RC_CANCELED = 54,
+ C_RC_NO_MATCHING_TRS = 55,
+ C_RC_NO_MATCHING_MST = 56,
+ C_RC_DELAYED = 57,
+ C_RC_AMO_LENGTH_ERROR = 58,
+ C_RC_PKTBUF_ERROR = 59,
+ C_RC_RESOURCE_BUSY = 60,
+ C_RC_FLUSH_TRANSLATION = 61,
+ C_RC_TRS_PEND_RSP = 62,
+};
+
+enum c_rss_hash_type {
+ C_RSS_HASH_NONE = 0,
+ C_RSS_HASH_IPV4 = 1,
+ C_RSS_HASH_IPV4_TCP = 2,
+ C_RSS_HASH_IPV4_UDP = 3,
+ C_RSS_HASH_IPV4_PROTOCOL = 4,
+ C_RSS_HASH_IPV4_PROTOCOL_TCP = 5,
+ C_RSS_HASH_IPV4_PROTOCOL_UDP = 6,
+ C_RSS_HASH_IPV4_PROTOCOL_UDP_ROCE = 7,
+ C_RSS_HASH_IPV4_FLOW_LABEL = 8,
+ C_RSS_HASH_IPV6 = 9,
+ C_RSS_HASH_IPV6_TCP = 10,
+ C_RSS_HASH_IPV6_UDP = 11,
+ C_RSS_HASH_IPV6_PROTOCOL = 12,
+ C_RSS_HASH_IPV6_PROTOCOL_TCP = 13,
+ C_RSS_HASH_IPV6_PROTOCOL_UDP = 14,
+ C_RSS_HASH_IPV6_PROTOCOL_UDP_ROCE = 15,
+ C_RSS_HASH_IPV6_FLOW_LABEL = 16,
+};
+
+enum c_sc_reason {
+ C_SC_FC_EQ_FULL = 0,
+ C_SC_FC_NO_MATCH = 1,
+ C_SC_FC_UNEXPECTED_FAIL = 2,
+ C_SC_FC_REQUEST_FULL = 3,
+ C_SC_SM_UNEXPECTED_FAIL = 4,
+ C_SC_SM_APPEND_FAIL = 5,
+ C_SC_DIS_UNCOR = 6,
+};
+
+enum c_pct_event_type {
+ C_PCT_REQUEST_NACK = 0,
+ C_PCT_REQUEST_TIMEOUT = 1,
+ C_PCT_SCT_TIMEOUT = 2,
+ C_PCT_TCT_TIMEOUT = 3,
+ C_PCT_ACCEL_CLOSE_COMPLETE = 4,
+ C_PCT_RETRY_COMPLETE = 5,
+};
+
+enum c_error_class {
+ C_EC_SFTWR = 0,
+ C_EC_INFO = 1,
+ C_EC_TRS_NS = 2,
+ C_EC_TRS_S = 3,
+ C_EC_TRNSNT_NS = 4,
+ C_EC_TRNSNT_S = 5,
+ C_EC_BADCON_NS = 6,
+ C_EC_BADCON_S = 7,
+ C_EC_DEGRD_NS = 8,
+ C_EC_COR = 9,
+ C_EC_UNCOR_NS = 10,
+ C_EC_UNCOR_S = 11,
+ C_EC_CRIT = 12,
+};
+
+enum c_odp_status {
+ C_ATU_ODP_SUCCESS = 0,
+ C_ATU_ODP_FAILURE = 1,
+};
+
+enum c_ta_mode {
+ C_ATU_ATS_MODE = 0,
+ C_ATU_NTA_MODE = 1,
+ C_ATU_ATS_DYNAMIC_MODE = 2,
+ C_ATU_PASSTHROUGH_MODE = 3,
+};
+
+enum c_ptg_mode {
+ C_ATU_PTG_MODE_SGL = 0,
+ C_ATU_PTG_MODE_DBL_A = 1,
+ C_ATU_PTG_MODE_DBL_B = 2,
+ C_ATU_PTG_MODE_DBL_C = 3,
+ C_ATU_PTG_MODE_TPL_A = 4,
+ C_ATU_PTG_MODE_TPL_B = 5,
+};
+
+enum c_odp_mode {
+ C_ATU_ODP_MODE_ATS_PRS = 0,
+ C_ATU_ODP_MODE_NIC_PRI = 1,
+};
+
+enum c_atucq_cmd {
+ C_ATU_NOP = 0,
+ C_ATU_INVALIDATE_PAGES = 1,
+ C_ATU_COMPLETION_WAIT = 2,
+ C_ATU_RESERVED = 3,
+};
+
+enum c_enet_frame_type {
+ C_RMU_ENET_802_3 = 1,
+ C_RMU_ENET_OPT_IPV4 = 2,
+ C_RMU_ENET_OPT_IPV6 = 3,
+};
+
+enum c_msix_ints {
+ C_PF_TO_VF_MSIX_INT = 0,
+ C_PI_IPD_IRQA_MSIX_INT = 0,
+ C_PI_IRQA_MSIX_INT = 1,
+ C_MB_IRQA_MSIX_INT = 2,
+ C_CQ_IRQA_MSIX_INT = 3,
+ C_PCT_IRQA_MSIX_INT = 4,
+ C_HNI_IRQA_MSIX_INT = 5,
+ C_HNI_PML_IRQA_MSIX_INT = 6,
+ C_RMU_IRQA_MSIX_INT = 7,
+ C_IXE_IRQA_MSIX_INT = 8,
+ C_ATU_IRQA_MSIX_INT = 9,
+ C_EE_IRQA_MSIX_INT = 10,
+ C_PARBS_IRQA_MSIX_INT = 11,
+ C_LPE_IRQA_MSIX_INT = 12,
+ C_MST_IRQA_MSIX_INT = 13,
+ C_OXE_IRQA_MSIX_INT = 14,
+ C_PI_IPD_IRQB_MSIX_INT = 15,
+ C_PI_IRQB_MSIX_INT = 16,
+ C_MB_IRQB_MSIX_INT = 17,
+ C_CQ_IRQB_MSIX_INT = 18,
+ C_PCT_IRQB_MSIX_INT = 19,
+ C_HNI_IRQB_MSIX_INT = 20,
+ C_HNI_PML_IRQB_MSIX_INT = 21,
+ C_RMU_IRQB_MSIX_INT = 22,
+ C_IXE_IRQB_MSIX_INT = 23,
+ C_ATU_IRQB_MSIX_INT = 24,
+ C_EE_IRQB_MSIX_INT = 25,
+ C_PARBS_IRQB_MSIX_INT = 26,
+ C_LPE_IRQB_MSIX_INT = 27,
+ C_MST_IRQB_MSIX_INT = 28,
+ C_OXE_IRQB_MSIX_INT = 29,
+ C_PI_DMAC_MSIX_INT = 30,
+ C_PI_IPD_VF_PF_MSIX_INT = 31,
+ C_FIRST_AVAIL_MSIX_INT = 32,
+};
+
+enum c_pi_err_flg_bit {
+ C_PI_ERR_FLG__UC_ATTENTION_0 = 62,
+ C_PI_ERR_FLG__UC_ATTENTION_1 = 63,
+};
+
+enum c_pct_bitmask {
+ C_PCT_CFG_SRB_RETRY_GRP_CTRL__GRP_LOADED_MSK = 0x1,
+ C_PCT_CFG_SRB_RETRY_GRP_CTRL__GRP_ACTIVE_MSK = 0x2,
+ C_PCT_CFG_SW_SIM_SRC_RSP__LOADED_MSK = 0x1000000000000,
+ C_PCT_CFG_SW_RETRY_SRC_CLS_REQ__LOADED_MSK = 0x10000,
+ C_PCT_CFG_SW_SIM_TGT_CLS_REQ__LOADED_MSK = 0x10000,
+};
+
+enum c2_link_dn_behavior {
+ C2_HNI_PML_LD_DISCARD = 0,
+ C2_HNI_PML_LD_BLOCK = 1,
+ C2_HNI_PML_LD_BEST_EFFORT = 2,
+};
+
+enum c2_llr_state {
+ C2_HNI_PML_OFF_LLR = 0,
+ C2_HNI_PML_INIT = 1,
+ C2_HNI_PML_ADVANCE = 2,
+ C2_HNI_PML_HALT = 3,
+ C2_HNI_PML_REPLAY = 4,
+ C2_HNI_PML_DISCARD = 5,
+ C2_HNI_PML_MONITOR = 6,
+};
+
+enum c2_link_function {
+ C2_LF_ETH_ACC = 0,
+ C2_LF_ETH_TRUNK = 1,
+ C2_LF_C3_R2 = 2,
+ C2_LF_C2_R2 = 3,
+ C2_LF_C1_R2 = 4,
+ C2_LF_C3_R1 = 5,
+ C2_LF_R1_R2 = 6,
+ C2_LF_R2_R2_FAB_NRML = 7,
+ C2_LF_R2_R2_FAB_TRANS = 8,
+ C2_LF_R2_R2_FAB_TO_FAB = 9,
+ C2_LF_R2_R2_FAB_RTR = 10,
+ C2_LF_C2_R1 = 11,
+};
+
+struct c_fa_anon {
+ __u8 action : 3;
+ __u32: 20;
+ __u16 fa_format : 9;
+};
+
+struct c_fa_unicast {
+ __u16 endpoint_defined : 12;
+ __u32 nid : 20;
+};
+
+struct c_fa_multicast {
+ __u8 action : 3;
+ __u16 multicast_id : 13;
+ __u8: 2;
+ __u8 reduction_id : 3;
+ __u8: 2;
+ __u16 format : 9;
+};
+
+union c_fab_addr {
+ struct c_fa_multicast multicast;
+ struct c_fa_unicast unicast;
+ struct c_fa_anon anon;
+};
+
+struct c_process {
+ __u32 process;
+};
+
+struct c_hdr_data {
+ __u64 hdr_data;
+};
+
+struct c_padded_ct_success {
+ __u64 value : 48;
+ __u16 unused_0;
+};
+
+struct c_padded_ct_failure {
+ __u8 value : 7;
+ __u64: 57;
+};
+
+struct c_tct_idx {
+ __u16 tct_idx : 13;
+ __u8: 3;
+};
+
+#ifdef __LITTLE_ENDIAN
+struct c_pkt_type {
+ __u8 opcode : 4;
+ __u8 ver_pkt_type : 3;
+ __u8 req_not_rsp : 1;
+};
+
+#else
+struct c_pkt_type {
+ __u8 req_not_rsp : 1;
+ __u8 ver_pkt_type : 3;
+ __u8 opcode : 4;
+};
+
+#endif
+
+struct c_ts {
+ __u32 ns : 30;
+ __u8 rsvd : 2;
+ __u64 sec : 48;
+} __attribute__((packed));
+
+struct c_padded_sct_idx {
+ __u16 sct_idx : 12;
+ __u8: 1;
+ __u8: 3;
+};
+
+union c_conn_idx {
+ struct c_tct_idx tct_idx;
+ struct c_padded_sct_idx padded_sct_idx;
+};
+
+struct c_ule_entry {
+ __u32: 17;
+ __u8 restricted : 1;
+ __u8 tc : 3;
+ __u8 use_offset_for_get : 1;
+ __u16 rendezvous_id : 8;
+ __u16 vni : 16;
+ __u16 dscp : 6;
+ __u32 sfa_nid : 20;
+ __u64 hdr_data : 64;
+ __u64 match_bits : 64;
+ __u32 initiator : 32;
+ __u64 start_or_offset : 57;
+ __u32 mlength : 32;
+ __u32 request_len : 32;
+ __u8 opcode : 4;
+ __u8 src_error : 1;
+ __u16 addr : 14;
+ __u8 vld : 1;
+ __u16: 11;
+} __attribute__((packed));
+
+struct c_amo_payload {
+ __u8 amo_op : 4;
+ __u8: 4;
+ __u8 amo_type : 4;
+ __u8: 4;
+ __u8 cswap_op : 3;
+ __u8: 5;
+ __u64: 40;
+ __u64 op1_word1;
+ __u64 op1_word2;
+ __u64 op2_word1;
+ __u64 op2_word2;
+};
+
+struct c_small_amo_payload {
+ __u8 amo_op : 4;
+ __u8: 4;
+ __u8 amo_type : 4;
+ __u8: 4;
+ __u64: 48;
+ __u64 op1_word1;
+};
+
+struct c_page_table_entry {
+ __u8: 6;
+ __u64 ptr : 51;
+ __u8 r : 1;
+ __u8 w : 1;
+ __u8 leaf : 1;
+ __u8 p : 1;
+ __u8: 3;
+};
+
+struct c_page_request_entry {
+ __u64 addr : 45;
+ __u16 index : 9;
+ __u16 acid : 10;
+} __attribute__((packed));
+
+struct c_cmd {
+ __u8 cmd_type : 2;
+ __u8 cmd_size : 2;
+ __u8 opcode : 4;
+};
+
+struct c_cmdq {
+ __u16 wr_ptr;
+ __u16 unused_0[511];
+ __u64 ll_wr64a0123[128];
+ __u64 ll_wr128a02[128];
+ __u64 ll_wr128a13[128];
+};
+
+struct c_cq_status {
+ __u16 rd_ptr;
+ __u16 num_write_cmds_rejected;
+ __u8 fail_command;
+ __u8 unused_0;
+ __u8 return_code : 6;
+ __u16: 7;
+ __u8 fail_loc_32 : 1;
+ __u8 fail_ll : 1;
+ __u8 ll_disabled : 1;
+};
+
+struct c_idc_hdr {
+ struct c_cmd command;
+ __u8 length;
+ __u16 unused_0;
+ union c_fab_addr dfa;
+ __u64 remote_offset : 56;
+ __u8 unused_1;
+};
+
+struct c_idc_amo_cmd {
+ struct c_idc_hdr idc_header;
+ __u64 local_addr : 57;
+ __u8: 7;
+ __u8 atomic_op : 4;
+ __u8: 4;
+ __u8 atomic_type : 4;
+ __u8: 4;
+ __u8 cswap_op : 3;
+ __u8: 5;
+ __u64: 40;
+ __u64 op1_word1;
+ __u64 op1_word2;
+ __u64 op2_word1;
+ __u64 op2_word2;
+};
+
+struct c_idc_msg_hdr {
+ struct c_cmd command;
+ __u8 length;
+ __u16 unused_0;
+ union c_fab_addr dfa;
+ __u64 match_bits;
+ __u64 header_data;
+ __u64 user_ptr;
+ __u8 data[];
+};
+
+struct c_cstate_cmd {
+ struct c_cmd command;
+ __u8 length;
+ __u8 write_lac : 3;
+ __u8 event_send_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_ct_send : 1;
+ __u8 event_ct_reply : 1;
+ __u8 event_ct_ack : 1;
+ __u8 event_ct_bytes : 1;
+ __u8 get_with_local_flag : 1;
+ __u8 restricted : 1;
+ __u8 reduction : 1;
+ __u8 flush : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 1;
+ __u8: 1;
+ __u32 initiator;
+ __u8 index_ext : 5;
+ __u8: 3;
+ __u64: 56;
+ __u64 user_ptr;
+ __u32 unused_0;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+};
+
+struct c_idc_eth_cmd {
+ struct c_cmd command;
+ __u8 length;
+ __u8 flow_hash;
+ __u8 checksum_ctrl : 2;
+ __u8: 2;
+ __u8 fmt : 1;
+ __u8: 3;
+ __u16 checksum_start : 10;
+ __u8: 2;
+ __u16 checksum_offset : 6;
+ __u16: 14;
+ __u64 unused_0;
+ __u8 data[];
+} __attribute__((packed));
+
+struct c_dma_eth_cmd {
+ struct c_cmd command;
+ __u8 read_lac : 3;
+ __u8: 4;
+ __u8 fmt : 1;
+ __u8 flow_hash;
+ __u8 checksum_ctrl : 2;
+ __u8: 3;
+ __u8 num_segments : 3;
+ __u16 checksum_start : 10;
+ __u8: 2;
+ __u16 checksum_offset : 6;
+ __u16: 14;
+ __u64 user_ptr;
+ __u16 len[7];
+ __u16 unused_0;
+ __u64 addr[7];
+ __u16 total_len;
+ __u8 event_send_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_ct_send : 1;
+ __u8 event_ct_reply : 1;
+ __u8 event_ct_ack : 1;
+ __u8 event_ct_bytes : 1;
+ __u8 get_with_local_flag : 1;
+ __u8 restricted : 1;
+ __u8 reduction : 1;
+ __u8 flush : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 1;
+ __u8: 1;
+ __u8: 3;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+} __attribute__((packed));
+
+struct c_nomatch_dma_cmd {
+ struct c_cmd command;
+ __u8 index_ext : 5;
+ __u8: 3;
+ __u8 lac : 3;
+ __u8 event_send_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_ct_send : 1;
+ __u8 event_ct_reply : 1;
+ __u8 event_ct_ack : 1;
+ __u8 event_ct_bytes : 1;
+ __u8 get_with_local_flag : 1;
+ __u8 restricted : 1;
+ __u8 reduction : 1;
+ __u8 flush : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 1;
+ __u8: 1;
+ union c_fab_addr dfa;
+ __u64 remote_offset : 56;
+ __u8 unused_0;
+ __u64 local_addr : 57;
+ __u8: 7;
+ __u32 request_len;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+};
+
+struct c_full_dma_cmd {
+ struct c_cmd command;
+ __u8 index_ext : 5;
+ __u8: 3;
+ __u8 lac : 3;
+ __u8 event_send_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_ct_send : 1;
+ __u8 event_ct_reply : 1;
+ __u8 event_ct_ack : 1;
+ __u8 event_ct_bytes : 1;
+ __u8 get_with_local_flag : 1;
+ __u8 restricted : 1;
+ __u8 reduction : 1;
+ __u8 flush : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 1;
+ __u8: 1;
+ union c_fab_addr dfa;
+ __u64 remote_offset : 56;
+ __u8 unused_0;
+ __u64 local_addr : 57;
+ __u8: 7;
+ __u32 request_len;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+ __u32 eager_length : 20;
+ __u8: 4;
+ __u8 rendezvous_id;
+ __u32 initiator;
+ __u64 match_bits;
+ __u64 header_data;
+ __u64 user_ptr;
+};
+
+struct c_dma_amo_cmd {
+ struct c_cmd command;
+ __u8 index_ext : 5;
+ __u8: 3;
+ __u8 lac : 3;
+ __u8 event_send_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_ct_send : 1;
+ __u8 event_ct_reply : 1;
+ __u8 event_ct_ack : 1;
+ __u8 event_ct_bytes : 1;
+ __u8 get_with_local_flag : 1;
+ __u8 restricted : 1;
+ __u8 reduction : 1;
+ __u8 flush : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 1;
+ __u8: 1;
+ union c_fab_addr dfa;
+ __u64 remote_offset : 56;
+ __u8 unused_0;
+ __u64 local_read_addr : 57;
+ __u8: 7;
+ __u32 request_len;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+ __u32 unused_1;
+ __u32 initiator;
+ __u64 match_bits;
+ __u64 header_data;
+ __u64 user_ptr;
+ __u64 local_write_addr : 57;
+ __u8: 7;
+ __u8 atomic_op : 4;
+ __u8: 4;
+ __u8 atomic_type : 4;
+ __u8: 4;
+ __u8 cswap_op : 3;
+ __u8: 5;
+ __u8 unused_2;
+ __u8 write_lac : 3;
+ __u32: 29;
+ __u64 op2_word1;
+ __u64 op2_word2;
+};
+
+struct c_ct_cmd {
+ struct c_cmd command;
+ __u8 unused_0;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 trig_ct : 11;
+ __u8: 5;
+ __u16 eq : 11;
+ __u8: 5;
+ __u64 ct_success : 48;
+ __u8 ct_failure : 7;
+ __u16: 7;
+ __u8 set_ct_success : 1;
+ __u8 set_ct_failure : 1;
+ __u64 threshold : 48;
+ __u16 unused_1;
+ __u8 embedded_dma[];
+} __attribute__((packed));
+
+struct c_cq_cmd {
+ struct c_cmd command;
+ __u32: 24;
+ __u8 lcid : 4;
+ __u8: 4;
+ __u32: 24;
+ __u64 unused_0;
+ __u64 unused_1;
+ __u64 unused_2;
+ __u64 unused_3;
+ __u64 unused_4;
+ __u64 unused_5;
+ __u64 unused_6;
+};
+
+struct c_target_cmd {
+ struct c_cmd command;
+ __u8 ptl_list : 2;
+ __u8: 6;
+ __u16 ptlte_index : 11;
+ __u8: 5;
+ __u8 event_ct_bytes : 1;
+ __u8 event_ct_overflow : 1;
+ __u8 event_ct_comm : 1;
+ __u8 event_unlink_disable : 1;
+ __u8 event_success_disable : 1;
+ __u8 event_comm_disable : 1;
+ __u8 event_link_disable : 1;
+ __u8 unrestricted_end_ro : 1;
+ __u8 unrestricted_body_ro : 1;
+ __u8 unexpected_hdr_disable : 1;
+ __u8 use_once : 1;
+ __u8 no_truncate : 1;
+ __u8 manage_local : 1;
+ __u8 op_get : 1;
+ __u8 op_put : 1;
+ __u8: 1;
+ __u16 ct : 11;
+ __u8: 5;
+ __u16 buffer_id;
+ __u8 lac : 3;
+ __u8: 5;
+ __u8 restart_seq : 1;
+ __u8: 7;
+ __u32 unused_0;
+ __u64 start : 57;
+ __u8: 7;
+ __u64 length : 56;
+ __u8 unused_1;
+ __u32 min_free : 24;
+ __u8 unused_2;
+ __u32 match_id;
+ __u64 match_bits;
+ __u64 ignore_bits;
+ __u64 unused_3;
+};
+
+struct c_set_state_cmd {
+ struct c_cmd command;
+ __u8 ptlte_state : 3;
+ __u8: 5;
+ __u16 ptlte_index : 11;
+ __u8: 5;
+ __u32 unused_0;
+ __u64 current_addr : 57;
+ __u8: 7;
+ __u32 drop_count : 24;
+ __u8 unused_1;
+ __u32 unused_2;
+ __u64 unused_3;
+ __u64 unused_4;
+ __u64 unused_5;
+ __u64 unused_6;
+ __u64 unused_7;
+};
+
+struct c_eq_status {
+ __u32 timestamp_ns_cpy : 30;
+ __u64: 34;
+ __u64 timestamp_sec_cpy : 48;
+ __u8 thld_sts : 1;
+ __u8: 3;
+ __u8 thld_id : 2;
+ __u8: 2;
+ __u8 unackd_dropped_event : 1;
+ __u8: 3;
+ __u8 event_drop_seq_no : 1;
+ __u8: 3;
+ __u32 event_slots_free : 26;
+ __u8: 6;
+ __u32 event_slots_rsrvd : 26;
+ __u8: 6;
+ __u32 wr_ptr : 26;
+ __u8: 6;
+ __u8 using_buffer_b : 1;
+ __u32: 31;
+ __u64 unused_0;
+ __u64 unused_1;
+ __u32 unused_2;
+ __u32 timestamp_ns : 30;
+ __u8: 2;
+ __u64 timestamp_sec : 48;
+ __u16 unused_3;
+};
+
+struct c_event_initiator_short {
+ __u64 user_ptr;
+ __u32 mlength;
+ __u8 ptl_list : 2;
+ __u8: 2;
+ __u8 rendezvous : 1;
+ __u8 retry : 1;
+ __u8 tgt_error : 1;
+ __u16: 9;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_initiator_long {
+ __u64 user_ptr;
+ __u32 mlength;
+ __u8 ptl_list : 2;
+ __u8: 2;
+ __u8 rendezvous : 1;
+ __u8 retry : 1;
+ __u8 tgt_error : 1;
+ __u16: 9;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 unused_0;
+ __u32 timestamp_ns : 30;
+ __u64: 34;
+ __u64 timestamp_sec : 48;
+ __u8 unused_1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_trig_op_short {
+ __u64 threshold : 48;
+ __u16 unused_0;
+ __u16 ct_handle : 11;
+ __u64: 37;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_trig_op_long {
+ __u64 threshold : 48;
+ __u16 unused_0;
+ __u16 ct_handle : 11;
+ __u64: 37;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 unused_1;
+ __u32 timestamp_ns : 30;
+ __u64: 34;
+ __u64 timestamp_sec : 48;
+ __u8 unused_2;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_cmd_fail {
+ __u16 cq_id : 10;
+ __u8 is_target : 1;
+ __u8: 5;
+ __u16 fail_loc;
+ struct c_cmd fail_command;
+ __u32: 24;
+ __u64: 48;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_state_chg_fields {
+ __u8 ptlte_state : 3;
+ __u8: 5;
+ __u8 sc_reason : 4;
+ __u8: 4;
+ __u8 sc_nic_auto : 1;
+ __u16: 15;
+};
+
+union c_tgt_ol_initiator {
+ struct c_process initiator;
+ struct c_state_chg_fields state_change;
+};
+
+struct c_event_target_long {
+ __u64 header_data;
+ union c_tgt_ol_initiator initiator;
+ __u16 ptlte_index : 11;
+ __u8: 5;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 ptl_list : 2;
+ __u8 rendezvous : 1;
+ __u8 get_issued : 1;
+ __u8 auto_unlinked : 1;
+ __u8: 3;
+ __u64 match_bits;
+ __u16 buffer_id;
+ __u16 vni;
+ __u32 timestamp_ns : 30;
+ __u8 timestamp_sec_low : 2;
+ __u32 mlength;
+ __u32 rlength;
+ __u64 remote_offset : 56;
+ __u8 unused_0;
+ __u64 start : 57;
+ __u8: 7;
+ __u16 lpe_stat_1;
+ __u16 lpe_stat_2;
+ __u8 atomic_type : 4;
+ __u8 atomic_op : 4;
+ __u8 cswap_op : 3;
+ __u8: 5;
+ __u8 rendezvous_id;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_target_short {
+ __u64 header_data;
+ __u32 initiator;
+ __u16 ptlte_index : 11;
+ __u8: 5;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 ptl_list : 2;
+ __u8: 2;
+ __u8 auto_unlinked : 1;
+ __u8: 3;
+ __u64 match_bits;
+ __u16 buffer_id;
+ __u16 vni;
+ __u32 length : 20;
+ __u8: 4;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_target_enet {
+ __u16 checksum;
+ __u64 pkt_cnt : 46;
+ __u8 seg_cnt : 2;
+ __u32 rss_hash_value;
+ __u16 ptlte_index : 11;
+ __u8: 5;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 ptl_list : 2;
+ __u8: 2;
+ __u8 auto_unlinked : 1;
+ __u8: 3;
+ __u64 start : 57;
+ __u8: 7;
+ __u16 buffer_id;
+ __u8 rss_hash_type : 5;
+ __u8: 3;
+ __u8 more_frags : 1;
+ __u8: 1;
+ __u8 is_roce : 1;
+ __u8 roce_icrc_ok : 1;
+ __u8 timestamp : 1;
+ __u8 fmt : 1;
+ __u8 parser_err : 1;
+ __u8: 1;
+ __u16 length;
+ __u8 unused_0;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_enet_fgfc {
+ __u32 identifier;
+ __u32 unused_0;
+ __u8 fgfc_type : 2;
+ __u8: 6;
+ __u8 xoff : 1;
+ __u8: 7;
+ __u8 srcip_tag : 2;
+ __u8: 6;
+ __u8 unused_1;
+ __u16 credits;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_pct {
+ union c_fab_addr dfa;
+ __u16 seq_num : 12;
+ __u8: 4;
+ __u16 unused_0;
+ __u8 pct_event_type : 3;
+ __u8: 5;
+ __u8 unused_1;
+ __u16 spt_idx : 11;
+ __u8: 5;
+ union c_conn_idx conn_idx;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_timestamp {
+ __u32 timestamp_ns : 30;
+ __u64: 34;
+ __u64 timestamp_sec : 48;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_event_eq_switch {
+ __u64 unused_0;
+ __u64: 48;
+ __u8 event_size : 2;
+ __u8 event_type : 5;
+ __u8: 1;
+ __u8 return_code : 6;
+ __u8: 2;
+};
+
+struct c_cq_cntrs {
+ __u64 success_tx_cntr;
+ __u64 success_tgt_cntr;
+ __u64 fail_tx_cntr;
+ __u64 fail_tgt_cntr;
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 rarb_ll_err_cntr;
+ __u64 rarb_err_cntr;
+ __u64 wr_ptr_updt_err_cntr;
+ __u64 cntr0[3];
+ __u64 num_txq_cmd_reads[4];
+ __u64 num_tgq_cmd_reads[4];
+ __u64 num_tou_cmd_reads[4];
+ __u64 tx_waiting_on_read[4];
+ __u64 tgt_waiting_on_read[4];
+ __u64 num_tx_cmd_align_errors;
+ __u64 num_tx_cmd_op_errors;
+ __u64 num_tx_cmd_arg_errors;
+ __u64 num_tx_cmd_perm_errors;
+ __u64 num_tgt_cmd_arg_errors;
+ __u64 num_tgt_cmd_perm_errors;
+ __u64 cq_oxe_num_flits;
+ __u64 cq_oxe_num_stalls;
+ __u64 cq_oxe_num_idles;
+ __u64 cq_tou_num_flits;
+ __u64 cq_tou_num_stalls;
+ __u64 cq_tou_num_idles;
+ __u64 num_idc_cmds[4];
+ __u64 num_dma_cmds[4];
+ __u64 num_cq_cmds[4];
+ __u64 num_ll_cmds[4];
+ __u64 num_tgt_cmds[4];
+ __u64 dma_cmd_counts[16];
+ __u64 cq_cmd_counts[16];
+ __u64 cycles_blocked[4];
+ __u64 cntr2[12];
+ __u64 num_ll_ops_successful[4];
+ __u64 num_ll_ops_rejected[4];
+ __u64 num_ll_ops_split[4];
+ __u64 num_ll_ops_received[4];
+};
+
+struct c_tou_cntrs {
+ __u64 success_cntr;
+ __u64 fail_cntr;
+ __u64 cntr0[2];
+ __u64 cq_tou_num_cmds;
+ __u64 cq_tou_num_stalls;
+ __u64 tou_oxe_num_flits;
+ __u64 tou_oxe_num_stalls;
+ __u64 tou_oxe_num_idles;
+ __u64 list_rebuild_cycles;
+ __u64 cmd_fifo_full_cycles;
+ __u64 cntr1[7];
+ __u64 num_doorbell_writes;
+ __u64 num_ct_updates;
+ __u64 num_trig_cmds[4];
+ __u64 num_list_rebuilds[4];
+ __u64 ct_cmd_counts[16];
+ __u64 cntr2[20];
+};
+
+struct c1_oxe_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 err_no_translation;
+ __u64 err_invalid_ac;
+ __u64 err_page_perm;
+ __u64 err_ta_error;
+ __u64 err_page_req;
+ __u64 err_pci_ep;
+ __u64 err_pci_cmpl;
+ __u64 rsvd0;
+ __u64 stall_pct_bc[10];
+ __u64 stall_pbuf_bc[10];
+ __u64 stall_ts_no_out_crd_tsc[10];
+ __u64 stall_ts_no_in_crd_tsc[10];
+ __u64 stall_with_no_pci_tag;
+ __u64 stall_with_no_atu_tag;
+ __u64 stall_stfwd_eop;
+ __u64 stall_pcie_scoreboard;
+ __u64 stall_wr_conflict_pkt_buff_bnk[4];
+ __u64 stall_idc_no_buff_bc[10];
+ __u64 stall_idc_cmd_no_deq;
+ __u64 stall_non_idc_cmd_no_deq;
+ __u64 stall_fgfc_blk[4];
+ __u64 stall_fgfc_cntrl[4];
+ __u64 stall_fgfc_start[4];
+ __u64 stall_fgfc_end[4];
+ __u64 stall_hdr_arb;
+ __u64 stall_ioi_last_ordered;
+ __u64 rsvd1[3];
+ __u64 ignore_errs;
+ __u64 ioi_dma;
+ __u64 ioi_pkts_ordered;
+ __u64 ioi_pkts_unordered;
+ __u64 ptl_tx_put_msgs_tsc[10];
+ __u64 ptl_tx_get_msgs_tsc[10];
+ __u64 ptl_tx_put_pkts_tsc[10];
+ __u64 ptl_tx_mr_msgs;
+ __u64 num_hrp_cmds;
+ __u64 channel_idle;
+ __u64 mcu_meas[96];
+ __u64 prf_set0_st_ready;
+ __u64 prf_set0_st_pct_idx_wait;
+ __u64 prf_set0_st_pktbuf_req;
+ __u64 prf_set0_st_pktbuf_gnt;
+ __u64 prf_set0_st_header;
+ __u64 prf_set0_st_dma_mdr;
+ __u64 prf_set0_st_dma_upd;
+ __u64 prf_set0_pktbuf_na;
+ __u64 prf_set0_spt_na;
+ __u64 prf_set0_smt_na;
+ __u64 prf_set0_srb_na;
+ __u64 prf_set0_ts_select;
+ __u64 prf_set0_occ_hist_bin0;
+ __u64 prf_set0_occ_hist_bin1;
+ __u64 prf_set0_occ_hist_bin2;
+ __u64 prf_set0_occ_hist_bin3;
+ __u64 prf_set1_st_ready;
+ __u64 prf_set1_st_pct_idx_wait;
+ __u64 prf_set1_st_pktbuf_req;
+ __u64 prf_set1_st_pktbuf_gnt;
+ __u64 prf_set1_st_header;
+ __u64 prf_set1_st_dma_mdr;
+ __u64 prf_set1_st_dma_upd;
+ __u64 prf_set1_pktbuf_na;
+ __u64 prf_set1_spt_na;
+ __u64 prf_set1_smt_na;
+ __u64 prf_set1_srb_na;
+ __u64 prf_set1_ts_select;
+ __u64 prf_set1_occ_hist_bin0;
+ __u64 prf_set1_occ_hist_bin1;
+ __u64 prf_set1_occ_hist_bin2;
+ __u64 prf_set1_occ_hist_bin3;
+};
+
+struct c2_oxe_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 err_no_translation;
+ __u64 err_invalid_ac;
+ __u64 err_page_perm;
+ __u64 err_ta_error;
+ __u64 err_page_req;
+ __u64 err_pci_ep;
+ __u64 err_pci_cmpl;
+ __u64 rsvd0;
+ __u64 stall_pct_bc[10];
+ __u64 stall_pbuf_bc[10];
+ __u64 stall_ts_no_out_crd_tsc[10];
+ __u64 stall_ts_no_in_crd_tsc[10];
+ __u64 stall_with_no_pci_tag;
+ __u64 stall_with_no_atu_tag;
+ __u64 stall_stfwd_eop;
+ __u64 stall_pcie_scoreboard;
+ __u64 stall_wr_conflict_pkt_buff_bnk[4];
+ __u64 stall_idc_no_buff_bc[10];
+ __u64 stall_idc_cmd_no_deq;
+ __u64 stall_non_idc_cmd_no_deq;
+ __u64 stall_fgfc_blk[4];
+ __u64 stall_fgfc_cntrl[4];
+ __u64 stall_fgfc_start[4];
+ __u64 stall_fgfc_end[4];
+ __u64 stall_hdr_arb;
+ __u64 stall_ioi_last_ordered;
+ __u64 spt_cdt_errs;
+ __u64 smt_cdt_errs;
+ __u64 rsvd1;
+ __u64 ignore_errs;
+ __u64 ioi_dma;
+ __u64 ioi_pkts_ordered;
+ __u64 ioi_pkts_unordered;
+ __u64 ptl_tx_put_msgs_tsc[10];
+ __u64 ptl_tx_get_msgs_tsc[10];
+ __u64 ptl_tx_put_pkts_tsc[10];
+ __u64 ptl_tx_mr_msgs;
+ __u64 num_hrp_cmds;
+ __u64 channel_idle;
+ __u64 mcu_meas[96];
+ __u64 prf_set0_st_ready;
+ __u64 prf_set0_st_pct_idx_wait;
+ __u64 prf_set0_st_pktbuf_req;
+ __u64 prf_set0_st_pktbuf_gnt;
+ __u64 prf_set0_st_header;
+ __u64 prf_set0_st_dma_mdr;
+ __u64 prf_set0_st_dma_upd;
+ __u64 prf_set0_pktbuf_na;
+ __u64 prf_set0_spt_na;
+ __u64 prf_set0_smt_na;
+ __u64 prf_set0_srb_na;
+ __u64 prf_set0_ts_select;
+ __u64 prf_set0_occ_hist_bin0;
+ __u64 prf_set0_occ_hist_bin1;
+ __u64 prf_set0_occ_hist_bin2;
+ __u64 prf_set0_occ_hist_bin3;
+ __u64 prf_set1_st_ready;
+ __u64 prf_set1_st_pct_idx_wait;
+ __u64 prf_set1_st_pktbuf_req;
+ __u64 prf_set1_st_pktbuf_gnt;
+ __u64 prf_set1_st_header;
+ __u64 prf_set1_st_dma_mdr;
+ __u64 prf_set1_st_dma_upd;
+ __u64 prf_set1_pktbuf_na;
+ __u64 prf_set1_spt_na;
+ __u64 prf_set1_smt_na;
+ __u64 prf_set1_srb_na;
+ __u64 prf_set1_ts_select;
+ __u64 prf_set1_occ_hist_bin0;
+ __u64 prf_set1_occ_hist_bin1;
+ __u64 prf_set1_occ_hist_bin2;
+ __u64 prf_set1_occ_hist_bin3;
+};
+
+struct c_ixe_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 cntr1[2];
+ __u64 port_dfa_mismatch;
+ __u64 hdr_checksum_errors;
+ __u64 ipv4_checksum_errors;
+ __u64 hrp_req_errors;
+ __u64 ip_options_errors;
+ __u64 get_len_errors;
+ __u64 roce_icrc_error;
+ __u64 parser_par_errors;
+ __u64 pbuf_rd_errors;
+ __u64 hdr_ecc_errors;
+ __u64 cntr2[2];
+ __u64 rx_udp_pkt;
+ __u64 rx_tcp_pkt;
+ __u64 rx_ipv4_pkt;
+ __u64 rx_ipv6_pkt;
+ __u64 rx_roce_pkt;
+ __u64 rx_ptl_gen_pkt;
+ __u64 rx_ptl_sml_pkt;
+ __u64 rx_ptl_unrestricted_pkt;
+ __u64 rx_ptl_smallmsg_pkt;
+ __u64 rx_ptl_continuation_pkt;
+ __u64 rx_ptl_restricted_pkt;
+ __u64 rx_ptl_connmgmt_pkt;
+ __u64 rx_ptl_response_pkt;
+ __u64 rx_unrecognized_pkt;
+ __u64 rx_ptl_sml_amo_pkt;
+ __u64 rx_ptl_msgs;
+ __u64 rx_ptl_multi_msgs;
+ __u64 rx_ptl_mr_msgs;
+ __u64 rx_pkt_drop_pct;
+ __u64 rx_pkt_drop_rmu_norsp;
+ __u64 rx_pkt_drop_rmu_wrsp;
+ __u64 rx_pkt_drop_ixe_parser;
+ __u64 rx_pkt_ipv4_options;
+ __u64 rx_pkt_ipv6_options;
+ __u64 rx_eth_seg;
+ __u64 rx_roce_seg;
+ __u64 rx_roce_spseg;
+ __u64 cntr3[21];
+ __u64 pool_ecn_pkts[4];
+ __u64 pool_no_ecn_pkts[4];
+ __u64 tc_req_ecn_pkts[8];
+ __u64 tc_req_no_ecn_pkts[8];
+ __u64 tc_rsp_ecn_pkts[8];
+ __u64 tc_rsp_no_ecn_pkts[8];
+ __u64 disp_lpe_puts;
+ __u64 disp_lpe_puts_ok;
+ __u64 disp_lpe_amos;
+ __u64 disp_lpe_amos_ok;
+ __u64 disp_mst_puts;
+ __u64 disp_mst_puts_ok;
+ __u64 disp_lpe_gets;
+ __u64 disp_lpe_gets_ok;
+ __u64 disp_mst_gets;
+ __u64 disp_mst_gets_ok;
+ __u64 disp_rpu_resps;
+ __u64 disp_rpu_err_reqs;
+ __u64 disp_dmawr_reqs;
+ __u64 disp_dmawr_resps;
+ __u64 disp_dmawr_resps_ok;
+ __u64 disp_oxe_resps;
+ __u64 disp_pct_getcomp;
+ __u64 disp_atu_reqs;
+ __u64 disp_atu_resps;
+ __u64 disp_atu_resps_ok;
+ __u64 disp_eth_events;
+ __u64 disp_put_events;
+ __u64 disp_amo_events;
+ __u64 disp_wr_conflicts;
+ __u64 disp_amo_conflicts;
+ __u64 disp_stall_conflict;
+ __u64 disp_stall_resp_fifo;
+ __u64 disp_stall_err_fifo;
+ __u64 disp_stall_atu_cdt;
+ __u64 disp_stall_atu_fifo;
+ __u64 disp_stall_gcomp_fifo;
+ __u64 disp_stall_mdid_cdts;
+ __u64 disp_stall_mst_match_fifo;
+ __u64 disp_stall_grr_id;
+ __u64 disp_stall_put_resp;
+ __u64 disp_atu_flush_reqs;
+ __u64 cntr4[4];
+ __u64 dmawr_stall_p_cdt;
+ __u64 dmawr_stall_np_cdt;
+ __u64 dmawr_stall_np_req_cnt;
+ __u64 dmawr_stall_ftch_amo_cnt;
+ __u64 dmawr_p_pass_np_cnt;
+ __u64 dmawr_write_reqs;
+ __u64 dmawr_nic_amo_reqs;
+ __u64 dmawr_cpu_amo_reqs;
+ __u64 dmawr_cpu_ftch_amo_reqs;
+ __u64 dmawr_flush_reqs;
+ __u64 dmawr_req_no_write_reqs;
+ __u64 dmawr_amo_ex_invalid;
+ __u64 dmawr_amo_ex_overflow;
+ __u64 dmawr_amo_ex_underflow;
+ __u64 dmawr_amo_ex_inexact;
+ __u64 dmawr_amo_misaligned;
+ __u64 dmawr_amo_invalid_op;
+ __u64 dmawr_amo_len_err;
+ __u64 dmawr_pcie_unsuccess_cmpl;
+ __u64 dmawr_pcie_err_poisoned;
+ __u64 cntr5[4];
+};
+
+struct c_pct_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 req_ordered;
+ __u64 req_unordered;
+ __u64 req_no_response;
+ __u64 eth_packets;
+ __u64 optip_packets;
+ __u64 ptls_response;
+ __u64 responses_received;
+ __u64 hrp_responses_received;
+ __u64 hrp_rsp_discard_received;
+ __u64 hrp_rsp_err_received;
+ __u64 conn_sct_open;
+ __u64 conn_tct_open;
+ __u64 mst_hit_on_som;
+ __u64 trs_hit_on_req;
+ __u64 cls_req_miss_tct;
+ __u64 clear_sent;
+ __u64 close_sent;
+ __u64 accel_close;
+ __u64 clear_close_drop;
+ __u64 req_src_error;
+ __u64 bad_seq_nacks;
+ __u64 no_tct_nacks;
+ __u64 no_mst_nacks;
+ __u64 no_trs_nacks;
+ __u64 no_matching_tct;
+ __u64 resource_busy;
+ __u64 err_no_matching_trs;
+ __u64 err_no_matching_mst;
+ __u64 spt_timeouts;
+ __u64 sct_timeouts;
+ __u64 tct_timeouts;
+ __u64 retry_srb_requests;
+ __u64 retry_trs_put;
+ __u64 retry_mst_get;
+ __u64 clr_cls_stalls;
+ __u64 close_rsp_drops;
+ __u64 trs_rsp_nack_drops;
+ __u64 req_blocked_closing;
+ __u64 req_blocked_clearing;
+ __u64 req_blocked_retry;
+ __u64 rsp_err_rcvd;
+ __u64 rsp_dropped_timeout;
+ __u64 rsp_dropped_try;
+ __u64 rsp_dropped_cls_try;
+ __u64 rsp_dropped_inactive;
+ __u64 pct_hni_flits;
+ __u64 pct_hni_stalls;
+ __u64 pct_ee_events;
+ __u64 pct_ee_stalls;
+ __u64 pct_cq_notifications;
+ __u64 pct_cq_stalls;
+ __u64 pct_mst_cmd0;
+ __u64 pct_mst_stalls0;
+ __u64 pct_mst_cmd1;
+ __u64 pct_mst_stalls1;
+ __u64 sct_stall_state;
+ __u64 tgt_cls_abort;
+ __u64 cls_req_bad_seqno_drops;
+ __u64 req_tct_tmout_drops;
+ __u64 trs_replay_pend_drops;
+ __u64 cntr_rsvd_1[2];
+ __u64 req_rsp_latency[32];
+ __u64 host_access_latency[16];
+ __u64 cntr_rsvd_2[16];
+};
+
+struct c_rmu_cntrs {
+ __u64 ptl_success_cntr;
+ __u64 enet_success_cntr;
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 ptl_invld_dfa_cntr;
+ __u64 ptl_invld_vni_cntr;
+ __u64 ptl_no_ptlte_cntr;
+ __u64 enet_frame_rejected_cntr;
+ __u64 enet_ptlte_set_ctrl_err_cntr;
+ __u64 cntr_rsvd[7];
+};
+
+struct c_lpe_cntrs {
+ __u64 success_cntr;
+ __u64 fail_cntr;
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 cntr0;
+ __u64 put_cmds;
+ __u64 rendezvous_put_cmds;
+ __u64 get_cmds;
+ __u64 amo_cmds;
+ __u64 famo_cmds;
+ __u64 cntr1[5];
+ __u64 err_entry_not_found_ethernet;
+ __u64 err_pt_disabled_eq_full;
+ __u64 err_pt_disabled_req_empty;
+ __u64 err_pt_disabled_cant_alloc_unexpected;
+ __u64 err_pt_disabled_no_match_in_overflow;
+ __u64 err_eq_disabled;
+ __u64 err_op_violation;
+ __u64 err_entry_not_found_unlink_failed;
+ __u64 err_entry_not_found_eq_full;
+ __u64 err_entry_not_found_req_empty;
+ __u64 err_entry_not_found_no_match_in_overflow;
+ __u64 err_entry_not_found_cant_alloc_unexpected;
+ __u64 err_invalid_endpoint;
+ __u64 err_no_space_append;
+ __u64 err_no_space_net;
+ __u64 err_search_no_match;
+ __u64 err_setstate_no_match;
+ __u64 err_src_error;
+ __u64 err_ptlte_sw_managed;
+ __u64 err_illegal_op;
+ __u64 err_restricted_unicast;
+ __u64 cntr2[5];
+ __u64 event_put_overflow;
+ __u64 cntr3;
+ __u64 event_get_overflow;
+ __u64 cntr4;
+ __u64 event_atomic_overflow;
+ __u64 plec_frees_csr;
+ __u64 event_fetch_atomic_overflow;
+ __u64 event_search;
+ __u64 event_rendezvous;
+ __u64 event_link;
+ __u64 event_unlink;
+ __u64 event_statechange;
+ __u64 plec_allocs;
+ __u64 plec_frees;
+ __u64 plec_hits;
+ __u64 cyc_no_rdy_cdts;
+ __u64 cyc_rrq_blocked[4];
+ __u64 cyc_blocked_lossless;
+ __u64 cyc_blocked_ixe_put;
+ __u64 cyc_blocked_ixe_get;
+ __u64 search_cmds;
+ __u64 search_success;
+ __u64 search_fail;
+ __u64 search_delete_cmds;
+ __u64 search_delete_success;
+ __u64 search_delete_fail;
+ __u64 unlink_cmds;
+ __u64 unlink_success;
+ __u64 net_match_requests[4];
+ __u64 net_match_success[4];
+ __u64 net_match_useonce[4];
+ __u64 net_match_local[4];
+ __u64 net_match_priority[4];
+ __u64 net_match_overflow[4];
+ __u64 net_match_request[4];
+ __u64 append_cmds[4];
+ __u64 append_success[4];
+ __u64 setstate_cmds[4];
+ __u64 setstate_success[4];
+ __u64 search_nid_any[4];
+ __u64 search_pid_any[4];
+ __u64 search_rank_any[4];
+ __u64 rndzv_puts[4];
+ __u64 rndzv_puts_offloaded[4];
+ __u64 num_truncated[4];
+ __u64 unexpected_get_amo[4];
+ __u64 cntr_rsvd[16];
+};
+
+struct c_mst_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 allocations;
+ __u64 requests;
+ __u64 stalled_waiting_for_lpe;
+ __u64 stalled_waiting_get_crdts;
+ __u64 stalled_waiting_put_crdts;
+ __u64 stalled_waiting_ee_crdts;
+ __u64 cntr1[8];
+ __u64 err_cancelled;
+ __u64 cntr2[15];
+};
+
+struct c_ee_cntrs {
+ __u64 events_enqueued_cntr[4];
+ __u64 events_dropped_rsrvn_cntr[4];
+ __u64 events_dropped_fc_sc_cntr[4];
+ __u64 events_dropped_ordinary_cntr[4];
+ __u64 eq_status_update_cntr[4];
+ __u64 cbs_written_cntr[4];
+ __u64 partial_cbs_written_cntr[4];
+ __u64 expired_cbs_written_cntr[4];
+ __u64 eq_buffer_switch_cntr[4];
+ __u64 deferred_eq_switch_cntr[4];
+ __u64 addr_trans_prefetch_cntr[4];
+ __u64 eq_sw_state_wr_cntr[4];
+ __u64 lpe_event_req_cntr;
+ __u64 lpe_fe_cntr;
+ __u64 lpe_dd_cntr;
+ __u64 lpe_ce_cntr;
+ __u64 lpe_fe_stall_cntr;
+ __u64 lpe_ce_stall_cntr;
+ __u64 ixe_event_req_cntr;
+ __u64 ixe_fe_cntr;
+ __u64 ixe_dd_cntr;
+ __u64 ixe_ce_cntr;
+ __u64 ixe_fe_stall_cntr;
+ __u64 ixe_ce_stall_cntr;
+ __u64 mst_event_req_cntr;
+ __u64 mst_fe_cntr;
+ __u64 mst_dd_cntr;
+ __u64 mst_ce_cntr;
+ __u64 mst_fe_stall_cntr;
+ __u64 mst_ce_stall_cntr;
+ __u64 pct_event_req_cntr;
+ __u64 pct_fe_cntr;
+ __u64 pct_dd_cntr;
+ __u64 pct_ce_cntr;
+ __u64 pct_fe_stall_cntr;
+ __u64 pct_ce_stall_cntr;
+ __u64 hni_event_req_cntr;
+ __u64 hni_fe_cntr;
+ __u64 hni_fe_stall_cntr;
+ __u64 cq_event_req_cntr;
+ __u64 cq_fe_cntr;
+ __u64 cq_fe_stall_cntr;
+ __u64 ts_fe_cntr;
+ __u64 ts_fe_stall_cntr;
+ __u64 fe_arb_out_event_cntr;
+ __u64 fe_arb_out_stall_cntr;
+ __u64 ce_arb_out_event_cntr;
+ __u64 ce_arb_out_stall_cntr;
+ __u64 lpe_query_eq_none_cntr;
+ __u64 eqs_lpe_query_req_cntr;
+ __u64 eqs_csr_req_cntr;
+ __u64 eqs_csr_stall_cntr;
+ __u64 eqs_hws_init_req_cntr;
+ __u64 eqs_hws_init_stall_cntr;
+ __u64 eqs_expired_cb_req_cntr;
+ __u64 eqs_expired_cb_stall_cntr;
+ __u64 eqs_sts_updt_req_cntr;
+ __u64 eqs_sts_updt_stall_cntr;
+ __u64 eqs_sws_wr_req_cntr;
+ __u64 eqs_sws_wr_stall_cntr;
+ __u64 eqs_event_req_cntr;
+ __u64 eqs_event_stall_cntr;
+ __u64 eqs_arb_out_req_cntr;
+ __u64 eqs_free_cb_stall_cntr;
+ __u64 addr_trans_req_cntr;
+ __u64 tarb_wr_req_cntr;
+ __u64 tarb_irq_req_cntr;
+ __u64 tarb_stall_cntr;
+ __u64 event_type_cntr[32];
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 eq_dsabld_event_err_cntr;
+ __u64 eq_dsabld_sws_err_cntr;
+ __u64 eq_dsabld_lpeq_err_cntr;
+ __u64 eq_rsrvn_uflw_err_cntr;
+ __u64 unxpctd_trnsltn_rsp_err_cntr;
+ __u64 rarb_hw_err_cntr;
+ __u64 rarb_sw_err_cntr;
+ __u64 tarb_err_cntr;
+ __u64 eq_state_ucor_err_cntr;
+ __u64 cntr_rsvd[13];
+};
+
+struct c_atu_cntrs {
+ __u64 mem_cor_err_cntr;
+ __u64 mem_ucor_err_cntr;
+ __u64 cache_miss[4];
+ __u64 cache_hit_base_page_size[4];
+ __u64 cache_hit_derivative1_page_size[4];
+ __u64 cache_hit_derivative2_page_size[4];
+ __u64 cache_miss_oxe;
+ __u64 cache_miss_ixe;
+ __u64 cache_miss_ee;
+ __u64 ats_trans_latency[4];
+ __u64 nta_trans_latency[4];
+ __u64 client_req_oxe;
+ __u64 client_req_ixe;
+ __u64 client_req_ee;
+ __u64 filtered_requests;
+ __u64 ats_prs_odp_latency[4];
+ __u64 nic_pri_odp_latency[4];
+ __u64 odp_requests[4];
+ __u64 client_rsp_not_ok[4];
+ __u64 cache_evictions;
+ __u64 ats_inval_cntr;
+ __u64 implicit_flr_inval_cntr;
+ __u64 implicit_ats_en_inval_cntr;
+ __u64 atucq_inval_cntr;
+ __u64 pcie_unsuccess_cmpl;
+ __u64 ats_trans_err;
+ __u64 pcie_err_poisoned;
+ __u64 ats_dynamic_state_change_cntr;
+ __u64 at_stall_ccp;
+ __u64 at_stall_no_ptid;
+ __u64 at_stall_np_cdts;
+ __u64 at_stall_tarb_arb;
+ __u64 inval_stall_arb;
+ __u64 inval_stall_cmpl_wait;
+};
+
+struct c_parbs_cntrs {
+ __u64 tarb_cq_posted_pkts;
+ __u64 tarb_cq_non_posted_pkts;
+ __u64 tarb_cq_sbe_cnt;
+ __u64 tarb_cq_mbe_cnt;
+ __u64 tarb_ee_posted_pkts;
+ __u64 tarb_ee_sbe_cnt;
+ __u64 tarb_ee_mbe_cnt;
+ __u64 tarb_ixe_posted_pkts;
+ __u64 tarb_ixe_non_posted_pkts;
+ __u64 tarb_ixe_sbe_cnt;
+ __u64 tarb_ixe_mbe_cnt;
+ __u64 tarb_oxe_non_posted_pkts;
+ __u64 tarb_oxe_sbe_cnt;
+ __u64 tarb_oxe_mbe_cnt;
+ __u64 tarb_atu_posted_pkts;
+ __u64 tarb_atu_non_posted_pkts;
+ __u64 tarb_atu_sbe_cnt;
+ __u64 tarb_atu_mbe_cnt;
+ __u64 tarb_pi_posted_pkts;
+ __u64 tarb_pi_non_posted_pkts;
+ __u64 tarb_pi_posted_blocked_cnt;
+ __u64 tarb_pi_non_posted_blocked_cnt;
+ __u64 tarb_cq_posted_fifo_sbe;
+ __u64 tarb_cq_non_posted_fifo_sbe;
+ __u64 tarb_ee_posted_fifo_sbe;
+ __u64 tarb_ixe_posted_fifo_sbe;
+ __u64 tarb_ixe_non_posted_fifo_sbe;
+ __u64 tarb_oxe_non_posted_fifo_sbe;
+ __u64 tarb_atu_posted_fifo_sbe;
+ __u64 tarb_atu_non_posted_fifo_sbe;
+ __u64 tarb_cq_posted_fifo_mbe;
+ __u64 tarb_cq_non_posted_fifo_mbe;
+ __u64 tarb_ee_posted_fifo_mbe;
+ __u64 tarb_ixe_posted_fifo_mbe;
+ __u64 tarb_ixe_non_posted_fifo_mbe;
+ __u64 tarb_oxe_non_posted_fifo_mbe;
+ __u64 tarb_atu_posted_fifo_mbe;
+ __u64 tarb_atu_non_posted_fifo_mbe;
+ __u64 tarb_reserved_cnts[10];
+ __u64 rarb_pi_posted_pkts;
+ __u64 rarb_pi_completion_pkts;
+ __u64 rarb_pi_sbe_cnt;
+ __u64 rarb_pi_mbe_cnt;
+ __u64 rarb_cq_posted_pkts;
+ __u64 rarb_cq_completion_pkts;
+ __u64 rarb_ee_posted_pkts;
+ __u64 rarb_ixe_posted_pkts;
+ __u64 rarb_ixe_completion_pkts;
+ __u64 rarb_oxe_completion_pkts;
+ __u64 rarb_atu_posted_pkts;
+ __u64 rarb_atu_completion_pkts;
+ __u64 rarb_reserved_cnts[4];
+};
+
+struct c_pi_cntrs {
+ __u64 pri_mb_rtrgt_tlps;
+ __u64 pri_mb_rtrgt_mwr_tlps;
+ __u64 pri_mb_rtrgt_mrd_tlps;
+ __u64 pri_mb_rtrgt_tlp_discards;
+ __u64 pri_mb_rtrgt_posted_tlp_discards;
+ __u64 pri_mb_rtrgt_non_posted_tlp_discards;
+ __u64 pri_mb_rtrgt_posted_tlp_partial_discards;
+ __u64 pri_mb_rtrgt_fifo_cor_errors;
+ __u64 pri_mb_rtrgt_fifo_ucor_errors;
+ __u64 pri_mb_xali_cmpl_tlps;
+ __u64 pri_mb_xali_cmpl_ca_tlps;
+ __u64 pri_mb_xali_cmpl_ur_tlps;
+ __u64 pri_mb_axi_wr_requests;
+ __u64 pri_mb_axi_rd_requests;
+ __u64 pri_mb_axi_wr_rsp_decerrs;
+ __u64 pri_mb_axi_wr_rsp_slverrs;
+ __u64 pri_mb_axi_rd_rsp_decerrs;
+ __u64 pri_mb_axi_rd_rsp_slverrs;
+ __u64 pri_mb_axi_rd_rsp_parerrs;
+ __u64 pri_rarb_rtrgt_tlps;
+ __u64 pri_rarb_rtrgt_mwr_tlps;
+ __u64 pri_rarb_rtrgt_msg_tlps;
+ __u64 pri_rarb_rtrgt_msgd_tlps;
+ __u64 pri_rarb_rtrgt_tlp_discards;
+ __u64 pri_rarb_rtrgt_fifo_cor_errors;
+ __u64 pri_rarb_rtrgt_fifo_ucor_errors;
+ __u64 pri_rarb_rbyp_tlps;
+ __u64 pri_rarb_rbyp_tlp_discards;
+ __u64 pri_rarb_rbyp_fifo_cor_errors;
+ __u64 pri_rarb_rbyp_fifo_ucor_errors;
+ __u64 pri_rarb_sriovt_cor_errors;
+ __u64 pri_rarb_sriovt_ucor_errors;
+ __u64 pti_tarb_pkts;
+ __u64 pti_tarb_pkt_discards;
+ __u64 pti_tarb_rarb_ca_pkts;
+ __u64 pti_tarb_mwr_pkts;
+ __u64 pti_tarb_mrd_pkts;
+ __u64 pti_tarb_flush_pkts;
+ __u64 pti_tarb_irq_pkts;
+ __u64 pti_tarb_translation_pkts;
+ __u64 pti_tarb_inv_rsp_pkts;
+ __u64 pti_tarb_pg_req_pkts;
+ __u64 pti_tarb_amo_pkts;
+ __u64 pti_tarb_fetching_amo_pkts;
+ __u64 pti_tarb_hdr_cor_errors;
+ __u64 pti_tarb_hdr_ucor_errors;
+ __u64 pti_tarb_data_cor_errors;
+ __u64 pti_tarb_data_ucor_error;
+ __u64 pti_tarb_acxt_cor_errors;
+ __u64 pti_tarb_acxt_ucor_errors;
+ __u64 pti_tarb_reserved[5];
+ __u64 dmac_axi_rd_requests;
+ __u64 dmac_axi_rd_rsp_decerrs;
+ __u64 dmac_axi_rd_rsp_slverrs;
+ __u64 dmac_axi_rd_rsp_parerrs;
+ __u64 dmac_payload_mwr_tlps;
+ __u64 dmac_ce_mwr_tlps;
+ __u64 dmac_irqs;
+ __u64 dmac_desc_cor_errors;
+ __u64 dmac_desc_ucor_errors;
+};
+
+struct c_pi_ipd_cntrs {
+ __u64 pri_rtrgt_tlps;
+ __u64 pri_rtrgt_mwr_tlps;
+ __u64 pri_rtrgt_mrd_tlps;
+ __u64 pri_rtrgt_msg_tlps;
+ __u64 pri_rtrgt_msgd_tlps;
+ __u64 pri_rtrgt_tlps_aborted;
+ __u64 pri_rtrgt_blocked_on_mb;
+ __u64 pri_rtrgt_blocked_on_rarb;
+ __u64 pri_rtrgt_hdr_parity_errors;
+ __u64 pri_rtrgt_data_parity_errors;
+ __u64 pri_rbyp_tlps;
+ __u64 pri_rbyp_tlps_aborted;
+ __u64 pri_rbyp_hdr_parity_errors;
+ __u64 pri_rbyp_data_parity_errors;
+ __u64 pti_tarb_xali_posted_tlps;
+ __u64 pti_tarb_xali_non_posted_tlps;
+ __u64 pti_msixc_xali_posted_tlps;
+ __u64 pti_dbg_xali_posted_tlps;
+ __u64 pti_dbg_xali_non_posted_tlps;
+ __u64 pti_dmac_xali_posted_tlps;
+ __u64 pti_tarb_p_fifo_cor_errors;
+ __u64 pti_tarb_p_fifo_ucor_errors;
+ __u64 pti_tarb_np_fifo_cor_errors;
+ __u64 pti_tarb_np_fifo_ucor_errors;
+ __u64 pti_tarb_blocked_on_ph_crd;
+ __u64 pti_tarb_blocked_on_pd_crd;
+ __u64 pti_tarb_blocked_on_nph_crd;
+ __u64 pti_tarb_blocked_on_npd_crd;
+ __u64 pti_tarb_blocked_on_tag;
+ __u64 pti_dmac_blocked_on_ph_crd;
+ __u64 pti_dmac_blocked_on_pd_crd;
+ __u64 pti_msixc_blocked_on_ph_crd;
+ __u64 pti_msixc_blocked_on_pd_crd;
+ __u64 pti_dbg_blocked_on_ph_crd;
+ __u64 pti_dbg_blocked_on_pd_crd;
+ __u64 pti_dbg_blocked_on_nph_crd;
+ __u64 pti_dbg_blocked_on_tag;
+ __u64 pti_tarb_cmpl_to;
+ __u64 pti_tarb_cmpl_to_fifo_cor_errors;
+ __u64 pti_tarb_cmpl_to_fifo_ucor_errors;
+ __u64 msixc_oob_irqs_sent;
+ __u64 msixc_oob_legacy_irqs_sent;
+ __u64 msixc_oob_irqs_discarded;
+ __u64 msixc_oob_irq_pbas;
+ __u64 msixc_ib_irqs_sent;
+ __u64 msixc_ib_legacy_irqs_sent;
+ __u64 msixc_ib_irqs_discarded;
+ __u64 msixc_ib_irq_pbas;
+ __u64 msixc_pba_cor_errors;
+ __u64 msixc_pba_ucor_errors;
+ __u64 msixc_table_cor_errors;
+ __u64 msixc_table_ucor_errors;
+ __u64 pti_msixc_fifo_cor_errors;
+ __u64 pti_msixc_fifo_ucor_errors;
+ __u64 msixc_pti_fifo_cor_errors;
+ __u64 msixc_pti_fifo_ucor_errors;
+ __u64 dmac_p_fifo_cor_errors;
+ __u64 dmac_p_fifo_ucor_errors;
+ __u64 dbic_dbi_requests;
+ __u64 dbic_dbi_acks;
+ __u64 ipd_trigger_events[2];
+ __u64 ipd_cnts_reserved[66];
+};
+
+struct c_mb_cntrs {
+ __u64 crmc_ring_sbe[3];
+ __u64 crmc_ring_mbe[3];
+ __u64 crmc_wr_error[3];
+ __u64 crmc_axi_wr_requests[3];
+ __u64 crmc_ring_wr_requests[3];
+ __u64 crmc_rd_error[3];
+ __u64 crmc_axi_rd_requests[3];
+ __u64 crmc_ring_rd_requests[3];
+ __u64 jai_axi_wr_requests;
+ __u64 jai_axi_rd_requests;
+ __u64 mb_lsa0_trigger_events[2];
+ __u64 ixe_lsa0_trigger_events[2];
+ __u64 cq_lsa0_trigger_events[2];
+ __u64 ee_lsa0_trigger_events[2];
+ __u64 mb_lsa1_trigger_events[2];
+ __u64 ixe_lsa1_trigger_events[2];
+ __u64 cq_lsa1_trigger_events[2];
+ __u64 ee_lsa1_trigger_events[2];
+ __u64 cmc_axi_wr_requests[4];
+ __u64 cmc_axi_rd_requests[4];
+ __u64 mb_todo_cntrs[14];
+};
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_fab_hdr {
+ __u8 ihl : 4;
+ __u8 ver : 4;
+ __u8 ecn : 2;
+ __u8 dscp : 6;
+ __u16 tl;
+ __u16 vni;
+ __u8 spt_idx_hi : 6;
+ __u8: 2;
+ __u8 try_ : 3;
+ __u8 spt_idx_low : 5;
+ __u8 ttl;
+ __u8 protocol;
+ __u16 hdr_chksum;
+ union c_fab_addr sfa;
+ union c_fab_addr dfa;
+} __attribute__((packed));
+#else
+struct c_port_fab_hdr {
+ __u8 ver : 4;
+ __u8 ihl : 4;
+ __u8 dscp : 6;
+ __u8 ecn : 2;
+ __u16 tl;
+ __u16 vni;
+ __u8: 2;
+ __u16 spt_idx : 11;
+ __u8 try_ : 3;
+ __u8 ttl;
+ __u8 protocol;
+ __u16 hdr_chksum;
+ union c_fab_addr sfa;
+ union c_fab_addr dfa;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_fab_hdr_set_tl(struct c_port_fab_hdr *p, __u16 tl)
+{
+ p->tl = cpu_to_be16(tl);
+}
+
+static inline __u16 c_port_fab_hdr_get_tl(const struct c_port_fab_hdr *p)
+{
+ return be16_to_cpu(p->tl);
+}
+
+static inline void c_port_fab_hdr_set_vni(struct c_port_fab_hdr *p, __u16 vni)
+{
+ p->vni = cpu_to_be16(vni);
+}
+
+static inline __u16 c_port_fab_hdr_get_vni(const struct c_port_fab_hdr *p)
+{
+ return be16_to_cpu(p->vni);
+}
+
+static inline void c_port_fab_hdr_set_spt_idx(struct c_port_fab_hdr *p, __u16 spt_idx)
+{
+#ifdef __LITTLE_ENDIAN
+ p->spt_idx_low = spt_idx;
+ p->spt_idx_hi = spt_idx >> 5;
+#else
+ p->spt_idx = spt_idx;
+#endif
+}
+
+static inline __u16 c_port_fab_hdr_get_spt_idx(const struct c_port_fab_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->spt_idx_low | (__u16)p->spt_idx_hi << 5;
+#else
+ return p->spt_idx;
+#endif
+}
+
+static inline void c_port_fab_hdr_set_hdr_chksum(struct c_port_fab_hdr *p, __u16 hdr_chksum)
+{
+ p->hdr_chksum = cpu_to_be16(hdr_chksum);
+}
+
+static inline __u16 c_port_fab_hdr_get_hdr_chksum(const struct c_port_fab_hdr *p)
+{
+ return be16_to_cpu(p->hdr_chksum);
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_fab_vs_hdr {
+ __u8 dscp_hi : 4;
+ __u8 ver : 4;
+ __u8: 2;
+ __u8: 4;
+ __u8 dscp_low : 2;
+ __u8 spt_idx_hi;
+ __u8: 2;
+ __u8 try_ : 3;
+ __u8 spt_idx_low : 3;
+ __u16 vni;
+ union c_fab_addr sfa;
+ union c_fab_addr dfa;
+} __attribute__((packed));
+#else
+struct c_port_fab_vs_hdr {
+ __u8 ver : 4;
+ __u16 dscp : 6;
+ __u8: 4;
+ __u8: 2;
+ __u16 spt_idx : 11;
+ __u8 try_ : 3;
+ __u8: 2;
+ __u16 vni;
+ union c_fab_addr sfa;
+ union c_fab_addr dfa;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_fab_vs_hdr_set_dscp(struct c_port_fab_vs_hdr *p, __u8 dscp)
+{
+#ifdef __LITTLE_ENDIAN
+ p->dscp_low = dscp;
+ p->dscp_hi = dscp >> 2;
+#else
+ p->dscp = dscp;
+#endif
+}
+
+static inline __u8 c_port_fab_vs_hdr_get_dscp(const struct c_port_fab_vs_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u8)p->dscp_low | (__u8)p->dscp_hi << 2;
+#else
+ return p->dscp;
+#endif
+}
+
+static inline void c_port_fab_vs_hdr_set_spt_idx(struct c_port_fab_vs_hdr *p, __u16 spt_idx)
+{
+#ifdef __LITTLE_ENDIAN
+ p->spt_idx_low = spt_idx;
+ p->spt_idx_hi = spt_idx >> 3;
+#else
+ p->spt_idx = spt_idx;
+#endif
+}
+
+static inline __u16 c_port_fab_vs_hdr_get_spt_idx(const struct c_port_fab_vs_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->spt_idx_low | (__u16)p->spt_idx_hi << 3;
+#else
+ return p->spt_idx;
+#endif
+}
+
+static inline void c_port_fab_vs_hdr_set_vni(struct c_port_fab_vs_hdr *p, __u16 vni)
+{
+ p->vni = cpu_to_be16(vni);
+}
+
+static inline __u16 c_port_fab_vs_hdr_get_vni(const struct c_port_fab_vs_hdr *p)
+{
+ return be16_to_cpu(p->vni);
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_unrestricted_hdr {
+ __u8 opcode : 4;
+ __u8 ver_pkt_type : 3;
+ __u8 req_not_rsp : 1;
+ __u8 index_ext : 5;
+ __u8 pktid_ext : 2;
+ __u8 flush : 1;
+ __u64 remote_offset : 56;
+ __u8 msg_id;
+ __u8 seq_num_hi;
+ __u8 clr_seq_num_hi : 4;
+ __u8 seq_num_low : 4;
+ __u8 clr_seq_num_low;
+ __u8 sct_idx_hi;
+ __u8 rendezvous_id_hi : 4;
+ __u8 sct_idx_low : 4;
+ __u8: 2;
+ __u8 use_offset_for_get : 1;
+ __u8 src_error : 1;
+ __u8 rendezvous_id_low : 4;
+ __u32 request_len;
+ __u32 initiator;
+ __u64 match_bits;
+ __u64 header_data;
+ __u8 eg_len_hi;
+ __u8 eg_len_mid;
+ __u8: 4;
+ __u8 eg_len_low : 4;
+} __attribute__((packed));
+#else
+struct c_port_unrestricted_hdr {
+ __u8 req_not_rsp : 1;
+ __u8 ver_pkt_type : 3;
+ __u8 opcode : 4;
+ __u8 flush : 1;
+ __u8 pktid_ext : 2;
+ __u8 index_ext : 5;
+ __u64 remote_offset : 56;
+ __u8 msg_id;
+ __u16 seq_num : 12;
+ __u16 clr_seq_num : 12;
+ __u16 sct_idx : 12;
+ __u16 rendezvous_id : 8;
+ __u8 src_error : 1;
+ __u8 use_offset_for_get : 1;
+ __u8: 2;
+ __u32 request_len;
+ __u32 initiator;
+ __u64 match_bits;
+ __u64 header_data;
+ __u32 eg_len : 20;
+ __u8: 4;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_unrestricted_hdr_set_remote_offset(struct c_port_unrestricted_hdr *p,
+ __u64 remote_offset)
+{
+ p->remote_offset = cpu_to_be64(remote_offset << 8);
+}
+
+static inline __u64
+c_port_unrestricted_hdr_get_remote_offset(const struct c_port_unrestricted_hdr *p)
+{
+ return be64_to_cpu(p->remote_offset) >> 8;
+}
+
+static inline void c_port_unrestricted_hdr_set_seq_num(struct c_port_unrestricted_hdr *p,
+ __u16 seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->seq_num_low = seq_num;
+ p->seq_num_hi = seq_num >> 4;
+#else
+ p->seq_num = seq_num;
+#endif
+}
+
+static inline __u16 c_port_unrestricted_hdr_get_seq_num(const struct c_port_unrestricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->seq_num_low | (__u16)p->seq_num_hi << 4;
+#else
+ return p->seq_num;
+#endif
+}
+
+static inline void c_port_unrestricted_hdr_set_clr_seq_num(struct c_port_unrestricted_hdr *p,
+ __u16 clr_seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->clr_seq_num_low = clr_seq_num;
+ p->clr_seq_num_hi = clr_seq_num >> 8;
+#else
+ p->clr_seq_num = clr_seq_num;
+#endif
+}
+
+static inline __u16 c_port_unrestricted_hdr_get_clr_seq_num(const struct c_port_unrestricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->clr_seq_num_low | (__u16)p->clr_seq_num_hi << 8;
+#else
+ return p->clr_seq_num;
+#endif
+}
+
+static inline void c_port_unrestricted_hdr_set_sct_idx(struct c_port_unrestricted_hdr *p,
+ __u16 sct_idx)
+{
+#ifdef __LITTLE_ENDIAN
+ p->sct_idx_low = sct_idx;
+ p->sct_idx_hi = sct_idx >> 4;
+#else
+ p->sct_idx = sct_idx;
+#endif
+}
+
+static inline __u16 c_port_unrestricted_hdr_get_sct_idx(const struct c_port_unrestricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->sct_idx_low | (__u16)p->sct_idx_hi << 4;
+#else
+ return p->sct_idx;
+#endif
+}
+
+static inline void c_port_unrestricted_hdr_set_rendezvous_id(struct c_port_unrestricted_hdr *p,
+ __u8 rendezvous_id)
+{
+#ifdef __LITTLE_ENDIAN
+ p->rendezvous_id_low = rendezvous_id;
+ p->rendezvous_id_hi = rendezvous_id >> 4;
+#else
+ p->rendezvous_id = rendezvous_id;
+#endif
+}
+
+static inline __u8
+c_port_unrestricted_hdr_get_rendezvous_id(const struct c_port_unrestricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u8)p->rendezvous_id_low | (__u8)p->rendezvous_id_hi << 4;
+#else
+ return p->rendezvous_id;
+#endif
+}
+
+static inline void c_port_unrestricted_hdr_set_request_len(struct c_port_unrestricted_hdr *p,
+ __u32 request_len)
+{
+ p->request_len = cpu_to_be32(request_len);
+}
+
+static inline __u32 c_port_unrestricted_hdr_get_request_len(const struct c_port_unrestricted_hdr *p)
+{
+ return be32_to_cpu(p->request_len);
+}
+
+static inline void c_port_unrestricted_hdr_set_initiator(struct c_port_unrestricted_hdr *p,
+ __u32 initiator)
+{
+ p->initiator = cpu_to_be32(initiator);
+}
+
+static inline __u32 c_port_unrestricted_hdr_get_initiator(const struct c_port_unrestricted_hdr *p)
+{
+ return be32_to_cpu(p->initiator);
+}
+
+static inline void c_port_unrestricted_hdr_set_match_bits(struct c_port_unrestricted_hdr *p,
+ __u64 match_bits)
+{
+ p->match_bits = cpu_to_be64(match_bits);
+}
+
+static inline __u64 c_port_unrestricted_hdr_get_match_bits(const struct c_port_unrestricted_hdr *p)
+{
+ return be64_to_cpu(p->match_bits);
+}
+
+static inline void c_port_unrestricted_hdr_set_header_data(struct c_port_unrestricted_hdr *p,
+ __u64 header_data)
+{
+ p->header_data = cpu_to_be64(header_data);
+}
+
+static inline __u64 c_port_unrestricted_hdr_get_header_data(const struct c_port_unrestricted_hdr *p)
+{
+ return be64_to_cpu(p->header_data);
+}
+
+static inline void c_port_unrestricted_hdr_set_eg_len(struct c_port_unrestricted_hdr *p,
+ __u32 eg_len)
+{
+#ifdef __LITTLE_ENDIAN
+ p->eg_len_low = eg_len;
+ p->eg_len_mid = eg_len >> 4;
+ p->eg_len_hi = eg_len >> 12;
+#else
+ p->eg_len = eg_len;
+#endif
+}
+
+static inline __u32 c_port_unrestricted_hdr_get_eg_len(const struct c_port_unrestricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u32)p->eg_len_low | (__u32)p->eg_len_mid << 4 | (__u32)p->eg_len_hi << 12;
+#else
+ return p->eg_len;
+#endif
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_small_msg_hdr {
+ __u8 opcode : 4;
+ __u8 ver_pkt_type : 3;
+ __u8 req_not_rsp : 1;
+ __u8 index_ext : 5;
+ __u8 pktid_ext : 2;
+ __u8 flush : 1;
+ __u64 header_data : 64;
+ __u8 seq_num_hi;
+ __u8 clr_seq_num_hi : 4;
+ __u8 seq_num_low : 4;
+ __u8 clr_seq_num_low;
+ __u8 sct_idx_hi;
+ __u8 request_len_hi : 4;
+ __u8 sct_idx_low : 4;
+ __u8 request_len_low;
+ __u32 initiator;
+ __u64 match_bits : 64;
+ __u8: 7;
+ __u8 src_error : 1;
+} __attribute__((packed));
+#else
+struct c_port_small_msg_hdr {
+ __u8 req_not_rsp : 1;
+ __u8 ver_pkt_type : 3;
+ __u8 opcode : 4;
+ __u8 flush : 1;
+ __u8 pktid_ext : 2;
+ __u8 index_ext : 5;
+ __u64 header_data : 64;
+ __u16 seq_num : 12;
+ __u16 clr_seq_num : 12;
+ __u16 sct_idx : 12;
+ __u16 request_len : 12;
+ __u32 initiator;
+ __u64 match_bits : 64;
+ __u8 src_error : 1;
+ __u8: 7;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_small_msg_hdr_set_header_data(struct c_port_small_msg_hdr *p,
+ __u64 header_data)
+{
+ p->header_data = cpu_to_be64(header_data);
+}
+
+static inline __u64 c_port_small_msg_hdr_get_header_data(const struct c_port_small_msg_hdr *p)
+{
+ return be64_to_cpu(p->header_data);
+}
+
+static inline void c_port_small_msg_hdr_set_seq_num(struct c_port_small_msg_hdr *p, __u16 seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->seq_num_low = seq_num;
+ p->seq_num_hi = seq_num >> 4;
+#else
+ p->seq_num = seq_num;
+#endif
+}
+
+static inline __u16 c_port_small_msg_hdr_get_seq_num(const struct c_port_small_msg_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->seq_num_low | (__u16)p->seq_num_hi << 4;
+#else
+ return p->seq_num;
+#endif
+}
+
+static inline void c_port_small_msg_hdr_set_clr_seq_num(struct c_port_small_msg_hdr *p,
+ __u16 clr_seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->clr_seq_num_low = clr_seq_num;
+ p->clr_seq_num_hi = clr_seq_num >> 8;
+#else
+ p->clr_seq_num = clr_seq_num;
+#endif
+}
+
+static inline __u16 c_port_small_msg_hdr_get_clr_seq_num(const struct c_port_small_msg_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->clr_seq_num_low | (__u16)p->clr_seq_num_hi << 8;
+#else
+ return p->clr_seq_num;
+#endif
+}
+
+static inline void c_port_small_msg_hdr_set_sct_idx(struct c_port_small_msg_hdr *p, __u16 sct_idx)
+{
+#ifdef __LITTLE_ENDIAN
+ p->sct_idx_low = sct_idx;
+ p->sct_idx_hi = sct_idx >> 4;
+#else
+ p->sct_idx = sct_idx;
+#endif
+}
+
+static inline __u16 c_port_small_msg_hdr_get_sct_idx(const struct c_port_small_msg_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->sct_idx_low | (__u16)p->sct_idx_hi << 4;
+#else
+ return p->sct_idx;
+#endif
+}
+
+static inline void c_port_small_msg_hdr_set_request_len(struct c_port_small_msg_hdr *p,
+ __u16 request_len)
+{
+#ifdef __LITTLE_ENDIAN
+ p->request_len_low = request_len;
+ p->request_len_hi = request_len >> 8;
+#else
+ p->request_len = request_len;
+#endif
+}
+
+static inline __u16 c_port_small_msg_hdr_get_request_len(const struct c_port_small_msg_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->request_len_low | (__u16)p->request_len_hi << 8;
+#else
+ return p->request_len;
+#endif
+}
+
+static inline void c_port_small_msg_hdr_set_initiator(struct c_port_small_msg_hdr *p,
+ __u32 initiator)
+{
+ p->initiator = cpu_to_be32(initiator);
+}
+
+static inline __u32 c_port_small_msg_hdr_get_initiator(const struct c_port_small_msg_hdr *p)
+{
+ return be32_to_cpu(p->initiator);
+}
+
+static inline void c_port_small_msg_hdr_set_match_bits(struct c_port_small_msg_hdr *p,
+ __u64 match_bits)
+{
+ p->match_bits = cpu_to_be64(match_bits);
+}
+
+static inline __u64 c_port_small_msg_hdr_get_match_bits(const struct c_port_small_msg_hdr *p)
+{
+ return be64_to_cpu(p->match_bits);
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_continuation_hdr {
+ __u8 opcode : 4;
+ __u8 ver_pkt_type : 3;
+ __u8 req_not_rsp : 1;
+ __u8: 2;
+ __u8 src_error : 1;
+ __u8 pkt_ordered : 1;
+ __u8 eom : 1;
+ __u8 pktid_ext : 2;
+ __u8 flush : 1;
+ __u32 offset : 32;
+ __u8 msg_id;
+ __u8 seq_num_hi;
+ __u8 clr_seq_num_hi : 4;
+ __u8 seq_num_low : 4;
+ __u8 clr_seq_num_low;
+ __u8 sct_idx_hi;
+ __u8 pkt_xfer_len_hi : 4;
+ __u8 sct_idx_low : 4;
+ __u8 pkt_xfer_len_low;
+} __attribute__((packed));
+#else
+struct c_port_continuation_hdr {
+ __u8 req_not_rsp : 1;
+ __u8 ver_pkt_type : 3;
+ __u8 opcode : 4;
+ __u8 flush : 1;
+ __u8 pktid_ext : 2;
+ __u8 eom : 1;
+ __u8 pkt_ordered : 1;
+ __u8 src_error : 1;
+ __u8: 2;
+ __u32 offset : 32;
+ __u8 msg_id;
+ __u16 seq_num : 12;
+ __u16 clr_seq_num : 12;
+ __u16 sct_idx : 12;
+ __u16 pkt_xfer_len : 12;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_continuation_hdr_set_offset(struct c_port_continuation_hdr *p,
+ __u32 offset)
+{
+ p->offset = cpu_to_be32(offset);
+}
+
+static inline __u32 c_port_continuation_hdr_get_offset(const struct c_port_continuation_hdr *p)
+{
+ return be32_to_cpu(p->offset);
+}
+
+static inline void c_port_continuation_hdr_set_seq_num(struct c_port_continuation_hdr *p,
+ __u16 seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->seq_num_low = seq_num;
+ p->seq_num_hi = seq_num >> 4;
+#else
+ p->seq_num = seq_num;
+#endif
+}
+
+static inline __u16 c_port_continuation_hdr_get_seq_num(const struct c_port_continuation_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->seq_num_low | (__u16)p->seq_num_hi << 4;
+#else
+ return p->seq_num;
+#endif
+}
+
+static inline void c_port_continuation_hdr_set_clr_seq_num(struct c_port_continuation_hdr *p,
+ __u16 clr_seq_num)
+{
+#ifdef __LITTLE_ENDIAN
+ p->clr_seq_num_low = clr_seq_num;
+ p->clr_seq_num_hi = clr_seq_num >> 8;
+#else
+ p->clr_seq_num = clr_seq_num;
+#endif
+}
+
+static inline __u16 c_port_continuation_hdr_get_clr_seq_num(const struct c_port_continuation_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->clr_seq_num_low | (__u16)p->clr_seq_num_hi << 8;
+#else
+ return p->clr_seq_num;
+#endif
+}
+
+static inline void c_port_continuation_hdr_set_sct_idx(struct c_port_continuation_hdr *p,
+ __u16 sct_idx)
+{
+#ifdef __LITTLE_ENDIAN
+ p->sct_idx_low = sct_idx;
+ p->sct_idx_hi = sct_idx >> 4;
+#else
+ p->sct_idx = sct_idx;
+#endif
+}
+
+static inline __u16 c_port_continuation_hdr_get_sct_idx(const struct c_port_continuation_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->sct_idx_low | (__u16)p->sct_idx_hi << 4;
+#else
+ return p->sct_idx;
+#endif
+}
+
+static inline void c_port_continuation_hdr_set_pkt_xfer_len(struct c_port_continuation_hdr *p,
+ __u16 pkt_xfer_len)
+{
+#ifdef __LITTLE_ENDIAN
+ p->pkt_xfer_len_low = pkt_xfer_len;
+ p->pkt_xfer_len_hi = pkt_xfer_len >> 8;
+#else
+ p->pkt_xfer_len = pkt_xfer_len;
+#endif
+}
+
+static inline __u16
+c_port_continuation_hdr_get_pkt_xfer_len(const struct c_port_continuation_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->pkt_xfer_len_low | (__u16)p->pkt_xfer_len_hi << 8;
+#else
+ return p->pkt_xfer_len;
+#endif
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_restricted_hdr {
+ __u8 opcode : 4;
+ __u8 ver_pkt_type : 3;
+ __u8 req_not_rsp : 1;
+ __u8 index_ext : 5;
+ __u8 pktid_ext : 2;
+ __u8 flush : 1;
+ __u64 remote_offset : 56;
+ __u8 request_len_hi : 4;
+ __u8 src_error : 1;
+ __u8: 3;
+ __u8 request_len_low;
+} __attribute__((packed));
+#else
+struct c_port_restricted_hdr {
+ __u8 req_not_rsp : 1;
+ __u8 ver_pkt_type : 3;
+ __u8 opcode : 4;
+ __u8 flush : 1;
+ __u8 pktid_ext : 2;
+ __u8 index_ext : 5;
+ __u64 remote_offset : 56;
+ __u8: 3;
+ __u8 src_error : 1;
+ __u16 request_len : 12;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_restricted_hdr_set_remote_offset(struct c_port_restricted_hdr *p,
+ __u64 remote_offset)
+{
+ p->remote_offset = cpu_to_be64(remote_offset << 8);
+}
+
+static inline __u64 c_port_restricted_hdr_get_remote_offset(const struct c_port_restricted_hdr *p)
+{
+ return be64_to_cpu(p->remote_offset) >> 8;
+}
+
+static inline void c_port_restricted_hdr_set_request_len(struct c_port_restricted_hdr *p,
+ __u16 request_len)
+{
+#ifdef __LITTLE_ENDIAN
+ p->request_len_low = request_len;
+ p->request_len_hi = request_len >> 8;
+#else
+ p->request_len = request_len;
+#endif
+}
+
+static inline __u16 c_port_restricted_hdr_get_request_len(const struct c_port_restricted_hdr *p)
+{
+#ifdef __LITTLE_ENDIAN
+ return (__u16)p->request_len_low | (__u16)p->request_len_hi << 8;
+#else
+ return p->request_len;
+#endif
+}
+
+#ifdef __LITTLE_ENDIAN
+struct c_port_amo_payload {
+ __u8 amo_op : 4;
+ __u8: 4;
+ __u8 amo_type : 4;
+ __u8: 4;
+ __u8 cswap_op : 3;
+ __u8: 5;
+ __u64: 40;
+ __u64 op1_word1_le;
+ __u64 op1_word2_le;
+ __u64 op2_word1_le;
+ __u64 op2_word2_le;
+} __attribute__((packed));
+#else
+struct c_port_amo_payload {
+ __u8: 4;
+ __u8 amo_op : 4;
+ __u8: 4;
+ __u8 amo_type : 4;
+ __u8: 5;
+ __u8 cswap_op : 3;
+ __u64: 40;
+ __u64 op1_word1_le;
+ __u64 op1_word2_le;
+ __u64 op2_word1_le;
+ __u64 op2_word2_le;
+} __attribute__((packed));
+#endif
+
+static inline void c_port_amo_payload_set_op1_word1_le(struct c_port_amo_payload *p,
+ __u64 op1_word1_le)
+{
+ p->op1_word1_le = cpu_to_be64(op1_word1_le);
+}
+
+static inline __u64 c_port_amo_payload_get_op1_word1_le(const struct c_port_amo_payload *p)
+{
+ return be64_to_cpu(p->op1_word1_le);
+}
+
+static inline void c_port_amo_payload_set_op1_word2_le(struct c_port_amo_payload *p,
+ __u64 op1_word2_le)
+{
+ p->op1_word2_le = cpu_to_be64(op1_word2_le);
+}
+
+static inline __u64 c_port_amo_payload_get_op1_word2_le(const struct c_port_amo_payload *p)
+{
+ return be64_to_cpu(p->op1_word2_le);
+}
+
+static inline void c_port_amo_payload_set_op2_word1_le(struct c_port_amo_payload *p,
+ __u64 op2_word1_le)
+{
+ p->op2_word1_le = cpu_to_be64(op2_word1_le);
+}
+
+static inline __u64 c_port_amo_payload_get_op2_word1_le(const struct c_port_amo_payload *p)
+{
+ return be64_to_cpu(p->op2_word1_le);
+}
+
+static inline void c_port_amo_payload_set_op2_word2_le(struct c_port_amo_payload *p,
+ __u64 op2_word2_le)
+{
+ p->op2_word2_le = cpu_to_be64(op2_word2_le);
+}
+
+static inline __u64 c_port_amo_payload_get_op2_word2_le(const struct c_port_amo_payload *p)
+{
+ return be64_to_cpu(p->op2_word2_le);
+}
+
+struct c_hni_cntrs {
+ __u64 cor_ecc_err_cntr;
+ __u64 ucor_ecc_err_cntr;
+ __u64 tx_stall_llr;
+ __u64 cntr0;
+ __u64 rx_stall_ixe_fifo;
+ __u64 cntr1[3];
+ __u64 rx_stall_ixe_pktbuf[8];
+ __u64 pfc_fifo_oflw_cntr[8];
+ __u64 discard_cntr[8];
+ __u64 tx_ok_ieee;
+ __u64 tx_ok_opt;
+ __u64 tx_poisoned_ieee;
+ __u64 tx_poisoned_opt;
+ __u64 tx_ok_broadcast;
+ __u64 tx_ok_multicast;
+ __u64 tx_ok_tagged;
+ __u64 tx_ok_27;
+ __u64 tx_ok_35;
+ __u64 tx_ok_36_to_63;
+ __u64 tx_ok_64;
+ __u64 tx_ok_65_to_127;
+ __u64 tx_ok_128_to_255;
+ __u64 tx_ok_256_to_511;
+ __u64 tx_ok_512_to_1023;
+ __u64 tx_ok_1024_to_2047;
+ __u64 tx_ok_2048_to_4095;
+ __u64 tx_ok_4096_to_8191;
+ __u64 tx_ok_8192_to_max;
+ __u64 rx_ok_ieee;
+ __u64 rx_ok_opt;
+ __u64 rx_bad_ieee;
+ __u64 rx_bad_opt;
+ __u64 rx_ok_broadcast;
+ __u64 rx_ok_multicast;
+ __u64 rx_ok_mac_control;
+ __u64 rx_ok_bad_op_code;
+ __u64 rx_ok_flow_control;
+ __u64 rx_ok_tagged;
+ __u64 rx_ok_len_type_error;
+ __u64 rx_ok_too_long;
+ __u64 rx_ok_undersize;
+ __u64 rx_fragment;
+ __u64 rx_jabber;
+ __u64 rx_ok_27;
+ __u64 rx_ok_35;
+ __u64 rx_ok_36_to_63;
+ __u64 rx_ok_64;
+ __u64 rx_ok_65_to_127;
+ __u64 rx_ok_128_to_255;
+ __u64 rx_ok_256_to_511;
+ __u64 rx_ok_512_to_1023;
+ __u64 rx_ok_1024_to_2047;
+ __u64 rx_ok_2048_to_4095;
+ __u64 rx_ok_4096_to_8191;
+ __u64 rx_ok_8192_to_max;
+ __u64 hrp_ack;
+ __u64 hrp_resp;
+ __u64 fgfc_port;
+ __u64 fgfc_l2;
+ __u64 fgfc_ipv4;
+ __u64 fgfc_ipv6;
+ __u64 fgfc_match;
+ __u64 fgfc_event_xon;
+ __u64 fgfc_event_xoff;
+ __u64 fgfc_discard;
+ __u64 pause_recv[8];
+ __u64 pause_xoff_sent[8];
+ __u64 rx_paused[8];
+ __u64 tx_paused[8];
+ __u64 rx_paused_std;
+ __u64 pause_sent;
+ __u64 pause_refresh;
+ __u64 cntr2;
+ __u64 tx_std_padded;
+ __u64 tx_opt_padded;
+ __u64 tx_std_size_err;
+ __u64 tx_opt_size_err;
+ __u64 pkts_sent_by_tc[8];
+ __u64 pkts_recv_by_tc[8];
+ __u64 multicast_pkts_sent_by_tc[8];
+ __u64 multicast_pkts_recv_by_tc[8];
+};
+
+struct c1_hni_pcs_cntrs {
+ __u64 pml_mbe_error_cnt;
+ __u64 pml_sbe_error_cnt;
+ __u64 corrected_cw;
+ __u64 uncorrected_cw;
+ __u64 good_cw;
+ __u64 fecl_errors[8];
+};
+
+struct c2_hni_pcs_cntrs {
+ __u64 pml_mbe_error_cnt;
+ __u64 pml_sbe_error_cnt;
+ __u64 corrected_cw;
+ __u64 uncorrected_cw;
+ __u64 good_cw;
+ __u64 fecl_errors[16];
+ __u64 corrected_cw_bin[15];
+};
+
+struct c1_hni_mac_cntrs {
+ __u64 rx_illegal_size;
+ __u64 rx_fragment;
+ __u64 rx_preamble_error;
+};
+
+struct c2_hni_mac_cntrs {
+ __u64 rx_illegal_size;
+ __u64 rx_fragment;
+ __u64 rx_preamble_error;
+ __u64 tx_ifg_adjustment_sync;
+};
+
+struct c1_hni_llr_cntrs {
+ __u64 tx_loop_time_req_ctl_fr;
+ __u64 tx_loop_time_rsp_ctl_fr;
+ __u64 tx_init_ctl_os;
+ __u64 tx_init_echo_ctl_os;
+ __u64 tx_ack_ctl_os;
+ __u64 tx_nack_ctl_os;
+ __u64 tx_discard;
+ __u64 tx_ok_lossy;
+ __u64 tx_ok_lossless;
+ __u64 tx_ok_lossless_rpt;
+ __u64 tx_poisoned_lossy;
+ __u64 tx_poisoned_lossless;
+ __u64 tx_poisoned_lossless_rpt;
+ __u64 tx_ok_bypass;
+ __u64 tx_replay_event;
+ __u64 rx_loop_time_req_ctl_fr;
+ __u64 rx_loop_time_rsp_ctl_fr;
+ __u64 rx_bad_ctl_fr;
+ __u64 rx_init_ctl_os;
+ __u64 rx_init_echo_ctl_os;
+ __u64 rx_ack_ctl_os;
+ __u64 rx_nack_ctl_os;
+ __u64 rx_ack_nack_seq_err;
+ __u64 rx_ok_lossy;
+ __u64 rx_poisoned_lossy;
+ __u64 rx_bad_lossy;
+ __u64 rx_ok_lossless;
+ __u64 rx_poisoned_lossless;
+ __u64 rx_bad_lossless;
+ __u64 rx_expected_seq_good;
+ __u64 rx_expected_seq_poisoned;
+ __u64 rx_expected_seq_bad;
+ __u64 rx_unexpected_seq;
+ __u64 rx_duplicate_seq;
+ __u64 rx_replay_event;
+};
+
+struct c2_hni_llr_cntrs {
+ __u64 tx_loop_time_req_ctl_fr;
+ __u64 tx_loop_time_rsp_ctl_fr;
+ __u64 tx_init_ctl_os;
+ __u64 tx_init_echo_ctl_os;
+ __u64 tx_ack_ctl_os;
+ __u64 tx_nack_ctl_os;
+ __u64 tx_discard;
+ __u64 tx_ok_lossy;
+ __u64 tx_ok_lossless;
+ __u64 tx_ok_lossless_rpt;
+ __u64 tx_poisoned_lossy;
+ __u64 tx_poisoned_lossless;
+ __u64 tx_poisoned_lossless_rpt;
+ __u64 tx_bad_lossy;
+ __u64 tx_bad_lossless;
+ __u64 tx_bad_lossless_rpt;
+ __u64 tx_ok_bypass;
+ __u64 tx_replay_event;
+ __u64 tx_llr_blocked;
+ __u64 tx_llr_unblocked;
+ __u64 rx_loop_time_req_ctl_fr;
+ __u64 rx_loop_time_rsp_ctl_fr;
+ __u64 rx_bad_ctl_fr;
+ __u64 rx_init_ctl_os;
+ __u64 rx_init_echo_ctl_os;
+ __u64 rx_ack_ctl_os;
+ __u64 rx_nack_ctl_os;
+ __u64 rx_ack_nack_seq_err;
+ __u64 rx_ok_lossy;
+ __u64 rx_poisoned_lossy;
+ __u64 rx_bad_lossy;
+ __u64 rx_ok_lossless;
+ __u64 rx_poisoned_lossless;
+ __u64 rx_bad_lossless;
+ __u64 rx_expected_seq_good;
+ __u64 rx_expected_seq_poisoned;
+ __u64 rx_expected_seq_bad;
+ __u64 rx_unexpected_seq;
+ __u64 rx_duplicate_seq;
+ __u64 rx_replay_event;
+ __u64 rx_ack_nack_error;
+};
+
+struct c_pi_dmac_cdesc {
+ __u8 done : 1;
+ __u8 status : 2;
+ __u64: 61;
+};
+
+struct c_idc_put_cmd {
+ struct c_idc_hdr idc_header;
+ __u8 data[];
+};
+
+struct c_list_entry_simple {
+ __u64: 38;
+ __u16 addr : 14;
+ __u8 vld : 1;
+ __u16: 11;
+} __attribute__((packed));
+
+struct c_mst_table_simple {
+ __u16 portal_index : 11;
+ __u8: 1;
+ __u8 ptl_list : 2;
+ __u8: 2;
+ __u16 buffer_id;
+ __u32 initiator;
+};
+
+struct c_ct_writeback {
+ __u64 ct_success : 48;
+ __u8 ct_failure : 7;
+ __u16 unused : 8;
+ __u8 ct_writeback : 1;
+};
+
+#define C_ATU_CFG_CRNC_OFFSET 0x00000000
+#define C_ATU_CFG_CRNC (C_ATU_BASE + C_ATU_CFG_CRNC_OFFSET)
+#define C_ATU_CFG_CRNC_SIZE 0x00000008
+
+union c_atu_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_ATU_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_ATU_MSC_SHADOW_ACTION (C_ATU_BASE + C_ATU_MSC_SHADOW_ACTION_OFFSET)
+#define C_ATU_MSC_SHADOW_ACTION_SIZE 0x00000008
+
+union c_msc_shadow_action {
+ __u64 qw;
+ struct {
+ __u64 addr_offset : 23;
+ __u64: 8;
+ __u64 write : 1;
+ __u64: 32;
+ };
+};
+
+#define C_ATU_MSC_SHADOW_OFFSET 0x00000040
+#define C_ATU_MSC_SHADOW (C_ATU_BASE + C_ATU_MSC_SHADOW_OFFSET)
+#define C_ATU_MSC_SHADOW_SIZE 0x00000020
+
+union c_atu_msc_shadow {
+ __u64 qw[4];
+};
+
+#define C_ATU_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_ATU_ERR_ELAPSED_TIME (C_ATU_BASE + C_ATU_ERR_ELAPSED_TIME_OFFSET)
+#define C_ATU_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_atu_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_ATU_ERR_FLG_OFFSET 0x00000108
+#define C_ATU_ERR_FLG (C_ATU_BASE + C_ATU_ERR_FLG_OFFSET)
+#define C_ATU_ERR_FLG_SIZE 0x00000008
+
+union c_atu_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 23;
+ __u64 fifo_err : 1;
+ __u64 page_perm_err : 1;
+ __u64 ats_trans_err : 1;
+ __u64 pcie_unsuccess_cmpl : 1;
+ __u64 pcie_error_poisoned : 1;
+ __u64 ats_page_req_err : 1;
+ __u64 no_translation : 1;
+ __u64 invalid_ac : 1;
+ __u64 prb_expired : 1;
+ __u64 nta_pte_align_err : 1;
+ __u64 ats_odp_config_err : 1;
+ __u64 addr_out_of_range : 1;
+ __u64 ats_page_size_config_err : 1;
+ __u64 ats_page_size_err : 1;
+ __u64 p_tarb_cdt_uflow : 1;
+ __u64 np_tarb_cdt_uflow : 1;
+ __u64 ee_odp_req_err : 1;
+ __u64 ats_fn_disabled_err : 1;
+ __u64 rarb_hw_err : 1;
+ __u64 epoch_cnt_err : 1;
+ __u64 rspq_cmpl_err : 1;
+ __u64 odp_unexp_idx_err : 1;
+ __u64 in_progress_cnt_err : 1;
+ __u64: 9;
+ };
+};
+
+#define C_ATU_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_ATU_ERR_FIRST_FLG (C_ATU_BASE + C_ATU_ERR_FIRST_FLG_OFFSET)
+#define C_ATU_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_ATU_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_ATU_ERR_FIRST_FLG_TS (C_ATU_BASE + C_ATU_ERR_FIRST_FLG_TS_OFFSET)
+#define C_ATU_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_ATU_ERR_CLR_OFFSET 0x00000120
+#define C_ATU_ERR_CLR (C_ATU_BASE + C_ATU_ERR_CLR_OFFSET)
+#define C_ATU_ERR_CLR_SIZE 0x00000008
+#define C_ATU_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_ATU_ERR_IRQA_MSK (C_ATU_BASE + C_ATU_ERR_IRQA_MSK_OFFSET)
+#define C_ATU_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_ATU_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_ATU_ERR_IRQB_MSK (C_ATU_BASE + C_ATU_ERR_IRQB_MSK_OFFSET)
+#define C_ATU_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_ATU_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_ATU_ERR_INFO_MSK (C_ATU_BASE + C_ATU_ERR_INFO_MSK_OFFSET)
+#define C_ATU_ERR_INFO_MSK_SIZE 0x00000008
+#define C_ATU_EXT_ERR_FLG_OFFSET 0x00000148
+#define C_ATU_EXT_ERR_FLG (C_ATU_BASE + C_ATU_EXT_ERR_FLG_OFFSET)
+#define C_ATU_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_atu_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 ac_mem_cor : 1;
+ __u64 otb_mem_cor : 1;
+ __u64 tag_mem_cor : 1;
+ __u64 ingress_bus_cor : 1;
+ __u64 data_mem_cor : 1;
+ __u64 chain_tail_mem_cor : 1;
+ __u64 chain_next_mem_cor : 1;
+ __u64 missq_mem_cor : 1;
+ __u64 uniqq_mem_cor : 1;
+ __u64 chain_mem_cor : 1;
+ __u64 pointer_mem_cor : 1;
+ __u64 replayq_mem_cor : 1;
+ __u64 retryq_mem_cor : 1;
+ __u64 prb_mem_cor : 1;
+ __u64 invalq_mem_cor : 1;
+ __u64 rspinfoq_mem_cor : 1;
+ __u64 cmpldata_mem_cor : 1;
+ __u64 atucq_mem_cor : 1;
+ __u64 ats_prq_mem_cor : 1;
+ __u64 rarb_hdr_bus_cor : 1;
+ __u64 rarb_data_bus_cor : 1;
+ __u64 odpq_mem_cor : 1;
+ __u64: 9;
+ __u64: 1;
+ __u64 ac_mem_ucor : 1;
+ __u64 otb_mem_ucor : 1;
+ __u64 tag_mem_ucor : 1;
+ __u64 ingress_bus_ucor : 1;
+ __u64 data_mem_ucor : 1;
+ __u64 chain_tail_mem_ucor : 1;
+ __u64 chain_next_mem_ucor : 1;
+ __u64 missq_mem_ucor : 1;
+ __u64 uniqq_mem_ucor : 1;
+ __u64 chain_mem_ucor : 1;
+ __u64 pointer_mem_ucor : 1;
+ __u64 replayq_mem_ucor : 1;
+ __u64 retryq_mem_ucor : 1;
+ __u64 prb_mem_ucor : 1;
+ __u64 invalq_mem_ucor : 1;
+ __u64 rspinfoq_mem_ucor : 1;
+ __u64 cmpldata_mem_ucor : 1;
+ __u64 atucq_mem_ucor : 1;
+ __u64 ats_prq_mem_ucor : 1;
+ __u64 rarb_hdr_bus_ucor : 1;
+ __u64 rarb_data_bus_ucor : 1;
+ __u64 odpq_mem_ucor : 1;
+ __u64: 1;
+ __u64 anchor_vld_mem_ucor : 1;
+ __u64 anchor_mem_ucor : 1;
+ __u64: 2;
+ __u64: 4;
+ };
+};
+
+#define C_ATU_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C_ATU_EXT_ERR_FIRST_FLG (C_ATU_BASE + C_ATU_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_ATU_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_ATU_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C_ATU_EXT_ERR_FIRST_FLG_TS (C_ATU_BASE + C_ATU_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_ATU_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_ATU_EXT_ERR_CLR_OFFSET 0x00000160
+#define C_ATU_EXT_ERR_CLR (C_ATU_BASE + C_ATU_EXT_ERR_CLR_OFFSET)
+#define C_ATU_EXT_ERR_CLR_SIZE 0x00000008
+#define C_ATU_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C_ATU_EXT_ERR_IRQA_MSK (C_ATU_BASE + C_ATU_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_ATU_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_ATU_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C_ATU_EXT_ERR_IRQB_MSK (C_ATU_BASE + C_ATU_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_ATU_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_ATU_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C_ATU_EXT_ERR_INFO_MSK (C_ATU_BASE + C_ATU_EXT_ERR_INFO_MSK_OFFSET)
+#define C_ATU_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_ATU_ERR_INFO_MEM_OFFSET 0x00000200
+#define C_ATU_ERR_INFO_MEM (C_ATU_BASE + C_ATU_ERR_INFO_MEM_OFFSET)
+#define C_ATU_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_atu_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 12;
+ __u64 cor_mem_id : 6;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 12;
+ __u64 ucor_mem_id : 6;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_ATU_ERR_INFO_AC_OFFSET 0x00000208
+#define C_ATU_ERR_INFO_AC (C_ATU_BASE + C_ATU_ERR_INFO_AC_OFFSET)
+#define C_ATU_ERR_INFO_AC_SIZE 0x00000008
+
+union c_atu_err_info_ac {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 2;
+ __u64 error_type : 3;
+ __u64: 45;
+ };
+};
+
+#define C_ATU_ERR_INFO_TRANSLATION_OFFSET 0x00000210
+#define C_ATU_ERR_INFO_TRANSLATION (C_ATU_BASE + C_ATU_ERR_INFO_TRANSLATION_OFFSET)
+#define C_ATU_ERR_INFO_TRANSLATION_SIZE 0x00000008
+
+union c_atu_err_info_translation {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 addr : 45;
+ __u64: 7;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_PAGE_REQ_OFFSET 0x00000218
+#define C_ATU_ERR_INFO_ATS_PAGE_REQ (C_ATU_BASE + C_ATU_ERR_INFO_ATS_PAGE_REQ_OFFSET)
+#define C_ATU_ERR_INFO_ATS_PAGE_REQ_SIZE 0x00000008
+
+union c_atu_err_info_ats_page_req {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 prg_rsp_code : 4;
+ __u64 prb_ucor : 1;
+ __u64: 47;
+ };
+};
+
+#define C_ATU_ERR_INFO_PCIE_EP_OFFSET 0x00000220
+#define C_ATU_ERR_INFO_PCIE_EP (C_ATU_BASE + C_ATU_ERR_INFO_PCIE_EP_OFFSET)
+#define C_ATU_ERR_INFO_PCIE_EP_SIZE 0x00000008
+
+union c_atu_err_info_pcie_ep {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 50;
+ };
+};
+
+#define C_ATU_ERR_INFO_PCIE_UC_OFFSET 0x00000228
+#define C_ATU_ERR_INFO_PCIE_UC (C_ATU_BASE + C_ATU_ERR_INFO_PCIE_UC_OFFSET)
+#define C_ATU_ERR_INFO_PCIE_UC_SIZE 0x00000008
+
+union c_atu_err_info_pcie_uc {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 2;
+ __u64 cmpl_status : 3;
+ __u64: 45;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_TRANS_OFFSET 0x00000230
+#define C_ATU_ERR_INFO_ATS_TRANS (C_ATU_BASE + C_ATU_ERR_INFO_ATS_TRANS_OFFSET)
+#define C_ATU_ERR_INFO_ATS_TRANS_SIZE 0x00000008
+
+union c_atu_err_info_ats_trans {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 addr : 45;
+ __u64 cmpl_status : 3;
+ __u64: 4;
+ };
+};
+
+#define C_ATU_ERR_INFO_PAGE_PERM_OFFSET 0x00000238
+#define C_ATU_ERR_INFO_PAGE_PERM (C_ATU_BASE + C_ATU_ERR_INFO_PAGE_PERM_OFFSET)
+#define C_ATU_ERR_INFO_PAGE_PERM_SIZE 0x00000008
+
+union c_atu_err_info_page_perm {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 2;
+ __u64 perm_ats_priv : 1;
+ __u64 perm_ats_exec : 1;
+ __u64 perm_w : 1;
+ __u64 perm_r : 1;
+ __u64 perm_req_ats_priv : 1;
+ __u64 perm_req_ats_exec : 1;
+ __u64 perm_req_w : 1;
+ __u64 perm_req_r : 1;
+ __u64: 40;
+ };
+};
+
+#define C_ATU_ERR_INFO_NTA_PTE_ALIGN_OFFSET 0x00000240
+#define C_ATU_ERR_INFO_NTA_PTE_ALIGN (C_ATU_BASE + C_ATU_ERR_INFO_NTA_PTE_ALIGN_OFFSET)
+#define C_ATU_ERR_INFO_NTA_PTE_ALIGN_SIZE 0x00000008
+
+union c_atu_err_info_nta_pte_align {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 addr : 45;
+ __u64 page_size : 5;
+ __u64: 2;
+ };
+};
+
+#define C_ATU_ERR_INFO_FIFO_OFFSET 0x00000248
+#define C_ATU_ERR_INFO_FIFO (C_ATU_BASE + C_ATU_ERR_INFO_FIFO_OFFSET)
+#define C_ATU_ERR_INFO_FIFO_SIZE 0x00000008
+
+union c_atu_err_info_fifo {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 14;
+ __u64 fifo_id : 4;
+ __u64: 44;
+ };
+};
+
+#define C_ATU_ERR_INFO_ADDR_OUT_OF_RANGE_OFFSET 0x00000250
+#define C_ATU_ERR_INFO_ADDR_OUT_OF_RANGE (C_ATU_BASE + C_ATU_ERR_INFO_ADDR_OUT_OF_RANGE_OFFSET)
+#define C_ATU_ERR_INFO_ADDR_OUT_OF_RANGE_SIZE 0x00000008
+
+union c_atu_err_info_addr_out_of_range {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 addr : 45;
+ __u64: 7;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE_CONFIG_OFFSET 0x00000258
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE_CONFIG \
+ (C_ATU_BASE + C_ATU_ERR_INFO_ATS_PAGE_SIZE_CONFIG_OFFSET)
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE_CONFIG_SIZE 0x00000008
+
+union c_atu_err_info_ats_page_size_config {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 2;
+ __u64 pg_size : 5;
+ __u64: 43;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE_OFFSET 0x00000260
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE (C_ATU_BASE + C_ATU_ERR_INFO_ATS_PAGE_SIZE_OFFSET)
+#define C_ATU_ERR_INFO_ATS_PAGE_SIZE_SIZE 0x00000008
+
+union c_atu_err_info_ats_page_size {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 2;
+ __u64 pg_size : 6;
+ __u64: 42;
+ };
+};
+
+#define C_ATU_ERR_INFO_EE_ODP_REQ_OFFSET 0x00000268
+#define C_ATU_ERR_INFO_EE_ODP_REQ (C_ATU_BASE + C_ATU_ERR_INFO_EE_ODP_REQ_OFFSET)
+#define C_ATU_ERR_INFO_EE_ODP_REQ_SIZE 0x00000008
+
+union c_atu_err_info_ee_odp_req {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 addr : 45;
+ __u64: 7;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_ODP_CONFIG_OFFSET 0x00000270
+#define C_ATU_ERR_INFO_ATS_ODP_CONFIG (C_ATU_BASE + C_ATU_ERR_INFO_ATS_ODP_CONFIG_OFFSET)
+#define C_ATU_ERR_INFO_ATS_ODP_CONFIG_SIZE 0x00000008
+
+union c_atu_err_info_ats_odp_config {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 50;
+ };
+};
+
+#define C_ATU_ERR_INFO_PRB_EXPIRED_OFFSET 0x00000278
+#define C_ATU_ERR_INFO_PRB_EXPIRED (C_ATU_BASE + C_ATU_ERR_INFO_PRB_EXPIRED_OFFSET)
+#define C_ATU_ERR_INFO_PRB_EXPIRED_SIZE 0x00000008
+
+union c_atu_err_info_prb_expired {
+ __u64 qw;
+ struct {
+ __u64 index : 9;
+ __u64: 55;
+ };
+};
+
+#define C_ATU_ERR_INFO_ATS_FN_DISABLED_OFFSET 0x00000280
+#define C_ATU_ERR_INFO_ATS_FN_DISABLED (C_ATU_BASE + C_ATU_ERR_INFO_ATS_FN_DISABLED_OFFSET)
+#define C_ATU_ERR_INFO_ATS_FN_DISABLED_SIZE 0x00000008
+
+union c_atu_err_info_ats_fn_disabled {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 client : 2;
+ __u64: 50;
+ };
+};
+
+#define C_ATU_ERR_INFO_RARB_OFFSET 0x00000288
+#define C_ATU_ERR_INFO_RARB (C_ATU_BASE + C_ATU_ERR_INFO_RARB_OFFSET)
+#define C_ATU_ERR_INFO_RARB_SIZE 0x00000008
+
+union c_atu_err_info_rarb {
+ __u64 qw;
+ struct {
+ __u64 hdr_ucor : 1;
+ __u64 data_ucor : 1;
+ __u64 bad_vld : 1;
+ __u64 bad_eop : 1;
+ __u64 bad_cmd : 1;
+ __u64 unexpected_cmpl_ptid : 1;
+ __u64 cmpl_tag_out_of_range : 1;
+ __u64: 57;
+ };
+};
+
+#define C_ATU_ERR_INFO_EPOCH_CNT_OFFSET 0x00000290
+#define C_ATU_ERR_INFO_EPOCH_CNT (C_ATU_BASE + C_ATU_ERR_INFO_EPOCH_CNT_OFFSET)
+#define C_ATU_ERR_INFO_EPOCH_CNT_SIZE 0x00000008
+
+union c_atu_err_info_epoch_cnt {
+ __u64 qw;
+ struct {
+ __u64 oxe_at_epoch0_cnt_underrun : 1;
+ __u64 oxe_at_epoch0_cnt_overrun : 1;
+ __u64 oxe_at_epoch1_cnt_underrun : 1;
+ __u64 oxe_at_epoch1_cnt_overrun : 1;
+ __u64 ixe_at_epoch0_cnt_underrun : 1;
+ __u64 ixe_at_epoch0_cnt_overrun : 1;
+ __u64 ixe_at_epoch1_cnt_underrun : 1;
+ __u64 ixe_at_epoch1_cnt_overrun : 1;
+ __u64 ee_at_epoch0_cnt_underrun : 1;
+ __u64 ee_at_epoch0_cnt_overrun : 1;
+ __u64 ee_at_epoch1_cnt_underrun : 1;
+ __u64 ee_at_epoch1_cnt_overrun : 1;
+ __u64 ib_epoch0_cnt_underrun : 1;
+ __u64 ib_epoch0_cnt_overrun : 1;
+ __u64 ib_epoch1_cnt_underrun : 1;
+ __u64 ib_epoch1_cnt_overrun : 1;
+ __u64: 48;
+ };
+};
+
+#define C_ATU_ERR_INFO_RSPQ_CMPL_OFFSET 0x00000298
+#define C_ATU_ERR_INFO_RSPQ_CMPL (C_ATU_BASE + C_ATU_ERR_INFO_RSPQ_CMPL_OFFSET)
+#define C_ATU_ERR_INFO_RSPQ_CMPL_SIZE 0x00000008
+
+union c_atu_err_info_rspq_cmpl {
+ __u64 qw;
+ struct {
+ __u64 cmpl_last_surplus : 1;
+ __u64 cmpl_last_deficit : 1;
+ __u64 cmpl_missing : 1;
+ __u64: 61;
+ };
+};
+
+#define C_ATU_ERR_INFO_ODP_UNEXP_IDX_OFFSET 0x000002a0
+#define C_ATU_ERR_INFO_ODP_UNEXP_IDX (C_ATU_BASE + C_ATU_ERR_INFO_ODP_UNEXP_IDX_OFFSET)
+#define C_ATU_ERR_INFO_ODP_UNEXP_IDX_SIZE 0x00000008
+
+union c_atu_err_info_odp_unexp_idx {
+ __u64 qw;
+ struct {
+ __u64 prb_index : 9;
+ __u64 ats_pg_rsp : 1;
+ __u64: 54;
+ };
+};
+
+#define C_ATU_ERR_INFO_IN_PROGRESS_CNT_OFFSET 0x000002a8
+#define C_ATU_ERR_INFO_IN_PROGRESS_CNT (C_ATU_BASE + C_ATU_ERR_INFO_IN_PROGRESS_CNT_OFFSET)
+#define C_ATU_ERR_INFO_IN_PROGRESS_CNT_SIZE 0x00000008
+
+union c_atu_err_info_in_progress_cnt {
+ __u64 qw;
+ struct {
+ __u64 oxe_epoch0_cnt_underrun : 1;
+ __u64 oxe_epoch0_cnt_overrun : 1;
+ __u64 oxe_epoch1_cnt_underrun : 1;
+ __u64 oxe_epoch1_cnt_overrun : 1;
+ __u64 ixe_epoch0_cnt_underrun : 1;
+ __u64 ixe_epoch0_cnt_overrun : 1;
+ __u64 ixe_epoch1_cnt_underrun : 1;
+ __u64 ixe_epoch1_cnt_overrun : 1;
+ __u64 ee_epoch0_cnt_underrun : 1;
+ __u64 ee_epoch0_cnt_overrun : 1;
+ __u64 ee_epoch1_cnt_underrun : 1;
+ __u64 ee_epoch1_cnt_overrun : 1;
+ __u64: 52;
+ };
+};
+
+#define C_ATU_CFG_NTA_OFFSET 0x00000400
+#define C_ATU_CFG_NTA (C_ATU_BASE + C_ATU_CFG_NTA_OFFSET)
+#define C_ATU_CFG_NTA_SIZE 0x00000008
+
+union c_atu_cfg_nta {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 54;
+ };
+};
+
+#define C_ATU_CFG_ATS_OFFSET 0x00000408
+#define C_ATU_CFG_ATS (C_ATU_BASE + C_ATU_CFG_ATS_OFFSET)
+#define C_ATU_CFG_ATS_SIZE 0x00000008
+
+union c_atu_cfg_ats {
+ __u64 qw;
+ struct {
+ __u64 inval_batch_mode : 1;
+ __u64: 3;
+ __u64 num_xlations_req : 2;
+ __u64: 2;
+ __u64 inval_process_interval : 5;
+ __u64: 3;
+ __u64 truncate_gt_stu_rsp : 1;
+ __u64: 47;
+ };
+};
+
+#define C_ATU_CFG_CMDPROC_OFFSET 0x00000410
+#define C_ATU_CFG_CMDPROC (C_ATU_BASE + C_ATU_CFG_CMDPROC_OFFSET)
+#define C_ATU_CFG_CMDPROC_SIZE 0x00000008
+
+union c_atu_cfg_cmdproc {
+ __u64 qw;
+ struct {
+ __u64: 4;
+ __u64 rd_ptr : 5;
+ __u64: 7;
+ __u64: 4;
+ __u64 wr_ptr : 5;
+ __u64: 39;
+ };
+};
+
+#define C_ATU_CFG_WB_DATA_OFFSET 0x00000418
+#define C_ATU_CFG_WB_DATA (C_ATU_BASE + C_ATU_CFG_WB_DATA_OFFSET)
+#define C_ATU_CFG_WB_DATA_SIZE 0x00000008
+
+union c_atu_cfg_wb_data {
+ __u64 qw;
+ struct {
+ __u64 data;
+ };
+};
+
+#define C_ATU_CFG_CMDS_OFFSET 0x00000430
+#define C_ATU_CFG_CMDS (C_ATU_BASE + C_ATU_CFG_CMDS_OFFSET)
+#define C_ATU_CFG_CMDS_SIZE 0x00000008
+
+union c_atu_cfg_cmds {
+ __u64 qw;
+ struct {
+ __u64 writeback_acid : 10;
+ __u64: 6;
+ __u64 ib_wait_int_idx : 11;
+ __u64: 1;
+ __u64 ib_wait_int_enable : 1;
+ __u64: 3;
+ __u64 cmpl_wait_int_idx : 11;
+ __u64: 1;
+ __u64 cmpl_wait_int_enable : 1;
+ __u64: 19;
+ };
+};
+
+#define C_ATU_CFG_ODPQ_OFFSET 0x00000438
+#define C_ATU_CFG_ODPQ (C_ATU_BASE + C_ATU_CFG_ODPQ_OFFSET)
+#define C_ATU_CFG_ODPQ_SIZE 0x00000008
+
+union c_atu_cfg_odpq {
+ __u64 qw;
+ struct {
+ __u64 prb_index : 9;
+ __u64: 7;
+ __u64 status : 1;
+ __u64: 47;
+ };
+};
+
+#define C_ATU_CFG_ODP_OFFSET 0x00000440
+#define C_ATU_CFG_ODP (C_ATU_BASE + C_ATU_CFG_ODP_OFFSET)
+#define C_ATU_CFG_ODP_SIZE 0x00000008
+
+union c_atu_cfg_odp {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64: 6;
+ __u64 int_idx : 11;
+ __u64: 1;
+ __u64 int_enable : 1;
+ __u64: 31;
+ __u64 odp_en : 1;
+ __u64: 3;
+ };
+};
+
+#define C_ATU_CFG_PRI_OFFSET 0x00000448
+#define C_ATU_CFG_PRI (C_ATU_BASE + C_ATU_CFG_PRI_OFFSET)
+#define C_ATU_CFG_PRI_SIZE 0x00000008
+
+union c_atu_cfg_pri {
+ __u64 qw;
+ struct {
+ __u64: 12;
+ __u64 base_addr : 45;
+ __u64: 3;
+ __u64 relaxed_ordering_en : 1;
+ __u64: 3;
+ };
+};
+
+#define C_ATU_CFG_PRB_OFFSET 0x00000450
+#define C_ATU_CFG_PRB (C_ATU_BASE + C_ATU_CFG_PRB_OFFSET)
+#define C_ATU_CFG_PRB_SIZE 0x00000008
+
+union c_atu_cfg_prb {
+ __u64 qw;
+ struct {
+ __u64 timeout : 4;
+ __u64: 60;
+ };
+};
+
+#define C1_ATU_CFG_ODP_DECOUPLE_OFFSET 0x00000478
+#define C1_ATU_CFG_ODP_DECOUPLE (C_ATU_BASE + C1_ATU_CFG_ODP_DECOUPLE_OFFSET)
+#define C1_ATU_CFG_ODP_DECOUPLE_SIZE 0x00000008
+
+union c1_atu_cfg_odp_decouple {
+ __u64 qw;
+ struct {
+ __u64 flush_req_delay : 10;
+ __u64: 2;
+ __u64 enable : 1;
+ __u64: 51;
+ };
+};
+
+#define C2_ATU_CFG_ODP_DECOUPLE_OFFSET 0x00000478
+#define C2_ATU_CFG_ODP_DECOUPLE (C_ATU_BASE + C2_ATU_CFG_ODP_DECOUPLE_OFFSET)
+#define C2_ATU_CFG_ODP_DECOUPLE_SIZE 0x00000008
+
+union c2_atu_cfg_odp_decouple {
+ __u64 qw;
+ struct {
+ __u64 flush_req_delay : 32;
+ __u64 enable : 1;
+ __u64 wait_no_trigger : 1;
+ __u64 ip_all_client : 1;
+ __u64 tcam_mask : 2;
+ __u64 flush_to_trigger : 1;
+ __u64 trigger_wo_odp : 1;
+ __u64: 25;
+ };
+};
+
+#define C_ATU_CFG_INBOUND_WAIT_OFFSET 0x00000480
+#define C_ATU_CFG_INBOUND_WAIT (C_ATU_BASE + C_ATU_CFG_INBOUND_WAIT_OFFSET)
+#define C_ATU_CFG_INBOUND_WAIT_SIZE 0x00000008
+
+union c_atu_cfg_inbound_wait {
+ __u64 qw;
+ struct {
+ __u64: 3;
+ __u64 rsp_addr : 54;
+ __u64 rsp_en : 1;
+ __u64: 6;
+ };
+};
+
+#define C_ATU_CFG_AC_TABLE_OFFSET(idx) (0x00010000 + ((idx) * 32))
+#define C_ATU_CFG_AC_TABLE_ENTRIES 1024
+#define C_ATU_CFG_AC_TABLE(idx) (C_ATU_BASE + C_ATU_CFG_AC_TABLE_OFFSET(idx))
+#define C_ATU_CFG_AC_TABLE_SIZE 0x00008000
+
+union c_atu_cfg_ac_table {
+ __u64 qw[4];
+ struct {
+ union {
+ struct {
+ __u64: 12;
+ __u64 nta_root_ptr : 45;
+ __u64 nta_use_req_acid : 1;
+ __u64: 6;
+ };
+ struct {
+ __u64: 12;
+ __u64 ats_vf_num : 6;
+ __u64 ats_vf_en : 1;
+ __u64 ats_no_write : 1;
+ __u64 ats_pasid : 20;
+ __u64 ats_pasid_er : 1;
+ __u64 ats_pasid_pmr : 1;
+ __u64 ats_pasid_en : 1;
+ __u64 ats_filter_optimistic : 1;
+ __u64: 20;
+ };
+ struct {
+ __u64: 12;
+ __u64 ta_mode_opts : 46;
+ __u64: 6;
+ };
+ };
+ __u64: 12;
+ __u64 mem_size : 45;
+ __u64: 7;
+ __u64: 15;
+ __u64 mem_base : 42;
+ __u64: 7;
+ __u64: 32;
+ __u64 idx_salt : 8;
+ __u64 ptn_salt : 2;
+ __u64 cntr_pool_id : 2;
+ __u64 odp_mode : 1;
+ __u64 odp_en : 1;
+ __u64 do_not_filter : 1;
+ __u64: 1;
+ __u64 ptg_mode : 3;
+ __u64: 1;
+ __u64 pg_table_size : 4;
+ __u64 base_pg_size : 4;
+ __u64 do_not_cache : 1;
+ __u64 ta_mode : 2;
+ __u64 context_en : 1;
+ };
+};
+
+#define C_ATU_CFG_CQ_TABLE_OFFSET(idx) (0x0001a000 + ((idx) * 8))
+#define C_ATU_CFG_CQ_TABLE_ENTRIES 32
+#define C_ATU_CFG_CQ_TABLE(idx) (C_ATU_BASE + C_ATU_CFG_CQ_TABLE_OFFSET(idx))
+#define C_ATU_CFG_CQ_TABLE_SIZE 0x00000100
+
+union c_atu_cfg_cq_table {
+ __u64 qw;
+ union {
+ struct {
+ __u64 cmd_args : 62;
+ __u64 cmd : 2;
+ };
+ struct {
+ __u64: 3;
+ __u64 comp_wait_rsp_addr : 54;
+ __u64 comp_wait_rsp_en : 1;
+ __u64: 4;
+ __u64 comp_wait_cmd : 2;
+ };
+ struct {
+ __u64 inval_acid : 10;
+ __u64: 1;
+ __u64 inval_size : 1;
+ __u64 inval_addr : 45;
+ __u64: 5;
+ __u64 inval_addr_cmd : 2;
+ };
+ };
+};
+
+#define C_ATU_STS_INIT_DONE_OFFSET 0x00000800
+#define C_ATU_STS_INIT_DONE (C_ATU_BASE + C_ATU_STS_INIT_DONE_OFFSET)
+#define C_ATU_STS_INIT_DONE_SIZE 0x00000008
+
+union c_atu_sts_init_done {
+ __u64 qw;
+ struct {
+ __u64 tag_init_done : 1;
+ __u64 anchor_init_done : 1;
+ __u64 prb_init_done : 1;
+ __u64: 61;
+ };
+};
+
+#define C_ATU_STS_CMDPROC_OFFSET 0x00000808
+#define C_ATU_STS_CMDPROC (C_ATU_BASE + C_ATU_STS_CMDPROC_OFFSET)
+#define C_ATU_STS_CMDPROC_SIZE 0x00000008
+
+union c_atu_sts_cmdproc {
+ __u64 qw;
+ struct {
+ __u64 atucq_cmd_count : 16;
+ __u64: 8;
+ __u64 atucq_cmd : 2;
+ __u64: 2;
+ __u64 atucq_running : 1;
+ __u64 atucq_idle : 1;
+ __u64 atucq_waiting_arb : 1;
+ __u64 inbound_wait_idle : 1;
+ __u64 unused : 32;
+ };
+};
+
+#define C_ATU_STS_AT_EPOCH_OFFSET 0x00000810
+#define C_ATU_STS_AT_EPOCH (C_ATU_BASE + C_ATU_STS_AT_EPOCH_OFFSET)
+#define C_ATU_STS_AT_EPOCH_SIZE 0x00000008
+
+union c_atu_sts_at_epoch {
+ __u64 qw;
+ struct {
+ __u64 current_epoch : 1;
+ __u64: 7;
+ __u64 ee_epoch0_cntr_ne0 : 1;
+ __u64 ee_epoch1_cntr_ne0 : 1;
+ __u64: 2;
+ __u64 oxe_epoch0_cntr_ne0 : 1;
+ __u64 oxe_epoch1_cntr_ne0 : 1;
+ __u64: 2;
+ __u64 ixe_epoch0_cntr_ne0 : 1;
+ __u64 ixe_epoch1_cntr_ne0 : 1;
+ __u64: 46;
+ };
+};
+
+#define C_ATU_STS_IXE_AT_EPOCH_CNTR_OFFSET 0x00000818
+#define C_ATU_STS_IXE_AT_EPOCH_CNTR (C_ATU_BASE + C_ATU_STS_IXE_AT_EPOCH_CNTR_OFFSET)
+#define C_ATU_STS_IXE_AT_EPOCH_CNTR_SIZE 0x00000008
+
+union c_atu_sts_ixe_at_epoch_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 16;
+ __u64 epoch1 : 16;
+ __u64 unused : 32;
+ };
+};
+
+#define C_ATU_STS_OXE_AT_EPOCH_CNTR_OFFSET 0x00000820
+#define C_ATU_STS_OXE_AT_EPOCH_CNTR (C_ATU_BASE + C_ATU_STS_OXE_AT_EPOCH_CNTR_OFFSET)
+#define C_ATU_STS_OXE_AT_EPOCH_CNTR_SIZE 0x00000008
+
+union c_atu_sts_oxe_at_epoch_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 16;
+ __u64 epoch1 : 16;
+ __u64 unused : 32;
+ };
+};
+
+#define C_ATU_STS_EE_AT_EPOCH_CNTR_OFFSET 0x00000828
+#define C_ATU_STS_EE_AT_EPOCH_CNTR (C_ATU_BASE + C_ATU_STS_EE_AT_EPOCH_CNTR_OFFSET)
+#define C_ATU_STS_EE_AT_EPOCH_CNTR_SIZE 0x00000008
+
+union c_atu_sts_ee_at_epoch_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 16;
+ __u64 epoch1 : 16;
+ __u64 unused : 32;
+ };
+};
+
+#define C_ATU_STS_IB_EPOCH_OFFSET 0x00000830
+#define C_ATU_STS_IB_EPOCH (C_ATU_BASE + C_ATU_STS_IB_EPOCH_OFFSET)
+#define C_ATU_STS_IB_EPOCH_SIZE 0x00000008
+
+union c_atu_sts_ib_epoch {
+ __u64 qw;
+ struct {
+ __u64 current_epoch : 1;
+ __u64 mirrored_epoch : 1;
+ __u64: 6;
+ __u64 epoch0_cntr_ne0 : 1;
+ __u64 epoch1_cntr_ne0 : 1;
+ __u64: 54;
+ };
+};
+
+#define C_ATU_STS_IB_EPOCH_CNTR_OFFSET 0x00000838
+#define C_ATU_STS_IB_EPOCH_CNTR (C_ATU_BASE + C_ATU_STS_IB_EPOCH_CNTR_OFFSET)
+#define C_ATU_STS_IB_EPOCH_CNTR_SIZE 0x00000008
+
+union c_atu_sts_ib_epoch_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 16;
+ __u64 epoch1 : 16;
+ __u64 unused : 32;
+ };
+};
+
+#define C_ATU_STS_ODPQ_OFFSET 0x00000848
+#define C_ATU_STS_ODPQ (C_ATU_BASE + C_ATU_STS_ODPQ_OFFSET)
+#define C_ATU_STS_ODPQ_SIZE 0x00000008
+
+union c_atu_sts_odpq {
+ __u64 qw;
+ struct {
+ __u64 odpq_space : 4;
+ __u64: 60;
+ };
+};
+
+#define C_ATU_STS_ATS_VF_DISABLED_OFFSET 0x00000858
+#define C_ATU_STS_ATS_VF_DISABLED (C_ATU_BASE + C_ATU_STS_ATS_VF_DISABLED_OFFSET)
+#define C_ATU_STS_ATS_VF_DISABLED_SIZE 0x00000008
+
+union c_atu_sts_ats_vf_disabled {
+ __u64 qw;
+ struct {
+ __u64 vf_disabled;
+ };
+};
+
+#define C_ATU_STS_ATS_PF_DISABLED_OFFSET 0x00000860
+#define C_ATU_STS_ATS_PF_DISABLED (C_ATU_BASE + C_ATU_STS_ATS_PF_DISABLED_OFFSET)
+#define C_ATU_STS_ATS_PF_DISABLED_SIZE 0x00000008
+
+union c_atu_sts_ats_pf_disabled {
+ __u64 qw;
+ struct {
+ __u64 pf_disabled : 1;
+ __u64: 63;
+ };
+};
+
+#define C_ATU_STS_ATS_INVALQ_OFFSET 0x00000918
+#define C_ATU_STS_ATS_INVALQ (C_ATU_BASE + C_ATU_STS_ATS_INVALQ_OFFSET)
+#define C_ATU_STS_ATS_INVALQ_SIZE 0x00000008
+
+union c_atu_sts_ats_invalq {
+ __u64 qw;
+ struct {
+ __u64 requester_id : 16;
+ __u64 vf_num : 6;
+ __u64: 2;
+ __u64 vf_en : 1;
+ __u64: 3;
+ __u64 invals_to_process : 6;
+ __u64: 2;
+ __u64 invalq_count : 6;
+ __u64 invalq_full : 1;
+ __u64 invalq_vld : 1;
+ __u64 state_drive_rsp : 1;
+ __u64 state_cmpl_wait : 1;
+ __u64 state_invalidating : 1;
+ __u64 state_wait_arb : 1;
+ __u64 state_wait_trig : 1;
+ __u64: 15;
+ };
+};
+
+#define C_ATU_STS_IXE_IN_PROGRESS_CNTR_OFFSET 0x00000920
+#define C_ATU_STS_IXE_IN_PROGRESS_CNTR (C_ATU_BASE + C_ATU_STS_IXE_IN_PROGRESS_CNTR_OFFSET)
+#define C_ATU_STS_IXE_IN_PROGRESS_CNTR_SIZE 0x00000008
+
+union c_atu_sts_ixe_in_progress_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 9;
+ __u64: 7;
+ __u64 epoch1 : 9;
+ __u64: 39;
+ };
+};
+
+#define C_ATU_STS_OXE_IN_PROGRESS_CNTR_OFFSET 0x00000928
+#define C_ATU_STS_OXE_IN_PROGRESS_CNTR (C_ATU_BASE + C_ATU_STS_OXE_IN_PROGRESS_CNTR_OFFSET)
+#define C_ATU_STS_OXE_IN_PROGRESS_CNTR_SIZE 0x00000008
+
+union c_atu_sts_oxe_in_progress_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 9;
+ __u64: 7;
+ __u64 epoch1 : 9;
+ __u64: 39;
+ };
+};
+
+#define C_ATU_STS_EE_IN_PROGRESS_CNTR_OFFSET 0x00000930
+#define C_ATU_STS_EE_IN_PROGRESS_CNTR (C_ATU_BASE + C_ATU_STS_EE_IN_PROGRESS_CNTR_OFFSET)
+#define C_ATU_STS_EE_IN_PROGRESS_CNTR_SIZE 0x00000008
+
+union c_atu_sts_ee_in_progress_cntr {
+ __u64 qw;
+ struct {
+ __u64 epoch0 : 9;
+ __u64: 7;
+ __u64 epoch1 : 9;
+ __u64: 39;
+ };
+};
+
+#define C_ATU_STS_ODP_DECOUPLE_OFFSET 0x00000938
+#define C_ATU_STS_ODP_DECOUPLE (C_ATU_BASE + C_ATU_STS_ODP_DECOUPLE_OFFSET)
+#define C_ATU_STS_ODP_DECOUPLE_SIZE 0x00000008
+
+union c_atu_sts_odp_decouple {
+ __u64 qw;
+ struct {
+ __u64 previous_epoch : 1;
+ __u64 cmpl_wait_active : 1;
+ __u64 ixe_at_prev_epoch_cnt_ne0 : 1;
+ __u64 ixe_at_prev_epoch_ip_cnt_eq0 : 1;
+ __u64 ixe_prb_vld : 1;
+ __u64 state : 2;
+ __u64: 57;
+ };
+};
+
+#define C_ATU_STS_PRB_TABLE_OFFSET(idx) (0x00020000 + ((idx) * 8))
+#define C_ATU_STS_PRB_TABLE_ENTRIES 512
+#define C_ATU_STS_PRB_TABLE(idx) (C_ATU_BASE + C_ATU_STS_PRB_TABLE_OFFSET(idx))
+#define C_ATU_STS_PRB_TABLE_SIZE 0x00001000
+
+union c_atu_sts_prb_table {
+ __u64 qw;
+ struct {
+ __u64 acid : 10;
+ __u64 client : 2;
+ __u64 addr : 45;
+ __u64 w : 1;
+ __u64 r : 1;
+ __u64 ta_mode : 2;
+ __u64 odp_mode : 1;
+ __u64 expired : 1;
+ __u64 valid : 1;
+ };
+};
+
+#define C_CQ_CFG_CRNC_OFFSET 0x00000000
+#define C_CQ_CFG_CRNC (C_CQ_BASE + C_CQ_CFG_CRNC_OFFSET)
+#define C_CQ_CFG_CRNC_SIZE 0x00000008
+
+union c_cq_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_CQ_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_CQ_MSC_SHADOW_ACTION (C_CQ_BASE + C_CQ_MSC_SHADOW_ACTION_OFFSET)
+#define C_CQ_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_CQ_MSC_SHADOW_OFFSET 0x00000040
+#define C_CQ_MSC_SHADOW (C_CQ_BASE + C_CQ_MSC_SHADOW_OFFSET)
+#define C_CQ_MSC_SHADOW_SIZE 0x00000088
+
+union c_cq_msc_shadow {
+ __u64 qw[17];
+};
+
+#define C_CQ_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_CQ_ERR_ELAPSED_TIME (C_CQ_BASE + C_CQ_ERR_ELAPSED_TIME_OFFSET)
+#define C_CQ_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_cq_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_CQ_ERR_FLG_OFFSET 0x00000108
+#define C_CQ_ERR_FLG (C_CQ_BASE + C_CQ_ERR_FLG_OFFSET)
+#define C_CQ_ERR_FLG_SIZE 0x00000008
+
+union c_cq_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 7;
+ __u64 fifo_err : 1;
+ __u64 credit_uflw : 1;
+ __u64 c_state_cor : 1;
+ __u64 rarb_hdr_cor : 1;
+ __u64 rarb_data_cor : 1;
+ __u64 event_ram_cor : 1;
+ __u64 ll_state_mem_cor : 1;
+ __u64 ll_status_mem_cor : 1;
+ __u64 c_state_ucor : 1;
+ __u64 rarb_hdr_ucor : 1;
+ __u64 rarb_data_ucor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 ll_state_mem_ucor : 1;
+ __u64 ll_status_mem_ucor : 1;
+ __u64 ll_nempty_vectr_ucor : 1;
+ __u64 ll_full_vectr_ucor : 1;
+ __u64 event_cnt_ovf : 1;
+ __u64 tle_oversubscribed : 1;
+ __u64 rarb_bad_xactn_err : 1;
+ __u64 rarb_cmpltn_err : 1;
+ __u64 rarb_tou_wr_hw_err : 1;
+ __u64 rarb_ll_wr_hw_err : 1;
+ __u64 rarb_invld_wr_sw_err : 1;
+ __u64 rarb_tou_wr_sw_err : 1;
+ __u64 rarb_ll_wr_sw_err : 1;
+ __u64 msg_cnt_uflw : 1;
+ __u64 fq_load_uflw : 1;
+ __u64 wr_ptr_updt_err : 1;
+ __u64 ard_ptr_update_ucor : 1;
+ __u64 tx_fqu_free_list_ovf : 1;
+ __u64 tou_fqu_free_list_ovf : 1;
+ __u64: 17;
+ };
+};
+
+#define C_CQ_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_CQ_ERR_FIRST_FLG (C_CQ_BASE + C_CQ_ERR_FIRST_FLG_OFFSET)
+#define C_CQ_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_CQ_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_CQ_ERR_FIRST_FLG_TS (C_CQ_BASE + C_CQ_ERR_FIRST_FLG_TS_OFFSET)
+#define C_CQ_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_CQ_ERR_CLR_OFFSET 0x00000120
+#define C_CQ_ERR_CLR (C_CQ_BASE + C_CQ_ERR_CLR_OFFSET)
+#define C_CQ_ERR_CLR_SIZE 0x00000008
+#define C_CQ_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_CQ_ERR_IRQA_MSK (C_CQ_BASE + C_CQ_ERR_IRQA_MSK_OFFSET)
+#define C_CQ_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_CQ_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_CQ_ERR_IRQB_MSK (C_CQ_BASE + C_CQ_ERR_IRQB_MSK_OFFSET)
+#define C_CQ_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_CQ_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_CQ_ERR_INFO_MSK (C_CQ_BASE + C_CQ_ERR_INFO_MSK_OFFSET)
+#define C_CQ_ERR_INFO_MSK_SIZE 0x00000008
+#define C_CQ_EXT_ERR_FLG_OFFSET 0x00000148
+#define C_CQ_EXT_ERR_FLG (C_CQ_BASE + C_CQ_EXT_ERR_FLG_OFFSET)
+#define C_CQ_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_cq_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 remap_array_cor : 1;
+ __u64 cprof_table_cor : 1;
+ __u64 ac_remap_array_cor : 1;
+ __u64 tou_fq_cmd_cor : 1;
+ __u64 cq_fq_cmd_cor : 1;
+ __u64 tou_fid_list_ptrs_cor : 1;
+ __u64 cq_fid_list_ptrs_cor : 1;
+ __u64 ll_buf_cor : 1;
+ __u64 tx_ptr_cor : 1;
+ __u64 tx_base_cor : 1;
+ __u64 tx_ocuset_cor : 1;
+ __u64 tg_ptr_cor : 1;
+ __u64 tg_base_cor : 1;
+ __u64 pfq_bufs_cor : 1;
+ __u64 pfq_bufs_info_cor : 1;
+ __u64 pfq_ptrs_cor : 1;
+ __u64 target_pfq_cor : 1;
+ __u64 tu_pfq_bufs_cor : 1;
+ __u64 tu_pfq_info_cor : 1;
+ __u64 tu_pfq_list_ptrs_cor : 1;
+ __u64 ct_table_cor : 1;
+ __u64 ee_table_cor : 1;
+ __u64 ptlte_table_cor : 1;
+ __u64 ct_events_cor : 1;
+ __u64 thresh_table_cor : 1;
+ __u64 trig_ct_field_cor : 1;
+ __u64 trig_list_nodes_cor : 1;
+ __u64 tou_ll_reorder_cor : 1;
+ __u64 tou_cmd_ptrs_cor : 1;
+ __u64 in_fifo_cor : 1;
+ __u64 wb_addr_cor : 1;
+ __u64: 1;
+ __u64 remap_array_ucor : 1;
+ __u64 cprof_table_ucor : 1;
+ __u64 ac_remap_array_ucor : 1;
+ __u64 tou_fq_cmd_ucor : 1;
+ __u64 cq_fq_cmd_ucor : 1;
+ __u64 tou_fid_list_ptrs_ucor : 1;
+ __u64 cq_fid_list_ptrs_ucor : 1;
+ __u64 ll_buf_ucor : 1;
+ __u64 tx_ptr_ucor : 1;
+ __u64 tx_base_ucor : 1;
+ __u64 tx_ocuset_ucor : 1;
+ __u64 tg_ptr_ucor : 1;
+ __u64 tg_base_ucor : 1;
+ __u64 pfq_bufs_ucor : 1;
+ __u64 pfq_bufs_info_ucor : 1;
+ __u64 pfq_ptrs_ucor : 1;
+ __u64 target_pfq_ucor : 1;
+ __u64 tu_pfq_bufs_ucor : 1;
+ __u64 tu_pfq_info_ucor : 1;
+ __u64 tu_pfq_list_ptrs_ucor : 1;
+ __u64 ct_table_ucor : 1;
+ __u64 ee_table_ucor : 1;
+ __u64 ptlte_table_ucor : 1;
+ __u64 ct_events_ucor : 1;
+ __u64 thresh_table_ucor : 1;
+ __u64 trig_ct_field_ucor : 1;
+ __u64 trig_list_nodes_ucor : 1;
+ __u64 tou_ll_reorder_ucor : 1;
+ __u64 tou_cmd_ptrs_ucor : 1;
+ __u64 in_fifo_ucor : 1;
+ __u64 wb_addr_ucor : 1;
+ };
+};
+
+#define C_CQ_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C_CQ_EXT_ERR_FIRST_FLG (C_CQ_BASE + C_CQ_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_CQ_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_CQ_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C_CQ_EXT_ERR_FIRST_FLG_TS (C_CQ_BASE + C_CQ_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_CQ_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_CQ_EXT_ERR_CLR_OFFSET 0x00000160
+#define C_CQ_EXT_ERR_CLR (C_CQ_BASE + C_CQ_EXT_ERR_CLR_OFFSET)
+#define C_CQ_EXT_ERR_CLR_SIZE 0x00000008
+#define C_CQ_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C_CQ_EXT_ERR_IRQA_MSK (C_CQ_BASE + C_CQ_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_CQ_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_CQ_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C_CQ_EXT_ERR_IRQB_MSK (C_CQ_BASE + C_CQ_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_CQ_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_CQ_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C_CQ_EXT_ERR_INFO_MSK (C_CQ_BASE + C_CQ_EXT_ERR_INFO_MSK_OFFSET)
+#define C_CQ_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_CQ_ERR_INFO_MEM_OFFSET 0x00000190
+#define C_CQ_ERR_INFO_MEM (C_CQ_BASE + C_CQ_ERR_INFO_MEM_OFFSET)
+#define C_CQ_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_cq_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 12;
+ __u64 cor_mem_id : 7;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 12;
+ __u64 ucor_mem_id : 7;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_CQ_ERR_INFO_FIFO_ERR_OFFSET 0x00000198
+#define C_CQ_ERR_INFO_FIFO_ERR (C_CQ_BASE + C_CQ_ERR_INFO_FIFO_ERR_OFFSET)
+#define C_CQ_ERR_INFO_FIFO_ERR_SIZE 0x00000008
+
+union c_cq_err_info_fifo_err {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 6;
+ __u64 fifo_id : 6;
+ __u64: 50;
+ };
+};
+
+#define C_CQ_ERR_INFO_CC_OFFSET 0x000001a0
+#define C_CQ_ERR_INFO_CC (C_CQ_BASE + C_CQ_ERR_INFO_CC_OFFSET)
+#define C_CQ_ERR_INFO_CC_SIZE 0x00000008
+
+union c_cq_err_info_cc {
+ __u64 qw;
+ struct {
+ __u64 cc_id : 5;
+ __u64: 3;
+ __u64 sub_id : 3;
+ __u64: 53;
+ };
+};
+
+#define C_CQ_ERR_INFO_RARB_OFFSET 0x000001b0
+#define C_CQ_ERR_INFO_RARB (C_CQ_BASE + C_CQ_ERR_INFO_RARB_OFFSET)
+#define C_CQ_ERR_INFO_RARB_SIZE 0x00000010
+
+union c_cq_err_info_rarb {
+ __u64 qw[2];
+ struct {
+ __u64 bad_xactn_err : 1;
+ __u64 cmpltn_sts_err : 1;
+ __u64 cmpltn_ep_err : 1;
+ __u64 cmpltn_len_err : 1;
+ __u64 cmpltn_addr_err : 1;
+ __u64 cmpltn_dv_err : 1;
+ __u64 cmpltn_eop_err : 1;
+ __u64 cmpltn_data_mbe_err : 1;
+ __u64 tou_wr_hw_err : 1;
+ __u64 invld_wr_sw_err : 1;
+ __u64 tou_wr_sw_err : 1;
+ __u64: 5;
+ __u64 msg_type : 3;
+ __u64: 1;
+ __u64 cmpl_status : 3;
+ __u64: 1;
+ __u64 ep : 1;
+ __u64 dv : 1;
+ __u64 eop : 1;
+ __u64 data_mbe : 1;
+ __u64: 4;
+ __u64 tag : 9;
+ __u64: 7;
+ __u64 lower_address : 7;
+ __u64: 9;
+ __u64 first_dw_be : 4;
+ __u64 last_dw_be : 4;
+ __u64: 8;
+ __u64 length : 11;
+ __u64: 7;
+ __u64 addr_29_2 : 28;
+ __u64: 2;
+ };
+};
+
+#define C_CQ_ERR_INFO_RARB_LL_OFFSET 0x000001c0
+#define C_CQ_ERR_INFO_RARB_LL (C_CQ_BASE + C_CQ_ERR_INFO_RARB_LL_OFFSET)
+#define C_CQ_ERR_INFO_RARB_LL_SIZE 0x00000010
+
+union c_cq_err_info_rarb_ll {
+ __u64 qw[2];
+ struct {
+ __u64 hw_data_uncorr_err : 1;
+ __u64 hw_early_eop_err : 1;
+ __u64 hw_missing_eop_err : 1;
+ __u64 hw_data_valid_err : 1;
+ __u64 sw_addr_err : 1;
+ __u64 sw_align_err : 1;
+ __u64 sw_op_chgd_err : 1;
+ __u64 sw_offset_err : 1;
+ __u64 sw_offset_chgd_err : 1;
+ __u64 sw_overlap_err : 1;
+ __u64: 6;
+ __u64 ll_op : 3;
+ __u64: 13;
+ __u64 cq_id : 10;
+ __u64: 6;
+ __u64 is_tgq : 1;
+ __u64: 15;
+ __u64 first_dw_be : 4;
+ __u64 last_dw_be : 4;
+ __u64: 8;
+ __u64 length : 11;
+ __u64: 7;
+ __u64 addr_in_pg_15_2 : 14;
+ __u64: 16;
+ };
+};
+
+#define C_CQ_ERR_INFO_OCU_MAP_OFFSET 0x000001d0
+#define C_CQ_ERR_INFO_OCU_MAP (C_CQ_BASE + C_CQ_ERR_INFO_OCU_MAP_OFFSET)
+#define C_CQ_ERR_INFO_OCU_MAP_SIZE 0x00000008
+
+union c_cq_err_info_ocu_map {
+ __u64 qw;
+ struct {
+ __u64 ocu_id : 8;
+ __u64 fq_id : 6;
+ __u64: 50;
+ };
+};
+
+#define C_CQ_ERR_INFO_WR_PTR_UPDT_OFFSET 0x000001d8
+#define C_CQ_ERR_INFO_WR_PTR_UPDT (C_CQ_BASE + C_CQ_ERR_INFO_WR_PTR_UPDT_OFFSET)
+#define C_CQ_ERR_INFO_WR_PTR_UPDT_SIZE 0x00000008
+
+union c_cq_err_info_wr_ptr_updt {
+ __u64 qw;
+ struct {
+ __u64 invalid_wr_ptr : 16;
+ __u64 max_ptr : 16;
+ __u64 cq_id : 10;
+ __u64: 6;
+ __u64 is_tgq : 1;
+ __u64: 15;
+ };
+};
+
+#define C_CQ_CFG_INIT_TXQ_HW_STATE_OFFSET 0x00000400
+#define C_CQ_CFG_INIT_TXQ_HW_STATE (C_CQ_BASE + C_CQ_CFG_INIT_TXQ_HW_STATE_OFFSET)
+#define C_CQ_CFG_INIT_TXQ_HW_STATE_SIZE 0x00000008
+
+union c_cq_cfg_init_txq_hw_state {
+ __u64 qw;
+ struct {
+ __u64 cq_handle : 10;
+ __u64: 6;
+ __u64 pending : 1;
+ __u64: 47;
+ };
+};
+
+#define C_CQ_CFG_INIT_TGQ_HW_STATE_OFFSET 0x00000440
+#define C_CQ_CFG_INIT_TGQ_HW_STATE (C_CQ_BASE + C_CQ_CFG_INIT_TGQ_HW_STATE_OFFSET)
+#define C_CQ_CFG_INIT_TGQ_HW_STATE_SIZE 0x00000008
+
+union c_cq_cfg_init_tgq_hw_state {
+ __u64 qw;
+ struct {
+ __u64 cq_handle : 9;
+ __u64: 7;
+ __u64 pending : 1;
+ __u64: 47;
+ };
+};
+
+#define C_CQ_CFG_INIT_CT_HW_STATE_OFFSET 0x00000480
+#define C_CQ_CFG_INIT_CT_HW_STATE (C_CQ_BASE + C_CQ_CFG_INIT_CT_HW_STATE_OFFSET)
+#define C_CQ_CFG_INIT_CT_HW_STATE_SIZE 0x00000008
+
+union c_cq_cfg_init_ct_hw_state {
+ __u64 qw;
+ struct {
+ __u64 ct_handle : 11;
+ __u64 init : 1;
+ __u64 cancel : 1;
+ __u64: 3;
+ __u64 pending : 1;
+ __u64: 47;
+ };
+};
+
+#define C_CQ_CFG_TLE_POOL_OFFSET(idx) (0x00000500 + ((idx) * 8))
+#define C_CQ_CFG_TLE_POOL_ENTRIES 4
+#define C_CQ_CFG_TLE_POOL(idx) (C_CQ_BASE + C_CQ_CFG_TLE_POOL_OFFSET(idx))
+#define C_CQ_CFG_TLE_POOL_SIZE 0x00000020
+
+union c_cq_cfg_tle_pool {
+ __u64 qw;
+ struct {
+ __u64 num_reserved : 12;
+ __u64: 4;
+ __u64 in_use : 8;
+ __u64: 8;
+ __u64 max_alloc : 12;
+ __u64: 20;
+ };
+};
+
+#define C_CQ_CFG_STS_TLE_SHARED_OFFSET 0x00000520
+#define C_CQ_CFG_STS_TLE_SHARED (C_CQ_BASE + C_CQ_CFG_STS_TLE_SHARED_OFFSET)
+#define C_CQ_CFG_STS_TLE_SHARED_SIZE 0x00000008
+
+union c_cq_cfg_sts_tle_shared {
+ __u64 qw;
+ struct {
+ __u64 num_shared : 12;
+ __u64: 20;
+ __u64 num_shared_allocated : 12;
+ __u64: 4;
+ __u64 num_total_allocated : 12;
+ __u64: 4;
+ };
+};
+
+#define C_CQ_CFG_CREDIT_LIMITS_OFFSET 0x00000530
+#define C_CQ_CFG_CREDIT_LIMITS (C_CQ_BASE + C_CQ_CFG_CREDIT_LIMITS_OFFSET)
+#define C_CQ_CFG_CREDIT_LIMITS_SIZE 0x00000010
+
+union c_cq_cfg_credit_limits {
+ __u64 qw[2];
+ struct {
+ __u64 lpe_cmd_credits : 10;
+ __u64: 6;
+ __u64 lpe_rcv_fifo_credits : 4;
+ __u64: 4;
+ __u64 ee_event_credits : 5;
+ __u64: 11;
+ __u64 tou_fq_credits : 7;
+ __u64: 1;
+ __u64 tarb_p_credits : 5;
+ __u64: 3;
+ __u64 tarb_np_credits : 5;
+ __u64: 3;
+ __u64 prefetch_tou_credits : 5;
+ __u64: 3;
+ __u64 tou_wb_credits : 5;
+ __u64: 3;
+ __u64 tou_event_credits : 3;
+ __u64: 5;
+ __u64 tgq_cmd_fail_event_credits : 3;
+ __u64: 5;
+ __u64 txq_cmd_fail_event_credits : 4;
+ __u64: 4;
+ __u64 tou_cmd_fail_event_credits : 3;
+ __u64: 5;
+ __u64 fq_tot_credits : 9;
+ __u64: 7;
+ };
+};
+
+#define C_CQ_CFG_EVENT_CNTS_OFFSET 0x00000540
+#define C_CQ_CFG_EVENT_CNTS (C_CQ_BASE + C_CQ_CFG_EVENT_CNTS_OFFSET)
+#define C_CQ_CFG_EVENT_CNTS_SIZE 0x00000008
+
+union c_cq_cfg_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 enable : 1;
+ __u64 init : 1;
+ __u64 init_done : 1;
+ __u64: 1;
+ __u64 ovf_cnt : 16;
+ __u64: 44;
+ };
+};
+
+#define C_CQ_TXQ_BASE_TABLE_OFFSET(idx) (0x00010000 + ((idx) * 16))
+#define C_CQ_TXQ_BASE_TABLE_ENTRIES 1024
+#define C_CQ_TXQ_BASE_TABLE(idx) (C_CQ_BASE + C_CQ_TXQ_BASE_TABLE_OFFSET(idx))
+#define C_CQ_TXQ_BASE_TABLE_SIZE 0x00004000
+
+union c_cq_txq_base_table {
+ __u64 qw[2];
+ struct {
+ __u64 mem_q_eq : 11;
+ __u64: 1;
+ __u64 mem_q_base : 45;
+ __u64: 7;
+ __u64 mem_q_max_ptr : 16;
+ __u64 mem_q_rgid : 8;
+ __u64: 1;
+ __u64: 1;
+ __u64 mem_q_stat_cnt_pool : 2;
+ __u64: 8;
+ __u64 mem_q_pfq : 6;
+ __u64: 2;
+ __u64 mem_q_lcid : 4;
+ __u64 mem_q_acid : 10;
+ __u64 mem_q_policy : 2;
+ __u64: 4;
+ };
+};
+
+#define C_CQ_TXQ_ENABLE_OFFSET(idx) (0x00002000 + ((idx) * 8))
+#define C_CQ_TXQ_ENABLE_ENTRIES 1024
+#define C_CQ_TXQ_ENABLE(idx) (C_CQ_BASE + C_CQ_TXQ_ENABLE_OFFSET(idx))
+#define C_CQ_TXQ_ENABLE_SIZE 0x00002000
+
+union c_cq_txq_enable {
+ __u64 qw;
+ struct {
+ __u64 txq_enable : 1;
+ __u64 drain : 1;
+ __u64 fence : 1;
+ __u64: 61;
+ };
+};
+
+#define C_CQ_TXQ_TC_TABLE_OFFSET(idx) (0x00016000 + ((idx) * 8))
+#define C_CQ_TXQ_TC_TABLE_ENTRIES 1024
+#define C_CQ_TXQ_TC_TABLE(idx) (C_CQ_BASE + C_CQ_TXQ_TC_TABLE_OFFSET(idx))
+#define C_CQ_TXQ_TC_TABLE_SIZE 0x00002000
+
+union c_cq_txq_tc_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_tc : 3;
+ __u64 mem_q_trig : 1;
+ __u64 mem_q_eth : 1;
+ __u64: 59;
+ };
+};
+
+#define C_CQ_TXQ_WRPTR_TABLE_OFFSET(idx) (0x00018000 + ((idx) * 8))
+#define C_CQ_TXQ_WRPTR_TABLE_ENTRIES 1024
+#define C_CQ_TXQ_WRPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TXQ_WRPTR_TABLE_OFFSET(idx))
+#define C_CQ_TXQ_WRPTR_TABLE_SIZE 0x00002000
+
+union c_cq_txq_wrptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_wr_ptr : 16;
+ __u64: 48;
+ };
+};
+
+#define C_CQ_TXQ_RDPTR_TABLE_OFFSET(idx) (0x00090000 + ((idx) * 8))
+#define C_CQ_TXQ_RDPTR_TABLE_ENTRIES 1024
+#define C_CQ_TXQ_RDPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TXQ_RDPTR_TABLE_OFFSET(idx))
+#define C_CQ_TXQ_RDPTR_TABLE_SIZE 0x00002000
+
+union c_cq_txq_rdptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_rd_ptr : 16;
+ __u64: 48;
+ };
+};
+
+#define C_CQ_TXQ_PREPTR_TABLE_OFFSET(idx) (0x00070000 + ((idx) * 8))
+#define C_CQ_TXQ_PREPTR_TABLE_ENTRIES 1024
+#define C_CQ_TXQ_PREPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TXQ_PREPTR_TABLE_OFFSET(idx))
+#define C_CQ_TXQ_PREPTR_TABLE_SIZE 0x00002000
+
+union c_cq_txq_preptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_pre_ptr : 16;
+ __u64 mem_q_pre_ptr_par : 1;
+ __u64: 47;
+ };
+};
+
+#define C_CQ_TXQ_ACK_CTR_OFFSET(idx) (0x00094000 + ((idx) * 8))
+#define C_CQ_TXQ_ACK_CTR_ENTRIES 1024
+#define C_CQ_TXQ_ACK_CTR(idx) (C_CQ_BASE + C_CQ_TXQ_ACK_CTR_OFFSET(idx))
+#define C_CQ_TXQ_ACK_CTR_SIZE 0x00002000
+
+union c_cq_txq_ack_ctr {
+ __u64 qw;
+ struct {
+ __u64 mem_q_ack_ctr : 12;
+ __u64: 52;
+ };
+};
+
+#define C_CQ_TGQ_TABLE_OFFSET(idx) (0x0001a000 + ((idx) * 16))
+#define C_CQ_TGQ_TABLE_ENTRIES 512
+#define C_CQ_TGQ_TABLE(idx) (C_CQ_BASE + C_CQ_TGQ_TABLE_OFFSET(idx))
+#define C_CQ_TGQ_TABLE_SIZE 0x00002000
+
+union c_cq_tgq_table {
+ __u64 qw[2];
+ struct {
+ __u64 mem_q_eq : 11;
+ __u64: 1;
+ __u64 mem_q_base : 45;
+ __u64: 7;
+ __u64 mem_q_max_ptr : 16;
+ __u64 mem_q_rgid : 8;
+ __u64: 1;
+ __u64: 1;
+ __u64 mem_q_stat_cnt_pool : 2;
+ __u64 mem_q_tc_reg : 3;
+ __u64: 17;
+ __u64 mem_q_acid : 10;
+ __u64 mem_q_policy : 2;
+ __u64: 4;
+ };
+};
+
+#define C_CQ_TGQ_ENABLE_OFFSET(idx) (0x00004000 + ((idx) * 8))
+#define C_CQ_TGQ_ENABLE_ENTRIES 512
+#define C_CQ_TGQ_ENABLE(idx) (C_CQ_BASE + C_CQ_TGQ_ENABLE_OFFSET(idx))
+#define C_CQ_TGQ_ENABLE_SIZE 0x00001000
+
+union c_cq_tgq_enable {
+ __u64 qw;
+ struct {
+ __u64 tgq_enable : 1;
+ __u64 drain : 1;
+ __u64: 62;
+ };
+};
+
+#define C_CQ_TGQ_WRPTR_TABLE_OFFSET(idx) (0x0001c000 + ((idx) * 8))
+#define C_CQ_TGQ_WRPTR_TABLE_ENTRIES 512
+#define C_CQ_TGQ_WRPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TGQ_WRPTR_TABLE_OFFSET(idx))
+#define C_CQ_TGQ_WRPTR_TABLE_SIZE 0x00001000
+
+union c_cq_tgq_wrptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_wr_ptr : 16;
+ __u64: 48;
+ };
+};
+
+#define C_CQ_TGQ_RDPTR_TABLE_OFFSET(idx) (0x00092000 + ((idx) * 8))
+#define C_CQ_TGQ_RDPTR_TABLE_ENTRIES 512
+#define C_CQ_TGQ_RDPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TGQ_RDPTR_TABLE_OFFSET(idx))
+#define C_CQ_TGQ_RDPTR_TABLE_SIZE 0x00001000
+
+union c_cq_tgq_rdptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_rd_ptr : 16;
+ __u64: 48;
+ };
+};
+
+#define C_CQ_TGQ_PREPTR_TABLE_OFFSET(idx) (0x00072000 + ((idx) * 8))
+#define C_CQ_TGQ_PREPTR_TABLE_ENTRIES 512
+#define C_CQ_TGQ_PREPTR_TABLE(idx) (C_CQ_BASE + C_CQ_TGQ_PREPTR_TABLE_OFFSET(idx))
+#define C_CQ_TGQ_PREPTR_TABLE_SIZE 0x00001000
+
+union c_cq_tgq_preptr_table {
+ __u64 qw;
+ struct {
+ __u64 mem_q_pre_ptr : 16;
+ __u64 mem_q_pre_ptr_par : 1;
+ __u64: 47;
+ };
+};
+
+#define C_CQ_TGQ_ACK_CTR_OFFSET(idx) (0x00096000 + ((idx) * 8))
+#define C_CQ_TGQ_ACK_CTR_ENTRIES 512
+#define C_CQ_TGQ_ACK_CTR(idx) (C_CQ_BASE + C_CQ_TGQ_ACK_CTR_OFFSET(idx))
+#define C_CQ_TGQ_ACK_CTR_SIZE 0x00001000
+
+union c_cq_tgq_ack_ctr {
+ __u64 qw;
+ struct {
+ __u64 mem_q_ack_ctr : 12;
+ __u64: 4;
+ __u64 append_ctr : 14;
+ __u64: 34;
+ };
+};
+
+#define C_CQ_CFG_CQ_POLICY_OFFSET 0x00000640
+#define C_CQ_CFG_CQ_POLICY (C_CQ_BASE + C_CQ_CFG_CQ_POLICY_OFFSET)
+#define C_CQ_CFG_CQ_POLICY_SIZE 0x00000008
+
+union c_cq_cfg_cq_policy {
+ __u64 qw;
+ struct {
+ struct {
+ __u8 shift : 4;
+ __u8 empty : 1;
+ __u8: 3;
+ } policy[4];
+ __u32 unused;
+ };
+};
+
+#define C_CQ_CFG_CP_TABLE_OFFSET(idx) (0x0001d000 + ((idx) * 8))
+#define C_CQ_CFG_CP_TABLE_ENTRIES 256
+#define C_CQ_CFG_CP_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_CP_TABLE_OFFSET(idx))
+#define C_CQ_CFG_CP_TABLE_SIZE 0x00000800
+
+union c_cq_cfg_cp_table {
+ __u64 qw;
+ struct {
+ __u64 vni : 16;
+ __u64 dscp_unrsto : 6;
+ __u64: 2;
+ __u64 dscp_rstuno : 6;
+ __u64: 2;
+ __u64 hrp_vld : 1;
+ __u64 smt_disabled : 1;
+ __u64 sct_disabled : 1;
+ __u64 srb_disabled : 1;
+ __u64 valid : 1;
+ __u64: 27;
+ };
+};
+
+#define C_CQ_CFG_CP_FL_TABLE_OFFSET(idx) (0x0001d800 + ((idx) * 8))
+#define C_CQ_CFG_CP_FL_TABLE_ENTRIES 256
+#define C_CQ_CFG_CP_FL_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_CP_FL_TABLE_OFFSET(idx))
+#define C_CQ_CFG_CP_FL_TABLE_SIZE 0x00000800
+
+union c_cq_cfg_cp_fl_table {
+ __u64 qw;
+ struct {
+ __u64 pfq : 6;
+ __u64: 2;
+ __u64 tc : 3;
+ __u64: 53;
+ };
+};
+
+#define C_CQ_CFG_CT_WB_MEM_ADDR_OFFSET(idx) (0x00080000 + ((idx) * 8))
+#define C_CQ_CFG_CT_WB_MEM_ADDR_ENTRIES 2048
+#define C_CQ_CFG_CT_WB_MEM_ADDR(idx) (C_CQ_BASE + C_CQ_CFG_CT_WB_MEM_ADDR_OFFSET(idx))
+#define C_CQ_CFG_CT_WB_MEM_ADDR_SIZE 0x00004000
+
+union c_cq_cfg_ct_wb_mem_addr {
+ __u64 qw;
+ struct {
+ __u64 wb_mem_context : 10;
+ __u64 wb_mem_addr : 54;
+ };
+};
+
+#define C_CQ_CFG_CT_ENABLE_OFFSET(idx) (0x00088000 + ((idx) * 8))
+#define C_CQ_CFG_CT_ENABLE_ENTRIES 2048
+#define C_CQ_CFG_CT_ENABLE(idx) (C_CQ_BASE + C_CQ_CFG_CT_ENABLE_OFFSET(idx))
+#define C_CQ_CFG_CT_ENABLE_SIZE 0x00004000
+
+union c_cq_cfg_ct_enable {
+ __u64 qw;
+ struct {
+ __u64 ct_enable : 1;
+ __u64: 63;
+ };
+};
+
+#define C_CQ_CFG_CID_ARRAY_OFFSET(idx) (0x00050000 + ((idx) * 8))
+#define C_CQ_CFG_CID_ARRAY_ENTRIES 4096
+#define C_CQ_CFG_CID_ARRAY(idx) (C_CQ_BASE + C_CQ_CFG_CID_ARRAY_OFFSET(idx))
+#define C_CQ_CFG_CID_ARRAY_SIZE 0x00008000
+
+union c_cq_cfg_cid_array {
+ __u64 qw;
+ struct {
+ __u64 cid : 8;
+ __u64: 56;
+ };
+};
+
+#define C_CQ_CFG_AC_ARRAY_OFFSET(idx) (0x00060000 + ((idx) * 8))
+#define C_CQ_CFG_AC_ARRAY_ENTRIES 2048
+#define C_CQ_CFG_AC_ARRAY(idx) (C_CQ_BASE + C_CQ_CFG_AC_ARRAY_OFFSET(idx))
+#define C_CQ_CFG_AC_ARRAY_SIZE 0x00004000
+
+union c_cq_cfg_ac_array {
+ __u64 qw;
+ struct {
+ __u64 ac : 10;
+ __u64: 54;
+ };
+};
+
+#define C_CQ_CFG_PFQ_THRESH_TABLE_OFFSET(idx) (0x0001e000 + ((idx) * 8))
+#define C_CQ_CFG_PFQ_THRESH_TABLE_ENTRIES 48
+#define C_CQ_CFG_PFQ_THRESH_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_PFQ_THRESH_TABLE_OFFSET(idx))
+#define C_CQ_CFG_PFQ_THRESH_TABLE_SIZE 0x00000180
+
+union c_cq_cfg_pfq_thresh_table {
+ __u64 qw;
+ struct {
+ __u64 high_thresh : 9;
+ __u64: 7;
+ __u64 buf_cnt : 10;
+ __u64: 38;
+ };
+};
+
+#define C_CQ_CFG_FQ_THRESH_TABLE_OFFSET(idx) (0x0001e200 + ((idx) * 8))
+#define C_CQ_CFG_FQ_THRESH_TABLE_ENTRIES 48
+#define C_CQ_CFG_FQ_THRESH_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_FQ_THRESH_TABLE_OFFSET(idx))
+#define C_CQ_CFG_FQ_THRESH_TABLE_SIZE 0x00000180
+
+union c_cq_cfg_fq_thresh_table {
+ __u64 qw;
+ struct {
+ __u64 thresh : 41;
+ __u64: 23;
+ };
+};
+
+#define C_CQ_CFG_PFQ_TC_MAP_OFFSET(idx) (0x0001e400 + ((idx) * 8))
+#define C_CQ_CFG_PFQ_TC_MAP_ENTRIES 48
+#define C_CQ_CFG_PFQ_TC_MAP(idx) (C_CQ_BASE + C_CQ_CFG_PFQ_TC_MAP_OFFSET(idx))
+#define C_CQ_CFG_PFQ_TC_MAP_SIZE 0x00000180
+
+union c_cq_cfg_pfq_tc_map {
+ __u64 qw;
+ struct {
+ __u64 pfq_tc : 3;
+ __u64: 61;
+ };
+};
+
+#define C_CQ_CFG_OCUSET_OCU_TABLE_OFFSET(idx) (0x0001e800 + ((idx) * 8))
+#define C_CQ_CFG_OCUSET_OCU_TABLE_ENTRIES 48
+#define C_CQ_CFG_OCUSET_OCU_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_OCUSET_OCU_TABLE_OFFSET(idx))
+#define C_CQ_CFG_OCUSET_OCU_TABLE_SIZE 0x00000180
+
+union c_cq_cfg_ocuset_ocu_table {
+ __u64 qw;
+ struct {
+ __u64 ocu_base : 8;
+ __u64 ocu_count : 4;
+ __u64 ocu_static : 1;
+ __u64: 51;
+ };
+};
+
+#define C_CQ_CFG_OCU_HASH_MASK_OFFSET 0x00039050
+#define C_CQ_CFG_OCU_HASH_MASK (C_CQ_BASE + C_CQ_CFG_OCU_HASH_MASK_OFFSET)
+#define C_CQ_CFG_OCU_HASH_MASK_SIZE 0x00000008
+
+union c_cq_cfg_ocu_hash_mask {
+ __u64 qw;
+ struct {
+ __u64 dfa : 32;
+ __u64 vni : 16;
+ __u64 dscp : 6;
+ __u64: 10;
+ };
+};
+
+#define C_CQ_CFG_OCUSET_FQ_TABLE_OFFSET(idx) (0x0001f000 + ((idx) * 8))
+#define C_CQ_CFG_OCUSET_FQ_TABLE_ENTRIES 48
+#define C_CQ_CFG_OCUSET_FQ_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_OCUSET_FQ_TABLE_OFFSET(idx))
+#define C_CQ_CFG_OCUSET_FQ_TABLE_SIZE 0x00000180
+
+union c_cq_cfg_ocuset_fq_table {
+ __u64 qw;
+ struct {
+ __u64 fq_count : 4;
+ __u64: 60;
+ };
+};
+
+#define C_CQ_CFG_OCU_TABLE_OFFSET(idx) (0x0001f800 + ((idx) * 8))
+#define C_CQ_CFG_OCU_TABLE_ENTRIES 256
+#define C_CQ_CFG_OCU_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_OCU_TABLE_OFFSET(idx))
+#define C_CQ_CFG_OCU_TABLE_SIZE 0x00000800
+
+union c_cq_cfg_ocu_table {
+ __u64 qw;
+ struct {
+ __u64 msg_count : 11;
+ __u64: 1;
+ __u64 fq_saved : 6;
+ __u64: 2;
+ __u64 fq : 6;
+ __u64: 38;
+ };
+};
+
+#define C_CQ_CFG_CT_RGID_TABLE_OFFSET(idx) (0x00020000 + ((idx) * 8))
+#define C_CQ_CFG_CT_RGID_TABLE_ENTRIES 2048
+#define C_CQ_CFG_CT_RGID_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_CT_RGID_TABLE_OFFSET(idx))
+#define C_CQ_CFG_CT_RGID_TABLE_SIZE 0x00004000
+
+union c_cq_cfg_ct_rgid_table {
+ __u64 qw;
+ struct {
+ __u64 rgid : 8;
+ __u64: 56;
+ };
+};
+
+#define C_CQ_CFG_PTLTE_RGID_TABLE_OFFSET(idx) (0x00028000 + ((idx) * 8))
+#define C_CQ_CFG_PTLTE_RGID_TABLE_ENTRIES 2048
+#define C_CQ_CFG_PTLTE_RGID_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_PTLTE_RGID_TABLE_OFFSET(idx))
+#define C_CQ_CFG_PTLTE_RGID_TABLE_SIZE 0x00004000
+
+union c_cq_cfg_ptlte_rgid_table {
+ __u64 qw;
+ struct {
+ __u64 rgid : 8;
+ __u64: 56;
+ };
+};
+
+#define C_CQ_CFG_EQ_RGID_TABLE_OFFSET(idx) (0x00030000 + ((idx) * 8))
+#define C_CQ_CFG_EQ_RGID_TABLE_ENTRIES 2048
+#define C_CQ_CFG_EQ_RGID_TABLE(idx) (C_CQ_BASE + C_CQ_CFG_EQ_RGID_TABLE_OFFSET(idx))
+#define C_CQ_CFG_EQ_RGID_TABLE_SIZE 0x00004000
+
+union c_cq_cfg_eq_rgid_table {
+ __u64 qw;
+ struct {
+ __u64 rgid : 8;
+ __u64: 56;
+ };
+};
+
+#define C_CQ_CFG_TG_THRESH_OFFSET 0x00038000
+#define C_CQ_CFG_TG_THRESH (C_CQ_BASE + C_CQ_CFG_TG_THRESH_OFFSET)
+#define C_CQ_CFG_TG_THRESH_SIZE 0x00000008
+
+union c_cq_cfg_tg_thresh {
+ __u64 qw;
+ struct {
+ struct {
+ __u16 thresh : 14;
+ __u16: 2;
+ } tg[4];
+ };
+};
+
+#define C_CQ_CFG_FQ_RESRV_OFFSET(idx) (0x00039000 + ((idx) * 8))
+#define C_CQ_CFG_FQ_RESRV_ENTRIES 8
+#define C_CQ_CFG_FQ_RESRV(idx) (C_CQ_BASE + C_CQ_CFG_FQ_RESRV_OFFSET(idx))
+#define C_CQ_CFG_FQ_RESRV_SIZE 0x00000040
+
+union c_cq_cfg_fq_resrv {
+ __u64 qw;
+ struct {
+ __u64 num_reserved : 8;
+ __u64 max_alloc : 9;
+ __u64: 3;
+ __u64 num_alloc : 9;
+ __u64: 35;
+ };
+};
+
+#define C_CQ_CFG_THRESH_MAP_OFFSET(idx) (0x00040000 + ((idx) * 8))
+#define C_CQ_CFG_THRESH_MAP_ENTRIES 512
+#define C_CQ_CFG_THRESH_MAP(idx) (C_CQ_BASE + C_CQ_CFG_THRESH_MAP_OFFSET(idx))
+#define C_CQ_CFG_THRESH_MAP_SIZE 0x00001000
+
+union c_cq_cfg_thresh_map {
+ __u64 qw;
+ struct {
+ __u64 thresh_id : 2;
+ __u64: 62;
+ };
+};
+
+#define C_CQ_STS_INIT_DONE_OFFSET 0x00049ff8
+#define C_CQ_STS_INIT_DONE (C_CQ_BASE + C_CQ_STS_INIT_DONE_OFFSET)
+#define C_CQ_STS_INIT_DONE_SIZE 0x00000008
+
+union c_cq_sts_init_done {
+ __u64 qw;
+ struct {
+ __u64 cq_init_done : 1;
+ __u64 tou_init_done : 1;
+ __u64: 62;
+ };
+};
+
+#define C_CQ_STS_TLE_IN_USE_OFFSET(idx) (0x00000850 + ((idx) * 8))
+#define C_CQ_STS_TLE_IN_USE_ENTRIES 4
+#define C_CQ_STS_TLE_IN_USE(idx) (C_CQ_BASE + C_CQ_STS_TLE_IN_USE_OFFSET(idx))
+#define C_CQ_STS_TLE_IN_USE_SIZE 0x00000020
+
+union c_cq_sts_tle_in_use {
+ __u64 qw;
+ struct {
+ __u64 count : 12;
+ __u64: 52;
+ };
+};
+
+#define C_CQ_STS_MAX_TLE_IN_USE_OFFSET(idx) (0x00000870 + ((idx) * 8))
+#define C_CQ_STS_MAX_TLE_IN_USE_ENTRIES 4
+#define C_CQ_STS_MAX_TLE_IN_USE(idx) (C_CQ_BASE + C_CQ_STS_MAX_TLE_IN_USE_OFFSET(idx))
+#define C_CQ_STS_MAX_TLE_IN_USE_SIZE 0x00000020
+
+union c_cq_sts_max_tle_in_use {
+ __u64 qw;
+ struct {
+ __u64 max : 12;
+ __u64: 52;
+ };
+};
+
+#define C_CQ_STS_CREDITS_IN_USE_OFFSET 0x000008b0
+#define C_CQ_STS_CREDITS_IN_USE (C_CQ_BASE + C_CQ_STS_CREDITS_IN_USE_OFFSET)
+#define C_CQ_STS_CREDITS_IN_USE_SIZE 0x00000010
+
+union c_cq_sts_credits_in_use {
+ __u64 qw[2];
+ struct {
+ __u64 lpe_cmd_credits : 10;
+ __u64: 6;
+ __u64 lpe_rcv_fifo_credits : 4;
+ __u64: 4;
+ __u64 ee_event_credits : 5;
+ __u64: 11;
+ __u64 tou_fq_credits : 7;
+ __u64: 1;
+ __u64 tarb_p_credits : 5;
+ __u64: 3;
+ __u64 tarb_np_credits : 5;
+ __u64: 3;
+ __u64 prefetch_tou_credits : 5;
+ __u64: 3;
+ __u64 tou_wb_credits : 5;
+ __u64: 3;
+ __u64 tou_event_credits : 3;
+ __u64: 5;
+ __u64 tgq_cmd_fail_event_credits : 3;
+ __u64: 5;
+ __u64 txq_cmd_fail_event_credits : 4;
+ __u64 tou_cmd_fail_event_credits : 3;
+ __u64: 1;
+ __u64 fq_tot_credits : 9;
+ __u64: 3;
+ __u64 fq_sh_credits : 9;
+ __u64: 3;
+ };
+};
+
+#define C_CQ_STS_EVENT_CNTS_OFFSET(idx) (0x00100000 + ((idx) * 8))
+#ifndef C_CQ_STS_EVENT_CNTS_ENTRIES
+#define C_CQ_STS_EVENT_CNTS_ENTRIES 512
+#endif
+#define C_CQ_STS_EVENT_CNTS(idx) (C_CQ_BASE + C_CQ_STS_EVENT_CNTS_OFFSET(idx))
+#define C_CQ_STS_EVENT_CNTS_SIZE 0x00001000
+
+union c_cq_sts_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 cnt : 56;
+ __u64: 8;
+ };
+};
+
+#define C_EE_CFG_CRNC_OFFSET 0x00000000
+#define C_EE_CFG_CRNC (C_EE_BASE + C_EE_CFG_CRNC_OFFSET)
+#define C_EE_CFG_CRNC_SIZE 0x00000008
+
+union c_ee_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_EE_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_EE_CFG_RT_OFFSET (C_EE_BASE + C_EE_CFG_RT_OFFSET_OFFSET)
+#define C_EE_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_ee_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_EE_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_EE_MSC_SHADOW_ACTION (C_EE_BASE + C_EE_MSC_SHADOW_ACTION_OFFSET)
+#define C_EE_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_EE_MSC_SHADOW_OFFSET 0x00000040
+#define C_EE_MSC_SHADOW (C_EE_BASE + C_EE_MSC_SHADOW_OFFSET)
+#define C_EE_MSC_SHADOW_SIZE 0x00000040
+
+union c_ee_msc_shadow {
+ __u64 qw[8];
+};
+
+#define C_EE_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_EE_ERR_ELAPSED_TIME (C_EE_BASE + C_EE_ERR_ELAPSED_TIME_OFFSET)
+#define C_EE_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_ee_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_EE_ERR_FLG_OFFSET 0x00000108
+#define C_EE_ERR_FLG (C_EE_BASE + C_EE_ERR_FLG_OFFSET)
+#define C_EE_ERR_FLG_SIZE 0x00000008
+
+union c_ee_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 23;
+ __u64 eq_ovflw_rsrvn : 1;
+ __u64 eq_ovflw_fc_sc : 1;
+ __u64 eq_ovflw_ordinary : 1;
+ __u64 eq_dsabld_event : 1;
+ __u64 eq_dsabld_sw_state_wr : 1;
+ __u64 eq_dsabld_lpe_query : 1;
+ __u64 eq_rsrvn_uflw : 1;
+ __u64 unxpctd_trnsltn_rsp : 1;
+ __u64 rarb_hw_err : 1;
+ __u64 rarb_sw_err : 1;
+ __u64 tarb_err : 1;
+ __u64 eq_state_ucor : 1;
+ __u64: 4;
+ __u64 unxpctd_cq_cdt : 1;
+ __u64 unxpctd_tarb_cdt : 1;
+ __u64 eq_state_updt_urun : 1;
+ __u64 eq_state_updt_orun : 1;
+ __u64: 12;
+ };
+};
+
+#define C_EE_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_EE_ERR_FIRST_FLG (C_EE_BASE + C_EE_ERR_FIRST_FLG_OFFSET)
+#define C_EE_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_EE_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_EE_ERR_FIRST_FLG_TS (C_EE_BASE + C_EE_ERR_FIRST_FLG_TS_OFFSET)
+#define C_EE_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_EE_ERR_CLR_OFFSET 0x00000120
+#define C_EE_ERR_CLR (C_EE_BASE + C_EE_ERR_CLR_OFFSET)
+#define C_EE_ERR_CLR_SIZE 0x00000008
+#define C_EE_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_EE_ERR_IRQA_MSK (C_EE_BASE + C_EE_ERR_IRQA_MSK_OFFSET)
+#define C_EE_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_EE_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_EE_ERR_IRQB_MSK (C_EE_BASE + C_EE_ERR_IRQB_MSK_OFFSET)
+#define C_EE_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_EE_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_EE_ERR_INFO_MSK (C_EE_BASE + C_EE_ERR_INFO_MSK_OFFSET)
+#define C_EE_ERR_INFO_MSK_SIZE 0x00000008
+#define C_EE_EXT_ERR_FLG_OFFSET 0x00000148
+#define C_EE_EXT_ERR_FLG (C_EE_BASE + C_EE_EXT_ERR_FLG_OFFSET)
+#define C_EE_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_ee_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 leo_mem_cor : 1;
+ __u64 pts_mem_cor : 1;
+ __u64 ixe_bus_cor : 1;
+ __u64 lpe_bus_cor : 1;
+ __u64 mst_bus_cor : 1;
+ __u64 pct_bus_cor : 1;
+ __u64 hni_bus_cor : 1;
+ __u64 cq_bus_cor : 1;
+ __u64 eqd_mem_cor : 1;
+ __u64 eqsws_mem_cor : 1;
+ __u64 eqhws_mem_cor : 1;
+ __u64 ecbsb_mem_cor : 1;
+ __u64 ecb_mem_cor : 1;
+ __u64 rarb_hdr_bus_cor : 1;
+ __u64 rarb_data_bus_cor : 1;
+ __u64 acb_vect_cor : 1;
+ __u64 eqswupd_vect_cor : 1;
+ __u64 lm_cbeq_mem_cor : 1;
+ __u64 lm_state_vect_cor : 1;
+ __u64 trnrsp_mem_cor : 1;
+ __u64 trnrsp_bus_cor : 1;
+ __u64 rlscb_vect_cor : 1;
+ __u64 trncb_vect_cor : 1;
+ __u64: 2;
+ __u64 leo_mem_ucor : 1;
+ __u64 pts_mem_ucor : 1;
+ __u64 ixe_bus_ucor : 1;
+ __u64 lpe_bus_ucor : 1;
+ __u64 mst_bus_ucor : 1;
+ __u64 pct_bus_ucor : 1;
+ __u64 hni_bus_ucor : 1;
+ __u64 cq_bus_ucor : 1;
+ __u64 eqd_mem_ucor : 1;
+ __u64 eqsws_mem_ucor : 1;
+ __u64 eqhws_mem_ucor : 1;
+ __u64 ecbsb_mem_ucor : 1;
+ __u64 ecb_mem_ucor : 1;
+ __u64 rarb_hdr_bus_ucor : 1;
+ __u64 rarb_data_bus_ucor : 1;
+ __u64 acb_vect_ucor : 1;
+ __u64 lm_cbeq_mem_ucor : 1;
+ __u64 trnrsp_mem_ucor : 1;
+ __u64 trnrsp_bus_ucor : 1;
+ __u64 rlscb_vect_ucor : 1;
+ __u64 trncb_vect_ucor : 1;
+ __u64: 2;
+ __u64 ixe_to_ee_urun : 1;
+ __u64 ixe_to_ee_orun : 1;
+ __u64 lpe_to_ee_urun : 1;
+ __u64 lpe_to_ee_orun : 1;
+ __u64 mst_to_ee_urun : 1;
+ __u64 mst_to_ee_orun : 1;
+ __u64 pct_to_ee_urun : 1;
+ __u64 pct_to_ee_orun : 1;
+ __u64 hni_to_ee_urun : 1;
+ __u64 hni_to_ee_orun : 1;
+ __u64 cq_to_ee_urun : 1;
+ __u64 cq_to_ee_orun : 1;
+ __u64: 3;
+ };
+};
+
+#define C_EE_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C_EE_EXT_ERR_FIRST_FLG (C_EE_BASE + C_EE_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_EE_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_EE_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C_EE_EXT_ERR_FIRST_FLG_TS (C_EE_BASE + C_EE_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_EE_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_EE_EXT_ERR_CLR_OFFSET 0x00000160
+#define C_EE_EXT_ERR_CLR (C_EE_BASE + C_EE_EXT_ERR_CLR_OFFSET)
+#define C_EE_EXT_ERR_CLR_SIZE 0x00000008
+#define C_EE_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C_EE_EXT_ERR_IRQA_MSK (C_EE_BASE + C_EE_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_EE_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_EE_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C_EE_EXT_ERR_IRQB_MSK (C_EE_BASE + C_EE_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_EE_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_EE_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C_EE_EXT_ERR_INFO_MSK (C_EE_BASE + C_EE_EXT_ERR_INFO_MSK_OFFSET)
+#define C_EE_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_EE_ERR_INFO_MEM_OFFSET 0x00000190
+#define C_EE_ERR_INFO_MEM (C_EE_BASE + C_EE_ERR_INFO_MEM_OFFSET)
+#define C_EE_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_ee_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 12;
+ __u64 cor_address : 11;
+ __u64: 1;
+ __u64 cor_mem_id : 5;
+ __u64: 2;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 12;
+ __u64 ucor_address : 11;
+ __u64: 1;
+ __u64 ucor_mem_id : 5;
+ __u64: 2;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_EE_ERR_INFO_EQ_CFG_OFFSET 0x00000198
+#define C_EE_ERR_INFO_EQ_CFG (C_EE_BASE + C_EE_ERR_INFO_EQ_CFG_OFFSET)
+#define C_EE_ERR_INFO_EQ_CFG_SIZE 0x00000008
+
+union c_ee_err_info_eq_cfg {
+ __u64 qw;
+ struct {
+ __u64 eq_ovflw_rsrvn : 1;
+ __u64 eq_ovflw_fc_sc : 1;
+ __u64 eq_ovflw_ordinary : 1;
+ __u64 eq_dsabld_event : 1;
+ __u64 eq_dsabld_sw_state_wr : 1;
+ __u64 eq_dsabld_lpe_query : 1;
+ __u64: 2;
+ __u64 event_type : 5;
+ __u64: 3;
+ __u64 eq_handle : 11;
+ __u64: 37;
+ };
+};
+
+#define C_EE_ERR_INFO_RSRVN_UFLW_OFFSET 0x000001a0
+#define C_EE_ERR_INFO_RSRVN_UFLW (C_EE_BASE + C_EE_ERR_INFO_RSRVN_UFLW_OFFSET)
+#define C_EE_ERR_INFO_RSRVN_UFLW_SIZE 0x00000008
+
+union c_ee_err_info_rsrvn_uflw {
+ __u64 qw;
+ struct {
+ __u64: 8;
+ __u64 event_type : 5;
+ __u64: 3;
+ __u64 eq_handle : 11;
+ __u64: 5;
+ __u64 pending_events : 26;
+ __u64: 2;
+ __u64 required_evnt_slots : 3;
+ __u64: 1;
+ };
+};
+
+#define C_EE_ERR_INFO_TRNSLTN_OFFSET 0x000001a8
+#define C_EE_ERR_INFO_TRNSLTN (C_EE_BASE + C_EE_ERR_INFO_TRNSLTN_OFFSET)
+#define C_EE_ERR_INFO_TRNSLTN_SIZE 0x00000008
+
+union c_ee_err_info_trnsltn {
+ __u64 qw;
+ struct {
+ __u64 cb_id : 8;
+ __u64 free : 1;
+ __u64 already_trnsltd : 1;
+ __u64 eq_wr_pending : 1;
+ __u64: 53;
+ };
+};
+
+#define C_EE_ERR_INFO_RARB_OFFSET 0x000001b0
+#define C_EE_ERR_INFO_RARB (C_EE_BASE + C_EE_ERR_INFO_RARB_OFFSET)
+#define C_EE_ERR_INFO_RARB_SIZE 0x00000008
+
+union c_ee_err_info_rarb {
+ __u64 qw;
+ struct {
+ __u64 hdr_ucor : 1;
+ __u64 data_ucor : 1;
+ __u64 bad_vld : 1;
+ __u64 bad_eop : 1;
+ __u64 bad_cmd : 1;
+ __u64 invalid_access : 1;
+ __u64 eq_none : 1;
+ __u64: 1;
+ __u64 first_dw_be : 4;
+ __u64 last_dw_be : 4;
+ __u64 length : 11;
+ __u64: 5;
+ __u64: 2;
+ __u64 addr_29_2 : 28;
+ __u64: 2;
+ };
+};
+
+#define C_EE_ERR_INFO_TARB_OFFSET 0x000001b8
+#define C_EE_ERR_INFO_TARB (C_EE_BASE + C_EE_ERR_INFO_TARB_OFFSET)
+#define C_EE_ERR_INFO_TARB_SIZE 0x00000008
+
+union c_ee_err_info_tarb {
+ __u64 qw;
+ struct {
+ __u64 ecb_mem_ucor : 1;
+ __u64 ecbsb_mem_ucor : 1;
+ __u64 trnrsp_mem_ucor : 1;
+ __u64 trnsltn_err : 1;
+ __u64 evnt_dropped : 1;
+ __u64 irq_dropped : 1;
+ __u64 trnsltn_performed : 1;
+ __u64: 1;
+ __u64 trnsltn_rc : 6;
+ __u64: 2;
+ __u64 acid : 10;
+ __u64: 6;
+ __u64 eq_handle : 11;
+ __u64: 21;
+ };
+};
+
+#define C_EE_ERR_INFO_EQ_UCOR_OFFSET 0x000001c0
+#define C_EE_ERR_INFO_EQ_UCOR (C_EE_BASE + C_EE_ERR_INFO_EQ_UCOR_OFFSET)
+#define C_EE_ERR_INFO_EQ_UCOR_SIZE 0x00000008
+
+union c_ee_err_info_eq_ucor {
+ __u64 qw;
+ struct {
+ __u64 eqd_mem_ucor : 1;
+ __u64 eqsws_mem_ucor : 1;
+ __u64 eqhws_mem_ucor : 1;
+ __u64: 5;
+ __u64 aes_rsn : 4;
+ __u64: 20;
+ __u64 eq_handle : 11;
+ __u64: 21;
+ };
+};
+
+#define C_EE_CFG_TIMESTAMP_FREQ_OFFSET 0x00000410
+#define C_EE_CFG_TIMESTAMP_FREQ (C_EE_BASE + C_EE_CFG_TIMESTAMP_FREQ_OFFSET)
+#define C_EE_CFG_TIMESTAMP_FREQ_SIZE 0x00000008
+
+union c_ee_cfg_timestamp_freq {
+ __u64 qw;
+ struct {
+ __u64 clk_divider : 32;
+ __u64: 32;
+ };
+};
+
+#define C_EE_CFG_INIT_EQ_HW_STATE_OFFSET 0x00000418
+#define C_EE_CFG_INIT_EQ_HW_STATE (C_EE_BASE + C_EE_CFG_INIT_EQ_HW_STATE_OFFSET)
+#define C_EE_CFG_INIT_EQ_HW_STATE_SIZE 0x00000008
+
+union c_ee_cfg_init_eq_hw_state {
+ __u64 qw;
+ struct {
+ __u64 eq_handle : 11;
+ __u64: 5;
+ __u64 pending : 1;
+ __u64: 47;
+ };
+};
+
+#define C_EE_CFG_LATENCY_MONITOR_OFFSET 0x00000420
+#define C_EE_CFG_LATENCY_MONITOR (C_EE_BASE + C_EE_CFG_LATENCY_MONITOR_OFFSET)
+#define C_EE_CFG_LATENCY_MONITOR_SIZE 0x00000020
+
+union c_ee_cfg_latency_monitor {
+ __u64 qw[4];
+ struct {
+ __u64 granularity : 16;
+ __u64: 16;
+ __u64 lt_limit : 9;
+ __u64: 23;
+ __u64 granularity_a : 16;
+ __u64 lt_reduction_a : 9;
+ __u64: 7;
+ __u64 lt_limit_a : 9;
+ __u64: 23;
+ __u64 granularity_b : 16;
+ __u64 lt_reduction_b : 9;
+ __u64: 7;
+ __u64 lt_limit_b : 9;
+ __u64: 23;
+ __u64 thresh_a : 9;
+ __u64: 7;
+ __u64 hysteresis_a : 9;
+ __u64: 7;
+ __u64 thresh_b : 9;
+ __u64: 7;
+ __u64 hysteresis_b : 9;
+ __u64: 7;
+ };
+};
+
+#define C_EE_CFG_EQ_DESCRIPTOR_OFFSET(idx) (0x00020000 + ((idx) * 64))
+#define C_EE_CFG_EQ_DESCRIPTOR_ENTRIES 2048
+#define C_EE_CFG_EQ_DESCRIPTOR(idx) (C_EE_BASE + C_EE_CFG_EQ_DESCRIPTOR_OFFSET(idx))
+#define C_EE_CFG_EQ_DESCRIPTOR_SIZE 0x00020000
+
+union c_ee_cfg_eq_descriptor {
+ __u64 qw[7];
+ struct {
+ __u64 eq_enable : 1;
+ __u64: 7;
+ __u64 cntr_pool_id : 2;
+ __u64: 6;
+ __u64 reserved_fc : 14;
+ __u64: 2;
+ __u64 event_int_idx : 11;
+ __u64: 4;
+ __u64 event_int_en : 1;
+ __u64 latency_tolerance : 9;
+ __u64: 7;
+ __u64 eq_sts_num_thld : 2;
+ __u64: 6;
+ __u64 eq_sts_thld_base : 6;
+ __u64: 2;
+ __u64 eq_sts_thld_offst : 6;
+ __u64: 2;
+ __u64 eq_sts_thld_shift : 5;
+ __u64: 1;
+ __u64 eq_sts_dropped_en : 1;
+ __u64 use_buffer_b : 1;
+ __u64 eq_sts_int_idx : 11;
+ __u64: 4;
+ __u64 eq_sts_int_en : 1;
+ __u64: 16;
+ __u64 buffer_a_size : 20;
+ __u64: 11;
+ __u64 buffer_a_en : 1;
+ __u64 buffer_b_size : 20;
+ __u64: 11;
+ __u64 buffer_b_en : 1;
+ __u64: 12;
+ __u64 buffer_a_addr : 45;
+ __u64: 7;
+ __u64: 12;
+ __u64 buffer_b_addr : 45;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 6;
+ __u64 pf_match : 8;
+ __u64 pf_match_shift : 6;
+ __u64: 2;
+ __u64 pf_mask_shift : 6;
+ __u64: 26;
+ __u64: 3;
+ __u64: 61;
+ };
+};
+
+#define C_EE_CFG_EQ_SW_STATE_OFFSET(idx) (0x00004000 + ((idx) * 8))
+#define C_EE_CFG_EQ_SW_STATE_ENTRIES 2048
+#define C_EE_CFG_EQ_SW_STATE(idx) (C_EE_BASE + C_EE_CFG_EQ_SW_STATE_OFFSET(idx))
+#define C_EE_CFG_EQ_SW_STATE_SIZE 0x00004000
+
+union c_ee_cfg_eq_sw_state {
+ __u64 qw;
+ struct {
+ __u64 rd_ptr : 26;
+ __u64: 5;
+ __u64 reading_buffer_b : 1;
+ __u64 event_int_disable : 1;
+ __u64 eq_sts_int_disable : 1;
+ __u64: 6;
+ __u64 event_drop_seq_no : 1;
+ __u64: 3;
+ __u64: 4;
+ __u64: 16;
+ };
+};
+
+#define C_EE_CFG_STS_EQ_HW_STATE_OFFSET(idx) (0x00008000 + ((idx) * 16))
+#define C_EE_CFG_STS_EQ_HW_STATE_ENTRIES 2048
+#define C_EE_CFG_STS_EQ_HW_STATE(idx) (C_EE_BASE + C_EE_CFG_STS_EQ_HW_STATE_OFFSET(idx))
+#define C_EE_CFG_STS_EQ_HW_STATE_SIZE 0x00008000
+
+union c_ee_cfg_sts_eq_hw_state {
+ __u64 qw[2];
+ struct {
+ __u64 wr_ptr : 26;
+ __u64: 5;
+ __u64 writing_buffer_b : 1;
+ __u64 pending_events : 26;
+ __u64: 6;
+ __u64 ecb_idx : 8;
+ __u64 ecb_state : 3;
+ __u64: 5;
+ __u64 eq_switch_dfrd : 1;
+ __u64 eq_switch_pending : 1;
+ __u64 prefetch_pending : 1;
+ __u64 event_int_blkd : 1;
+ __u64 event_dropped : 1;
+ __u64 event_drop_seq_no : 1;
+ __u64: 10;
+ __u64: 2;
+ __u64: 30;
+ };
+};
+
+#define C_EE_CFG_LONG_EVNT_OVR_TABLE_OFFSET(idx) (0x00001000 + ((idx) * 8))
+#define C_EE_CFG_LONG_EVNT_OVR_TABLE_ENTRIES 64
+#define C_EE_CFG_LONG_EVNT_OVR_TABLE(idx) (C_EE_BASE + C_EE_CFG_LONG_EVNT_OVR_TABLE_OFFSET(idx))
+#define C_EE_CFG_LONG_EVNT_OVR_TABLE_SIZE 0x00000200
+
+union c_ee_cfg_long_evnt_ovr_table {
+ __u64 qw;
+};
+
+#define C_EE_CFG_PERIODIC_TSTAMP_TABLE_OFFSET(idx) (0x00001200 + ((idx) * 8))
+#define C_EE_CFG_PERIODIC_TSTAMP_TABLE_ENTRIES 32
+#define C_EE_CFG_PERIODIC_TSTAMP_TABLE(idx) (C_EE_BASE + C_EE_CFG_PERIODIC_TSTAMP_TABLE_OFFSET(idx))
+#define C_EE_CFG_PERIODIC_TSTAMP_TABLE_SIZE 0x00000100
+
+union c_ee_cfg_periodic_tstamp_table {
+ __u64 qw;
+ struct {
+ __u64 n63_n0_enable_periodic_tstamp;
+ };
+};
+
+#define C_EE_STS_INIT_DONE_OFFSET 0x00000828
+#define C_EE_STS_INIT_DONE (C_EE_BASE + C_EE_STS_INIT_DONE_OFFSET)
+#define C_EE_STS_INIT_DONE_SIZE 0x00000008
+
+union c_ee_sts_init_done {
+ __u64 qw;
+ struct {
+ __u64 init_done : 1;
+ __u64 warm_reset : 1;
+ __u64: 62;
+ };
+};
+
+#define C_EE_DBG_ECB_SIDEBAND_OFFSET(idx) (0x00001800 + ((idx) * 8))
+#define C_EE_DBG_ECB_SIDEBAND_ENTRIES 256
+#define C_EE_DBG_ECB_SIDEBAND(idx) (C_EE_BASE + C_EE_DBG_ECB_SIDEBAND_OFFSET(idx))
+#define C_EE_DBG_ECB_SIDEBAND_SIZE 0x00000800
+
+union c_ee_dbg_ecb_sideband {
+ __u64 qw;
+ struct {
+ __u64: 6;
+ __u64 addr_11_6 : 6;
+ __u64: 4;
+ __u64 acid : 10;
+ __u64: 4;
+ __u64 trnsltn : 1;
+ __u64 data_present : 1;
+ __u64 eq_handle : 11;
+ __u64: 5;
+ __u64 int_idx : 11;
+ __u64: 2;
+ __u64 int_present : 1;
+ __u64 block_tarb : 1;
+ __u64: 1;
+ };
+};
+
+#define C_EE_DBG_ECB_OFFSET(idx) (0x00010000 + ((idx) * 64))
+#define C_EE_DBG_ECB_ENTRIES 256
+#define C_EE_DBG_ECB(idx) (C_EE_BASE + C_EE_DBG_ECB_OFFSET(idx))
+#define C_EE_DBG_ECB_SIZE 0x00004000
+
+union c_ee_dbg_ecb {
+ __u64 qw[8];
+};
+
+#define C_EE_DBG_TRNSLTN_RSP_OFFSET(idx) (0x00002000 + ((idx) * 8))
+#define C_EE_DBG_TRNSLTN_RSP_ENTRIES 256
+#define C_EE_DBG_TRNSLTN_RSP(idx) (C_EE_BASE + C_EE_DBG_TRNSLTN_RSP_OFFSET(idx))
+#define C_EE_DBG_TRNSLTN_RSP_SIZE 0x00000800
+
+union c_ee_dbg_trnsltn_rsp {
+ __u64 qw;
+ struct {
+ __u64 return_code : 6;
+ __u64: 2;
+ __u64 at_type : 1;
+ __u64 nsa : 1;
+ __u64 at_epoch : 1;
+ __u64: 1;
+ __u64 addr_pg : 45;
+ __u64: 4;
+ __u64: 3;
+ };
+};
+
+#define C_EE_DBG_LM_CB_TO_EQ_MAP_OFFSET(idx) (0x00002800 + ((idx) * 8))
+#define C_EE_DBG_LM_CB_TO_EQ_MAP_ENTRIES 256
+#define C_EE_DBG_LM_CB_TO_EQ_MAP(idx) (C_EE_BASE + C_EE_DBG_LM_CB_TO_EQ_MAP_OFFSET(idx))
+#define C_EE_DBG_LM_CB_TO_EQ_MAP_SIZE 0x00000800
+
+union c_ee_dbg_lm_cb_to_eq_map {
+ __u64 qw;
+ struct {
+ __u64 eq_handle : 11;
+ __u64: 53;
+ };
+};
+
+#define C_HNI_CFG_CRNC_OFFSET 0x00000000
+#define C_HNI_CFG_CRNC (C_HNI_BASE + C_HNI_CFG_CRNC_OFFSET)
+#define C_HNI_CFG_CRNC_SIZE 0x00000008
+
+union c_hni_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_HNI_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_HNI_CFG_RT_OFFSET (C_HNI_BASE + C_HNI_CFG_RT_OFFSET_OFFSET)
+#define C_HNI_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_hni_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_HNI_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_HNI_MSC_SHADOW_ACTION (C_HNI_BASE + C_HNI_MSC_SHADOW_ACTION_OFFSET)
+#define C_HNI_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_HNI_MSC_SHADOW_OFFSET 0x00000040
+#define C_HNI_MSC_SHADOW (C_HNI_BASE + C_HNI_MSC_SHADOW_OFFSET)
+#define C_HNI_MSC_SHADOW_SIZE 0x00000008
+
+union c_hni_msc_shadow {
+ __u64 qw[C_HNI_MSC_SHADOW_SIZE / sizeof(__u64)];
+};
+
+#define C_HNI_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_HNI_ERR_ELAPSED_TIME (C_HNI_BASE + C_HNI_ERR_ELAPSED_TIME_OFFSET)
+#define C_HNI_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_hni_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C1_HNI_ERR_FLG_OFFSET 0x00000108
+#define C1_HNI_ERR_FLG (C_HNI_BASE + C1_HNI_ERR_FLG_OFFSET)
+#define C1_HNI_ERR_FLG_SIZE 0x00000008
+
+union c1_hni_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 1;
+ __u64 event_cnt_ovf : 1;
+ __u64 llr_flit_cor : 1;
+ __u64 rx_stat_fifo_cor : 1;
+ __u64 rx_pkt_fifo_cor : 1;
+ __u64 timestamp_cor : 1;
+ __u64 hrp_fifo_cor : 1;
+ __u64 fgfc_fifo_cor : 1;
+ __u64 tx_flit_cor : 1;
+ __u64 event_ram_cor : 1;
+ __u64 llr_flit_ucor : 1;
+ __u64 rx_stat_fifo_ucor : 1;
+ __u64 rx_pkt_fifo_ucor : 1;
+ __u64 timestamp_ucor : 1;
+ __u64 hrp_fifo_ucor : 1;
+ __u64 fgfc_fifo_ucor : 1;
+ __u64 tx_flit_ucor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 fifo_err : 1;
+ __u64 llr_chksum_bad : 1;
+ __u64 llr_fcs_bad : 1;
+ __u64 llr_ctrl_perr : 1;
+ __u64 llr_exceed_mfs : 1;
+ __u64 llr_eopb : 1;
+ __u64 rx_ctrl_perr : 1;
+ __u64 pause_timeout : 1;
+ __u64 fgfc_err : 1;
+ __u64 credit_uflw : 1;
+ __u64 tx_ctrl_perr : 1;
+ __u64 tx_size_err : 1;
+ __u64 rx_pause_err : 1;
+ __u64 pfc_fifo_oflw : 8;
+ __u64 discard_err : 8;
+ __u64 disable_err : 8;
+ };
+};
+
+#define C2_HNI_ERR_FLG_OFFSET 0x00000108
+#define C2_HNI_ERR_FLG (C_HNI_BASE + C2_HNI_ERR_FLG_OFFSET)
+#define C2_HNI_ERR_FLG_SIZE 0x00000008
+
+union c2_hni_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 1;
+ __u64 event_cnt_ovf : 1;
+ __u64 llr_flit_cor : 1;
+ __u64 rx_stat_fifo_cor : 1;
+ __u64 rx_pkt_fifo_cor : 1;
+ __u64 timestamp_cor : 1;
+ __u64 hrp_fifo_cor : 1;
+ __u64 fgfc_fifo_cor : 1;
+ __u64 tx_flit_cor : 1;
+ __u64 event_ram_cor : 1;
+ __u64 ixe_flit_cor : 1;
+ __u64 llr_flit_ucor : 1;
+ __u64 rx_stat_fifo_ucor : 1;
+ __u64 rx_pkt_fifo_ucor : 1;
+ __u64 timestamp_ucor : 1;
+ __u64 hrp_fifo_ucor : 1;
+ __u64 fgfc_fifo_ucor : 1;
+ __u64 tx_flit_ucor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 ixe_flit_ucor : 1;
+ __u64 fifo_err : 1;
+ __u64 llr_chksum_bad : 1;
+ __u64 llr_fcs_bad : 1;
+ __u64 llr_ctrl_perr : 1;
+ __u64 llr_exceed_mfs : 1;
+ __u64 llr_eopb : 1;
+ __u64 pause_timeout : 1;
+ __u64 fgfc_err : 1;
+ __u64 credit_uflw : 1;
+ __u64 tx_size_err : 1;
+ __u64 rx_pause_err : 1;
+ __u64 pfc_fifo_oflw : 8;
+ __u64 discard_err : 8;
+ __u64 disable_err : 8;
+ };
+};
+
+#define C_HNI_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_HNI_ERR_FIRST_FLG (C_HNI_BASE + C_HNI_ERR_FIRST_FLG_OFFSET)
+#define C_HNI_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_HNI_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_HNI_ERR_FIRST_FLG_TS (C_HNI_BASE + C_HNI_ERR_FIRST_FLG_TS_OFFSET)
+#define C_HNI_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_HNI_ERR_CLR_OFFSET 0x00000120
+#define C_HNI_ERR_CLR (C_HNI_BASE + C_HNI_ERR_CLR_OFFSET)
+#define C_HNI_ERR_CLR_SIZE 0x00000008
+#define C_HNI_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_HNI_ERR_IRQA_MSK (C_HNI_BASE + C_HNI_ERR_IRQA_MSK_OFFSET)
+#define C_HNI_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_HNI_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_HNI_ERR_IRQB_MSK (C_HNI_BASE + C_HNI_ERR_IRQB_MSK_OFFSET)
+#define C_HNI_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_HNI_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_HNI_ERR_INFO_MSK (C_HNI_BASE + C_HNI_ERR_INFO_MSK_OFFSET)
+#define C_HNI_ERR_INFO_MSK_SIZE 0x00000008
+#define C1_HNI_ERR_INFO_ECC_OFFSET 0x00000180
+#define C1_HNI_ERR_INFO_ECC (C_HNI_BASE + C1_HNI_ERR_INFO_ECC_OFFSET)
+#define C1_HNI_ERR_INFO_ECC_SIZE 0x00000008
+
+union c1_hni_err_info_ecc {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 9;
+ __u64: 3;
+ __u64 cor_id : 3;
+ __u64: 4;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 9;
+ __u64: 3;
+ __u64 ucor_id : 3;
+ __u64: 4;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C2_HNI_ERR_INFO_ECC_OFFSET 0x00000188
+#define C2_HNI_ERR_INFO_ECC (C_HNI_BASE + C2_HNI_ERR_INFO_ECC_OFFSET)
+#define C2_HNI_ERR_INFO_ECC_SIZE 0x00000008
+
+union c2_hni_err_info_ecc {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 9;
+ __u64: 3;
+ __u64 cor_id : 4;
+ __u64: 3;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 9;
+ __u64: 3;
+ __u64 ucor_id : 4;
+ __u64: 3;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C1_HNI_ERR_INFO_FIFO_OFFSET 0x00000188
+#define C1_HNI_ERR_INFO_FIFO (C_HNI_BASE + C1_HNI_ERR_INFO_FIFO_OFFSET)
+#define C_HNI_ERR_INFO_FIFO_SIZE 0x00000008
+#define C1_HNI_ERR_INFO_FIFO_SIZE C_HNI_ERR_INFO_FIFO_SIZE
+
+union c_hni_err_info_fifo {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 2;
+ __u64 fifo_id : 3;
+ __u64: 57;
+ };
+};
+
+#define C2_HNI_ERR_INFO_FIFO_OFFSET 0x00000190
+#define C2_HNI_ERR_INFO_FIFO (C_HNI_BASE + C2_HNI_ERR_INFO_FIFO_OFFSET)
+#define C2_HNI_ERR_INFO_FIFO_SIZE C_HNI_ERR_INFO_FIFO_SIZE
+
+#define C1_HNI_ERR_INFO_CC_OFFSET 0x00000190
+#define C1_HNI_ERR_INFO_CC (C_HNI_BASE + C1_HNI_ERR_INFO_CC_OFFSET)
+#define C_HNI_ERR_INFO_CC_SIZE 0x00000008
+#define C1_HNI_ERR_INFO_CC_SIZE C_HNI_ERR_INFO_CC_SIZE
+
+union c_hni_err_info_cc {
+ __u64 qw;
+ struct {
+ __u64 cc_id : 3;
+ __u64: 1;
+ __u64 cc_tc : 3;
+ __u64: 57;
+ };
+};
+
+#define C2_HNI_ERR_INFO_CC_OFFSET 0x00000198
+#define C2_HNI_ERR_INFO_CC (C_HNI_BASE + C2_HNI_ERR_INFO_CC_OFFSET)
+#define C2_HNI_ERR_INFO_CC_SIZE C_HNI_ERR_INFO_CC_SIZE
+
+#define C1_HNI_ERR_INFO_FGFC_OFFSET 0x00000198
+#define C1_HNI_ERR_INFO_FGFC (C_HNI_BASE + C1_HNI_ERR_INFO_FGFC_OFFSET)
+#define C_HNI_ERR_INFO_FGFC_SIZE 0x00000008
+#define C1_HNI_ERR_INFO_FGFC_SIZE C_HNI_ERR_INFO_FGFC_SIZE
+
+union c_hni_err_info_fgfc {
+ __u64 qw;
+ struct {
+ __u64 invalid_type : 1;
+ __u64 no_match : 1;
+ __u64 cache_full : 1;
+ __u64 fifo_full : 1;
+ __u64: 60;
+ };
+};
+
+#define C2_HNI_ERR_INFO_FGFC_OFFSET 0x000001a0
+#define C2_HNI_ERR_INFO_FGFC (C_HNI_BASE + C2_HNI_ERR_INFO_FGFC_OFFSET)
+#define C2_HNI_ERR_INFO_FGFC_SIZE C_HNI_ERR_INFO_FGFC_SIZE
+
+#define C1_HNI_ERR_INFO_SIZE_ERR_OFFSET 0x000001a0
+#define C1_HNI_ERR_INFO_SIZE_ERR (C_HNI_BASE + C1_HNI_ERR_INFO_SIZE_ERR_OFFSET)
+#define C_HNI_ERR_INFO_SIZE_ERR_SIZE 0x00000008
+#define C1_HNI_ERR_INFO_SIZE_ERR_SIZE C_HNI_ERR_INFO_SIZE_ERR_SIZE
+
+union c_hni_err_info_size_err {
+ __u64 qw;
+ struct {
+ __u64 opt_too_small : 1;
+ __u64 std_too_small : 1;
+ __u64 opt_too_big : 1;
+ __u64 std_too_big : 1;
+ __u64: 60;
+ };
+};
+
+#define C2_HNI_ERR_INFO_SIZE_ERR_OFFSET 0x000001a8
+#define C2_HNI_ERR_INFO_SIZE_ERR (C_HNI_BASE + C2_HNI_ERR_INFO_SIZE_ERR_OFFSET)
+#define C2_HNI_ERR_INFO_SIZE_ERR_SIZE C_HNI_ERR_INFO_SIZE_ERR_SIZE
+
+#define C1_HNI_ERR_INFO_DISCARD_OFFSET 0x00000200
+#define C1_HNI_ERR_INFO_DISCARD (C_HNI_BASE + C1_HNI_ERR_INFO_DISCARD_OFFSET)
+#define C_HNI_ERR_INFO_DISCARD_SIZE 0x00000018
+#define C1_HNI_ERR_INFO_DISCARD_SIZE C_HNI_ERR_INFO_DISCARD_SIZE
+
+union c_hni_err_info_discard {
+ __u64 qw[3];
+ struct {
+ __u64 addr_low;
+ __u64 addr_high;
+ __u64 tc : 3;
+ __u64: 1;
+ __u64 pkt_type : 2;
+ __u64: 58;
+ };
+};
+
+#define C2_HNI_ERR_INFO_DISCARD_OFFSET 0x000001b0
+#define C2_HNI_ERR_INFO_DISCARD (C_HNI_BASE + C2_HNI_ERR_INFO_DISCARD_OFFSET)
+#define C2_HNI_ERR_INFO_DISCARD_SIZE C_HNI_ERR_INFO_DISCARD_SIZE
+
+#define C_HNI_CFG_GEN_OFFSET 0x00000400
+#define C_HNI_CFG_GEN (C_HNI_BASE + C_HNI_CFG_GEN_OFFSET)
+#define C_HNI_CFG_GEN_SIZE 0x00000008
+
+union c_hni_cfg_gen {
+ __u64 qw;
+ struct {
+ __u64 tx_timestamp_en : 1;
+ __u64 rx_timestamp_en : 1;
+ __u64 timestamp_fmt : 2;
+ __u64 default_pcp : 3;
+ __u64 ip_enable_dscp : 1;
+ __u64 default_dscp : 6;
+ __u64: 50;
+ };
+};
+
+#define C_HNI_CFG_CDT_OFFSET 0x00000408
+#define C_HNI_CFG_CDT (C_HNI_BASE + C_HNI_CFG_CDT_OFFSET)
+#define C_HNI_CFG_CDT_SIZE 0x00000008
+
+union c_hni_cfg_cdt {
+ __u64 qw;
+ struct {
+ __u64 ixe_cdts : 6;
+ __u64: 2;
+ __u64 hrp_cdts : 5;
+ __u64: 3;
+ __u64 llr_cdts : 4;
+ __u64: 4;
+ __u64 ee_cdts : 5;
+ __u64: 3;
+ __u64 ixe_pbuf_size : 13;
+ __u64: 19;
+ };
+};
+
+#define C_HNI_CFG_TXTS_L2_MASK_OFFSET 0x00000430
+#define C_HNI_CFG_TXTS_L2_MASK (C_HNI_BASE + C_HNI_CFG_TXTS_L2_MASK_OFFSET)
+#define C_HNI_CFG_TXTS_L2_MASK_SIZE 0x00000008
+
+union c_hni_cfg_txts_l2_mask {
+ __u64 qw;
+ struct {
+ __u64 dmac : 48;
+ __u64 ethertype : 16;
+ };
+};
+
+#define C_HNI_CFG_TXTS_L2_MATCH_OFFSET 0x00000438
+#define C_HNI_CFG_TXTS_L2_MATCH (C_HNI_BASE + C_HNI_CFG_TXTS_L2_MATCH_OFFSET)
+#define C_HNI_CFG_TXTS_L2_MATCH_SIZE 0x00000008
+
+union c_hni_cfg_txts_l2_match {
+ __u64 qw;
+ struct {
+ __u64 dmac : 48;
+ __u64 ethertype : 16;
+ };
+};
+
+#define C_HNI_CFG_TXTS_L3_MASK_OFFSET 0x00000440
+#define C_HNI_CFG_TXTS_L3_MASK (C_HNI_BASE + C_HNI_CFG_TXTS_L3_MASK_OFFSET)
+#define C_HNI_CFG_TXTS_L3_MASK_SIZE 0x00000008
+
+union c_hni_cfg_txts_l3_mask {
+ __u64 qw;
+ struct {
+ __u64 hdr;
+ };
+};
+
+#define C_HNI_CFG_TXTS_L3_MATCH_OFFSET 0x00000448
+#define C_HNI_CFG_TXTS_L3_MATCH (C_HNI_BASE + C_HNI_CFG_TXTS_L3_MATCH_OFFSET)
+#define C_HNI_CFG_TXTS_L3_MATCH_SIZE 0x00000008
+
+union c_hni_cfg_txts_l3_match {
+ __u64 qw;
+ struct {
+ __u64 hdr;
+ };
+};
+
+#define C_HNI_CFG_RXTS_L2_MASK_OFFSET 0x00000450
+#define C_HNI_CFG_RXTS_L2_MASK (C_HNI_BASE + C_HNI_CFG_RXTS_L2_MASK_OFFSET)
+#define C_HNI_CFG_RXTS_L2_MASK_SIZE 0x00000008
+
+union c_hni_cfg_rxts_l2_mask {
+ __u64 qw;
+ struct {
+ __u64 dmac : 48;
+ __u64 ethertype : 16;
+ };
+};
+
+#define C_HNI_CFG_RXTS_L2_MATCH_OFFSET 0x00000458
+#define C_HNI_CFG_RXTS_L2_MATCH (C_HNI_BASE + C_HNI_CFG_RXTS_L2_MATCH_OFFSET)
+#define C_HNI_CFG_RXTS_L2_MATCH_SIZE 0x00000008
+
+union c_hni_cfg_rxts_l2_match {
+ __u64 qw;
+ struct {
+ __u64 dmac : 48;
+ __u64 ethertype : 16;
+ };
+};
+
+#define C_HNI_CFG_RXTS_L3_MASK_OFFSET 0x00000460
+#define C_HNI_CFG_RXTS_L3_MASK (C_HNI_BASE + C_HNI_CFG_RXTS_L3_MASK_OFFSET)
+#define C_HNI_CFG_RXTS_L3_MASK_SIZE 0x00000008
+
+union c_hni_cfg_rxts_l3_mask {
+ __u64 qw;
+ struct {
+ __u64 hdr;
+ };
+};
+
+#define C_HNI_CFG_RXTS_L3_MATCH_OFFSET 0x00000468
+#define C_HNI_CFG_RXTS_L3_MATCH (C_HNI_BASE + C_HNI_CFG_RXTS_L3_MATCH_OFFSET)
+#define C_HNI_CFG_RXTS_L3_MATCH_SIZE 0x00000008
+
+union c_hni_cfg_rxts_l3_match {
+ __u64 qw;
+ struct {
+ __u64 hdr;
+ };
+};
+
+#define C_HNI_CFG_PAUSE_QUANTA_OFFSET 0x00000470
+#define C_HNI_CFG_PAUSE_QUANTA (C_HNI_BASE + C_HNI_CFG_PAUSE_QUANTA_OFFSET)
+#define C_HNI_CFG_PAUSE_QUANTA_SIZE 0x00000008
+
+union c_hni_cfg_pause_quanta {
+ __u64 qw;
+ struct {
+ __u64 sub_value : 24;
+ __u64 sub_period : 8;
+ __u64: 32;
+ };
+};
+
+#define C_HNI_CFG_PAUSE_TIMING_OFFSET 0x00000478
+#define C_HNI_CFG_PAUSE_TIMING (C_HNI_BASE + C_HNI_CFG_PAUSE_TIMING_OFFSET)
+#define C_HNI_CFG_PAUSE_TIMING_SIZE 0x00000008
+
+union c_hni_cfg_pause_timing {
+ __u64 qw;
+ struct {
+ __u64 pause_period : 16;
+ __u64 pause_repeat_period : 16;
+ __u64: 32;
+ };
+};
+
+#define C_HNI_CFG_PAUSE_TX_CTRL_OFFSET 0x00000490
+#define C_HNI_CFG_PAUSE_TX_CTRL (C_HNI_BASE + C_HNI_CFG_PAUSE_TX_CTRL_OFFSET)
+#define C_HNI_CFG_PAUSE_TX_CTRL_SIZE 0x00000008
+
+union c_hni_cfg_pause_tx_ctrl {
+ __u64 qw;
+ struct {
+ __u64 mac_cntl_opcode : 16;
+ __u64 mac_cntl_type : 16;
+ __u64 enable_send_pause : 8;
+ __u64 pev : 8;
+ __u64 enable_pause : 1;
+ __u64 enable_pfc_pause : 1;
+ __u64: 14;
+ };
+};
+
+#define C_HNI_CFG_PAUSE_RX_CTRL_OFFSET 0x00000498
+#define C_HNI_CFG_PAUSE_RX_CTRL (C_HNI_BASE + C_HNI_CFG_PAUSE_RX_CTRL_OFFSET)
+#define C_HNI_CFG_PAUSE_RX_CTRL_SIZE 0x00000008
+
+union c_hni_cfg_pause_rx_ctrl {
+ __u64 qw;
+ struct {
+ __u64 enable_rec_pause : 8;
+ __u64 pause_rec_enable : 1;
+ __u64 pfc_rec_enable : 1;
+ __u64: 2;
+ __u64 timer_bit : 5;
+ __u64: 47;
+ };
+};
+
+#define C_HNI_CFG_MAX_SIZES_OFFSET 0x000004a8
+#define C_HNI_CFG_MAX_SIZES (C_HNI_BASE + C_HNI_CFG_MAX_SIZES_OFFSET)
+#define C_HNI_CFG_MAX_SIZES_SIZE 0x00000008
+
+union c_hni_cfg_max_sizes {
+ __u64 qw;
+ struct {
+ __u64 max_std_size : 14;
+ __u64: 2;
+ __u64 max_opt_size : 14;
+ __u64: 2;
+ __u64 max_portals_size : 14;
+ __u64: 18;
+ };
+};
+
+#define C_HNI_CFG_EVENT_CNTS_OFFSET 0x000004b8
+#define C_HNI_CFG_EVENT_CNTS (C_HNI_BASE + C_HNI_CFG_EVENT_CNTS_OFFSET)
+#define C_HNI_CFG_EVENT_CNTS_SIZE 0x00000008
+
+union c_hni_cfg_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 enable : 1;
+ __u64 init : 1;
+ __u64 init_done : 1;
+ __u64: 1;
+ __u64 ovf_cnt : 16;
+ __u64: 44;
+ };
+};
+
+#define C_HNI_CFG_PBUF_OFFSET(idx) (0x00000500 + ((idx) * 8))
+#define C_HNI_CFG_PBUF_ENTRIES 8
+#define C_HNI_CFG_PBUF(idx) (C_HNI_BASE + C_HNI_CFG_PBUF_OFFSET(idx))
+#define C_HNI_CFG_PBUF_SIZE 0x00000040
+
+union c_hni_cfg_pbuf {
+ __u64 qw;
+ struct {
+ __u64 static_rsvd : 12;
+ __u64: 4;
+ __u64 mtu : 7;
+ __u64: 41;
+ };
+};
+
+#define C1_HNI_CFG_PFC_BUF_OFFSET(idx) (0x00000580 + ((idx) * 8))
+#define C1_HNI_CFG_PFC_BUF_ENTRIES 8
+#define C1_HNI_CFG_PFC_BUF(idx) (C_HNI_BASE + C1_HNI_CFG_PFC_BUF_OFFSET(idx))
+#define C1_HNI_CFG_PFC_BUF_SIZE 0x00000040
+
+union c1_hni_cfg_pfc_buf {
+ __u64 qw;
+ struct {
+ __u64 low_water : 11;
+ __u64: 1;
+ __u64 high_water : 11;
+ __u64: 1;
+ __u64 timer_bit : 5;
+ __u64: 3;
+ __u64 discard_max : 3;
+ __u64: 1;
+ __u64 resume : 1;
+ __u64: 27;
+ };
+};
+
+#define C2_HNI_CFG_PFC_BUF_OFFSET(idx) (0x00000580 + ((idx) * 8))
+#define C2_HNI_CFG_PFC_BUF_ENTRIES 8
+#define C2_HNI_CFG_PFC_BUF(idx) (C_HNI_BASE + C2_HNI_CFG_PFC_BUF_OFFSET(idx))
+#define C2_HNI_CFG_PFC_BUF_SIZE 0x00000040
+
+union c2_hni_cfg_pfc_buf {
+ __u64 qw;
+ struct {
+ __u64 low_water : 12;
+ __u64 high_water : 12;
+ __u64 timer_bit : 5;
+ __u64: 3;
+ __u64 discard_max : 3;
+ __u64: 1;
+ __u64 resume : 1;
+ __u64: 27;
+ };
+};
+
+#define C_HNI_CFG_DSCP_PCP_OFFSET(idx) (0x00000800 + ((idx) * 8))
+#define C_HNI_CFG_DSCP_PCP_ENTRIES 64
+#define C_HNI_CFG_DSCP_PCP(idx) (C_HNI_BASE + C_HNI_CFG_DSCP_PCP_OFFSET(idx))
+#define C_HNI_CFG_DSCP_PCP_SIZE 0x00000200
+
+union c_hni_cfg_dscp_pcp {
+ __u64 qw;
+ struct {
+ __u64 pcp : 3;
+ __u64: 61;
+ };
+};
+
+#define C_HNI_STS_CDT_OFFSET 0x00001000
+#define C_HNI_STS_CDT (C_HNI_BASE + C_HNI_STS_CDT_OFFSET)
+#define C_HNI_STS_CDT_SIZE 0x00000008
+
+union c_hni_sts_cdt {
+ __u64 qw;
+ struct {
+ __u64 ixe_cdts : 6;
+ __u64: 2;
+ __u64 hrp_cdts : 5;
+ __u64: 3;
+ __u64 llr_cdts : 4;
+ __u64: 4;
+ __u64 ee_cdts : 5;
+ __u64: 3;
+ __u64 buf_cdts : 13;
+ __u64: 19;
+ };
+};
+
+#define C_HNI_STS_PAUSE_TIMEOUT_OFFSET 0x00001008
+#define C_HNI_STS_PAUSE_TIMEOUT (C_HNI_BASE + C_HNI_STS_PAUSE_TIMEOUT_OFFSET)
+#define C_HNI_STS_PAUSE_TIMEOUT_SIZE 0x00000008
+
+union c_hni_sts_pause_timeout {
+ __u64 qw;
+ struct {
+ __u64 pfc_0 : 4;
+ __u64 pfc_1 : 4;
+ __u64 pfc_2 : 4;
+ __u64 pfc_3 : 4;
+ __u64 pfc_4 : 4;
+ __u64 pfc_5 : 4;
+ __u64 pfc_6 : 4;
+ __u64 pfc_7 : 4;
+ __u64: 32;
+ };
+};
+
+#define C_HNI_STS_EVENT_CNTS_OFFSET(idx) (0x00002000 + ((idx) * 8))
+#ifndef C_HNI_STS_EVENT_CNTS_ENTRIES
+#define C_HNI_STS_EVENT_CNTS_ENTRIES 512
+#endif
+#define C_HNI_STS_EVENT_CNTS(idx) (C_HNI_BASE + C_HNI_STS_EVENT_CNTS_OFFSET(idx))
+#define C_HNI_STS_EVENT_CNTS_SIZE 0x00001000
+
+union c_hni_sts_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 cnt : 56;
+ __u64: 8;
+ };
+};
+
+#define C_HNI_UC_SBR_INTR_OFFSET 0x00004310
+#define C_HNI_UC_SBR_INTR (C_HNI_BASE + C_HNI_UC_SBR_INTR_OFFSET)
+#define C_HNI_UC_SBR_INTR_SIZE 0x00000008
+
+union c_hni_uc_sbr_intr {
+ __u64 qw;
+ struct {
+ __u64 intr : 8;
+ __u64 send_sbr : 1;
+ __u64 send_sbr_dis : 1;
+ __u64: 54;
+ };
+};
+
+#define C_HNI_PML_CFG_CRNC_OFFSET 0x00000000
+#define C_HNI_PML_CFG_CRNC (C_HNI_PML_BASE + C_HNI_PML_CFG_CRNC_OFFSET)
+#define C_HNI_PML_CFG_CRNC_SIZE 0x00000008
+
+union c_hni_pml_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_HNI_PML_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_HNI_PML_ERR_ELAPSED_TIME (C_HNI_PML_BASE + C_HNI_PML_ERR_ELAPSED_TIME_OFFSET)
+#define C_HNI_PML_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_hni_pml_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C1_HNI_PML_ERR_FLG_OFFSET 0x00000108
+#define C1_HNI_PML_ERR_FLG (C_HNI_PML_BASE + C1_HNI_PML_ERR_FLG_OFFSET)
+#define C1_HNI_PML_ERR_FLG_SIZE 0x00000008
+
+union c1_hni_pml_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 22;
+ __u64 mac_rx_frame_err : 1;
+ __u64 autoneg_page_received : 1;
+ __u64 autoneg_complete : 1;
+ __u64 autoneg_failed : 1;
+ __u64 pcs_tx_dp_err : 1;
+ __u64 pcs_rx_dp_err : 1;
+ __u64 pcs_rx_deskew_overflow : 1;
+ __u64 pcs_rx_deskew_pe : 1;
+ __u64 pcs_fec_mem0_sbe : 1;
+ __u64 pcs_fec_mem0_mbe : 1;
+ __u64 pcs_fec_mem1_sbe : 1;
+ __u64 pcs_fec_mem1_mbe : 1;
+ __u64 pcs_tx_degrade : 1;
+ __u64 pcs_rx_degrade : 1;
+ __u64 pcs_rx_degrade_failure : 1;
+ __u64 pcs_tx_degrade_failure : 1;
+ __u64 pcs_hi_ser : 1;
+ __u64 pcs_link_down : 1;
+ __u64 mac_tx_dp_err : 1;
+ __u64 mac_rx_dp_err : 1;
+ __u64 llr_tx_dp_sbe : 1;
+ __u64 llr_tx_dp_mbe : 1;
+ __u64 llr_tx_dp_err : 1;
+ __u64 llr_seq_mem_sbe : 1;
+ __u64 llr_seq_mem_mbe : 1;
+ __u64 llr_replay_mem_sbe : 1;
+ __u64 llr_replay_mem_mbe : 1;
+ __u64 llr_ack_nack_error : 1;
+ __u64 llr_ack_nack_seq_err : 1;
+ __u64 llr_replay_at_max : 1;
+ __u64 pcs_lanes_locked : 1;
+ __u64 pcs_aligned : 1;
+ __u64 pcs_ready : 1;
+ };
+};
+
+#define SS2_PORT_PML_ERR_FLG_OFFSET 0x00000120
+#define SS2_PORT_PML_ERR_FLG (C_HNI_PML_BASE + SS2_PORT_PML_ERR_FLG_OFFSET)
+#define SS2_PORT_PML_ERR_FLG_SIZE 0x00000020
+
+union ss2_port_pml_err_flg {
+ __u64 qw[4];
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64 csrc_ring_sync_error : 1;
+ __u64 csrc_ring_ecc_sbe : 1;
+ __u64 csrc_ring_ecc_mbe : 1;
+ __u64 csrc_ring_cmd_unknown : 1;
+ __u64 csrc_sring_sync_error : 1;
+ __u64 csrc_sring_ecc_sbe : 1;
+ __u64 csrc_sring_ecc_mbe : 1;
+ __u64 csrc_sring_cmd_unknown : 1;
+ __u64 csrc_buf_ecc_sbe : 1;
+ __u64 csrc_buf_ecc_mbe : 1;
+ __u64: 13;
+ __u64 pcs_tx_dp_err : 1;
+ __u64 pcs_rx_dp_err : 1;
+ __u64 pcs_rx_deskew_overflow : 1;
+ __u64 pcs_rx_deskew_pe : 1;
+ __u64 pcs_fec0_mem_sbe : 1;
+ __u64 pcs_fec0_mem_mbe : 1;
+ __u64 pcs_fec1_mem_sbe : 1;
+ __u64 pcs_fec1_mem_mbe : 1;
+ __u64 mac_tx_dp_err : 1;
+ __u64 mac_rx_dp_err : 1;
+ __u64 llr_tx_dp_sbe : 1;
+ __u64 llr_tx_dp_mbe : 1;
+ __u64 llr_tx_dp_err : 1;
+ __u64 llr_rx_dp_err : 1;
+ __u64 llr_seq_mem_sbe : 1;
+ __u64 llr_seq_mem_mbe : 1;
+ __u64 llr_replay_mem_sbe : 1;
+ __u64 llr_replay_mem_mbe : 1;
+ __u64 event_mem_sbe : 1;
+ __u64 event_mem_mbe : 1;
+ __u64 mac_rx_fcs32_err_0 : 1;
+ __u64 mac_rx_fcs32_err_1 : 1;
+ __u64 mac_rx_fcs32_err_2 : 1;
+ __u64 mac_rx_fcs32_err_3 : 1;
+ __u64 mac_rx_framing_err_0 : 1;
+ __u64 mac_rx_framing_err_1 : 1;
+ __u64 mac_rx_framing_err_2 : 1;
+ __u64 mac_rx_framing_err_3 : 1;
+ __u64 mac_rx_preamble_err_0 : 1;
+ __u64 mac_rx_preamble_err_1 : 1;
+ __u64 mac_rx_preamble_err_2 : 1;
+ __u64 mac_rx_preamble_err_3 : 1;
+ __u64 pcs_link_down_0 : 1;
+ __u64 pcs_link_down_1 : 1;
+ __u64 pcs_link_down_2 : 1;
+ __u64 pcs_link_down_3 : 1;
+ __u64 pcs_link_down_lf_0 : 1;
+ __u64 pcs_link_down_lf_1 : 1;
+ __u64 pcs_link_down_lf_2 : 1;
+ __u64 pcs_link_down_lf_3 : 1;
+ __u64 pcs_link_down_rf_0 : 1;
+ __u64 pcs_link_down_rf_1 : 1;
+ __u64 pcs_link_down_rf_2 : 1;
+ __u64 pcs_link_down_rf_3 : 1;
+ __u64 pcs_hi_ser_0 : 1;
+ __u64 pcs_hi_ser_1 : 1;
+ __u64 pcs_hi_ser_2 : 1;
+ __u64 pcs_hi_ser_3 : 1;
+ __u64 pcs_tx_degrade : 1;
+ __u64 pcs_rx_degrade : 1;
+ __u64 pcs_rx_degrade_failure : 1;
+ __u64 pcs_tx_degrade_failure : 1;
+ __u64: 8;
+ __u64 autoneg_failed_0 : 1;
+ __u64 autoneg_failed_1 : 1;
+ __u64 autoneg_failed_2 : 1;
+ __u64 autoneg_failed_3 : 1;
+ __u64 llr_ack_nack_error_0 : 1;
+ __u64 llr_ack_nack_error_1 : 1;
+ __u64 llr_ack_nack_error_2 : 1;
+ __u64 llr_ack_nack_error_3 : 1;
+ __u64 llr_ack_nack_seq_err_0 : 1;
+ __u64 llr_ack_nack_seq_err_1 : 1;
+ __u64 llr_ack_nack_seq_err_2 : 1;
+ __u64 llr_ack_nack_seq_err_3 : 1;
+ __u64 llr_replay_at_max_0 : 1;
+ __u64 llr_replay_at_max_1 : 1;
+ __u64 llr_replay_at_max_2 : 1;
+ __u64 llr_replay_at_max_3 : 1;
+ __u64 llr_expected_frame_bad_0 : 1;
+ __u64 llr_expected_frame_bad_1 : 1;
+ __u64 llr_expected_frame_bad_2 : 1;
+ __u64 llr_expected_frame_bad_3 : 1;
+ __u64 llr_duplicate_frame_0 : 1;
+ __u64 llr_duplicate_frame_1 : 1;
+ __u64 llr_duplicate_frame_2 : 1;
+ __u64 llr_duplicate_frame_3 : 1;
+ __u64 llr_unexpected_frame_0 : 1;
+ __u64 llr_unexpected_frame_1 : 1;
+ __u64 llr_unexpected_frame_2 : 1;
+ __u64 llr_unexpected_frame_3 : 1;
+ __u64 llr_loop_time_fail_0 : 1;
+ __u64 llr_loop_time_fail_1 : 1;
+ __u64 llr_loop_time_fail_2 : 1;
+ __u64 llr_loop_time_fail_3 : 1;
+ __u64 llr_init_fail_0 : 1;
+ __u64 llr_init_fail_1 : 1;
+ __u64 llr_init_fail_2 : 1;
+ __u64 llr_init_fail_3 : 1;
+ __u64 llr_starved_0 : 1;
+ __u64 llr_starved_1 : 1;
+ __u64 llr_starved_2 : 1;
+ __u64 llr_starved_3 : 1;
+ __u64 llr_max_starvation_limit_0 : 1;
+ __u64 llr_max_starvation_limit_1 : 1;
+ __u64 llr_max_starvation_limit_2 : 1;
+ __u64 llr_max_starvation_limit_3 : 1;
+ __u64: 56;
+ __u64 pcs_lanes_locked_0 : 1;
+ __u64 pcs_lanes_locked_1 : 1;
+ __u64 pcs_lanes_locked_2 : 1;
+ __u64 pcs_lanes_locked_3 : 1;
+ __u64 pcs_aligned_0 : 1;
+ __u64 pcs_aligned_1 : 1;
+ __u64 pcs_aligned_2 : 1;
+ __u64 pcs_aligned_3 : 1;
+ __u64 pcs_link_up_0 : 1;
+ __u64 pcs_link_up_1 : 1;
+ __u64 pcs_link_up_2 : 1;
+ __u64 pcs_link_up_3 : 1;
+ __u64 pcs_rx_degrade_rdy : 1;
+ __u64 pcs_lp_degrade_rdy : 1;
+ __u64: 2;
+ __u64 autoneg_page_received_0 : 1;
+ __u64 autoneg_page_received_1 : 1;
+ __u64 autoneg_page_received_2 : 1;
+ __u64 autoneg_page_received_3 : 1;
+ __u64 autoneg_complete_0 : 1;
+ __u64 autoneg_complete_1 : 1;
+ __u64 autoneg_complete_2 : 1;
+ __u64 autoneg_complete_3 : 1;
+ __u64 llr_loop_time_0 : 1;
+ __u64 llr_loop_time_1 : 1;
+ __u64 llr_loop_time_2 : 1;
+ __u64 llr_loop_time_3 : 1;
+ __u64 time_stamp_valid_0 : 1;
+ __u64 time_stamp_valid_1 : 1;
+ __u64 time_stamp_valid_2 : 1;
+ __u64 time_stamp_valid_3 : 1;
+ __u64 fec_err_vector_valid : 1;
+ __u64 llr_init_complete_0 : 1;
+ __u64 llr_init_complete_1 : 1;
+ __u64 llr_init_complete_2 : 1;
+ __u64 llr_init_complete_3 : 1;
+ __u64 event_cnt_ovf : 1;
+ __u64 rx_signal_ok_0 : 1;
+ __u64 rx_signal_ok_1 : 1;
+ __u64 rx_signal_ok_2 : 1;
+ __u64 rx_signal_ok_3 : 1;
+ __u64: 22;
+ };
+};
+
+#define C1_HNI_PML_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C1_HNI_PML_ERR_FIRST_FLG (C_HNI_PML_BASE + C1_HNI_PML_ERR_FIRST_FLG_OFFSET)
+#define C1_HNI_PML_ERR_FIRST_FLG_SIZE 0x00000008
+#define SS2_PORT_PML_ERR_FIRST_FLG_OFFSET 0x00000140
+#define SS2_PORT_PML_ERR_FIRST_FLG (C_HNI_PML_BASE + SS2_PORT_PML_ERR_FIRST_FLG_OFFSET)
+#define SS2_PORT_PML_ERR_FIRST_FLG_SIZE 0x00000020
+#define C1_HNI_PML_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C1_HNI_PML_ERR_FIRST_FLG_TS (C_HNI_PML_BASE + C1_HNI_PML_ERR_FIRST_FLG_TS_OFFSET)
+#define C_HNI_PML_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C1_HNI_PML_ERR_FIRST_FLG_TS_SIZE C_HNI_PML_ERR_FIRST_FLG_TS_SIZE
+#define SS2_PORT_PML_ERR_FIRST_FLG_TS_OFFSET 0x00000160
+#define SS2_PORT_PML_ERR_FIRST_FLG_TS (C_HNI_PML_BASE + SS2_PORT_PML_ERR_FIRST_FLG_TS_OFFSET)
+#define SS2_PORT_PML_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C1_HNI_PML_ERR_CLR_OFFSET 0x00000120
+#define C1_HNI_PML_ERR_CLR (C_HNI_PML_BASE + C1_HNI_PML_ERR_CLR_OFFSET)
+#define C1_HNI_PML_ERR_CLR_SIZE 0x00000008
+#define SS2_PORT_PML_ERR_CLR_OFFSET 0x00000180
+#define SS2_PORT_PML_ERR_CLR (C_HNI_PML_BASE + SS2_PORT_PML_ERR_CLR_OFFSET)
+#define SS2_PORT_PML_ERR_CLR_SIZE 0x00000020
+#define C1_HNI_PML_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C1_HNI_PML_ERR_IRQA_MSK (C_HNI_PML_BASE + C1_HNI_PML_ERR_IRQA_MSK_OFFSET)
+#define C1_HNI_PML_ERR_IRQA_MSK_SIZE 0x00000008
+#define SS2_PORT_PML_ERR_IRQA_MSK_OFFSET 0x000001a0
+#define SS2_PORT_PML_ERR_IRQA_MSK (C_HNI_PML_BASE + SS2_PORT_PML_ERR_IRQA_MSK_OFFSET)
+#define SS2_PORT_PML_ERR_IRQA_MSK_SIZE 0x00000020
+#define C1_HNI_PML_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C1_HNI_PML_ERR_IRQB_MSK (C_HNI_PML_BASE + C1_HNI_PML_ERR_IRQB_MSK_OFFSET)
+#define C1_HNI_PML_ERR_IRQB_MSK_SIZE 0x00000008
+#define SS2_PORT_PML_ERR_IRQB_MSK_OFFSET 0x000001c0
+#define SS2_PORT_PML_ERR_IRQB_MSK (C_HNI_PML_BASE + SS2_PORT_PML_ERR_IRQB_MSK_OFFSET)
+#define SS2_PORT_PML_ERR_IRQB_MSK_SIZE 0x00000020
+#define C1_HNI_PML_ERR_INFO_MSK_OFFSET 0x00000140
+#define C1_HNI_PML_ERR_INFO_MSK (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_MSK_OFFSET)
+#define C1_HNI_PML_ERR_INFO_MSK_SIZE 0x00000008
+#define SS2_PORT_PML_ERR_INFO_MSK_OFFSET 0x00000200
+#define SS2_PORT_PML_ERR_INFO_MSK (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_MSK_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_MSK_SIZE 0x00000020
+#define C1_HNI_PML_ERR_INFO_MEM_OFFSET 0x00000180
+#define C1_HNI_PML_ERR_INFO_MEM (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_MEM_OFFSET)
+#define C1_HNI_PML_ERR_INFO_MEM_SIZE 0x00000008
+
+union c1_hni_pml_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 csr_detected_sbe : 1;
+ __u64 csr_detected_mbe : 1;
+ __u64: 2;
+ __u64 sbe_syndrome : 10;
+ __u64: 2;
+ __u64 sbe_address : 11;
+ __u64: 1;
+ __u64 sbe_mem_id : 2;
+ __u64: 6;
+ __u64 mbe_syndrome : 10;
+ __u64: 2;
+ __u64 mbe_address : 11;
+ __u64: 1;
+ __u64 mbe_mem_id : 2;
+ __u64: 2;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_MBE_CNTS_OFFSET 0x00000188
+#define C1_HNI_PML_ERR_INFO_MBE_CNTS (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_MBE_CNTS_OFFSET)
+#define C1_HNI_PML_ERR_INFO_MBE_CNTS_SIZE 0x00000008
+
+union c1_hni_pml_err_info_mbe_cnts {
+ __u64 qw;
+ struct {
+ __u64 pcs_fec0_mbe_cnt : 4;
+ __u64: 4;
+ __u64 pcs_fec1_mbe_cnt : 4;
+ __u64: 4;
+ __u64 llr_seq_mbe_cnt : 4;
+ __u64: 4;
+ __u64 llr_replay_mbe_cnt : 4;
+ __u64: 36;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_SBE_CNTS_OFFSET 0x00000190
+#define C1_HNI_PML_ERR_INFO_SBE_CNTS (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_SBE_CNTS_OFFSET)
+#define C1_HNI_PML_ERR_INFO_SBE_CNTS_SIZE 0x00000008
+
+union c1_hni_pml_err_info_sbe_cnts {
+ __u64 qw;
+ struct {
+ __u64 pcs_fec0_sbe_cnt : 8;
+ __u64 pcs_fec1_sbe_cnt : 8;
+ __u64 llr_seq_sbe_cnt : 8;
+ __u64 llr_replay_sbe_cnt : 8;
+ __u64: 32;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_PCS_TX_DP_OFFSET 0x000001a0
+#define C1_HNI_PML_ERR_INFO_PCS_TX_DP (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_PCS_TX_DP_OFFSET)
+#define C1_HNI_PML_ERR_INFO_PCS_TX_DP_SIZE 0x00000008
+
+union c1_hni_pml_err_info_pcs_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_cdc_underrun : 4;
+ __u64 tx_cdc_overflow : 4;
+ __u64 tx_mac_if_fifo_overflow : 1;
+ __u64 tx_mac_if_fifo_starved : 1;
+ __u64 tx_serdes_if_fifo_overflow : 1;
+ __u64: 53;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_PCS_TX_DP_OFFSET 0x00000320
+#define SS2_PORT_PML_ERR_INFO_PCS_TX_DP (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_PCS_TX_DP_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_PCS_TX_DP_SIZE 0x00000008
+
+union ss2_port_pml_err_info_pcs_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_cdc_underrun : 4;
+ __u64 tx_cdc_overflow : 4;
+ __u64 tx_mac_if_fifo_overflow : 1;
+ __u64 tx_mac_if_fifo_starved : 1;
+ __u64 tx_serdes_if_fifo_overflow : 1;
+ __u64: 5;
+ __u64 subport : 2;
+ __u64: 46;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DP_OFFSET 0x000001a8
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DP (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_PCS_RX_DP_OFFSET)
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DP_SIZE 0x00000008
+
+union c1_hni_pml_err_info_pcs_rx_dp {
+ __u64 qw;
+ struct {
+ __u64 rx_cdc_overflow : 4;
+ __u64 rx_rs_buffer_overflow : 1;
+ __u64: 59;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DP_OFFSET 0x00000328
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DP (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_PCS_RX_DP_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DP_SIZE 0x00000008
+
+union ss2_port_pml_err_info_pcs_rx_dp {
+ __u64 qw;
+ struct {
+ __u64 rx_cdc_overflow : 4;
+ __u64 rx_rs_buffer_overflow : 1;
+ __u64: 3;
+ __u64 subport : 2;
+ __u64: 54;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_OFFSET 0x000001b0
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW \
+ (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_OFFSET)
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_SIZE 0x00000008
+
+union c1_hni_pml_err_info_pcs_rx_deskew {
+ __u64 qw;
+ struct {
+ __u64 rx_deskew_overflow : 8;
+ __u64: 56;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_OFFSET 0x00000330
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW \
+ (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_SIZE 0x00000008
+
+union ss2_port_pml_err_info_pcs_rx_deskew {
+ __u64 qw;
+ struct {
+ __u64 rx_deskew_overflow : 16;
+ __u64: 48;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_PES_OFFSET 0x000001b8
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_PES \
+ (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_PES_OFFSET)
+#define C1_HNI_PML_ERR_INFO_PCS_RX_DESKEW_PES_SIZE 0x00000008
+
+union c1_hni_pml_err_info_pcs_rx_deskew_pes {
+ __u64 qw;
+ struct {
+ __u64 deskew_0_pe_cnt : 8;
+ __u64 deskew_1_pe_cnt : 8;
+ __u64 deskew_2_pe_cnt : 8;
+ __u64 deskew_3_pe_cnt : 8;
+ __u64 deskew_4_pe_cnt : 8;
+ __u64 deskew_5_pe_cnt : 8;
+ __u64 deskew_6_pe_cnt : 8;
+ __u64 deskew_7_pe_cnt : 8;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_PES_OFFSET 0x00000338
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_PES \
+ (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_PES_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_PCS_RX_DESKEW_PES_SIZE 0x00000008
+
+union ss2_port_pml_err_info_pcs_rx_deskew_pes {
+ __u64 qw;
+ struct {
+ __u64 rx_deskew_parity_err : 16;
+ __u64: 48;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_MAC_TX_DP_OFFSET 0x000001c0
+#define C1_HNI_PML_ERR_INFO_MAC_TX_DP (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_MAC_TX_DP_OFFSET)
+#define C1_HNI_PML_ERR_INFO_MAC_TX_DP_SIZE 0x00000008
+
+union c1_hni_pml_err_info_mac_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_llr_if_credit_error : 1;
+ __u64 tx_llr_if_ctl_par_err : 1;
+ __u64 tx_llr_if_llr_par_err : 1;
+ __u64 tx_llr_if_bytes_vld_err : 1;
+ __u64 tx_llr_if_framing_err : 1;
+ __u64 tx_llr_if_fcs_16_err : 1;
+ __u64 tx_mac_gb_underrun : 1;
+ __u64: 57;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_MAC_TX_DP_OFFSET 0x00000348
+#define SS2_PORT_PML_ERR_INFO_MAC_TX_DP (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_MAC_TX_DP_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_MAC_TX_DP_SIZE 0x00000008
+
+union ss2_port_pml_err_info_mac_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_llr_if_credit_error : 1;
+ __u64 tx_llr_if_ctl_par_err : 1;
+ __u64 tx_llr_if_llr_par_err : 1;
+ __u64 tx_llr_if_llr_seg_par_err : 4;
+ __u64 tx_llr_if_bytes_vld_err : 4;
+ __u64 tx_llr_if_framing_err : 1;
+ __u64 tx_llr_if_fcs_16_err : 1;
+ __u64 tx_mac_gb_underrun : 1;
+ __u64 tx_mac_gb_overflow : 1;
+ __u64 tx_mac_fifo_overflow : 1;
+ __u64 subport : 2;
+ __u64: 46;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_MAC_RX_DP_OFFSET 0x000001c8
+#define C1_HNI_PML_ERR_INFO_MAC_RX_DP (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_MAC_RX_DP_OFFSET)
+#define C1_HNI_PML_ERR_INFO_MAC_RX_DP_SIZE 0x00000008
+
+union c1_hni_pml_err_info_mac_rx_dp {
+ __u64 qw;
+ struct {
+ __u64 rx_mac_gb_err : 1;
+ __u64 rx_mac_illegal_size : 1;
+ __u64 rx_mac_fragment : 1;
+ __u64 rx_mac_preamble_error : 1;
+ __u64 rx_mac_framing_error : 1;
+ __u64 rx_mac_fcs32_error : 1;
+ __u64: 58;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_MAC_RX_DP_OFFSET 0x00000350
+#define SS2_PORT_PML_ERR_INFO_MAC_RX_DP (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_MAC_RX_DP_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_MAC_RX_DP_SIZE 0x00000008
+
+union ss2_port_pml_err_info_mac_rx_dp {
+ __u64 qw;
+ struct {
+ __u64 rx_mac_illegal_size : 1;
+ __u64 rx_mac_fragment : 1;
+ __u64 rx_mac_fifo_overflow : 1;
+ __u64 rx_mac_short_pkt_buf_ovfw : 1;
+ __u64: 4;
+ __u64 subport : 2;
+ __u64: 54;
+ };
+};
+
+#define C1_HNI_PML_ERR_INFO_LLR_TX_DP_OFFSET 0x000001d0
+#define C1_HNI_PML_ERR_INFO_LLR_TX_DP (C_HNI_PML_BASE + C1_HNI_PML_ERR_INFO_LLR_TX_DP_OFFSET)
+#define C1_HNI_PML_ERR_INFO_LLR_TX_DP_SIZE 0x00000008
+
+union c1_hni_pml_err_info_llr_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_llr_sbe_syndrome : 10;
+ __u64 tx_llr_bypass_sbe : 1;
+ __u64 tx_llr_if_fifo_sbe : 1;
+ __u64: 4;
+ __u64 tx_llr_mbe_syndrome : 10;
+ __u64 tx_llr_bypass_mbe : 1;
+ __u64 tx_llr_if_fifo_mbe : 1;
+ __u64: 4;
+ __u64 tx_llr_bypass_par_err : 1;
+ __u64 tx_llr_bypass_overflow_err : 1;
+ __u64 tx_llr_bypass_illegal_len_err : 1;
+ __u64 tx_llr_if_fifo_par_err : 1;
+ __u64 tx_llr_if_fifo_overrun_err : 1;
+ __u64 tx_llr_if_fifo_len_err : 1;
+ __u64: 26;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_OFFSET 0x00000358
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_LLR_TX_DP_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_SIZE 0x00000008
+
+union ss2_port_pml_err_info_llr_tx_dp {
+ __u64 qw;
+ struct {
+ __u64 tx_llr_bypass_par_err : 1;
+ __u64 tx_llr_bypass_overflow_err : 1;
+ __u64 tx_llr_bypass_illegal_len_err : 1;
+ __u64 tx_llr_if_fifo_seg0_par_err : 1;
+ __u64 tx_llr_if_fifo_seg1_par_err : 1;
+ __u64 tx_llr_if_fifo_seg2_par_err : 1;
+ __u64 tx_llr_if_fifo_seg3_par_err : 1;
+ __u64 tx_llr_if_fifo_par_err : 1;
+ __u64 tx_llr_if_fifo_overrun_err : 1;
+ __u64 tx_llr_if_fifo_len_err : 1;
+ __u64 tx_llr_bypass_illegal_frame_type : 1;
+ __u64 tx_llr_input_bus_err : 1;
+ __u64: 12;
+ __u64 subport : 2;
+ __u64: 38;
+ };
+};
+
+#define C_HNI_PML_CFG_GENERAL_OFFSET 0x00000400
+#define C_HNI_PML_CFG_GENERAL (C_HNI_PML_BASE + C_HNI_PML_CFG_GENERAL_OFFSET)
+#define C_HNI_PML_CFG_GENERAL_SIZE 0x00000008
+
+union c_hni_pml_cfg_general {
+ __u64 qw;
+ struct {
+ __u64 clock_period_ps : 11;
+ __u64: 53;
+ };
+};
+
+#define C1_HNI_PML_CFG_SERDES_CORE_INTERRUPT_OFFSET 0x00000408
+#define C1_HNI_PML_CFG_SERDES_CORE_INTERRUPT \
+ (C_HNI_PML_BASE + C1_HNI_PML_CFG_SERDES_CORE_INTERRUPT_OFFSET)
+#define C1_HNI_PML_CFG_SERDES_CORE_INTERRUPT_SIZE 0x00000008
+
+union c1_hni_pml_cfg_serdes_core_interrupt {
+ __u64 qw;
+ struct {
+ __u64 set_interrupt_delay : 8;
+ __u64 clear_interrupt_delay : 8;
+ __u64 capture_interrupt_data_delay : 8;
+ __u64: 40;
+ };
+};
+
+#define C1_HNI_PML_SERDES_CORE_INTERRUPT_OFFSET 0x00000410
+#define C1_HNI_PML_SERDES_CORE_INTERRUPT (C_HNI_PML_BASE + C1_HNI_PML_SERDES_CORE_INTERRUPT_OFFSET)
+#define C1_HNI_PML_SERDES_CORE_INTERRUPT_SIZE 0x00000008
+
+union c1_hni_pml_serdes_core_interrupt {
+ __u64 qw;
+ struct {
+ __u64 core_interrupt_data : 16;
+ __u64 core_interrupt_code : 16;
+ __u64 do_core_interrupt : 1;
+ __u64 serdes_sel : 2;
+ __u64: 29;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_OFFSET 0x00000500
+#define C1_HNI_PML_CFG_PCS (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_OFFSET)
+#define C1_HNI_PML_CFG_PCS_SIZE 0x00000008
+
+union c1_hni_pml_cfg_pcs {
+ __u64 qw;
+ struct {
+ __u64 pcs_enable : 1;
+ __u64 enable_auto_neg : 1;
+ __u64: 6;
+ __u64 pcs_mode : 2;
+ __u64 enable_auto_lane_degrade : 1;
+ __u64: 5;
+ __u64 ll_fec : 1;
+ __u64: 7;
+ __u64 timestamp_shift : 2;
+ __u64: 38;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_OFFSET 0x00000500
+#define SS2_PORT_PML_CFG_PCS (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_OFFSET)
+#define SS2_PORT_PML_CFG_PCS_SIZE 0x00000008
+
+union ss2_port_pml_cfg_pcs {
+ __u64 qw;
+ struct {
+ __u64 pcs_mode : 3;
+ __u64 enable_auto_lane_degrade : 1;
+ __u64 by_25g_fec_mode : 2;
+ __u64: 10;
+ __u64 timestamp_shift : 2;
+ __u64: 46;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_AUTONEG_OFFSET 0x00000508
+#define C1_HNI_PML_CFG_PCS_AUTONEG (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_AUTONEG_OFFSET)
+#define C1_HNI_PML_CFG_PCS_AUTONEG_SIZE 0x00000008
+
+union c_hni_pml_cfg_pcs_autoneg {
+ __u64 qw;
+ struct {
+ __u64 next_page_loaded : 1;
+ __u64: 7;
+ __u64 restart : 1;
+ __u64: 7;
+ __u64 reset : 1;
+ __u64: 7;
+ __u64 tx_lane : 2;
+ __u64 rx_lane : 2;
+ __u64: 36;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_OFFSET(idx) (0x00000540 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_ENTRIES 4
+#define SS2_PORT_PML_CFG_PCS_AUTONEG(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_AUTONEG_OFFSET(idx))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_SIZE 0x00000020
+
+union ss2_port_pml_cfg_pcs_autoneg {
+ __u64 qw;
+ struct {
+ __u64 next_page_loaded : 1;
+ __u64: 7;
+ __u64 restart : 1;
+ __u64: 7;
+ __u64 reset : 1;
+ __u64: 7;
+ __u64 tx_lane : 2;
+ __u64 rx_lane : 2;
+ __u64: 36;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_AUTONEG_TIMERS_OFFSET 0x00000510
+#define C1_HNI_PML_CFG_PCS_AUTONEG_TIMERS \
+ (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_AUTONEG_TIMERS_OFFSET)
+#define C1_HNI_PML_CFG_PCS_AUTONEG_TIMERS_SIZE 0x00000008
+
+union c1_hni_pml_cfg_pcs_autoneg_timers {
+ __u64 qw;
+ struct {
+ __u64 break_link_timer_max : 32;
+ __u64 link_fail_inhibit_timer_max : 32;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_TIMERS_OFFSET 0x00000560
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_TIMERS \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_AUTONEG_TIMERS_OFFSET)
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_TIMERS_SIZE 0x00000010
+
+union ss2_port_pml_cfg_pcs_autoneg_timers {
+ __u64 qw[2];
+ struct {
+ __u64 break_link_timer_max : 32;
+ __u64: 32;
+ __u64 link_fail_inhibit_timer_max : 34;
+ __u64: 30;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_AUTONEG_BASE_PAGE_OFFSET 0x00000518
+#define C1_HNI_PML_CFG_PCS_AUTONEG_BASE_PAGE \
+ (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_AUTONEG_BASE_PAGE_OFFSET)
+#define C1_HNI_PML_CFG_PCS_AUTONEG_BASE_PAGE_SIZE 0x00000008
+
+union c_hni_pml_cfg_pcs_autoneg_base_page {
+ __u64 qw;
+ struct {
+ __u64 base_page : 48;
+ __u64: 16;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_BASE_PAGE_OFFSET(idx) (0x00000580 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_BASE_PAGE_ENTRIES 4
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_BASE_PAGE(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_AUTONEG_BASE_PAGE_OFFSET(idx))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_BASE_PAGE_SIZE 0x00000020
+
+union ss2_port_pml_cfg_pcs_autoneg_base_page {
+ __u64 qw;
+ struct {
+ __u64 base_page : 48;
+ __u64: 16;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_AUTONEG_NEXT_PAGE_OFFSET 0x00000520
+#define C1_HNI_PML_CFG_PCS_AUTONEG_NEXT_PAGE \
+ (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_AUTONEG_NEXT_PAGE_OFFSET)
+#define C1_HNI_PML_CFG_PCS_AUTONEG_NEXT_PAGE_SIZE 0x00000008
+
+union c_hni_pml_cfg_pcs_autoneg_next_page {
+ __u64 qw;
+ struct {
+ __u64 next_page : 48;
+ __u64: 16;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_NEXT_PAGE_OFFSET(idx) (0x000005a0 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_NEXT_PAGE_ENTRIES 4
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_NEXT_PAGE(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_AUTONEG_NEXT_PAGE_OFFSET(idx))
+#define SS2_PORT_PML_CFG_PCS_AUTONEG_NEXT_PAGE_SIZE 0x00000020
+
+union ss2_port_pml_cfg_pcs_autoneg_next_page {
+ __u64 qw;
+ struct {
+ __u64 next_page : 48;
+ __u64: 16;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_AMS_OFFSET 0x00000528
+#define C1_HNI_PML_CFG_PCS_AMS (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_AMS_OFFSET)
+#define C_HNI_PML_CFG_PCS_AMS_SIZE 0x00000008
+#define C1_HNI_PML_CFG_PCS_AMS_SIZE C_HNI_PML_CFG_PCS_AMS_SIZE
+
+union c_hni_pml_cfg_pcs_ams {
+ __u64 qw;
+ struct {
+ __u64 am_spacing : 4;
+ __u64: 4;
+ __u64 ram_spacing : 4;
+ __u64: 12;
+ __u64 use_programmable_am_spacing : 1;
+ __u64 use_programmable_ams : 1;
+ __u64: 38;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_AMS_OFFSET 0x000005c0
+#define SS2_PORT_PML_CFG_PCS_AMS (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_AMS_OFFSET)
+#define SS2_PORT_PML_CFG_PCS_AMS_SIZE 0x00000008
+
+union ss2_port_pml_cfg_pcs_ams {
+ __u64 qw;
+ struct {
+ __u64 am_spacing : 4;
+ __u64: 4;
+ __u64 ram_spacing : 4;
+ __u64: 12;
+ __u64 use_programmable_am_spacing : 1;
+ __u64 use_programmable_ams : 1;
+ __u64: 38;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_UM_OFFSET(idx) (0x00000530 + ((idx) * 8))
+#define C1_HNI_PML_CFG_PCS_UM_ENTRIES 8
+#define C1_HNI_PML_CFG_PCS_UM(idx) (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_UM_OFFSET(idx))
+#define C1_HNI_PML_CFG_PCS_UM_SIZE 0x00000040
+
+union c_hni_pml_cfg_pcs_um {
+ __u64 qw;
+ struct {
+ __u64 um : 56;
+ __u64: 8;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_UM_OFFSET(idx) (0x00000600 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_PCS_UM_ENTRIES 16
+#define SS2_PORT_PML_CFG_PCS_UM(idx) (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_UM_OFFSET(idx))
+#define SS2_PORT_PML_CFG_PCS_UM_SIZE 0x00000080
+
+union ss2_port_pml_cfg_pcs_um {
+ __u64 qw;
+ struct {
+ __u64 um : 56;
+ __u64: 8;
+ };
+};
+
+#define C1_HNI_PML_CFG_PCS_CM_OFFSET 0x00000570
+#define C1_HNI_PML_CFG_PCS_CM (C_HNI_PML_BASE + C1_HNI_PML_CFG_PCS_CM_OFFSET)
+#define C_HNI_PML_CFG_PCS_CM_SIZE 0x00000008
+#define C1_HNI_PML_CFG_PCS_CM_SIZE C_HNI_PML_CFG_PCS_CM_SIZE
+
+union c_hni_pml_cfg_pcs_cm {
+ __u64 qw;
+ struct {
+ __u64 cm;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_CM_OFFSET 0x00000680
+#define SS2_PORT_PML_CFG_PCS_CM (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_CM_OFFSET)
+#define SS2_PORT_PML_CFG_PCS_CM_SIZE 0x00000008
+
+union ss2_port_pml_cfg_pcs_cm {
+ __u64 qw;
+ struct {
+ __u64 cm;
+ };
+};
+
+#define C1_HNI_PML_CFG_TX_PCS_OFFSET 0x00000578
+#define C1_HNI_PML_CFG_TX_PCS (C_HNI_PML_BASE + C1_HNI_PML_CFG_TX_PCS_OFFSET)
+#define C1_HNI_PML_CFG_TX_PCS_SIZE 0x00000008
+
+union c1_hni_pml_cfg_tx_pcs {
+ __u64 qw;
+ struct {
+ __u64 lane_0_source : 2;
+ __u64: 6;
+ __u64 lane_1_source : 2;
+ __u64: 6;
+ __u64 lane_2_source : 2;
+ __u64: 6;
+ __u64 lane_3_source : 2;
+ __u64: 6;
+ __u64 enable_ctl_os : 1;
+ __u64 allow_auto_degrade : 1;
+ __u64: 6;
+ __u64 gearbox_credits : 4;
+ __u64: 4;
+ __u64 cdc_ready_level : 4;
+ __u64: 12;
+ };
+};
+
+#define SS2_PORT_PML_CFG_TX_PCS_OFFSET 0x00000688
+#define SS2_PORT_PML_CFG_TX_PCS (C_HNI_PML_BASE + SS2_PORT_PML_CFG_TX_PCS_OFFSET)
+#define SS2_PORT_PML_CFG_TX_PCS_SIZE 0x00000008
+
+union ss2_port_pml_cfg_tx_pcs {
+ __u64 qw;
+ struct {
+ __u64 lane_0_source : 2;
+ __u64: 6;
+ __u64 lane_1_source : 2;
+ __u64: 6;
+ __u64 lane_2_source : 2;
+ __u64: 6;
+ __u64 lane_3_source : 2;
+ __u64: 6;
+ __u64 allow_auto_degrade : 1;
+ __u64: 7;
+ __u64 cdc_ready_level : 4;
+ __u64 en_pk_bw_limiter : 1;
+ __u64: 19;
+ };
+};
+
+#define C1_HNI_PML_CFG_RX_PCS_OFFSET 0x00000580
+#define C1_HNI_PML_CFG_RX_PCS (C_HNI_PML_BASE + C1_HNI_PML_CFG_RX_PCS_OFFSET)
+#define C1_HNI_PML_CFG_RX_PCS_SIZE 0x00000008
+
+union c1_hni_pml_cfg_rx_pcs {
+ __u64 qw;
+ struct {
+ __u64 active_lanes : 4;
+ __u64: 4;
+ __u64 rs_mode : 3;
+ __u64: 5;
+ __u64 enable_lock : 1;
+ __u64 restart_lock_on_bad_ams : 1;
+ __u64 restart_lock_on_bad_cws : 1;
+ __u64: 5;
+ __u64 enable_ctl_os : 1;
+ __u64: 7;
+ __u64 health_bad_sensitivity : 4;
+ __u64 lp_health_bad_sensitivity : 1;
+ __u64: 3;
+ __u64 allow_auto_degrade : 1;
+ __u64: 7;
+ __u64 enable_rx_sm : 1;
+ __u64: 15;
+ };
+};
+
+#define SS2_PORT_PML_CFG_RX_PCS_OFFSET 0x000006c0
+#define SS2_PORT_PML_CFG_RX_PCS (C_HNI_PML_BASE + SS2_PORT_PML_CFG_RX_PCS_OFFSET)
+#define SS2_PORT_PML_CFG_RX_PCS_SIZE 0x00000008
+
+union ss2_port_pml_cfg_rx_pcs {
+ __u64 qw;
+ struct {
+ __u64 active_lanes : 4;
+ __u64 cw_gap_544 : 5;
+ __u64 cw_gap_ll : 5;
+ __u64 cw_gap_one_fec : 5;
+ __u64 restart_lock_on_bad_ams : 1;
+ __u64 restart_lock_on_bad_cws : 1;
+ __u64 health_bad_sensitivity : 4;
+ __u64 lp_health_bad_sensitivity : 1;
+ __u64 allow_auto_degrade : 1;
+ __u64 lane_0_source : 2;
+ __u64 lane_1_source : 2;
+ __u64 lane_2_source : 2;
+ __u64 lane_3_source : 2;
+ __u64 signal_detect_enn : 4;
+ __u64 rx_lock_enn : 4;
+ __u64 rx_clk_vld_enn : 4;
+ __u64: 17;
+ };
+};
+
+#define C1_HNI_PML_CFG_RX_PCS_AMS_OFFSET 0x00000588
+#define C1_HNI_PML_CFG_RX_PCS_AMS (C_HNI_PML_BASE + C1_HNI_PML_CFG_RX_PCS_AMS_OFFSET)
+#define C_HNI_PML_CFG_RX_PCS_AMS_SIZE 0x00000008
+#define C1_HNI_PML_CFG_RX_PCS_AMS_SIZE C_HNI_PML_CFG_RX_PCS_AMS_SIZE
+
+union c_hni_pml_cfg_rx_pcs_ams {
+ __u64 qw;
+ struct {
+ __u64 cm_match_mask : 16;
+ __u64 um_match_mask : 14;
+ __u64: 34;
+ };
+};
+
+#define SS2_PORT_PML_CFG_RX_PCS_AMS_OFFSET 0x00000700
+#define SS2_PORT_PML_CFG_RX_PCS_AMS (C_HNI_PML_BASE + SS2_PORT_PML_CFG_RX_PCS_AMS_OFFSET)
+#define SS2_PORT_PML_CFG_RX_PCS_AMS_SIZE 0x00000008
+
+union ss2_port_pml_cfg_rx_pcs_ams {
+ __u64 qw;
+ struct {
+ __u64 cm_match_mask : 16;
+ __u64 um_match_mask : 14;
+ __u64: 34;
+ };
+};
+
+#define C1_HNI_PML_CFG_TX_MAC_OFFSET 0x00000600
+#define C1_HNI_PML_CFG_TX_MAC (C_HNI_PML_BASE + C1_HNI_PML_CFG_TX_MAC_OFFSET)
+#define C1_HNI_PML_CFG_TX_MAC_SIZE 0x00000008
+
+union c1_hni_pml_cfg_tx_mac {
+ __u64 qw;
+ struct {
+ __u64 mac_operational : 1;
+ __u64 short_preamble : 1;
+ __u64: 6;
+ __u64 pcs_credits : 4;
+ __u64: 4;
+ __u64 ifg_mode : 1;
+ __u64: 3;
+ __u64 vs_version : 4;
+ __u64 ieee_ifg_adjustment : 2;
+ __u64 non_portals_sof_window : 5;
+ __u64 non_portals_max_sof : 4;
+ __u64 any_frame_sof_window_0 : 5;
+ __u64 any_frame_max_sof_0 : 4;
+ __u64 any_frame_sof_window_1 : 5;
+ __u64 any_frame_max_sof_1 : 4;
+ __u64 portals_protocol : 8;
+ __u64: 3;
+ };
+};
+
+#define SS2_PORT_PML_CFG_TX_MAC_OFFSET 0x00000800
+#define SS2_PORT_PML_CFG_TX_MAC (C_HNI_PML_BASE + SS2_PORT_PML_CFG_TX_MAC_OFFSET)
+#define SS2_PORT_PML_CFG_TX_MAC_SIZE 0x00000008
+
+union ss2_port_pml_cfg_tx_mac {
+ __u64 qw;
+ struct {
+ __u64 ifg_mode : 1;
+ __u64 min_ifg : 3;
+ __u64 mac_pad_idle_thresh : 8;
+ __u64: 1;
+ __u64 ieee_ifg_adjustment : 3;
+ __u64 vs_version : 4;
+ __u64: 6;
+ __u64 non_st_sof_window : 6;
+ __u64 non_st_max_sof : 3;
+ __u64 any_frame_sof_window_0 : 6;
+ __u64 any_frame_max_sof_0 : 3;
+ __u64: 10;
+ __u64 st_protocol : 8;
+ __u64: 2;
+ };
+};
+
+#define C1_HNI_PML_CFG_RX_MAC_OFFSET 0x00000608
+#define C1_HNI_PML_CFG_RX_MAC (C_HNI_PML_BASE + C1_HNI_PML_CFG_RX_MAC_OFFSET)
+#define C1_HNI_PML_CFG_RX_MAC_SIZE 0x00000008
+
+union c1_hni_pml_cfg_rx_mac {
+ __u64 qw;
+ struct {
+ __u64 mac_operational : 1;
+ __u64 short_preamble : 1;
+ __u64: 6;
+ __u64 filter_illegal_size : 1;
+ __u64: 55;
+ };
+};
+
+#define SS2_PORT_PML_CFG_RX_MAC_OFFSET 0x00000840
+#define SS2_PORT_PML_CFG_RX_MAC (C_HNI_PML_BASE + SS2_PORT_PML_CFG_RX_MAC_OFFSET)
+#define SS2_PORT_PML_CFG_RX_MAC_SIZE 0x00000008
+
+union ss2_port_pml_cfg_rx_mac {
+ __u64 qw;
+ struct {
+ __u64 flit_packing_cnt : 4;
+ __u64 stop_packing : 1;
+ __u64: 59;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_OFFSET 0x00000700
+#define C1_HNI_PML_CFG_LLR (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_OFFSET)
+#define C1_HNI_PML_CFG_LLR_SIZE 0x00000008
+
+union c1_hni_pml_cfg_llr {
+ __u64 qw;
+ struct {
+ __u64 llr_mode : 2;
+ __u64: 6;
+ __u64 mac_if_credits : 4;
+ __u64: 4;
+ __u64 link_down_behavior : 2;
+ __u64: 6;
+ __u64 enable_loop_timing : 1;
+ __u64: 7;
+ __u64 size : 2;
+ __u64: 6;
+ __u64 filter_ctl_frames : 1;
+ __u64 filter_lossless_when_off : 1;
+ __u64 ack_nack_err_check : 1;
+ __u64 preamble_seq_check : 1;
+ __u64: 20;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_OFFSET 0x00000900
+#define SS2_PORT_PML_CFG_LLR (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_OFFSET)
+#define SS2_PORT_PML_CFG_LLR_SIZE 0x00000008
+
+union ss2_port_pml_cfg_llr {
+ __u64 qw;
+ struct {
+ __u64 size : 1;
+ __u64: 7;
+ __u64 ack_nack_err_check : 1;
+ __u64 preamble_seq_check : 1;
+ __u64: 6;
+ __u64 stop_packing : 1;
+ __u64: 47;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_CF_SMAC_OFFSET 0x00000710
+#define C1_HNI_PML_CFG_LLR_CF_SMAC (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_CF_SMAC_OFFSET)
+#define C_HNI_PML_CFG_LLR_CF_SMAC_SIZE 0x00000008
+#define C1_HNI_PML_CFG_LLR_CF_SMAC_SIZE C_HNI_PML_CFG_LLR_CF_SMAC_SIZE
+
+union c_hni_pml_cfg_llr_cf_smac {
+ __u64 qw;
+ struct {
+ __u64 ctl_frame_smac : 48;
+ __u64: 16;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_CF_SMAC_OFFSET 0x00000948
+#define SS2_PORT_PML_CFG_LLR_CF_SMAC (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_CF_SMAC_OFFSET)
+#define SS2_PORT_PML_CFG_LLR_CF_SMAC_SIZE 0x00000008
+
+union ss2_port_pml_cfg_llr_cf_smac {
+ __u64 qw;
+ struct {
+ __u64 ctl_frame_smac : 48;
+ __u64: 16;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_CF_ETYPE_OFFSET 0x00000718
+#define C1_HNI_PML_CFG_LLR_CF_ETYPE (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_CF_ETYPE_OFFSET)
+#define C_HNI_PML_CFG_LLR_CF_ETYPE_SIZE 0x00000008
+#define C1_HNI_PML_CFG_LLR_CF_ETYPE_SIZE C_HNI_PML_CFG_LLR_CF_ETYPE_SIZE
+
+union c_hni_pml_cfg_llr_cf_etype {
+ __u64 qw;
+ struct {
+ __u64 ctl_frame_ethertype : 16;
+ __u64: 48;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_CF_ETYPE_OFFSET 0x00000950
+#define SS2_PORT_PML_CFG_LLR_CF_ETYPE (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_CF_ETYPE_OFFSET)
+#define SS2_PORT_PML_CFG_LLR_CF_ETYPE_SIZE 0x00000008
+
+union ss2_port_pml_cfg_llr_cf_etype {
+ __u64 qw;
+ struct {
+ __u64 ctl_frame_ethertype : 16;
+ __u64: 48;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_CF_RATES_OFFSET 0x00000720
+#define C1_HNI_PML_CFG_LLR_CF_RATES (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_CF_RATES_OFFSET)
+#define C1_HNI_PML_CFG_LLR_CF_RATES_SIZE 0x00000008
+
+union c_hni_pml_cfg_llr_cf_rates {
+ __u64 qw;
+ struct {
+ __u64 loop_timing_period : 16;
+ __u64 init_ctl_os_period : 4;
+ __u64: 44;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_CF_RATES_OFFSET(idx) (0x00000960 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_LLR_CF_RATES_ENTRIES 4
+#define SS2_PORT_PML_CFG_LLR_CF_RATES(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_CF_RATES_OFFSET(idx))
+#define SS2_PORT_PML_CFG_LLR_CF_RATES_SIZE 0x00000020
+
+union ss2_port_pml_cfg_llr_cf_rates {
+ __u64 qw;
+ struct {
+ __u64 loop_timing_period : 16;
+ __u64 init_ctl_os_period : 4;
+ __u64: 44;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_SM_OFFSET 0x00000728
+#define C1_HNI_PML_CFG_LLR_SM (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_SM_OFFSET)
+#define C1_HNI_PML_CFG_LLR_SM_SIZE 0x00000008
+
+union c_hni_pml_cfg_llr_sm {
+ __u64 qw;
+ struct {
+ __u64 replay_timer_max : 16;
+ __u64 replay_ct_max : 8;
+ __u64 allow_re_init : 1;
+ __u64: 7;
+ __u64 retry_threshold : 8;
+ __u64: 24;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_SM_OFFSET(idx) (0x00000980 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_LLR_SM_ENTRIES 4
+#define SS2_PORT_PML_CFG_LLR_SM(idx) (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_SM_OFFSET(idx))
+#define SS2_PORT_PML_CFG_LLR_SM_SIZE 0x00000020
+
+union ss2_port_pml_cfg_llr_sm {
+ __u64 qw;
+ struct {
+ __u64 replay_timer_max : 16;
+ __u64 replay_ct_max : 8;
+ __u64 allow_re_init : 1;
+ __u64: 7;
+ __u64 retry_threshold : 8;
+ __u64: 24;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_CAPACITY_OFFSET 0x00000730
+#define C1_HNI_PML_CFG_LLR_CAPACITY (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_CAPACITY_OFFSET)
+#define C1_HNI_PML_CFG_LLR_CAPACITY_SIZE 0x00000008
+
+union c1_hni_pml_cfg_llr_capacity {
+ __u64 qw;
+ struct {
+ __u64 max_seq : 12;
+ __u64: 4;
+ __u64 max_data : 12;
+ __u64: 36;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_CAPACITY_OFFSET(idx) (0x000009a0 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_LLR_CAPACITY_ENTRIES 4
+#define SS2_PORT_PML_CFG_LLR_CAPACITY(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_CAPACITY_OFFSET(idx))
+#define SS2_PORT_PML_CFG_LLR_CAPACITY_SIZE 0x00000020
+
+union ss2_port_pml_cfg_llr_capacity {
+ __u64 qw;
+ struct {
+ __u64 max_seq : 12;
+ __u64: 4;
+ __u64 max_data : 12;
+ __u64: 4;
+ __u64: 32;
+ };
+};
+
+#define C1_HNI_PML_CFG_LLR_TIMEOUTS_OFFSET 0x00000738
+#define C1_HNI_PML_CFG_LLR_TIMEOUTS (C_HNI_PML_BASE + C1_HNI_PML_CFG_LLR_TIMEOUTS_OFFSET)
+#define C1_HNI_PML_CFG_LLR_TIMEOUTS_SIZE 0x00000008
+
+union c_hni_pml_cfg_llr_timeouts {
+ __u64 qw;
+ struct {
+ __u64 pcs_link_dn_timer_max : 32;
+ __u64 data_age_timer_max : 32;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_TIMEOUTS_OFFSET(idx) (0x000009c0 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_LLR_TIMEOUTS_ENTRIES 4
+#define SS2_PORT_PML_CFG_LLR_TIMEOUTS(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_TIMEOUTS_OFFSET(idx))
+#define SS2_PORT_PML_CFG_LLR_TIMEOUTS_SIZE 0x00000020
+
+union ss2_port_pml_cfg_llr_timeouts {
+ __u64 qw;
+ struct {
+ __u64 pcs_link_dn_timer_max : 32;
+ __u64 data_age_timer_max : 32;
+ };
+};
+
+#define C1_HNI_PML_SERDES_CORE_STATUS_OFFSET(idx) (0x00000800 + ((idx) * 8))
+#define C1_HNI_PML_SERDES_CORE_STATUS_ENTRIES 4
+#define C1_HNI_PML_SERDES_CORE_STATUS(idx) \
+ (C_HNI_PML_BASE + C1_HNI_PML_SERDES_CORE_STATUS_OFFSET(idx))
+#define C1_HNI_PML_SERDES_CORE_STATUS_SIZE 0x00000020
+
+union c1_hni_pml_serdes_core_status {
+ __u64 qw;
+ struct {
+ __u64 core_status : 32;
+ __u64 rx_idle_detect : 1;
+ __u64 rx_rdy : 1;
+ __u64 tx_rdy : 1;
+ __u64: 29;
+ };
+};
+
+#define C1_HNI_PML_STS_PCS_AUTONEG_BASE_PAGE_OFFSET 0x00000820
+#define C1_HNI_PML_STS_PCS_AUTONEG_BASE_PAGE \
+ (C_HNI_PML_BASE + C1_HNI_PML_STS_PCS_AUTONEG_BASE_PAGE_OFFSET)
+#define C1_HNI_PML_STS_PCS_AUTONEG_BASE_PAGE_SIZE 0x00000008
+
+union c_hni_pml_sts_pcs_autoneg_base_page {
+ __u64 qw;
+ struct {
+ __u64 lp_base_page : 48;
+ __u64 lp_ability : 1;
+ __u64 page_received : 1;
+ __u64 base_page : 1;
+ __u64 state : 4;
+ __u64 complete : 1;
+ __u64 remaining_ack_ct : 3;
+ __u64 ack_match_ct : 2;
+ __u64 ability_match_ct : 2;
+ __u64: 1;
+ };
+};
+
+#define SS2_PORT_PML_STS_PCS_AUTONEG_BASE_PAGE_OFFSET(idx) (0x00001300 + ((idx) * 8))
+#define SS2_PORT_PML_STS_PCS_AUTONEG_BASE_PAGE_ENTRIES 4
+#define SS2_PORT_PML_STS_PCS_AUTONEG_BASE_PAGE(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_PCS_AUTONEG_BASE_PAGE_OFFSET(idx))
+#define SS2_PORT_PML_STS_PCS_AUTONEG_BASE_PAGE_SIZE 0x00000020
+
+union ss2_port_pml_sts_pcs_autoneg_base_page {
+ __u64 qw;
+ struct {
+ __u64 lp_base_page : 48;
+ __u64 lp_ability : 1;
+ __u64 page_received : 1;
+ __u64 base_page : 1;
+ __u64 state : 4;
+ __u64 complete : 1;
+ __u64 remaining_ack_ct : 3;
+ __u64 ack_match_ct : 2;
+ __u64 ability_match_ct : 2;
+ __u64: 1;
+ };
+};
+
+#define C1_HNI_PML_STS_PCS_AUTONEG_NEXT_PAGE_OFFSET 0x00000828
+#define C1_HNI_PML_STS_PCS_AUTONEG_NEXT_PAGE \
+ (C_HNI_PML_BASE + C1_HNI_PML_STS_PCS_AUTONEG_NEXT_PAGE_OFFSET)
+#define C1_HNI_PML_STS_PCS_AUTONEG_NEXT_PAGE_SIZE 0x00000008
+
+union c_hni_pml_sts_pcs_autoneg_next_page {
+ __u64 qw;
+ struct {
+ __u64 lp_next_page : 48;
+ __u64 lp_ability : 1;
+ __u64 page_received : 1;
+ __u64 base_page : 1;
+ __u64 state : 4;
+ __u64 complete : 1;
+ __u64 remaining_ack_ct : 3;
+ __u64 ack_match_ct : 2;
+ __u64 ability_match_ct : 2;
+ __u64: 1;
+ };
+};
+
+#define SS2_PORT_PML_STS_PCS_AUTONEG_NEXT_PAGE_OFFSET(idx) (0x00001320 + ((idx) * 8))
+#define SS2_PORT_PML_STS_PCS_AUTONEG_NEXT_PAGE_ENTRIES 4
+#define SS2_PORT_PML_STS_PCS_AUTONEG_NEXT_PAGE(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_PCS_AUTONEG_NEXT_PAGE_OFFSET(idx))
+#define SS2_PORT_PML_STS_PCS_AUTONEG_NEXT_PAGE_SIZE 0x00000020
+
+union ss2_port_pml_sts_pcs_autoneg_next_page {
+ __u64 qw;
+ struct {
+ __u64 lp_next_page : 48;
+ __u64 lp_ability : 1;
+ __u64 page_received : 1;
+ __u64 base_page : 1;
+ __u64 state : 4;
+ __u64 complete : 1;
+ __u64 remaining_ack_ct : 3;
+ __u64 ack_match_ct : 2;
+ __u64 ability_match_ct : 2;
+ __u64: 1;
+ };
+};
+
+#define C1_HNI_PML_STS_TX_PCS_OFFSET 0x00000830
+#define C1_HNI_PML_STS_TX_PCS (C_HNI_PML_BASE + C1_HNI_PML_STS_TX_PCS_OFFSET)
+#define C1_HNI_PML_STS_TX_PCS_SIZE 0x00000008
+
+union c_hni_pml_sts_tx_pcs {
+ __u64 qw;
+ struct {
+ __u64 timestamp : 32;
+ __u64 timestamp_valid : 1;
+ __u64: 31;
+ };
+};
+
+#define SS2_PORT_PML_STS_TX_PCS_OFFSET(idx) (0x00001340 + ((idx) * 8))
+#define SS2_PORT_PML_STS_TX_PCS_ENTRIES 4
+#define SS2_PORT_PML_STS_TX_PCS(idx) (C_HNI_PML_BASE + SS2_PORT_PML_STS_TX_PCS_OFFSET(idx))
+#define SS2_PORT_PML_STS_TX_PCS_SIZE 0x00000020
+
+union ss2_port_pml_sts_tx_pcs {
+ __u64 qw;
+ struct {
+ __u64 timestamp : 32;
+ __u64 timestamp_valid : 1;
+ __u64: 31;
+ };
+};
+
+#define C1_HNI_PML_STS_RX_PCS_OFFSET 0x00000838
+#define C1_HNI_PML_STS_RX_PCS (C_HNI_PML_BASE + C1_HNI_PML_STS_RX_PCS_OFFSET)
+#define C1_HNI_PML_STS_RX_PCS_SIZE 0x00000008
+
+union c1_hni_pml_sts_rx_pcs {
+ __u64 qw;
+ struct {
+ __u64 am_identity_0 : 3;
+ __u64: 1;
+ __u64 am_identity_1 : 3;
+ __u64: 1;
+ __u64 am_identity_2 : 3;
+ __u64: 1;
+ __u64 am_identity_3 : 3;
+ __u64: 1;
+ __u64 am_identity_4 : 3;
+ __u64: 1;
+ __u64 am_identity_5 : 3;
+ __u64: 1;
+ __u64 am_identity_6 : 3;
+ __u64: 1;
+ __u64 am_identity_7 : 3;
+ __u64: 1;
+ __u64 am_lock : 8;
+ __u64 align_status : 1;
+ __u64: 7;
+ __u64 fault : 1;
+ __u64 local_fault : 1;
+ __u64 hi_ser : 1;
+ __u64: 13;
+ };
+};
+
+#define C1_HNI_PML_STS_RX_PCS_AM_MATCH_OFFSET 0x00000840
+#define C1_HNI_PML_STS_RX_PCS_AM_MATCH (C_HNI_PML_BASE + C1_HNI_PML_STS_RX_PCS_AM_MATCH_OFFSET)
+#define C1_HNI_PML_STS_RX_PCS_AM_MATCH_SIZE 0x00000008
+
+union c1_hni_pml_sts_rx_pcs_am_match {
+ __u64 qw;
+ struct {
+ __u64 am_match_state_0 : 2;
+ __u64 am_match_pos_0 : 6;
+ __u64 am_match_state_1 : 2;
+ __u64 am_match_pos_1 : 6;
+ __u64 am_match_state_2 : 2;
+ __u64 am_match_pos_2 : 6;
+ __u64 am_match_state_3 : 2;
+ __u64 am_match_pos_3 : 6;
+ __u64 am_match_state_4 : 2;
+ __u64 am_match_pos_4 : 6;
+ __u64 am_match_state_5 : 2;
+ __u64 am_match_pos_5 : 6;
+ __u64 am_match_state_6 : 2;
+ __u64 am_match_pos_6 : 6;
+ __u64 am_match_state_7 : 2;
+ __u64 am_match_pos_7 : 6;
+ };
+};
+
+#define C1_HNI_PML_STS_RX_PCS_FECL_SOURCES_OFFSET 0x00000848
+#define C1_HNI_PML_STS_RX_PCS_FECL_SOURCES \
+ (C_HNI_PML_BASE + C1_HNI_PML_STS_RX_PCS_FECL_SOURCES_OFFSET)
+#define C1_HNI_PML_STS_RX_PCS_FECL_SOURCES_SIZE 0x00000008
+
+union c1_hni_pml_sts_rx_pcs_fecl_sources {
+ __u64 qw;
+ struct {
+ __u64 fecl_source_0 : 3;
+ __u64 fecl_source_vld_0 : 1;
+ __u64: 4;
+ __u64 fecl_source_1 : 3;
+ __u64 fecl_source_vld_1 : 1;
+ __u64: 4;
+ __u64 fecl_source_2 : 3;
+ __u64 fecl_source_vld_2 : 1;
+ __u64: 4;
+ __u64 fecl_source_3 : 3;
+ __u64 fecl_source_vld_3 : 1;
+ __u64: 4;
+ __u64 fecl_source_4 : 3;
+ __u64 fecl_source_vld_4 : 1;
+ __u64: 4;
+ __u64 fecl_source_5 : 3;
+ __u64 fecl_source_vld_5 : 1;
+ __u64: 4;
+ __u64 fecl_source_6 : 3;
+ __u64 fecl_source_vld_6 : 1;
+ __u64: 4;
+ __u64 fecl_source_7 : 3;
+ __u64 fecl_source_vld_7 : 1;
+ __u64: 4;
+ };
+};
+
+#define C1_HNI_PML_STS_RX_PCS_DESKEW_DEPTHS_OFFSET 0x00000850
+#define C1_HNI_PML_STS_RX_PCS_DESKEW_DEPTHS \
+ (C_HNI_PML_BASE + C1_HNI_PML_STS_RX_PCS_DESKEW_DEPTHS_OFFSET)
+#define C1_HNI_PML_STS_RX_PCS_DESKEW_DEPTHS_SIZE 0x00000008
+
+union c1_hni_pml_sts_rx_pcs_deskew_depths {
+ __u64 qw;
+ struct {
+ __u64 df_depth_0 : 8;
+ __u64 df_depth_1 : 8;
+ __u64 df_depth_2 : 8;
+ __u64 df_depth_3 : 8;
+ __u64 df_depth_4 : 8;
+ __u64 df_depth_5 : 8;
+ __u64 df_depth_6 : 8;
+ __u64 df_depth_7 : 8;
+ };
+};
+
+#define C1_HNI_PML_STS_PCS_LANE_DEGRADE_OFFSET 0x00000868
+#define C1_HNI_PML_STS_PCS_LANE_DEGRADE (C_HNI_PML_BASE + C1_HNI_PML_STS_PCS_LANE_DEGRADE_OFFSET)
+#define C1_HNI_PML_STS_PCS_LANE_DEGRADE_SIZE 0x00000008
+
+union c1_hni_pml_sts_pcs_lane_degrade {
+ __u64 qw;
+ struct {
+ __u64 rx_fecl_health_good : 8;
+ __u64 lp_pls_available : 4;
+ __u64: 4;
+ __u64 rx_state : 2;
+ __u64: 2;
+ __u64 rx_pls_available : 4;
+ __u64 tx_state : 2;
+ __u64: 2;
+ __u64 tx_lane : 2;
+ __u64: 2;
+ __u64 lp_health_bad_0 : 4;
+ __u64 lp_health_bad_1 : 4;
+ __u64 lp_health_bad_2 : 4;
+ __u64 lp_health_bad_3 : 4;
+ __u64 lp_health_good_0 : 4;
+ __u64 lp_health_good_1 : 4;
+ __u64 lp_health_good_2 : 4;
+ __u64 lp_health_good_3 : 4;
+ };
+};
+
+#define SS2_PORT_PML_STS_PCS_LANE_DEGRADE_OFFSET 0x00001460
+#define SS2_PORT_PML_STS_PCS_LANE_DEGRADE \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_PCS_LANE_DEGRADE_OFFSET)
+#define SS2_PORT_PML_STS_PCS_LANE_DEGRADE_SIZE 0x00000010
+
+union ss2_port_pml_sts_pcs_lane_degrade {
+ __u64 qw[2];
+ struct {
+ __u64 rx_fecl_health_good : 16;
+ __u64 lp_pls_available : 4;
+ __u64 rx_state : 3;
+ __u64: 1;
+ __u64 rx_pls_available : 4;
+ __u64 tx_state : 3;
+ __u64: 1;
+ __u64 tx_lane : 2;
+ __u64: 2;
+ __u64 degrade_failure : 1;
+ __u64 degrading : 1;
+ __u64: 26;
+ __u64 lp_health_bad_0 : 5;
+ __u64: 3;
+ __u64 lp_health_bad_1 : 5;
+ __u64: 3;
+ __u64 lp_health_bad_2 : 5;
+ __u64: 3;
+ __u64 lp_health_bad_3 : 5;
+ __u64: 3;
+ __u64 lp_health_good_0 : 5;
+ __u64: 3;
+ __u64 lp_health_good_1 : 5;
+ __u64: 3;
+ __u64 lp_health_good_2 : 5;
+ __u64: 3;
+ __u64 lp_health_good_3 : 5;
+ __u64: 3;
+ };
+};
+
+#define C1_HNI_PML_STS_LLR_OFFSET 0x00000a00
+#define C1_HNI_PML_STS_LLR (C_HNI_PML_BASE + C1_HNI_PML_STS_LLR_OFFSET)
+#define C1_HNI_PML_STS_LLR_SIZE 0x00000008
+
+union c_hni_pml_sts_llr {
+ __u64 qw;
+ struct {
+ __u64 llr_state : 3;
+ __u64: 1;
+ __u64 tx_seq : 20;
+ __u64 timestamp_frame_in_buffer : 1;
+ __u64 timestamp_frame_ackd : 1;
+ __u64: 6;
+ __u64 ack_state : 2;
+ __u64: 2;
+ __u64 ackd_seq : 20;
+ __u64: 8;
+ };
+};
+
+#define SS2_PORT_PML_STS_LLR_OFFSET(idx) (0x00001500 + ((idx) * 8))
+#define SS2_PORT_PML_STS_LLR_ENTRIES 4
+#define SS2_PORT_PML_STS_LLR(idx) (C_HNI_PML_BASE + SS2_PORT_PML_STS_LLR_OFFSET(idx))
+#define SS2_PORT_PML_STS_LLR_SIZE 0x00000020
+
+union ss2_port_pml_sts_llr {
+ __u64 qw;
+ struct {
+ __u64 llr_state : 3;
+ __u64: 1;
+ __u64 tx_seq : 20;
+ __u64 timestamp_frame_in_buffer : 1;
+ __u64 timestamp_frame_ackd : 1;
+ __u64: 6;
+ __u64 ack_state : 2;
+ __u64: 2;
+ __u64 ackd_seq : 20;
+ __u64: 8;
+ };
+};
+
+#define C1_HNI_PML_STS_LLR_LOOP_TIME_OFFSET 0x00000a08
+#define C1_HNI_PML_STS_LLR_LOOP_TIME (C_HNI_PML_BASE + C1_HNI_PML_STS_LLR_LOOP_TIME_OFFSET)
+#define C1_HNI_PML_STS_LLR_LOOP_TIME_SIZE 0x00000008
+
+union c_hni_pml_sts_llr_loop_time {
+ __u64 qw;
+ struct {
+ __u64 loop_time : 16;
+ __u64: 48;
+ };
+};
+
+#define SS2_PORT_PML_STS_LLR_LOOP_TIME_OFFSET(idx) (0x00001520 + ((idx) * 8))
+#define SS2_PORT_PML_STS_LLR_LOOP_TIME_ENTRIES 4
+#define SS2_PORT_PML_STS_LLR_LOOP_TIME(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_LLR_LOOP_TIME_OFFSET(idx))
+#define SS2_PORT_PML_STS_LLR_LOOP_TIME_SIZE 0x00000020
+
+union ss2_port_pml_sts_llr_loop_time {
+ __u64 qw;
+ struct {
+ __u64 loop_time : 16;
+ __u64: 48;
+ };
+};
+
+#define C1_HNI_PML_STS_LLR_USAGE_OFFSET 0x00000a18
+#define C1_HNI_PML_STS_LLR_USAGE (C_HNI_PML_BASE + C1_HNI_PML_STS_LLR_USAGE_OFFSET)
+#define C1_HNI_PML_STS_LLR_USAGE_SIZE 0x00000008
+
+union c_hni_pml_sts_llr_usage {
+ __u64 qw;
+ struct {
+ __u64 buffer_space_used : 12;
+ __u64: 4;
+ __u64 outstanding_seq : 20;
+ __u64: 28;
+ };
+};
+
+#define SS2_PORT_PML_STS_LLR_USAGE_OFFSET(idx) (0x00001560 + ((idx) * 8))
+#define SS2_PORT_PML_STS_LLR_USAGE_ENTRIES 4
+#define SS2_PORT_PML_STS_LLR_USAGE(idx) (C_HNI_PML_BASE + SS2_PORT_PML_STS_LLR_USAGE_OFFSET(idx))
+#define SS2_PORT_PML_STS_LLR_USAGE_SIZE 0x00000020
+
+union ss2_port_pml_sts_llr_usage {
+ __u64 qw;
+ struct {
+ __u64 buffer_space_used : 12;
+ __u64: 4;
+ __u64 outstanding_seq : 20;
+ __u64: 28;
+ };
+};
+
+#define C1_HNI_PML_STS_LLR_MAX_USAGE_OFFSET 0x00000a20
+#define C1_HNI_PML_STS_LLR_MAX_USAGE (C_HNI_PML_BASE + C1_HNI_PML_STS_LLR_MAX_USAGE_OFFSET)
+#define C1_HNI_PML_STS_LLR_MAX_USAGE_SIZE 0x00000008
+
+union c_hni_pml_sts_llr_max_usage {
+ __u64 qw;
+ struct {
+ __u64 max_buffer_space_used : 12;
+ __u64 max_outstanding_seq : 20;
+ __u64 max_starvation_time : 16;
+ __u64 seq_starved : 1;
+ __u64 buffer_space_starved : 1;
+ __u64: 14;
+ };
+};
+
+#define SS2_PORT_PML_STS_LLR_MAX_USAGE_OFFSET(idx) (0x00001580 + ((idx) * 8))
+#define SS2_PORT_PML_STS_LLR_MAX_USAGE_ENTRIES 4
+#define SS2_PORT_PML_STS_LLR_MAX_USAGE(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_LLR_MAX_USAGE_OFFSET(idx))
+#define SS2_PORT_PML_STS_LLR_MAX_USAGE_SIZE 0x00000020
+
+union ss2_port_pml_sts_llr_max_usage {
+ __u64 qw;
+ struct {
+ __u64 max_buffer_space_used : 12;
+ __u64 max_outstanding_seq : 20;
+ __u64 max_starvation_time : 16;
+ __u64 seq_starved : 1;
+ __u64 buffer_space_starved : 1;
+ __u64: 14;
+ };
+};
+
+#define C1_HNI_PML_DBG_PCS_OFFSET 0x00000c10
+#define C1_HNI_PML_DBG_PCS (C_HNI_PML_BASE + C1_HNI_PML_DBG_PCS_OFFSET)
+#define C1_HNI_PML_DBG_PCS_SIZE 0x00000008
+
+union c1_hni_pml_dbg_pcs {
+ __u64 qw;
+ struct {
+ __u64 tx_scrambler_en : 1;
+ __u64 rx_descrambler_en : 1;
+ __u64: 6;
+ __u64 enable_rapid_alignment : 1;
+ __u64: 7;
+ __u64 force_bad_bip : 5;
+ __u64: 3;
+ __u64 enable_idle_check : 1;
+ __u64: 7;
+ __u64 force_tx_data : 1;
+ __u64 force_tx_data_rf : 1;
+ __u64: 6;
+ __u64 ppm_test_mode : 1;
+ __u64: 23;
+ };
+};
+
+#define SS2_PORT_PML_DBG_PCS_OFFSET(idx) (0x00001740 + ((idx) * 8))
+#define SS2_PORT_PML_DBG_PCS_ENTRIES 4
+#define SS2_PORT_PML_DBG_PCS(idx) (C_HNI_PML_BASE + SS2_PORT_PML_DBG_PCS_OFFSET(idx))
+#define SS2_PORT_PML_DBG_PCS_SIZE 0x00000020
+
+union ss2_port_pml_dbg_pcs {
+ __u64 qw;
+ struct {
+ __u64 tx_scrambler_en : 1;
+ __u64 rx_descrambler_en : 1;
+ __u64: 6;
+ __u64 enable_rapid_alignment : 1;
+ __u64: 7;
+ __u64 force_bad_bip : 5;
+ __u64: 3;
+ __u64 enable_idle_check : 1;
+ __u64: 7;
+ __u64 force_tx_data : 1;
+ __u64 force_tx_data_rf : 1;
+ __u64: 6;
+ __u64 ppm_test_mode : 1;
+ __u64 tx_clk_select : 2;
+ __u64: 21;
+ };
+};
+
+#define C_IXE_CFG_CRNC_OFFSET 0x00000000
+#define C_IXE_CFG_CRNC (C_IXE_BASE + C_IXE_CFG_CRNC_OFFSET)
+#define C_IXE_CFG_CRNC_SIZE 0x00000008
+
+union c_ixe_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_IXE_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_IXE_MSC_SHADOW_ACTION (C_IXE_BASE + C_IXE_MSC_SHADOW_ACTION_OFFSET)
+#define C_IXE_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_IXE_MSC_SHADOW_OFFSET 0x00000080
+#define C_IXE_MSC_SHADOW (C_IXE_BASE + C_IXE_MSC_SHADOW_OFFSET)
+#define C_IXE_MSC_SHADOW_SIZE 0x00000048
+
+union c_ixe_msc_shadow {
+ __u64 qw[9];
+};
+
+#define C_IXE_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_IXE_ERR_ELAPSED_TIME (C_IXE_BASE + C_IXE_ERR_ELAPSED_TIME_OFFSET)
+#define C_IXE_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_ixe_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_IXE_ERR_FLG_OFFSET 0x00000108
+#define C_IXE_ERR_FLG (C_IXE_BASE + C_IXE_ERR_FLG_OFFSET)
+#define C_IXE_ERR_FLG_SIZE 0x00000008
+
+union c_ixe_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 23;
+ __u64 pafa_perr : 1;
+ __u64 fifo_err : 1;
+ __u64 credit_uflw : 1;
+ __u64 pcie_unsuccess_cmpl : 1;
+ __u64 pcie_error_poisoned : 1;
+ __u64 port_dfa_mismatch : 1;
+ __u64 port_discard_trig : 1;
+ __u64 hdr_checksum_err : 1;
+ __u64 hdr_ecc_err : 1;
+ __u64 get_len_err : 1;
+ __u64 ipv4_checksum_err : 1;
+ __u64 ipv4_options_err : 1;
+ __u64 ipv6_options_err : 1;
+ __u64 hrp_req_err : 1;
+ __u64 parser_disable : 1;
+ __u64 pbuf_pkt_perr : 1;
+ __u64 pbuf_rd_err : 1;
+ __u64 pkt_flit_fifo_perr : 1;
+ __u64 amo_align_err : 1;
+ __u64 amo_op_err : 1;
+ __u64 amo_fp_inexact : 1;
+ __u64 amo_fp_overflow : 1;
+ __u64 amo_fp_underflow : 1;
+ __u64 amo_fp_invalid : 1;
+ __u64 rarb_hw_err : 1;
+ __u64 amo_length_err : 1;
+ __u64 pbuf_overflow : 1;
+ __u64: 5;
+ };
+};
+
+#define C_IXE_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_IXE_ERR_FIRST_FLG (C_IXE_BASE + C_IXE_ERR_FIRST_FLG_OFFSET)
+#define C_IXE_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_IXE_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_IXE_ERR_FIRST_FLG_TS (C_IXE_BASE + C_IXE_ERR_FIRST_FLG_TS_OFFSET)
+#define C_IXE_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_IXE_ERR_CLR_OFFSET 0x00000120
+#define C_IXE_ERR_CLR (C_IXE_BASE + C_IXE_ERR_CLR_OFFSET)
+#define C_IXE_ERR_CLR_SIZE 0x00000008
+#define C_IXE_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_IXE_ERR_IRQA_MSK (C_IXE_BASE + C_IXE_ERR_IRQA_MSK_OFFSET)
+#define C_IXE_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_IXE_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_IXE_ERR_IRQB_MSK (C_IXE_BASE + C_IXE_ERR_IRQB_MSK_OFFSET)
+#define C_IXE_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_IXE_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_IXE_ERR_INFO_MSK (C_IXE_BASE + C_IXE_ERR_INFO_MSK_OFFSET)
+#define C_IXE_ERR_INFO_MSK_SIZE 0x00000008
+#define C_IXE_EXT_ERR_FLG_OFFSET 0x00000148
+#define C_IXE_EXT_ERR_FLG (C_IXE_BASE + C_IXE_EXT_ERR_FLG_OFFSET)
+#define C_IXE_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_ixe_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 flop_fifo_cor : 1;
+ __u64 put_resp_mem_cor : 1;
+ __u64 get_req_mem_cor : 1;
+ __u64 rdfq_list_mem_cor : 1;
+ __u64 wr_md_mem_cor : 1;
+ __u64 event_fifo_cor : 1;
+ __u64 wr_ev_mem_cor : 1;
+ __u64 pkt_flit_fifo_cor : 1;
+ __u64 pbuf_list_mem_cor : 1;
+ __u64 pbuf_sb_mem_cor : 1;
+ __u64 atu_resp_cor : 1;
+ __u64 rdoq_cor : 1;
+ __u64 ingressq_cor : 1;
+ __u64 info_cor : 1;
+ __u64 cmd_info_cor : 1;
+ __u64 sideband_cor : 1;
+ __u64 p_cmd_cor : 1;
+ __u64 np_cmd_cor : 1;
+ __u64 amo_info_cor : 1;
+ __u64 addr_cor : 1;
+ __u64 rd_buf_cor : 1;
+ __u64 ack_rd_buf_cor : 1;
+ __u64 hni_flit_cor : 1;
+ __u64 rpu_list_mem_cor : 1;
+ __u64 rpu_st_mem_cor : 1;
+ __u64 rarb_hdr_bus_cor : 1;
+ __u64 rarb_data_bus_cor : 1;
+ __u64 pbuf_flit_mem_cor : 1;
+ __u64: 3;
+ __u64: 1;
+ __u64 flop_fifo_ucor : 1;
+ __u64 put_resp_mem_ucor : 1;
+ __u64 get_req_mem_ucor : 1;
+ __u64 rdfq_list_mem_ucor : 1;
+ __u64 wr_md_mem_ucor : 1;
+ __u64 event_fifo_ucor : 1;
+ __u64 wr_ev_mem_ucor : 1;
+ __u64 pkt_flit_fifo_ucor : 1;
+ __u64 pbuf_list_mem_ucor : 1;
+ __u64 pbuf_sb_mem_ucor : 1;
+ __u64 atu_resp_ucor : 1;
+ __u64 rdoq_ucor : 1;
+ __u64 ingressq_ucor : 1;
+ __u64 info_ucor : 1;
+ __u64 cmd_info_ucor : 1;
+ __u64 sideband_ucor : 1;
+ __u64 p_cmd_ucor : 1;
+ __u64 np_cmd_ucor : 1;
+ __u64 amo_info_ucor : 1;
+ __u64 addr_ucor : 1;
+ __u64 rd_buf_ucor : 1;
+ __u64 ack_rd_buf_ucor : 1;
+ __u64 hni_flit_ucor : 1;
+ __u64 rpu_list_mem_ucor : 1;
+ __u64 rpu_st_mem_ucor : 1;
+ __u64 rarb_hdr_bus_ucor : 1;
+ __u64 rarb_data_bus_ucor : 1;
+ __u64 pbuf_flit_mem_ucor : 1;
+ __u64: 3;
+ };
+};
+
+#define C_IXE_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C_IXE_EXT_ERR_FIRST_FLG (C_IXE_BASE + C_IXE_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_IXE_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_IXE_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C_IXE_EXT_ERR_FIRST_FLG_TS (C_IXE_BASE + C_IXE_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_IXE_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_IXE_EXT_ERR_CLR_OFFSET 0x00000160
+#define C_IXE_EXT_ERR_CLR (C_IXE_BASE + C_IXE_EXT_ERR_CLR_OFFSET)
+#define C_IXE_EXT_ERR_CLR_SIZE 0x00000008
+#define C_IXE_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C_IXE_EXT_ERR_IRQA_MSK (C_IXE_BASE + C_IXE_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_IXE_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_IXE_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C_IXE_EXT_ERR_IRQB_MSK (C_IXE_BASE + C_IXE_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_IXE_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_IXE_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C_IXE_EXT_ERR_INFO_MSK (C_IXE_BASE + C_IXE_EXT_ERR_INFO_MSK_OFFSET)
+#define C_IXE_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_IXE_ERR_INFO_MEM_OFFSET 0x00000190
+#define C_IXE_ERR_INFO_MEM (C_IXE_BASE + C_IXE_ERR_INFO_MEM_OFFSET)
+#define C_IXE_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_ixe_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 11;
+ __u64: 1;
+ __u64 cor_mem_id : 6;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 11;
+ __u64: 1;
+ __u64 ucor_mem_id : 6;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_IXE_ERR_INFO_FIFO_ERR_OFFSET 0x00000198
+#define C_IXE_ERR_INFO_FIFO_ERR (C_IXE_BASE + C_IXE_ERR_INFO_FIFO_ERR_OFFSET)
+#define C_IXE_ERR_INFO_FIFO_ERR_SIZE 0x00000008
+
+union c_ixe_err_info_fifo_err {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 6;
+ __u64 fifo_id : 5;
+ __u64: 51;
+ };
+};
+
+#define C_IXE_ERR_INFO_CC_OFFSET 0x000001a0
+#define C_IXE_ERR_INFO_CC (C_IXE_BASE + C_IXE_ERR_INFO_CC_OFFSET)
+#define C_IXE_ERR_INFO_CC_SIZE 0x00000008
+
+union c_ixe_err_info_cc {
+ __u64 qw;
+ struct {
+ __u64 cc_id : 4;
+ __u64: 4;
+ __u64 sub_id : 5;
+ __u64: 51;
+ };
+};
+
+#define C_IXE_ERR_INFO_PCIE_EP_OFFSET 0x00000200
+#define C_IXE_ERR_INFO_PCIE_EP (C_IXE_BASE + C_IXE_ERR_INFO_PCIE_EP_OFFSET)
+#define C_IXE_ERR_INFO_PCIE_EP_SIZE 0x00000008
+
+union c_ixe_err_info_pcie_ep {
+ __u64 qw;
+ struct {
+ __u64 pcie_tag : 9;
+ __u64: 55;
+ };
+};
+
+#define C_IXE_ERR_INFO_PCIE_UC_OFFSET 0x00000208
+#define C_IXE_ERR_INFO_PCIE_UC (C_IXE_BASE + C_IXE_ERR_INFO_PCIE_UC_OFFSET)
+#define C_IXE_ERR_INFO_PCIE_UC_SIZE 0x00000008
+
+union c_ixe_err_info_pcie_uc {
+ __u64 qw;
+ struct {
+ __u64 pcie_tag : 9;
+ __u64: 3;
+ __u64 cmpl_status : 3;
+ __u64: 49;
+ };
+};
+
+#define C_IXE_ERR_INFO_ETH_PARSE_OFFSET 0x00000210
+#define C_IXE_ERR_INFO_ETH_PARSE (C_IXE_BASE + C_IXE_ERR_INFO_ETH_PARSE_OFFSET)
+#define C_IXE_ERR_INFO_ETH_PARSE_SIZE 0x00000008
+
+union c_ixe_err_info_eth_parse {
+ __u64 qw;
+ struct {
+ __u64 ptlte_index : 11;
+ __u64: 1;
+ __u64 ipv4_checksum_err : 1;
+ __u64 ipv4_options_err : 1;
+ __u64 ipv6_options_err : 1;
+ __u64: 49;
+ };
+};
+
+#define C_IXE_ERR_INFO_RARB_OFFSET 0x00000218
+#define C_IXE_ERR_INFO_RARB (C_IXE_BASE + C_IXE_ERR_INFO_RARB_OFFSET)
+#define C_IXE_ERR_INFO_RARB_SIZE 0x00000008
+
+union c_ixe_err_info_rarb {
+ __u64 qw;
+ struct {
+ __u64 hdr_ucor : 1;
+ __u64 data_ucor : 1;
+ __u64 bad_cmpl_last : 1;
+ __u64 bad_vld : 1;
+ __u64 bad_eop : 1;
+ __u64 bad_cmd : 1;
+ __u64 unexpected_cmpl_tag : 1;
+ __u64 cmpl_tag_out_of_range : 1;
+ __u64: 56;
+ };
+};
+
+#define C_IXE_ERR_INFO_FP_INVALID_OFFSET 0x00000220
+#define C_IXE_ERR_INFO_FP_INVALID (C_IXE_BASE + C_IXE_ERR_INFO_FP_INVALID_OFFSET)
+#define C_IXE_ERR_INFO_FP_INVALID_SIZE 0x00000010
+
+union c_ixe_err_info_fp_invalid {
+ __u64 qw[2];
+ struct {
+ __u64: 2;
+ __u64 addr_56_2 : 55;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64: 48;
+ };
+};
+
+#define C_IXE_ERR_INFO_FP_UNDERFLOW_OFFSET 0x00000230
+#define C_IXE_ERR_INFO_FP_UNDERFLOW (C_IXE_BASE + C_IXE_ERR_INFO_FP_UNDERFLOW_OFFSET)
+#define C_IXE_ERR_INFO_FP_UNDERFLOW_SIZE 0x00000010
+
+union c_ixe_err_info_fp_underflow {
+ __u64 qw[2];
+ struct {
+ __u64: 2;
+ __u64 addr_56_2 : 55;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64: 48;
+ };
+};
+
+#define C_IXE_ERR_INFO_FP_OVERFLOW_OFFSET 0x00000240
+#define C_IXE_ERR_INFO_FP_OVERFLOW (C_IXE_BASE + C_IXE_ERR_INFO_FP_OVERFLOW_OFFSET)
+#define C_IXE_ERR_INFO_FP_OVERFLOW_SIZE 0x00000010
+
+union c_ixe_err_info_fp_overflow {
+ __u64 qw[2];
+ struct {
+ __u64: 2;
+ __u64 addr_56_2 : 55;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64: 48;
+ };
+};
+
+#define C_IXE_ERR_INFO_FP_INEXACT_OFFSET 0x00000250
+#define C_IXE_ERR_INFO_FP_INEXACT (C_IXE_BASE + C_IXE_ERR_INFO_FP_INEXACT_OFFSET)
+#define C_IXE_ERR_INFO_FP_INEXACT_SIZE 0x00000010
+
+union c_ixe_err_info_fp_inexact {
+ __u64 qw[2];
+ struct {
+ __u64: 2;
+ __u64 addr_56_2 : 55;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64: 48;
+ };
+};
+
+#define C_IXE_ERR_INFO_AMO_ALIGN_OFFSET 0x00000260
+#define C_IXE_ERR_INFO_AMO_ALIGN (C_IXE_BASE + C_IXE_ERR_INFO_AMO_ALIGN_OFFSET)
+#define C_IXE_ERR_INFO_AMO_ALIGN_SIZE 0x00000010
+
+union c_ixe_err_info_amo_align {
+ __u64 qw[2];
+ struct {
+ __u64 addr_56_0 : 57;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64: 48;
+ };
+};
+
+#define C_IXE_ERR_INFO_AMO_OP_OFFSET 0x00000270
+#define C_IXE_ERR_INFO_AMO_OP (C_IXE_BASE + C_IXE_ERR_INFO_AMO_OP_OFFSET)
+#define C_IXE_ERR_INFO_AMO_OP_SIZE 0x00000010
+
+union c_ixe_err_info_amo_op {
+ __u64 qw[2];
+ struct {
+ __u64 addr_56_0 : 57;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64 cswap_op : 3;
+ __u64: 1;
+ __u64 atomic_op : 4;
+ __u64: 40;
+ };
+};
+
+#define C_IXE_ERR_INFO_AMO_LENGTH_OFFSET 0x00000280
+#define C_IXE_ERR_INFO_AMO_LENGTH (C_IXE_BASE + C_IXE_ERR_INFO_AMO_LENGTH_OFFSET)
+#define C_IXE_ERR_INFO_AMO_LENGTH_SIZE 0x00000010
+
+union c_ixe_err_info_amo_length {
+ __u64 qw[2];
+ struct {
+ __u64 addr_56_0 : 57;
+ __u64: 7;
+ __u64 acid : 10;
+ __u64: 2;
+ __u64 atomic_type : 4;
+ __u64 cmd_length : 13;
+ __u64: 35;
+ };
+};
+
+#define C_IXE_CFG_DSCP_WRQ_MAP_OFFSET(idx) (0x00000400 + ((idx) * 8))
+#define C_IXE_CFG_DSCP_WRQ_MAP_ENTRIES 64
+#define C_IXE_CFG_DSCP_WRQ_MAP(idx) (C_IXE_BASE + C_IXE_CFG_DSCP_WRQ_MAP_OFFSET(idx))
+#define C_IXE_CFG_DSCP_WRQ_MAP_SIZE 0x00000200
+
+union c_ixe_cfg_dscp_wrq_map {
+ __u64 qw;
+ struct {
+ __u64 mask0 : 22;
+ __u64: 2;
+ __u64 mask1 : 22;
+ __u64: 2;
+ __u64 hash_mask : 2;
+ __u64: 6;
+ __u64 base : 5;
+ __u64: 3;
+ };
+};
+
+#define C_IXE_CFG_DSCP_DSCP_TC_MAP_OFFSET(idx) (0x00000600 + ((idx) * 8))
+#define C_IXE_CFG_DSCP_DSCP_TC_MAP_ENTRIES 16
+#define C_IXE_CFG_DSCP_DSCP_TC_MAP(idx) (C_IXE_BASE + C_IXE_CFG_DSCP_DSCP_TC_MAP_OFFSET(idx))
+#define C_IXE_CFG_DSCP_DSCP_TC_MAP_SIZE 0x00000080
+
+struct c_dscp_map {
+ __u8 dscp : 6;
+ __u8: 2;
+ __u8 tc : 3;
+ __u8: 5;
+};
+
+#define C_IXE_CFG_DSCP_DSCP_TC_MAP_ARRAY_SIZE 4
+union c_ixe_cfg_dscp_dscp_tc_map {
+ __u64 qw;
+ struct c_dscp_map map[C_IXE_CFG_DSCP_DSCP_TC_MAP_ARRAY_SIZE];
+};
+
+#define C_IXE_CFG_TC_FQ_MAP_OFFSET(idx) (0x00000700 + ((idx) * 8))
+#define C_IXE_CFG_TC_FQ_MAP_ENTRIES 8
+#define C_IXE_CFG_TC_FQ_MAP(idx) (C_IXE_BASE + C_IXE_CFG_TC_FQ_MAP_OFFSET(idx))
+#define C_IXE_CFG_TC_FQ_MAP_SIZE 0x00000040
+
+union c_ixe_cfg_tc_fq_map {
+ __u64 qw;
+ struct {
+ __u64 put_resp_mask : 24;
+ __u64: 8;
+ __u64 get_req_mask : 24;
+ __u64: 8;
+ };
+};
+
+#define C_IXE_CFG_MP_TC_FQ_MAP_OFFSET(idx) (0x00000740 + ((idx) * 8))
+#define C_IXE_CFG_MP_TC_FQ_MAP_ENTRIES 8
+#define C_IXE_CFG_MP_TC_FQ_MAP(idx) (C_IXE_BASE + C_IXE_CFG_MP_TC_FQ_MAP_OFFSET(idx))
+#define C_IXE_CFG_MP_TC_FQ_MAP_SIZE 0x00000040
+
+union c_ixe_cfg_mp_tc_fq_map {
+ __u64 qw;
+ struct {
+ __u64 num_fqs_mask : 2;
+ __u64: 14;
+ __u64 base : 5;
+ __u64: 43;
+ };
+};
+
+#define C_IXE_CFG_DISP_CDT_LIM_OFFSET 0x00000788
+#define C_IXE_CFG_DISP_CDT_LIM (C_IXE_BASE + C_IXE_CFG_DISP_CDT_LIM_OFFSET)
+#define C_IXE_CFG_DISP_CDT_LIM_SIZE 0x00000008
+
+union c_ixe_cfg_disp_cdt_lim {
+ __u64 qw;
+ struct {
+ __u64 mst_match_cdts : 6;
+ __u64: 2;
+ __u64 wrq_ff_cdts : 2;
+ __u64: 2;
+ __u64 atu_req_cdts : 3;
+ __u64: 1;
+ __u64 rpu_err_cdts : 3;
+ __u64: 1;
+ __u64 rpu_resp_cdts : 3;
+ __u64: 1;
+ __u64 pct_gcomp_cdts : 6;
+ __u64: 2;
+ __u64 put_resp_cdts : 10;
+ __u64: 6;
+ __u64 put_atu_cdts : 9;
+ __u64 ee_cdts : 5;
+ __u64: 2;
+ };
+};
+
+#define C_IXE_CFG_AMO_OFFLOAD_EN_OFFSET 0x00000800
+#define C_IXE_CFG_AMO_OFFLOAD_EN (C_IXE_BASE + C_IXE_CFG_AMO_OFFLOAD_EN_OFFSET)
+#define C_IXE_CFG_AMO_OFFLOAD_EN_SIZE 0x00000008
+
+union c_ixe_cfg_amo_offload_en {
+ __u64 qw;
+ struct {
+ __u64 op_min : 4;
+ __u64 op_max : 4;
+ __u64 op_sum : 4;
+ __u64 op_lor : 4;
+ __u64 op_land : 4;
+ __u64 op_bor : 4;
+ __u64 op_band : 4;
+ __u64 op_lxor : 4;
+ __u64 op_bxor : 4;
+ __u64 op_swap : 4;
+ __u64 op_cswap_eq : 3;
+ __u64: 1;
+ __u64 op_cswap_ne : 2;
+ __u64 op_cswap_le : 2;
+ __u64 op_cswap_lt : 2;
+ __u64 op_cswap_ge : 2;
+ __u64 op_cswap_gt : 2;
+ __u64 op_axor : 2;
+ __u64: 8;
+ };
+};
+
+#define C_IXE_CFG_AMO_OFFLOAD_CODE_1OP_OFFSET 0x00000808
+#define C_IXE_CFG_AMO_OFFLOAD_CODE_1OP (C_IXE_BASE + C_IXE_CFG_AMO_OFFLOAD_CODE_1OP_OFFSET)
+#define C_IXE_CFG_AMO_OFFLOAD_CODE_1OP_SIZE 0x00000008
+
+union c_ixe_cfg_amo_offload_code_1op {
+ __u64 qw;
+ struct {
+ __u64 op_min_code : 4;
+ __u64 op_max_code : 4;
+ __u64 op_sum_code : 4;
+ __u64 op_lor_code : 4;
+ __u64 op_land_code : 4;
+ __u64 op_bor_code : 4;
+ __u64 op_band_code : 4;
+ __u64 op_lxor_code : 4;
+ __u64 op_bxor_code : 4;
+ __u64 op_swap_code : 4;
+ __u64: 24;
+ };
+};
+
+#define C_IXE_CFG_AMO_OFFLOAD_OFFSET 0x00000818
+#define C_IXE_CFG_AMO_OFFLOAD (C_IXE_BASE + C_IXE_CFG_AMO_OFFLOAD_OFFSET)
+#define C_IXE_CFG_AMO_OFFLOAD_SIZE 0x00000008
+
+union c_ixe_cfg_amo_offload {
+ __u64 qw;
+ struct {
+ __u64 base_amo_req : 1;
+ __u64 force_native_swap : 1;
+ __u64 force_native_fetchadd : 1;
+ __u64: 13;
+ __u64 first_dw_be_32bit : 4;
+ __u64 last_dw_be_32bit : 4;
+ __u64 first_dw_be_64bit : 4;
+ __u64 last_dw_be_64bit : 4;
+ __u64: 32;
+ };
+};
+
+#define C_IXE_CFG_PARSER_OFFSET 0x00000908
+#define C_IXE_CFG_PARSER (C_IXE_BASE + C_IXE_CFG_PARSER_OFFSET)
+#define C_IXE_CFG_PARSER_SIZE 0x00000008
+
+union c_ixe_cfg_parser {
+ __u64 qw;
+ struct {
+ __u64 ipv4_flowlab_type : 8;
+ __u64 ipv6_frag_type : 8;
+ __u64 udp_type : 8;
+ __u64 tcp_type : 8;
+ __u64 eth_segment : 5;
+ __u64: 3;
+ __u64 rpu_wrdisp_cdt : 4;
+ __u64: 20;
+ };
+};
+
+#define C_IXE_CFG_ROCE_OFFSET 0x00000910
+#define C_IXE_CFG_ROCE (C_IXE_BASE + C_IXE_CFG_ROCE_OFFSET)
+#define C_IXE_CFG_ROCE_SIZE 0x00000008
+
+union c_ixe_cfg_roce {
+ __u64 qw;
+ struct {
+ __u64 udp_dstport_bth : 16;
+ __u64 enable_1k : 1;
+ __u64 enable_2k : 1;
+ __u64 enable_4k : 1;
+ __u64: 45;
+ };
+};
+
+#define C_IXE_CFG_HRP_OFFSET 0x00000918
+#define C_IXE_CFG_HRP (C_IXE_BASE + C_IXE_CFG_HRP_OFFSET)
+#define C_IXE_CFG_HRP_SIZE 0x00000008
+
+union c_ixe_cfg_hrp {
+ __u64 qw;
+ struct {
+ __u64 hrp_enable;
+ };
+};
+
+#define C_IXE_CFG_DFA_OFFSET 0x00000920
+#define C_IXE_CFG_DFA (C_IXE_BASE + C_IXE_CFG_DFA_OFFSET)
+#define C_IXE_CFG_DFA_SIZE 0x00000008
+
+union c_ixe_cfg_dfa {
+ __u64 qw;
+ struct {
+ __u64: 12;
+ __u64 dfa_nid : 20;
+ __u64 dfa_chk_en : 8;
+ __u64: 24;
+ };
+};
+
+#define C_IXE_CFG_DISCARD_OFFSET 0x00000928
+#define C_IXE_CFG_DISCARD (C_IXE_BASE + C_IXE_CFG_DISCARD_OFFSET)
+#define C_IXE_CFG_DISCARD_SIZE 0x00000008
+
+union c_ixe_cfg_discard {
+ __u64 qw;
+ struct {
+ __u64 v4_pkt_type_mask : 8;
+ __u64 v4_pkt_type_match : 8;
+ __u64 vs_pkt_type_mask : 8;
+ __u64 vs_pkt_type_match : 8;
+ __u64 armed : 8;
+ __u64: 24;
+ };
+};
+
+#define C_IXE_CFG_IPV6_OPT_ABORT_OFFSET(idx) (0x00000960 + ((idx) * 8))
+#define C_IXE_CFG_IPV6_OPT_ABORT_ENTRIES 4
+#define C_IXE_CFG_IPV6_OPT_ABORT(idx) (C_IXE_BASE + C_IXE_CFG_IPV6_OPT_ABORT_OFFSET(idx))
+#define C_IXE_CFG_IPV6_OPT_ABORT_SIZE 0x00000020
+
+union c_ixe_cfg_ipv6_opt_abort {
+ __u64 qw;
+ struct {
+ __u64 abort;
+ };
+};
+
+#define C_IXE_CFG_BTH_OPCODE_OFFSET(idx) (0x00000980 + ((idx) * 8))
+#define C_IXE_CFG_BTH_OPCODE_ENTRIES 16
+#define C_IXE_CFG_BTH_OPCODE(idx) (C_IXE_BASE + C_IXE_CFG_BTH_OPCODE_OFFSET(idx))
+#define C_IXE_CFG_BTH_OPCODE_SIZE 0x00000080
+
+union c_ixe_cfg_bth_opcode {
+ __u64 qw;
+ struct {
+ __u64 len_0 : 4;
+ __u64 len_1 : 4;
+ __u64 len_2 : 4;
+ __u64 len_3 : 4;
+ __u64 len_4 : 4;
+ __u64 len_5 : 4;
+ __u64 len_6 : 4;
+ __u64 len_7 : 4;
+ __u64 len_8 : 4;
+ __u64 len_9 : 4;
+ __u64 len_10 : 4;
+ __u64 len_11 : 4;
+ __u64 len_12 : 4;
+ __u64 len_13 : 4;
+ __u64 len_14 : 4;
+ __u64 len_15 : 4;
+ };
+};
+
+#define C_IXE_STS_PARSER_DECODE_OFFSET 0x00000c40
+#define C_IXE_STS_PARSER_DECODE (C_IXE_BASE + C_IXE_STS_PARSER_DECODE_OFFSET)
+#define C_IXE_STS_PARSER_DECODE_SIZE 0x00000008
+
+union c_ixe_sts_parser_decode {
+ __u64 qw;
+ struct {
+ __u64 flit_fifo_depth : 6;
+ __u64: 2;
+ __u64 pkt_fifo_depth : 6;
+ __u64: 2;
+ __u64 pct_req_fifo_depth : 6;
+ __u64: 2;
+ __u64 pct_rsp_fifo_depth : 6;
+ __u64: 2;
+ __u64 rmu_fifo_depth : 6;
+ __u64: 26;
+ };
+};
+
+#define C_LPE_CFG_CRNC_OFFSET 0x00000000
+#define C_LPE_CFG_CRNC (C_LPE_BASE + C_LPE_CFG_CRNC_OFFSET)
+#define C_LPE_CFG_CRNC_SIZE 0x00000008
+
+union c_lpe_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_LPE_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_LPE_MSC_SHADOW_ACTION (C_LPE_BASE + C_LPE_MSC_SHADOW_ACTION_OFFSET)
+#define C_LPE_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_LPE_MSC_SHADOW_OFFSET 0x00000040
+#define C_LPE_MSC_SHADOW (C_LPE_BASE + C_LPE_MSC_SHADOW_OFFSET)
+#define C_LPE_MSC_SHADOW_SIZE 0x00000040
+
+union c_lpe_msc_shadow {
+ __u64 qw[8];
+};
+
+#define C_LPE_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_LPE_ERR_ELAPSED_TIME (C_LPE_BASE + C_LPE_ERR_ELAPSED_TIME_OFFSET)
+#define C_LPE_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_lpe_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_LPE_ERR_FLG_OFFSET 0x00000108
+#define C_LPE_ERR_FLG (C_LPE_BASE + C_LPE_ERR_FLG_OFFSET)
+#define C_LPE_ERR_FLG_SIZE 0x00000008
+
+union c_lpe_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64 event_cnt_ovf : 1;
+ __u64 le_oversubscribed : 1;
+ __u64: 1;
+ __u64 illegal_op : 1;
+ __u64 src_error : 1;
+ __u64 delayed : 1;
+ __u64 restricted_unicast : 1;
+ __u64 no_space : 1;
+ __u64 invalid_endpoint : 1;
+ __u64 entry_not_found : 1;
+ __u64 op_violation : 1;
+ __u64 eq_disabled : 1;
+ __u64 pt_disabled_fc : 1;
+ __u64 pt_disabled_dis : 1;
+ __u64 pt_disabled_rst : 1;
+ __u64 illegal_cq_op : 1;
+ __u64 fifo_err : 1;
+ __u64 cq_fifo_overrun : 1;
+ __u64 cdt_cnt_uflow : 1;
+ __u64 mrr_mem_cor : 1;
+ __u64 free_list_mem_cor : 1;
+ __u64 event_ram_cor : 1;
+ __u64 plec_mem_cor : 1;
+ __u64 ptlte_mem_cor : 1;
+ __u64 ixemrq_front_mem_cor : 1;
+ __u64 ixemrq_back_mem_cor : 1;
+ __u64 ixemrq_list_mem_cor : 1;
+ __u64 petcq_list_mem_cor : 1;
+ __u64 list_entry_mem_cor : 1;
+ __u64 cqmrq_front_mem_cor : 1;
+ __u64 cqmrq_back_mem_cor : 1;
+ __u64 cqmrq_list_mem_cor : 1;
+ __u64 rget_ram_mem_cor : 1;
+ __u64 rrq_fifo_cor : 1;
+ __u64 cq_fifo_cor : 1;
+ __u64: 1;
+ __u64 rdy_pleq_cor : 1;
+ __u64 mrr_mem_ucor : 1;
+ __u64 free_list_mem_ucor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 plec_mem_ucor : 1;
+ __u64 ptlte_mem_ucor : 1;
+ __u64 ixemrq_front_mem_ucor : 1;
+ __u64 ixemrq_back_mem_ucor : 1;
+ __u64 ixemrq_list_mem_ucor : 1;
+ __u64 petcq_list_mem_ucor : 1;
+ __u64 list_entry_mem_ucor : 1;
+ __u64 cqmrq_front_mem_ucor : 1;
+ __u64 cqmrq_back_mem_ucor : 1;
+ __u64 cqmrq_list_mem_ucor : 1;
+ __u64 rget_ram_mem_ucor : 1;
+ __u64 rrq_fifo_ucor : 1;
+ __u64 cq_fifo_ucor : 1;
+ __u64: 1;
+ __u64 rdy_pleq_ucor : 1;
+ };
+};
+
+#define C_LPE_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_LPE_ERR_FIRST_FLG (C_LPE_BASE + C_LPE_ERR_FIRST_FLG_OFFSET)
+#define C_LPE_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_LPE_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_LPE_ERR_FIRST_FLG_TS (C_LPE_BASE + C_LPE_ERR_FIRST_FLG_TS_OFFSET)
+#define C_LPE_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_LPE_ERR_CLR_OFFSET 0x00000120
+#define C_LPE_ERR_CLR (C_LPE_BASE + C_LPE_ERR_CLR_OFFSET)
+#define C_LPE_ERR_CLR_SIZE 0x00000008
+#define C_LPE_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_LPE_ERR_IRQA_MSK (C_LPE_BASE + C_LPE_ERR_IRQA_MSK_OFFSET)
+#define C_LPE_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_LPE_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_LPE_ERR_IRQB_MSK (C_LPE_BASE + C_LPE_ERR_IRQB_MSK_OFFSET)
+#define C_LPE_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_LPE_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_LPE_ERR_INFO_MSK (C_LPE_BASE + C_LPE_ERR_INFO_MSK_OFFSET)
+#define C_LPE_ERR_INFO_MSK_SIZE 0x00000008
+#define C_LPE_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_LPE_ERR_INFO_MEM (C_LPE_BASE + C_LPE_ERR_INFO_MEM_OFFSET)
+#define C_LPE_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_lpe_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64 cor_address : 14;
+ __u64 cor_mem_id : 5;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64 ucor_address : 14;
+ __u64 ucor_mem_id : 5;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_LPE_ERR_INFO_CDT_CNT_UFLOW_OFFSET 0x00000188
+#define C_LPE_ERR_INFO_CDT_CNT_UFLOW (C_LPE_BASE + C_LPE_ERR_INFO_CDT_CNT_UFLOW_OFFSET)
+#define C_LPE_ERR_INFO_CDT_CNT_UFLOW_SIZE 0x00000008
+
+union c_lpe_err_info_cdt_cnt_uflow {
+ __u64 qw;
+ struct {
+ __u64 cdt_cnt_id : 4;
+ __u64: 60;
+ };
+};
+
+#define C_LPE_ERR_INFO_NET_HDR_OFFSET 0x00000190
+#define C_LPE_ERR_INFO_NET_HDR (C_LPE_BASE + C_LPE_ERR_INFO_NET_HDR_OFFSET)
+#define C_LPE_ERR_INFO_NET_HDR_SIZE 0x00000008
+
+union c_lpe_err_info_net_hdr {
+ __u64 qw;
+ struct {
+ __u64 initiator : 32;
+ __u64 ptlte_index : 11;
+ __u64 src_error : 1;
+ __u64 tc : 3;
+ __u64: 1;
+ __u64 opcode : 4;
+ __u64 net_hdr_err_id : 4;
+ __u64: 8;
+ };
+};
+
+#define C_LPE_CFG_FQ_TC_MAP_OFFSET 0x00000410
+#define C_LPE_CFG_FQ_TC_MAP (C_LPE_BASE + C_LPE_CFG_FQ_TC_MAP_OFFSET)
+#define C_LPE_CFG_FQ_TC_MAP_SIZE 0x00000008
+
+struct c_lpe_cfg_tc_fqs {
+ __u8 fq_base : 4;
+ __u8 fq_mask : 3;
+ __u8: 1;
+};
+
+union c_lpe_cfg_fq_tc_map {
+ __u64 qw;
+ struct c_lpe_cfg_tc_fqs tc[8];
+};
+
+#define C_LPE_CFG_CDT_LIMITS_OFFSET 0x00000418
+#define C_LPE_CFG_CDT_LIMITS (C_LPE_BASE + C_LPE_CFG_CDT_LIMITS_OFFSET)
+#define C_LPE_CFG_CDT_LIMITS_SIZE 0x00000008
+
+union c_lpe_cfg_cdt_limits {
+ __u64 qw;
+ struct {
+ __u64 ixemrq_wc_cdts : 4;
+ __u64 cqmrq_wc_cdts : 4;
+ __u64 rdy_ple_cdts : 4;
+ __u64 event_cdts : 5;
+ __u64: 3;
+ __u64 ixe_put_cdts : 4;
+ __u64 ixe_get_cdts : 4;
+ __u64 ixe_mst_cdts : 4;
+ __u64 rrq_cdts : 3;
+ __u64: 29;
+ };
+};
+
+#define C_LPE_CFG_GET_CTRL_OFFSET 0x00000428
+#define C_LPE_CFG_GET_CTRL (C_LPE_BASE + C_LPE_CFG_GET_CTRL_OFFSET)
+#define C_LPE_CFG_GET_CTRL_SIZE 0x00000008
+
+union c_lpe_cfg_get_ctrl {
+ __u64 qw;
+ struct {
+ __u64 get_index : 12;
+ __u64: 4;
+ __u64 get_index_ext : 5;
+ __u64 get_pid_shift : 3;
+ __u64 transaction_type : 4;
+ __u64: 3;
+ __u64 get_en : 1;
+ __u64 dfa_nid : 20;
+ __u64: 12;
+ };
+};
+
+#define C_LPE_CFG_INITIATOR_CTRL_OFFSET 0x00000430
+#define C_LPE_CFG_INITIATOR_CTRL (C_LPE_BASE + C_LPE_CFG_INITIATOR_CTRL_OFFSET)
+#define C_LPE_CFG_INITIATOR_CTRL_SIZE 0x00000008
+
+union c_lpe_cfg_initiator_ctrl {
+ __u64 qw;
+ struct {
+ __u64 pid_bits : 4;
+ __u64: 60;
+ };
+};
+
+#define C_LPE_CFG_ETHERNET_THRESHOLD_OFFSET 0x00000438
+#define C_LPE_CFG_ETHERNET_THRESHOLD (C_LPE_BASE + C_LPE_CFG_ETHERNET_THRESHOLD_OFFSET)
+#define C_LPE_CFG_ETHERNET_THRESHOLD_SIZE 0x00000008
+
+union c_lpe_cfg_ethernet_threshold {
+ __u64 qw;
+ struct {
+ __u64 threshold : 14;
+ __u64: 50;
+ };
+};
+
+#define C_LPE_CFG_MIN_FREE_SHFT_OFFSET 0x00000440
+#define C_LPE_CFG_MIN_FREE_SHFT (C_LPE_BASE + C_LPE_CFG_MIN_FREE_SHFT_OFFSET)
+#define C_LPE_CFG_MIN_FREE_SHFT_SIZE 0x00000008
+
+union c_lpe_cfg_min_free_shft {
+ __u64 qw;
+ struct {
+ __u64 min_free_shft : 4;
+ __u64: 60;
+ };
+};
+
+#define C_LPE_CFG_EVENT_CNTS_OFFSET 0x00000448
+#define C_LPE_CFG_EVENT_CNTS (C_LPE_BASE + C_LPE_CFG_EVENT_CNTS_OFFSET)
+#define C_LPE_CFG_EVENT_CNTS_SIZE 0x00000008
+
+union c_lpe_cfg_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 enable : 1;
+ __u64 init : 1;
+ __u64 init_done : 1;
+ __u64: 1;
+ __u64 ovf_cnt : 16;
+ __u64: 44;
+ };
+};
+
+#define C_LPE_CFG_PE_LE_POOLS_OFFSET(idx) (0x00000480 + ((idx) * 8))
+#define C_LPE_CFG_PE_LE_POOLS_ENTRIES 64
+#define C_LPE_CFG_PE_LE_POOLS(idx) (C_LPE_BASE + C_LPE_CFG_PE_LE_POOLS_OFFSET(idx))
+#define C_LPE_CFG_PE_LE_POOLS_SIZE 0x00000200
+
+union c_lpe_cfg_pe_le_pools {
+ __u64 qw;
+ struct {
+ __u64 num_reserved : 15;
+ __u64: 17;
+ __u64 max_alloc : 15;
+ __u64: 17;
+ };
+};
+
+#define C_LPE_STS_PE_LE_ALLOC_OFFSET(idx) (0x00000800 + ((idx) * 8))
+#define C_LPE_STS_PE_LE_ALLOC_ENTRIES 64
+#define C_LPE_STS_PE_LE_ALLOC(idx) (C_LPE_BASE + C_LPE_STS_PE_LE_ALLOC_OFFSET(idx))
+#define C_LPE_STS_PE_LE_ALLOC_SIZE 0x00000200
+
+union c_lpe_sts_pe_le_alloc {
+ __u64 qw;
+ struct {
+ __u64 num_allocated : 15;
+ __u64: 49;
+ };
+};
+
+#define C_LPE_CFG_PE_LE_SHARED_OFFSET(idx) (0x00000a00 + ((idx) * 8))
+#define C_LPE_CFG_PE_LE_SHARED_ENTRIES 4
+#define C_LPE_CFG_PE_LE_SHARED(idx) (C_LPE_BASE + C_LPE_CFG_PE_LE_SHARED_OFFSET(idx))
+#define C_LPE_CFG_PE_LE_SHARED_SIZE 0x00000020
+
+union c_lpe_cfg_pe_le_shared {
+ __u64 qw;
+ struct {
+ __u64 num_shared_allocated : 15;
+ __u64: 1;
+ __u64 num_total_allocated : 15;
+ __u64: 1;
+ __u64 num_shared : 15;
+ __u64: 1;
+ __u64 num_total : 15;
+ __u64: 1;
+ };
+};
+
+#define C_LPE_STS_INIT_DONE_OFFSET 0x00000a28
+#define C_LPE_STS_INIT_DONE (C_LPE_BASE + C_LPE_STS_INIT_DONE_OFFSET)
+#define C_LPE_STS_INIT_DONE_SIZE 0x00000008
+
+union c_lpe_sts_init_done {
+ __u64 qw;
+ struct {
+ __u64 ptlte_init_done : 1;
+ __u64 free_mask_init_done : 4;
+ __u64: 59;
+ };
+};
+
+#define C_LPE_STS_CDTS_IN_USE_OFFSET 0x00000a30
+#define C_LPE_STS_CDTS_IN_USE (C_LPE_BASE + C_LPE_STS_CDTS_IN_USE_OFFSET)
+#define C_LPE_STS_CDTS_IN_USE_SIZE 0x00000008
+
+union c_lpe_sts_cdts_in_use {
+ __u64 qw;
+ struct {
+ __u64 ixemrq_wc_cdts_in_use : 4;
+ __u64 cqmrq_wc_cdts_in_use : 4;
+ __u64 rdy_ple_cdts_in_use : 4;
+ __u64 event_cdts_in_use : 5;
+ __u64: 3;
+ __u64 ixe_put_cdts_in_use : 4;
+ __u64 ixe_get_cdts_in_use : 4;
+ __u64 ixe_mst_cdts_in_use : 4;
+ __u64 pe0_rrq_cdts_in_use : 3;
+ __u64: 1;
+ __u64 pe1_rrq_cdts_in_use : 3;
+ __u64: 1;
+ __u64 pe2_rrq_cdts_in_use : 3;
+ __u64: 1;
+ __u64 pe3_rrq_cdts_in_use : 3;
+ __u64: 17;
+ };
+};
+
+#define C_LPE_MSC_LE_POOL_FREE_OFFSET(idx) (0x00000a40 + ((idx) * 8))
+#define C_LPE_MSC_LE_POOL_FREE_ENTRIES 4
+#define C_LPE_MSC_LE_POOL_FREE(idx) (C_LPE_BASE + C_LPE_MSC_LE_POOL_FREE_OFFSET(idx))
+#define C_LPE_MSC_LE_POOL_FREE_SIZE 0x00000020
+
+union c_lpe_msc_le_pool_free {
+ __u64 qw;
+ struct {
+ __u64 le_pool : 4;
+ __u64 free_en : 1;
+ __u64: 59;
+ };
+};
+
+#define C_LPE_MSC_LOAD_STATS_DOORBELL_OFFSET 0x00000a60
+#define C_LPE_MSC_LOAD_STATS_DOORBELL (C_LPE_BASE + C_LPE_MSC_LOAD_STATS_DOORBELL_OFFSET)
+#define C_LPE_MSC_LOAD_STATS_DOORBELL_SIZE 0x00000008
+
+union c_lpe_msc_load_stats_doorbell {
+ __u64 qw;
+ struct {
+ __u64 doorbell : 1;
+ __u64: 63;
+ };
+};
+
+#define C_LPE_STS_PE_FREE_MASK_OFFSET(idx) (0x00001000 + ((idx) * 8))
+#define C_LPE_STS_PE_FREE_MASK_ENTRIES 1024
+#define C_LPE_STS_PE_FREE_MASK(idx) (C_LPE_BASE + C_LPE_STS_PE_FREE_MASK_OFFSET(idx))
+#define C_LPE_STS_PE_FREE_MASK_SIZE 0x00002000
+
+union c_lpe_sts_pe_free_mask {
+ __u64 qw;
+ struct {
+ __u64 free_mask;
+ };
+};
+
+#define C_LPE_STS_LOAD_STATS_OFFSET(idx) (0x00003000 + ((idx) * 8))
+#define C_LPE_STS_LOAD_STATS_ENTRIES 4
+#define C_LPE_STS_LOAD_STATS(idx) (C_LPE_BASE + C_LPE_STS_LOAD_STATS_OFFSET(idx))
+#define C_LPE_STS_LOAD_STATS_SIZE 0x00000020
+
+union c_lpe_sts_load_stats {
+ __u64 qw;
+ struct {
+ __u64 load : 48;
+ __u64: 12;
+ __u64 max : 4;
+ };
+};
+
+#define C_LPE_CFG_PTL_TABLE_OFFSET(idx) (0x00010000 + ((idx) * 32))
+#define C_LPE_CFG_PTL_TABLE_ENTRIES 2048
+#define C_LPE_CFG_PTL_TABLE(idx) (C_LPE_BASE + C_LPE_CFG_PTL_TABLE_OFFSET(idx))
+#define C_LPE_CFG_PTL_TABLE_SIZE 0x00010000
+
+struct c_lpe_cfg_ptl_table_ptrs {
+ __u32 tail : 14;
+ __u32: 2;
+ __u32 head : 14;
+ __u32 append_disabled : 1; /* not for unexpected */
+ __u32 list_vld : 1;
+};
+
+union c_lpe_cfg_ptl_table {
+ __u64 qw[4];
+ struct {
+ __u64 clr_remote_offset : 1;
+ __u64 en_flowctrl : 1;
+ __u64 use_long_event : 1;
+ __u64 lossless : 1;
+ __u64 en_event_match : 1;
+ __u64: 11;
+ __u64 eq_handle : 11;
+ __u64: 5;
+ __u64 eq_handle_no_rget : 11;
+ __u64: 5;
+ __u64 le_pool : 4;
+ __u64 en_restricted_unicast_lm : 1;
+ __u64 use_logical : 1;
+ __u64 is_matching : 1;
+ __u64 do_space_check : 1;
+ __u64 cntr_pool : 2;
+ __u64 pe_num : 2;
+ __u64 en_align_lm : 1;
+ __u64 en_match_on_vni : 1; /* Cassini 2 only */
+ __u64: 1;
+ __u64 en_sw_hw_st_chng : 1;
+ struct c_lpe_cfg_ptl_table_ptrs l[4];
+ __u64 ptl_state : 3;
+ __u64: 29;
+ __u64 drop_count : 24;
+ __u64 signal_invalid : 1;
+ __u64 signal_underflow : 1;
+ __u64 signal_overflow : 1;
+ __u64 signal_inexact : 1;
+ __u64: 4;
+ };
+};
+
+#define C_LPE_DBG_MRR_OFFSET(idx) (0x00040000 + ((idx) * 64))
+#define C_LPE_DBG_MRR_ENTRIES 2560
+#define C_LPE_DBG_MRR(idx) (C_LPE_BASE + C_LPE_DBG_MRR_OFFSET(idx))
+#define C_LPE_DBG_MRR_SIZE 0x00028000
+
+union c_lpe_dbg_mrr {
+ __u64 qw[7];
+};
+
+#define C_LPE_DBG_RGET_RAM_OFFSET(idx) (0x00068000 + ((idx) * 64))
+#define C_LPE_DBG_RGET_RAM_ENTRIES 256
+#define C_LPE_DBG_RGET_RAM(idx) (C_LPE_BASE + C_LPE_DBG_RGET_RAM_OFFSET(idx))
+#define C_LPE_DBG_RGET_RAM_SIZE 0x00004000
+
+union c_lpe_dbg_rget_ram {
+ __u64 qw[7];
+ struct {
+ __u64 vni : 16;
+ __u64 buffer_id : 16;
+ __u64 eq : 11;
+ __u64 ct : 11;
+ __u64 ac : 10;
+ __u64 ptlte_index : 11;
+ __u64: 1;
+ __u64 sfa_nid : 20;
+ __u64 eager_len : 20;
+ __u64: 4;
+ __u64 rendezvous_id : 8;
+ __u64 hdr_data;
+ __u64 addr : 57;
+ __u64: 7;
+ __u64 remote_offset : 56;
+ __u64 event_ct_reply : 1;
+ __u64 event_ct_bytes : 1;
+ __u64 dscp : 6;
+ __u64 request_len : 32;
+ __u64: 23;
+ __u64 initiator_pid : 9;
+ __u64 cmdq_id : 9;
+ __u64: 39;
+ __u64 match_bits_up : 16;
+ };
+};
+
+#define C_LPE_STS_EVENT_CNTS_OFFSET(idx) (0x00070000 + ((idx) * 8))
+#ifndef C_LPE_STS_EVENT_CNTS_ENTRIES
+#define C_LPE_STS_EVENT_CNTS_ENTRIES 512
+#endif
+#define C_LPE_STS_EVENT_CNTS(idx) (C_LPE_BASE + C_LPE_STS_EVENT_CNTS_OFFSET(idx))
+#define C_LPE_STS_EVENT_CNTS_SIZE 0x00001000
+
+union c_lpe_sts_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 cnt : 56;
+ __u64: 8;
+ };
+};
+
+#define C_LPE_STS_LIST_ENTRIES_OFFSET(idx) (0x00400000 + ((idx) * 64))
+#define C_LPE_STS_LIST_ENTRIES_ENTRIES 65536
+#define C_LPE_STS_LIST_ENTRIES(idx) (C_LPE_BASE + C_LPE_STS_LIST_ENTRIES_OFFSET(idx))
+#define C_LPE_STS_LIST_ENTRIES_SIZE 0x00400000
+
+union c_lpe_sts_list_entries {
+ __u64 qw[6];
+};
+
+#define C_MB_CFG_CRNC_OFFSET 0x00000000
+#define C_MB_CFG_CRNC (C_MB_BASE + C_MB_CFG_CRNC_OFFSET)
+#define C_MB_CFG_CRNC_SIZE 0x00000008
+
+union c_mb_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_MB_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_MB_CFG_RT_OFFSET (C_MB_BASE + C_MB_CFG_RT_OFFSET_OFFSET)
+#define C_MB_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_mb_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_MB_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_MB_MSC_SHADOW_ACTION (C_MB_BASE + C_MB_MSC_SHADOW_ACTION_OFFSET)
+#define C_MB_MSC_SHADOW_ACTION_SIZE 0x00000008
+
+union c_any_msc_shadow_action {
+ __u64 qw;
+ struct {
+ __u64 addr_offset : 23;
+ __u64: 8;
+ __u64 write : 1;
+ __u64: 32;
+ };
+};
+
+#define C_MB_MSC_SHADOW_OFFSET 0x00000040
+#define C_MB_MSC_SHADOW (C_MB_BASE + C_MB_MSC_SHADOW_OFFSET)
+#define C_MB_MSC_SHADOW_SIZE 0x00000028
+
+union c_mb_msc_shadow {
+ __u64 qw[5];
+};
+
+#define C_MB_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_MB_ERR_ELAPSED_TIME (C_MB_BASE + C_MB_ERR_ELAPSED_TIME_OFFSET)
+#define C_MB_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_mb_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_MB_ERR_FLG_OFFSET 0x00000108
+#define C_MB_ERR_FLG (C_MB_BASE + C_MB_ERR_FLG_OFFSET)
+#define C_MB_ERR_FLG_SIZE 0x00000008
+
+union c_mb_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 7;
+ __u64 crmc_ring_sync_error : 1;
+ __u64 crmc_ring_ecc_sbe : 1;
+ __u64 crmc_ring_ecc_mbe : 1;
+ __u64 crmc_ring_cmd_unknown : 1;
+ __u64 crmc_wr_error : 1;
+ __u64 crmc_wr_addr_invalid : 1;
+ __u64 crmc_wr_cmd_invalid : 1;
+ __u64 crmc_wr_be_invalid : 1;
+ __u64 crmc_wr_cor_error : 1;
+ __u64 crmc_wr_uncor_error : 1;
+ __u64 crmc_wr_burst_error : 1;
+ __u64 crmc_wr_mcast_nack : 1;
+ __u64 crmc_wr_rsvd_error : 1;
+ __u64 crmc_wr_wrapped : 1;
+ __u64 crmc_wr_timeout : 1;
+ __u64 crmc_wr_axi_req_error : 1;
+ __u64 crmc_wr_axi_ring_error : 1;
+ __u64 crmc_wr_axi_wstrb_error : 1;
+ __u64 crmc_wr_axi_parity_error : 1;
+ __u64 crmc_rd_error : 1;
+ __u64 crmc_rd_addr_invalid : 1;
+ __u64 crmc_rd_cmd_invalid : 1;
+ __u64 crmc_rd_be_invalid : 1;
+ __u64 crmc_rd_cor_error : 1;
+ __u64 crmc_rd_uncor_error : 1;
+ __u64 crmc_rd_burst_error : 1;
+ __u64 crmc_rd_mcast_nack : 1;
+ __u64 crmc_rd_rsvd_error : 1;
+ __u64 crmc_rd_wrapped : 1;
+ __u64 crmc_rd_timeout : 1;
+ __u64 crmc_rd_axi_req_error : 1;
+ __u64 crmc_rd_axi_ring_error : 1;
+ __u64 cmc_wr_error : 4;
+ __u64 cmc_rd_error : 4;
+ __u64 event_cnt_ovf : 1;
+ __u64 event_ram_cor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 flash_cache0_cor : 1;
+ __u64 flash_cache0_ucor : 1;
+ __u64 flash_cache1_cor : 1;
+ __u64 flash_cache1_ucor : 1;
+ __u64 spi_ecc_error : 1;
+ };
+};
+
+#define C_MB_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_MB_ERR_FIRST_FLG (C_MB_BASE + C_MB_ERR_FIRST_FLG_OFFSET)
+#define C_MB_ERR_FIRST_FLG_SIZE 0x00000008
+
+union c_any_err_first_flg {
+ __u64 qw;
+ struct {
+ __u64 err_first_flg;
+ };
+};
+
+#define C_MB_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_MB_ERR_FIRST_FLG_TS (C_MB_BASE + C_MB_ERR_FIRST_FLG_TS_OFFSET)
+#define C_MB_ERR_FIRST_FLG_TS_SIZE 0x00000008
+
+union c_any_err_first_flg_ts {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_MB_ERR_CLR_OFFSET 0x00000120
+#define C_MB_ERR_CLR (C_MB_BASE + C_MB_ERR_CLR_OFFSET)
+#define C_MB_ERR_CLR_SIZE 0x00000008
+
+union c_any_err_clr {
+ __u64 qw;
+ struct {
+ __u64 err_clr;
+ };
+};
+
+#define C_MB_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_MB_ERR_IRQA_MSK (C_MB_BASE + C_MB_ERR_IRQA_MSK_OFFSET)
+#define C_MB_ERR_IRQA_MSK_SIZE 0x00000008
+
+union c_any_err_irqa_msk {
+ __u64 qw;
+ struct {
+ __u64 err_irq_msk;
+ };
+};
+
+#define C_MB_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_MB_ERR_IRQB_MSK (C_MB_BASE + C_MB_ERR_IRQB_MSK_OFFSET)
+#define C_MB_ERR_IRQB_MSK_SIZE 0x00000008
+
+union c_any_err_irqb_msk {
+ __u64 qw;
+ struct {
+ __u64 err_irq_msk;
+ };
+};
+
+#define C_MB_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_MB_ERR_INFO_MSK (C_MB_BASE + C_MB_ERR_INFO_MSK_OFFSET)
+#define C_MB_ERR_INFO_MSK_SIZE 0x00000008
+
+union c_any_err_info_msk {
+ __u64 qw;
+ struct {
+ __u64 err_info_msk;
+ };
+};
+
+#define C_MB_ERR_INFO_MEM_OFFSET 0x00000150
+#define C_MB_ERR_INFO_MEM (C_MB_BASE + C_MB_ERR_INFO_MEM_OFFSET)
+#define C_MB_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_mb_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 9;
+ __u64: 3;
+ __u64 cor_address : 13;
+ __u64: 3;
+ __u64 cor_mem_id : 2;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 9;
+ __u64: 3;
+ __u64 ucor_address : 13;
+ __u64: 3;
+ __u64 ucor_mem_id : 2;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_MB_ERR_INFO_CRMC_OFFSET 0x00000158
+#define C_MB_ERR_INFO_CRMC (C_MB_BASE + C_MB_ERR_INFO_CRMC_OFFSET)
+#define C_MB_ERR_INFO_CRMC_SIZE 0x00000008
+
+union c_mb_err_info_crmc {
+ __u64 qw;
+ struct {
+ __u64 ring_id : 10;
+ __u64: 2;
+ __u64 ring : 3;
+ __u64: 1;
+ __u64 crnc_ring_sts : 4;
+ __u64 crmc_ring_sts : 1;
+ __u64: 43;
+ };
+};
+
+#define C_MB_ERR_INFO_CMC_WR_OFFSET 0x00000160
+#define C_MB_ERR_INFO_CMC_WR (C_MB_BASE + C_MB_ERR_INFO_CMC_WR_OFFSET)
+#define C_MB_ERR_INFO_CMC_WR_SIZE 0x00000018
+
+union c_mb_err_info_cmc_wr {
+ __u64 qw[3];
+ struct {
+ __u64 mst_awaddr : 32;
+ __u64 mst_awuser : 32;
+ __u64 mst_wdata;
+ __u64 mst_wderr : 8;
+ __u64 mst_wstrb : 8;
+ __u64 mst_awid : 4;
+ __u64 mst_awregion : 4;
+ __u64 mst_awlen : 8;
+ __u64 mst_awsize : 3;
+ __u64 mst_awburst : 2;
+ __u64 mst_awmid : 4;
+ __u64 mst_awlock : 1;
+ __u64 mst_awqos : 4;
+ __u64 mst_awprot : 3;
+ __u64 mst_awcache : 4;
+ __u64 slv_bresp : 2;
+ __u64 slv_bid : 4;
+ __u64 cmc_port : 2;
+ __u64 ring : 3;
+ };
+};
+
+#define C_MB_ERR_INFO_CMC_RD_OFFSET 0x00000180
+#define C_MB_ERR_INFO_CMC_RD (C_MB_BASE + C_MB_ERR_INFO_CMC_RD_OFFSET)
+#define C_MB_ERR_INFO_CMC_RD_SIZE 0x00000018
+
+union c_mb_err_info_cmc_rd {
+ __u64 qw[3];
+ struct {
+ __u64 mst_araddr : 32;
+ __u64 mst_aruser : 32;
+ __u64 slv_rdata;
+ __u64 slv_rderr : 8;
+ __u64 slv_ruser : 8;
+ __u64 mst_arid : 4;
+ __u64 mst_arregion : 4;
+ __u64 mst_arlen : 8;
+ __u64 mst_arsize : 3;
+ __u64 mst_arburst : 2;
+ __u64 mst_armid : 4;
+ __u64 mst_arlock : 1;
+ __u64 mst_arqos : 4;
+ __u64 mst_arprot : 3;
+ __u64 mst_arcache : 4;
+ __u64 slv_rresp : 2;
+ __u64 slv_rid : 4;
+ __u64 cmc_port : 2;
+ __u64 ring : 3;
+ };
+};
+
+#define C_MB_ERR_INFO_SPI_OFFSET 0x000001a0
+#define C_MB_ERR_INFO_SPI (C_MB_BASE + C_MB_ERR_INFO_SPI_OFFSET)
+#define C_MB_ERR_INFO_SPI_SIZE 0x00000008
+
+union c_mb_err_info_spi {
+ __u64 qw;
+ struct {
+ __u64: 3;
+ __u64 address : 29;
+ __u64 status : 8;
+ __u64: 24;
+ };
+};
+
+#define C_MB_EXT_ERR_FLG_OFFSET 0x00000208
+#define C_MB_EXT_ERR_FLG (C_MB_BASE + C_MB_EXT_ERR_FLG_OFFSET)
+#define C_MB_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_mb_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 jai_axi_cadr_unexpected_cmd : 1;
+ __u64 jai_axi_cadr_unknown_cmd : 1;
+ __u64 jai_axi_wr_decerr : 1;
+ __u64 jai_axi_wr_slverr : 1;
+ __u64 jai_axi_rd_decerr : 1;
+ __u64 jai_axi_rd_slverr : 1;
+ __u64 jai_axi_rd_parity_error : 1;
+ __u64 flm_csr_init_p1_spi_err : 1;
+ __u64 flm_csr_init_p2_spi_err : 1;
+ __u64 flm_csr_init_p1_fail : 1;
+ __u64 flm_csr_init_p2_fail : 1;
+ __u64 flm_csr_init_p1_abort : 1;
+ __u64 flm_csr_init_p2_abort : 1;
+ __u64 flm_csr_init_p1_len_err : 1;
+ __u64 flm_csr_init_p2_len_err : 1;
+ __u64 flm_csr_init_p1_cont_err : 1;
+ __u64 flm_csr_init_p2_cont_err : 1;
+ __u64 flm_csr_init_p1_axi_decerr : 1;
+ __u64 flm_csr_init_p2_axi_decerr : 1;
+ __u64 flm_csr_init_p1_axi_slverr : 1;
+ __u64 flm_csr_init_p2_axi_slverr : 1;
+ __u64 flm_serdes_rom_load_spi_err : 1;
+ __u64 flm_serdes_rom_load_error : 1;
+ __u64 flm_serdes_rom_load_abort : 1;
+ __u64 flm_serdes_rom_load_fail : 1;
+ __u64 flm_hg_spi_error : 1;
+ __u64 flm_hg_addr_error : 1;
+ __u64 flm_sbus_wr_error : 1;
+ __u64 flm_sbus_rd_error : 1;
+ __u64: 34;
+ };
+};
+
+#define C_MB_EXT_ERR_FIRST_FLG_OFFSET 0x00000210
+#define C_MB_EXT_ERR_FIRST_FLG (C_MB_BASE + C_MB_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_MB_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_MB_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000218
+#define C_MB_EXT_ERR_FIRST_FLG_TS (C_MB_BASE + C_MB_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_MB_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_MB_EXT_ERR_CLR_OFFSET 0x00000220
+#define C_MB_EXT_ERR_CLR (C_MB_BASE + C_MB_EXT_ERR_CLR_OFFSET)
+#define C_MB_EXT_ERR_CLR_SIZE 0x00000008
+#define C_MB_EXT_ERR_IRQA_MSK_OFFSET 0x00000228
+#define C_MB_EXT_ERR_IRQA_MSK (C_MB_BASE + C_MB_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_MB_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_MB_EXT_ERR_IRQB_MSK_OFFSET 0x00000230
+#define C_MB_EXT_ERR_IRQB_MSK (C_MB_BASE + C_MB_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_MB_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_MB_EXT_ERR_INFO_MSK_OFFSET 0x00000240
+#define C_MB_EXT_ERR_INFO_MSK (C_MB_BASE + C_MB_EXT_ERR_INFO_MSK_OFFSET)
+#define C_MB_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_MB_CFG_MISC_OFFSET 0x00004000
+#define C_MB_CFG_MISC (C_MB_BASE + C_MB_CFG_MISC_OFFSET)
+#define C_MB_CFG_MISC_SIZE 0x00000008
+
+union c_mb_cfg_misc {
+ __u64 qw;
+ struct {
+ __u64 nic_warm_rst0 : 1;
+ __u64 nic_warm_rst1 : 1;
+ __u64 nic_warm_rst2 : 1;
+ __u64 nic_warm_rst3 : 1;
+ __u64 nic_warm_rst4 : 1;
+ __u64 nic_warm_rst5 : 1;
+ __u64 nic_warm_rst6 : 1;
+ __u64 nic_warm_rst7 : 1;
+ __u64 nic_warm_rst8 : 1;
+ __u64 nic_warm_rst9 : 1;
+ __u64: 6;
+ __u64 nic_warm_rst_mask : 10;
+ __u64 mb_warm_rst_mask : 1;
+ __u64 pi_warm_rst_mask : 1;
+ __u64: 3;
+ __u64 halt_clock_en : 1;
+ __u64 cold_rst_enable : 16;
+ __u64 cold_rst : 1;
+ __u64 mb_cold_rst_enable : 1;
+ __u64 cold_rst_on_perst : 1;
+ __u64 cold_rst_on_hot_rst : 1;
+ __u64 skip_rom_load_on_forced_cold_rst : 1;
+ __u64 ignore_link_req_rst : 1;
+ __u64 ignore_gpout_all_done : 1;
+ __u64 ignore_gpout_efuse_done : 1;
+ __u64 ignore_gpout_temp_pushed : 1;
+ __u64 ignore_ancil_osc_clk_rdy : 1;
+ __u64: 6;
+ };
+};
+
+#define C_MB_STS_REV_OFFSET 0x00004008
+#define C_MB_STS_REV (C_MB_BASE + C_MB_STS_REV_OFFSET)
+#define C_MB_STS_REV_SIZE 0x00000008
+
+union c_mb_sts_rev {
+ __u64 qw;
+ struct {
+ __u64 rev : 16;
+ __u64 device_id : 16;
+ __u64 vendor_id : 16;
+ __u64 proto : 12;
+ __u64 platform : 4;
+ };
+};
+
+#define C_MB_CFG_EVENT_CNTS_OFFSET 0x00004010
+#define C_MB_CFG_EVENT_CNTS (C_MB_BASE + C_MB_CFG_EVENT_CNTS_OFFSET)
+#define C_MB_CFG_EVENT_CNTS_SIZE 0x00000008
+
+union c_mb_cfg_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 enable : 1;
+ __u64 init : 1;
+ __u64 init_done : 1;
+ __u64 warm_rst_disable : 1;
+ __u64 ovf_cnt : 16;
+ __u64: 44;
+ };
+};
+
+#define C_MB_DBG_SCRATCH_OFFSET(idx) (0x00004020 + ((idx) * 8))
+#define C_MB_DBG_SCRATCH_ENTRIES 8
+#define C_MB_DBG_SCRATCH(idx) (C_MB_BASE + C_MB_DBG_SCRATCH_OFFSET(idx))
+#define C_MB_DBG_SCRATCH_SIZE 0x00000040
+
+union c_mb_dbg_scratch {
+ __u64 qw;
+ struct {
+ __u64 scratch;
+ };
+};
+
+#define C_MB_CFG_CRMC_OFFSET(idx) (0x0000d000 + ((idx) * 8))
+#define C_MB_CFG_CRMC_ENTRIES 3
+#define C_MB_CFG_CRMC(idx) (C_MB_BASE + C_MB_CFG_CRMC_OFFSET(idx))
+#define C_MB_CFG_CRMC_SIZE 0x00000018
+
+union c_mb_cfg_crmc {
+ __u64 qw;
+ struct {
+ __u64 ring_timeout : 8;
+ __u64 rready_timeout_disable : 1;
+ __u64 bready_timeout_disable : 1;
+ __u64 rd_addr_invalid_decerr_disable : 1;
+ __u64: 53;
+ };
+};
+
+#define C_MB_DBG_CFG_SBUS_MASTER_OFFSET 0x0000e000
+#define C_MB_DBG_CFG_SBUS_MASTER (C_MB_BASE + C_MB_DBG_CFG_SBUS_MASTER_OFFSET)
+#define C_MB_DBG_CFG_SBUS_MASTER_SIZE 0x00000008
+
+union c_mb_dbg_cfg_sbus_master {
+ __u64 qw;
+ struct {
+ __u64 execute : 1;
+ __u64 rcv_data_valid_sel : 1;
+ __u64 mode : 1;
+ __u64 stop_on_overrun : 1;
+ __u64 stop_on_write_error : 1;
+ __u64: 3;
+ __u64 command : 8;
+ __u64 receiver_address : 8;
+ __u64 data_address : 8;
+ __u64 data : 32;
+ };
+};
+
+#define C_MB_DBG_STS_SBUS_MASTER_OFFSET 0x0000e010
+#define C_MB_DBG_STS_SBUS_MASTER (C_MB_BASE + C_MB_DBG_STS_SBUS_MASTER_OFFSET)
+#define C_MB_DBG_STS_SBUS_MASTER_SIZE 0x00000008
+
+union c_mb_dbg_sts_sbus_master {
+ __u64 qw;
+ struct {
+ __u64 done : 1;
+ __u64 rcv_data_valid : 1;
+ __u64 overrun : 1;
+ __u64 write_error : 1;
+ __u64 result_code : 3;
+ __u64: 1;
+ __u64 command : 8;
+ __u64 receiver_address : 8;
+ __u64 data_address : 8;
+ __u64 data : 32;
+ };
+};
+
+#define C_MB_CFG_RTC_OFFSET 0x0000f000
+#define C_MB_CFG_RTC (C_MB_BASE + C_MB_CFG_RTC_OFFSET)
+#define C_MB_CFG_RTC_SIZE 0x00000008
+
+union c_mb_cfg_rtc {
+ __u64 qw;
+ struct {
+ __u64 rtc_enable : 1;
+ __u64 rtc_load : 1;
+ __u64 rtc_update : 1;
+ __u64: 1;
+ __u64 rtc_etc_sec_change_mask : 3;
+ __u64: 9;
+ __u64 etc_enable : 1;
+ __u64 etc_load : 1;
+ __u64: 2;
+ __u64 etc_ns_lock_resolution : 3;
+ __u64: 41;
+ };
+};
+
+#define C_MB_STS_RTC_OFFSET 0x0000f008
+#define C_MB_STS_RTC (C_MB_BASE + C_MB_STS_RTC_OFFSET)
+#define C_MB_STS_RTC_SIZE 0x00000008
+
+union c_mb_sts_rtc {
+ __u64 qw;
+ struct {
+ __u64 rtc_minus_etc_sec : 48;
+ __u64 rtc_lt_etc_sec : 1;
+ __u64 rtc_minus_etc_sec_change : 1;
+ __u64 etc_ns_locked : 1;
+ __u64 etc_ns_lost_lock : 1;
+ __u64: 12;
+ };
+};
+
+#define C_MB_CFG_RTC_TIME_OFFSET 0x0000f010
+#define C_MB_CFG_RTC_TIME (C_MB_BASE + C_MB_CFG_RTC_TIME_OFFSET)
+#define C_MB_CFG_RTC_TIME_SIZE 0x00000010
+
+union c_mb_cfg_rtc_time {
+ __u64 qw[2];
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds_33_0 : 34;
+ __u64 seconds_47_34 : 14;
+ __u64: 50;
+ };
+};
+
+#define C_MB_CFG_RTC_INC_OFFSET 0x0000f020
+#define C_MB_CFG_RTC_INC (C_MB_BASE + C_MB_CFG_RTC_INC_OFFSET)
+#define C_MB_CFG_RTC_INC_SIZE 0x00000008
+
+union c_mb_cfg_rtc_inc {
+ __u64 qw;
+ struct {
+ __u64 fractional_ns : 32;
+ __u64 nanoseconds : 10;
+ __u64: 22;
+ };
+};
+
+#define C_MB_STS_RTC_CURRENT_TIME_OFFSET 0x0000f030
+#define C_MB_STS_RTC_CURRENT_TIME (C_MB_BASE + C_MB_STS_RTC_CURRENT_TIME_OFFSET)
+#define C_MB_STS_RTC_CURRENT_TIME_SIZE 0x00000010
+
+union c_mb_sts_rtc_current_time {
+ __u64 qw[2];
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds_33_0 : 34;
+ __u64 seconds_47_34 : 14;
+ __u64: 50;
+ };
+};
+
+#define C_MB_STS_RTC_LAST_TIME_OFFSET 0x0000f040
+#define C_MB_STS_RTC_LAST_TIME (C_MB_BASE + C_MB_STS_RTC_LAST_TIME_OFFSET)
+#define C_MB_STS_RTC_LAST_TIME_SIZE 0x00000010
+
+union c_mb_sts_rtc_last_time {
+ __u64 qw[2];
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds_33_0 : 34;
+ __u64 seconds_47_34 : 14;
+ __u64: 50;
+ };
+};
+
+#define C_MB_STS_RTC_ETC_CUR_TIME_OFFSET 0x0000f050
+#define C_MB_STS_RTC_ETC_CUR_TIME (C_MB_BASE + C_MB_STS_RTC_ETC_CUR_TIME_OFFSET)
+#define C_MB_STS_RTC_ETC_CUR_TIME_SIZE 0x00000008
+
+union c_mb_sts_rtc_etc_cur_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_MB_STS_RTC_ETC_LAST_TIME_OFFSET 0x0000f058
+#define C_MB_STS_RTC_ETC_LAST_TIME (C_MB_BASE + C_MB_STS_RTC_ETC_LAST_TIME_OFFSET)
+#define C_MB_STS_RTC_ETC_LAST_TIME_SIZE 0x00000008
+
+union c_mb_sts_rtc_etc_last_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_MB_STS_EVENT_CNTS_OFFSET(idx) (0x00020000 + ((idx) * 8))
+#ifndef C_MB_STS_EVENT_CNTS_ENTRIES
+#define C_MB_STS_EVENT_CNTS_ENTRIES 256
+#endif
+#define C_MB_STS_EVENT_CNTS(idx) (C_MB_BASE + C_MB_STS_EVENT_CNTS_OFFSET(idx))
+#define C_MB_STS_EVENT_CNTS_SIZE 0x00000800
+
+union c_mb_sts_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 cnt : 56;
+ __u64: 8;
+ };
+};
+
+#define C_MST_CFG_CRNC_OFFSET 0x00000000
+#define C_MST_CFG_CRNC (C_MST_BASE + C_MST_CFG_CRNC_OFFSET)
+#define C_MST_CFG_CRNC_SIZE 0x00000008
+
+union c_mst_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_MST_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_MST_CFG_RT_OFFSET (C_MST_BASE + C_MST_CFG_RT_OFFSET_OFFSET)
+#define C_MST_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_mst_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_MST_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_MST_MSC_SHADOW_ACTION (C_MST_BASE + C_MST_MSC_SHADOW_ACTION_OFFSET)
+#define C_MST_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_MST_MSC_SHADOW_OFFSET 0x00000040
+#define C_MST_MSC_SHADOW (C_MST_BASE + C_MST_MSC_SHADOW_OFFSET)
+#define C_MST_MSC_SHADOW_SIZE 0x00000040
+
+union c_mst_msc_shadow {
+ __u64 qw[8];
+};
+
+#define C_MST_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_MST_ERR_ELAPSED_TIME (C_MST_BASE + C_MST_ERR_ELAPSED_TIME_OFFSET)
+#define C_MST_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_mst_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_MST_ERR_FLG_OFFSET 0x00000108
+#define C_MST_ERR_FLG (C_MST_BASE + C_MST_ERR_FLG_OFFSET)
+#define C_MST_ERR_FLG_SIZE 0x00000008
+
+union c_mst_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 23;
+ __u64 lnk_list_ptrs_cor : 1;
+ __u64 lnk_list_ptrs_ucor : 1;
+ __u64: 2;
+ __u64 req_fifo_unrun : 1;
+ __u64 req_fifo_ovrun : 1;
+ __u64 req_fifo_crdt_unflw : 1;
+ __u64: 5;
+ __u64 match_crdt_unflw_get : 1;
+ __u64 match_crdt_unflw_put : 1;
+ __u64 evnt_fifo_cor : 1;
+ __u64 evnt_fifo_ucor : 1;
+ __u64 evnt_fifo_unrun : 1;
+ __u64 evnt_fifo_ovrun : 1;
+ __u64 ee_crdt_unflw : 1;
+ __u64 req_fifo_cor : 1;
+ __u64 req_fifo_ucor : 1;
+ __u64 mst_table_cor : 1;
+ __u64 mst_table_ucor : 1;
+ __u64 ll_data_ram_cor : 1;
+ __u64 ll_data_ram_ucor : 1;
+ __u64: 7;
+ };
+};
+
+#define C_MST_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_MST_ERR_FIRST_FLG (C_MST_BASE + C_MST_ERR_FIRST_FLG_OFFSET)
+#define C_MST_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_MST_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_MST_ERR_FIRST_FLG_TS (C_MST_BASE + C_MST_ERR_FIRST_FLG_TS_OFFSET)
+#define C_MST_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_MST_ERR_CLR_OFFSET 0x00000120
+#define C_MST_ERR_CLR (C_MST_BASE + C_MST_ERR_CLR_OFFSET)
+#define C_MST_ERR_CLR_SIZE 0x00000008
+#define C_MST_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_MST_ERR_IRQA_MSK (C_MST_BASE + C_MST_ERR_IRQA_MSK_OFFSET)
+#define C_MST_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_MST_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_MST_ERR_IRQB_MSK (C_MST_BASE + C_MST_ERR_IRQB_MSK_OFFSET)
+#define C_MST_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_MST_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_MST_ERR_INFO_MSK (C_MST_BASE + C_MST_ERR_INFO_MSK_OFFSET)
+#define C_MST_ERR_INFO_MSK_SIZE 0x00000008
+#define C_MST_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_MST_ERR_INFO_MEM (C_MST_BASE + C_MST_ERR_INFO_MEM_OFFSET)
+#define C_MST_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_mst_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 12;
+ __u64 cor_mem_id : 6;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 12;
+ __u64 ucor_mem_id : 6;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_MST_CFG_RC_UPDATE_OFFSET 0x00000400
+#define C_MST_CFG_RC_UPDATE (C_MST_BASE + C_MST_CFG_RC_UPDATE_OFFSET)
+#define C_MST_CFG_RC_UPDATE_SIZE 0x00000008
+
+union c_mst_cfg_rc_update {
+ __u64 qw;
+ struct {
+ __u64 return_code : 6;
+ __u64: 2;
+ __u64 mst_idx : 11;
+ __u64: 5;
+ __u64 buffer_idx : 16;
+ __u64 portal_idx : 11;
+ __u64: 1;
+ __u64 ptl_list : 2;
+ __u64: 2;
+ __u64 ptl_vld : 1;
+ __u64 portal_vld : 1;
+ __u64 buffer_vld : 1;
+ __u64: 5;
+ };
+};
+
+#define C_MST_STS_RC_STS_OFFSET 0x00010000
+#define C_MST_STS_RC_STS (C_MST_BASE + C_MST_STS_RC_STS_OFFSET)
+#define C_MST_STS_RC_STS_SIZE 0x00000008
+
+union c_mst_sts_rc_sts {
+ __u64 qw;
+ struct {
+ __u64 done : 1;
+ __u64 match : 1;
+ __u64: 62;
+ };
+};
+
+#define C_MST_STS_NUM_REQ_OFFSET 0x00010018
+#define C_MST_STS_NUM_REQ (C_MST_BASE + C_MST_STS_NUM_REQ_OFFSET)
+#define C_MST_STS_NUM_REQ_SIZE 0x00000008
+
+union c_mst_sts_num_req {
+ __u64 qw;
+ struct {
+ __u64 cnt : 12;
+ __u64: 52;
+ };
+};
+
+#define C_MST_DBG_MST_TABLE_OFFSET(idx) (0x00020000 + ((idx) * 64))
+#define C_MST_DBG_MST_TABLE_ENTRIES 2048
+#define C_MST_DBG_MST_TABLE(idx) (C_MST_BASE + C_MST_DBG_MST_TABLE_OFFSET(idx))
+#define C_MST_DBG_MST_TABLE_SIZE 0x00020000
+
+union c_mst_dbg_mst_table {
+ __u64 qw[8];
+ struct {
+ __u64 cntr_pool_id : 2;
+ __u64: 2;
+ __u64 rendezvous : 1;
+ __u64: 3;
+ __u64 rendezvous_id : 8;
+ __u64 vni : 16;
+ __u64 lpe_stat_1 : 16;
+ __u64 lpe_stat_2 : 16;
+ __u64 auto_unlinked : 1;
+ __u64: 7;
+ __u64 dma_hdr_len : 6;
+ __u64: 2;
+ __u64 event_ct_bytes : 1;
+ __u64 event_ct_comm : 1;
+ __u64 event_success_disable : 1;
+ __u64 event_comm_disable : 1;
+ __u64 use_once : 1;
+ __u64 event_use_long_fmt : 1;
+ __u64 event_start_at_base : 1;
+ __u64 unrestricted_end_ro : 1;
+ __u64 unrestricted_body_ro : 1;
+ __u64 acid : 10;
+ __u64: 5;
+ __u64 ct_handle : 11;
+ __u64: 1;
+ __u64 eq_handle : 11;
+ __u64: 1;
+ __u64 portal_index : 11;
+ __u64: 1;
+ __u64 ptl_list : 2;
+ __u64: 2;
+ __u64 buffer_id : 16;
+ __u64 initiator : 32;
+ __u64 hdr_data;
+ __u64 match_bits;
+ __u64 mlength : 32;
+ __u64 rlength : 32;
+ __u64 remote_offset : 56;
+ __u64 return_code : 6;
+ __u64: 2;
+ __u64 start_addr : 57;
+ __u64: 7;
+ };
+};
+
+#define C_MST_DBG_MATCH_DONE_OFFSET 0x00064100
+#define C_MST_DBG_MATCH_DONE (C_MST_BASE + C_MST_DBG_MATCH_DONE_OFFSET)
+#define C_MST_DBG_MATCH_DONE_SIZE 0x00000008
+
+union c_mst_dbg_match_done {
+ __u64 qw;
+ struct {
+ __u64 mst_idx : 11;
+ __u64: 5;
+ __u64 wr_en : 1;
+ __u64: 3;
+ __u64 mst_idx_st : 1;
+ __u64: 43;
+ };
+};
+
+#define C_OXE_CFG_CRNC_OFFSET 0x00000000
+#define C_OXE_CFG_CRNC (C_OXE_BASE + C_OXE_CFG_CRNC_OFFSET)
+#define C_OXE_CFG_CRNC_SIZE 0x00000008
+
+union c_oxe_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_OXE_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_OXE_CFG_RT_OFFSET (C_OXE_BASE + C_OXE_CFG_RT_OFFSET_OFFSET)
+#define C_OXE_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_oxe_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_OXE_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_OXE_MSC_SHADOW_ACTION (C_OXE_BASE + C_OXE_MSC_SHADOW_ACTION_OFFSET)
+#define C_OXE_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_OXE_MSC_SHADOW_OFFSET 0x00000040
+#define C_OXE_MSC_SHADOW (C_OXE_BASE + C_OXE_MSC_SHADOW_OFFSET)
+#define C_OXE_MSC_SHADOW_SIZE 0x00000040
+
+union c_oxe_msc_shadow {
+ __u64 qw[8];
+};
+
+#define C_OXE_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_OXE_ERR_ELAPSED_TIME (C_OXE_BASE + C_OXE_ERR_ELAPSED_TIME_OFFSET)
+#define C_OXE_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_oxe_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_OXE_ERR_FLG_OFFSET 0x00000108
+#define C_OXE_ERR_FLG (C_OXE_BASE + C_OXE_ERR_FLG_OFFSET)
+#define C_OXE_ERR_FLG_SIZE 0x00000008
+
+union c_oxe_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 5;
+ __u64 spt_cdt_err : 1;
+ __u64 smt_cdt_err : 1;
+ __u64 cells_mem_cor : 1;
+ __u64 pkl_mem_cor : 1;
+ __u64 pct_sb_mcu_mem_cor : 1;
+ __u64 pct_sb_sct_mem_cor : 1;
+ __u64 dmu_mem_cor : 1;
+ __u64 rec_mem_cor : 1;
+ __u64 atreq_mem_cor : 1;
+ __u64 atrsp_mem_cor : 1;
+ __u64 tso_flit_cor : 1;
+ __u64 sb_fifo_cor : 1;
+ __u64 rarb_hdr_cor : 1;
+ __u64 rarb_data_cor : 1;
+ __u64 at_resp_bus_cor : 1;
+ __u64 ixe_cmd_cor : 1;
+ __u64 lpe_cmd_cor : 1;
+ __u64 tou_cmd_cor : 1;
+ __u64 cq_cmd_cor : 1;
+ __u64 cells_mem_ucor : 1;
+ __u64 pkl_mem_ucor : 1;
+ __u64 pct_sb_mcu_mem_ucor : 1;
+ __u64 pct_sb_sct_mem_ucor : 1;
+ __u64 dmu_mem_ucor : 1;
+ __u64 rec_mem_ucor : 1;
+ __u64 atreq_mem_ucor : 1;
+ __u64 atrsp_mem_ucor : 1;
+ __u64 tso_flit_ucor : 1;
+ __u64 sb_fifo_ucor : 1;
+ __u64 rarb_hdr_ucor : 1;
+ __u64 rarb_data_ucor : 1;
+ __u64 at_resp_bus_ucor : 1;
+ __u64 ixe_cmd_ucor : 1;
+ __u64 lpe_cmd_ucor : 1;
+ __u64 tou_cmd_ucor : 1;
+ __u64 cq_cmd_ucor : 1;
+ __u64 fifo_err : 1;
+ __u64 credit_uflw : 1;
+ __u64 spt_ignore_err : 1;
+ __u64 smt_ignore_err : 1;
+ __u64 sct_ignore_err : 1;
+ __u64 srb_ignore_err : 1;
+ __u64 cmd_unexpected : 1;
+ __u64 rarb_hw_err : 1;
+ __u64 pcie_unsuccess_cmpl : 1;
+ __u64 pcie_error_poisoned : 1;
+ __u64 at_overrun_err : 1;
+ __u64 mdr_pipe_ucor : 1;
+ __u64 cell_xlate_parity_err : 1;
+ __u64: 1;
+ };
+};
+
+#define C_OXE_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_OXE_ERR_FIRST_FLG (C_OXE_BASE + C_OXE_ERR_FIRST_FLG_OFFSET)
+#define C_OXE_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_OXE_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_OXE_ERR_FIRST_FLG_TS (C_OXE_BASE + C_OXE_ERR_FIRST_FLG_TS_OFFSET)
+#define C_OXE_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_OXE_ERR_CLR_OFFSET 0x00000120
+#define C_OXE_ERR_CLR (C_OXE_BASE + C_OXE_ERR_CLR_OFFSET)
+#define C_OXE_ERR_CLR_SIZE 0x00000008
+#define C_OXE_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_OXE_ERR_IRQA_MSK (C_OXE_BASE + C_OXE_ERR_IRQA_MSK_OFFSET)
+#define C_OXE_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_OXE_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_OXE_ERR_IRQB_MSK (C_OXE_BASE + C_OXE_ERR_IRQB_MSK_OFFSET)
+#define C_OXE_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_OXE_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_OXE_ERR_INFO_MSK (C_OXE_BASE + C_OXE_ERR_INFO_MSK_OFFSET)
+#define C_OXE_ERR_INFO_MSK_SIZE 0x00000008
+#define C_OXE_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_OXE_ERR_INFO_MEM (C_OXE_BASE + C_OXE_ERR_INFO_MEM_OFFSET)
+#define C_OXE_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_oxe_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 12;
+ __u64 cor_mem_id : 5;
+ __u64: 2;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 12;
+ __u64 ucor_mem_id : 5;
+ __u64: 2;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_OXE_ERR_INFO_FIFO_ERR_OFFSET 0x00000188
+#define C_OXE_ERR_INFO_FIFO_ERR (C_OXE_BASE + C_OXE_ERR_INFO_FIFO_ERR_OFFSET)
+#define C_OXE_ERR_INFO_FIFO_ERR_SIZE 0x00000008
+
+union c_oxe_err_info_fifo_err {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 6;
+ __u64 fifo_id : 4;
+ __u64: 52;
+ };
+};
+
+#define C_OXE_ERR_INFO_CC_OFFSET 0x00000190
+#define C_OXE_ERR_INFO_CC (C_OXE_BASE + C_OXE_ERR_INFO_CC_OFFSET)
+#define C_OXE_ERR_INFO_CC_SIZE 0x00000008
+
+union c_oxe_err_info_cc {
+ __u64 qw;
+ struct {
+ __u64 cc_id : 5;
+ __u64: 3;
+ __u64 sub_id : 4;
+ __u64: 52;
+ };
+};
+
+#define C_OXE_ERR_INFO_PCIE_UC_OFFSET 0x00000198
+#define C_OXE_ERR_INFO_PCIE_UC (C_OXE_BASE + C_OXE_ERR_INFO_PCIE_UC_OFFSET)
+#define C_OXE_ERR_INFO_PCIE_UC_SIZE 0x00000008
+
+union c_oxe_err_info_pcie_uc {
+ __u64 qw;
+ struct {
+ __u64 pcie_tag : 9;
+ __u64: 3;
+ __u64 cmpl_status : 3;
+ __u64: 49;
+ };
+};
+
+#define C_OXE_ERR_INFO_PCIE_EP_OFFSET 0x000001a0
+#define C_OXE_ERR_INFO_PCIE_EP (C_OXE_BASE + C_OXE_ERR_INFO_PCIE_EP_OFFSET)
+#define C_OXE_ERR_INFO_PCIE_EP_SIZE 0x00000008
+
+union c_oxe_err_info_pcie_ep {
+ __u64 qw;
+ struct {
+ __u64 pcie_tag : 9;
+ __u64: 55;
+ };
+};
+
+#define C_OXE_ERR_INFO_RARB_OFFSET 0x000001a8
+#define C_OXE_ERR_INFO_RARB (C_OXE_BASE + C_OXE_ERR_INFO_RARB_OFFSET)
+#define C_OXE_ERR_INFO_RARB_SIZE 0x00000008
+
+union c_oxe_err_info_rarb {
+ __u64 qw;
+ struct {
+ __u64 hdr_ucor : 1;
+ __u64 data_ucor : 1;
+ __u64 bad_vld : 1;
+ __u64 bad_size : 1;
+ __u64 bad_cmd : 1;
+ __u64 unexpected_cmpl_tag : 1;
+ __u64 cmpl_tag_out_of_range : 1;
+ __u64 pcie_tag : 9;
+ __u64: 48;
+ };
+};
+
+#define C_OXE_ERR_INFO_UNEXPCTD_OFFSET 0x000001b0
+#define C_OXE_ERR_INFO_UNEXPCTD (C_OXE_BASE + C_OXE_ERR_INFO_UNEXPCTD_OFFSET)
+#define C_OXE_ERR_INFO_UNEXPCTD_SIZE 0x00000008
+
+union c_oxe_err_info_unexpctd {
+ __u64 qw;
+ struct {
+ __u64 mcu_unexpc_cmd : 7;
+ __u64: 1;
+ __u64 ixe_unexp_cmd : 1;
+ __u64 lpe_unexp_cmd : 1;
+ __u64 tou_unexp_cmd : 1;
+ __u64 cq_unexp_cmd : 1;
+ __u64: 52;
+ };
+};
+
+#define C_OXE_ERR_INFO_CELL_XLATE_OFFSET 0x000001b8
+#define C_OXE_ERR_INFO_CELL_XLATE (C_OXE_BASE + C_OXE_ERR_INFO_CELL_XLATE_OFFSET)
+#define C_OXE_ERR_INFO_CELL_XLATE_SIZE 0x00000008
+
+union c_oxe_err_info_cell_xlate {
+ __u64 qw;
+ struct {
+ __u64 free_list_perr : 1;
+ __u64 vptr_table_perr : 1;
+ __u64 tt1_perr : 1;
+ __u64 tt2_perr : 1;
+ __u64 tt3_perr : 1;
+ __u64: 59;
+ };
+};
+
+#define C_OXE_ERR_INFO_IGNORE_ERR_OFFSET 0x000001e0
+#define C_OXE_ERR_INFO_IGNORE_ERR (C_OXE_BASE + C_OXE_ERR_INFO_IGNORE_ERR_OFFSET)
+#define C_OXE_ERR_INFO_IGNORE_ERR_SIZE 0x00000008
+
+union c_oxe_err_info_ignore_err {
+ __u64 qw;
+ struct {
+ __u64 spt_err : 1;
+ __u64 smt_err : 1;
+ __u64 sct_err : 1;
+ __u64 srb_err : 1;
+ __u64 bc : 4;
+ __u64 mcu_num : 7;
+ __u64: 49;
+ };
+};
+
+#define C_OXE_CFG_COMMON_OFFSET 0x00000400
+#define C_OXE_CFG_COMMON (C_OXE_BASE + C_OXE_CFG_COMMON_OFFSET)
+#define C_OXE_CFG_COMMON_SIZE 0x00000008
+
+union c_oxe_cfg_common {
+ __u64 qw;
+ struct {
+ __u64 occ_bin0_sz : 10;
+ __u64 occ_bin1_sz : 10;
+ __u64 occ_bin2_sz : 10;
+ __u64 occ_bin3_sz : 10;
+ __u64 ioi_enable : 1;
+ __u64 mcu_meas_unit : 2;
+ __u64: 21;
+ };
+};
+
+#define C_OXE_CFG_FAB_PARAM_OFFSET 0x00000410
+#define C_OXE_CFG_FAB_PARAM (C_OXE_BASE + C_OXE_CFG_FAB_PARAM_OFFSET)
+#define C_OXE_CFG_FAB_PARAM_SIZE 0x00000008
+
+union c_oxe_cfg_fab_param {
+ __u64 qw;
+ struct {
+ __u64 ver : 4;
+ __u64 req_32b_enabled : 1;
+ __u64 rsp_32b_enabled : 1;
+ __u64 req_40b_enabled : 1;
+ __u64 rsp_40b_enabled : 1;
+ __u64 ttl : 8;
+ __u64 protocol : 8;
+ __u64 ecn_enable : 8;
+ __u64 min_req_size : 6;
+ __u64: 2;
+ __u64 min_rsp_size : 6;
+ __u64: 18;
+ };
+};
+
+#define C_OXE_CFG_FAB_SFA_OFFSET 0x00000418
+#define C_OXE_CFG_FAB_SFA (C_OXE_BASE + C_OXE_CFG_FAB_SFA_OFFSET)
+#define C_OXE_CFG_FAB_SFA_SIZE 0x00000008
+
+union c_oxe_cfg_fab_sfa {
+ __u64 qw;
+ struct {
+ __u64 nid : 20;
+ __u64: 44;
+ };
+};
+
+#define C_OXE_CFG_DUMMY_ADDR_OFFSET 0x00000420
+#define C_OXE_CFG_DUMMY_ADDR (C_OXE_BASE + C_OXE_CFG_DUMMY_ADDR_OFFSET)
+#define C_OXE_CFG_DUMMY_ADDR_SIZE 0x00000008
+
+union c_oxe_cfg_dummy_addr {
+ __u64 qw;
+ struct {
+ __u64 ac : 10;
+ __u64: 2;
+ __u64 subaddr : 45;
+ __u64: 7;
+ };
+};
+
+#define C_OXE_CFG_PAUSE_QUANTA_OFFSET 0x00000438
+#define C_OXE_CFG_PAUSE_QUANTA (C_OXE_BASE + C_OXE_CFG_PAUSE_QUANTA_OFFSET)
+#define C_OXE_CFG_PAUSE_QUANTA_SIZE 0x00000008
+
+union c_oxe_cfg_pause_quanta {
+ __u64 qw;
+ struct {
+ __u64 sub_value : 24;
+ __u64 sub_period : 8;
+ __u64: 32;
+ };
+};
+
+#define C_OXE_CFG_FGFC_OFFSET 0x00000440
+#define C_OXE_CFG_FGFC (C_OXE_BASE + C_OXE_CFG_FGFC_OFFSET)
+#define C_OXE_CFG_FGFC_SIZE 0x00000008
+
+union c_oxe_cfg_fgfc {
+ __u64 qw;
+ struct {
+ __u64 extra_bytes : 4;
+ __u64 round_pos : 4;
+ __u64 enable : 1;
+ __u64: 7;
+ __u64 cdt_adj : 14;
+ __u64: 2;
+ __u64 cdt_limit : 24;
+ __u64: 8;
+ };
+};
+
+#define C_OXE_CFG_PCT_CDT_OFFSET 0x00000448
+#define C_OXE_CFG_PCT_CDT (C_OXE_BASE + C_OXE_CFG_PCT_CDT_OFFSET)
+#define C_OXE_CFG_PCT_CDT_SIZE 0x00000008
+
+union c_oxe_cfg_pct_cdt {
+ __u64 qw;
+ struct {
+ __u64 spt_cdt_limit : 11;
+ __u64: 5;
+ __u64 smt_cdt_limit : 9;
+ __u64: 7;
+ __u64 sct_cdt_limit : 13;
+ __u64: 3;
+ __u64 srb_cdt_limit : 12;
+ __u64: 4;
+ };
+};
+
+#define C_OXE_CFG_BUF_BC_PARAM_OFFSET(idx) (0x00000500 + ((idx) * 8))
+#define C_OXE_CFG_BUF_BC_PARAM_ENTRIES 10
+#define C_OXE_CFG_BUF_BC_PARAM(idx) (C_OXE_BASE + C_OXE_CFG_BUF_BC_PARAM_OFFSET(idx))
+#define C_OXE_CFG_BUF_BC_PARAM_SIZE 0x00000050
+
+union c_oxe_cfg_buf_bc_param {
+ __u64 qw;
+ struct {
+ __u64 bc_reserv_buf_cdt : 11;
+ __u64: 5;
+ __u64 bc_max_mtu : 8;
+ __u64: 40;
+ };
+};
+
+#define C_OXE_CFG_PCT_BC_CDT_OFFSET(idx) (0x00000600 + ((idx) * 8))
+#define C_OXE_CFG_PCT_BC_CDT_ENTRIES 10
+#define C_OXE_CFG_PCT_BC_CDT(idx) (C_OXE_BASE + C_OXE_CFG_PCT_BC_CDT_OFFSET(idx))
+#define C_OXE_CFG_PCT_BC_CDT_SIZE 0x00000050
+
+union c_oxe_cfg_pct_bc_cdt {
+ __u64 qw;
+ struct {
+ __u64 spt_cdt_rsvd : 11;
+ __u64: 5;
+ __u64 smt_cdt_rsvd : 9;
+ __u64: 7;
+ __u64 sct_cdt_rsvd : 13;
+ __u64: 3;
+ __u64 srb_cdt_rsvd : 12;
+ __u64 ignore_spt : 1;
+ __u64 ignore_smt : 1;
+ __u64 ignore_sct : 1;
+ __u64 ignore_srb : 1;
+ };
+};
+
+#define C_OXE_CFG_BUF_SH_CDT_OFFSET(idx) (0x00000700 + ((idx) * 8))
+#define C_OXE_CFG_BUF_SH_CDT_ENTRIES 10
+#define C_OXE_CFG_BUF_SH_CDT(idx) (C_OXE_BASE + C_OXE_CFG_BUF_SH_CDT_OFFSET(idx))
+#define C_OXE_CFG_BUF_SH_CDT_SIZE 0x00000050
+
+union c_oxe_cfg_buf_sh_cdt {
+ __u64 qw;
+ struct {
+ __u64 buf_sh_cdt : 11;
+ __u64: 5;
+ __u64 buf_sh_bc_cdt : 11;
+ __u64: 5;
+ __u64 buf_sh_bc_idc_cdt : 11;
+ __u64: 21;
+ };
+};
+
+#define C_OXE_CFG_MCU_PARAM_OFFSET(idx) (0x00001000 + ((idx) * 8))
+#define C_OXE_CFG_MCU_PARAM_ENTRIES 96
+#define C_OXE_CFG_MCU_PARAM(idx) (C_OXE_BASE + C_OXE_CFG_MCU_PARAM_OFFSET(idx))
+#define C_OXE_CFG_MCU_PARAM_SIZE 0x00000300
+
+union c_oxe_cfg_mcu_param {
+ __u64 qw;
+ struct {
+ __u64 bc_map : 4;
+ __u64 tsc_map : 4;
+ __u64 wdrr_out_sel : 2;
+ __u64 wdrr_in_sel : 2;
+ __u64 stall_cnt_en0 : 1;
+ __u64 stall_cnt_en1 : 1;
+ __u64 pcp_map : 3;
+ __u64 limit_sel : 2;
+ __u64: 45;
+ };
+};
+
+#define C_OXE_CFG_MCU_PRIORITY_LIMIT_OFFSET(idx) (0x00001400 + ((idx) * 8))
+#define C_OXE_CFG_MCU_PRIORITY_LIMIT_ENTRIES 96
+#define C_OXE_CFG_MCU_PRIORITY_LIMIT(idx) (C_OXE_BASE + C_OXE_CFG_MCU_PRIORITY_LIMIT_OFFSET(idx))
+#define C_OXE_CFG_MCU_PRIORITY_LIMIT_SIZE 0x00000300
+
+union c_oxe_cfg_mcu_priority_limit {
+ __u64 qw;
+ struct {
+ __u64 occ_blimit : 11;
+ __u64: 5;
+ __u64 occ_climit : 11;
+ __u64: 37;
+ };
+};
+
+#define C_OXE_CFG_ARB_CONFIG_OFFSET 0x00001808
+#define C_OXE_CFG_ARB_CONFIG (C_OXE_BASE + C_OXE_CFG_ARB_CONFIG_OFFSET)
+#define C_OXE_CFG_ARB_CONFIG_SIZE 0x00000008
+
+union c_oxe_cfg_arb_config {
+ __u64 qw;
+ struct {
+ __u64 fill_rate : 10;
+ __u64: 2;
+ __u64 mfs_out_sel : 2;
+ __u64 mfs_in_sel : 2;
+ __u64: 48;
+ };
+};
+
+#define C_OXE_CFG_ARB_MFS_OUT_OFFSET 0x00001810
+#define C_OXE_CFG_ARB_MFS_OUT (C_OXE_BASE + C_OXE_CFG_ARB_MFS_OUT_OFFSET)
+#define C_OXE_CFG_ARB_MFS_OUT_SIZE 0x00000008
+
+union c_oxe_cfg_arb_mfs_out {
+ __u64 qw;
+ struct {
+ __u64 mfs0 : 9;
+ __u64: 3;
+ __u64 mfs1 : 9;
+ __u64: 3;
+ __u64 mfs2 : 9;
+ __u64: 3;
+ __u64 mfs3 : 9;
+ __u64: 19;
+ };
+};
+
+#define C_OXE_CFG_ARB_MFS_IN_OFFSET 0x00001818
+#define C_OXE_CFG_ARB_MFS_IN (C_OXE_BASE + C_OXE_CFG_ARB_MFS_IN_OFFSET)
+#define C_OXE_CFG_ARB_MFS_IN_SIZE 0x00000008
+
+union c_oxe_cfg_arb_mfs_in {
+ __u64 qw;
+ struct {
+ __u64 mfs0 : 9;
+ __u64: 3;
+ __u64 mfs1 : 9;
+ __u64: 3;
+ __u64 mfs2 : 9;
+ __u64: 3;
+ __u64 mfs3 : 9;
+ __u64: 19;
+ };
+};
+
+#define C_OXE_CFG_ARB_DRR_OUT_OFFSET 0x00001820
+#define C_OXE_CFG_ARB_DRR_OUT (C_OXE_BASE + C_OXE_CFG_ARB_DRR_OUT_OFFSET)
+#define C_OXE_CFG_ARB_DRR_OUT_SIZE 0x00000008
+
+union c_oxe_cfg_arb_drr_out {
+ __u64 qw;
+ struct {
+ __u64 quanta_val0 : 12;
+ __u64 quanta_val1 : 12;
+ __u64 quanta_val2 : 12;
+ __u64 quanta_val3 : 12;
+ __u64: 16;
+ };
+};
+
+#define C_OXE_CFG_ARB_DRR_IN_OFFSET 0x00001828
+#define C_OXE_CFG_ARB_DRR_IN (C_OXE_BASE + C_OXE_CFG_ARB_DRR_IN_OFFSET)
+#define C_OXE_CFG_ARB_DRR_IN_SIZE 0x00000008
+
+union c_oxe_cfg_arb_drr_in {
+ __u64 qw;
+ struct {
+ __u64 quanta_val0 : 12;
+ __u64 quanta_val1 : 12;
+ __u64 quanta_val2 : 12;
+ __u64 quanta_val3 : 12;
+ __u64: 16;
+ };
+};
+
+#define C_OXE_CFG_ARB_HEAD_OUT_C_OFFSET 0x00001830
+#define C_OXE_CFG_ARB_HEAD_OUT_C (C_OXE_BASE + C_OXE_CFG_ARB_HEAD_OUT_C_OFFSET)
+#define C_OXE_CFG_ARB_HEAD_OUT_C_SIZE 0x00000008
+
+union c_oxe_cfg_arb_head_out_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_ARB_HEAD_IN_C_OFFSET 0x00001838
+#define C_OXE_CFG_ARB_HEAD_IN_C (C_OXE_BASE + C_OXE_CFG_ARB_HEAD_IN_C_OFFSET)
+#define C_OXE_CFG_ARB_HEAD_IN_C_SIZE 0x00000008
+
+union c_oxe_cfg_arb_head_in_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_ARB_PCP_MASK_OFFSET(idx) (0x00001840 + ((idx) * 8))
+#define C_OXE_CFG_ARB_PCP_MASK_ENTRIES 8
+#define C_OXE_CFG_ARB_PCP_MASK(idx) (C_OXE_BASE + C_OXE_CFG_ARB_PCP_MASK_OFFSET(idx))
+#define C_OXE_CFG_ARB_PCP_MASK_SIZE 0x00000040
+
+union c_oxe_cfg_arb_pcp_mask {
+ __u64 qw;
+ struct {
+ __u64 tsc_mask : 10;
+ __u64: 54;
+ };
+};
+
+#define C_OXE_CFG_OUTSTANDING_LIMIT_OFFSET(idx) (0x00001880 + ((idx) * 8))
+#define C_OXE_CFG_OUTSTANDING_LIMIT_ENTRIES 4
+#define C_OXE_CFG_OUTSTANDING_LIMIT(idx) (C_OXE_BASE + C_OXE_CFG_OUTSTANDING_LIMIT_OFFSET(idx))
+#define C_OXE_CFG_OUTSTANDING_LIMIT_SIZE 0x00000020
+
+union c_oxe_cfg_outstanding_limit {
+ __u64 qw;
+ struct {
+ __u64 put_limit : 11;
+ __u64 get_limit : 11;
+ __u64 ioi_ord_limit : 11;
+ __u64 ioi_unord_limit : 13;
+ __u64: 18;
+ };
+};
+
+#define C_OXE_CFG_ARB_LEAF_OFFSET(idx) (0x000018a0 + ((idx) * 8))
+#define C_OXE_CFG_ARB_LEAF_ENTRIES 10
+#define C_OXE_CFG_ARB_LEAF(idx) (C_OXE_BASE + C_OXE_CFG_ARB_LEAF_OFFSET(idx))
+#define C_OXE_CFG_ARB_LEAF_SIZE 0x00000050
+
+union c_oxe_cfg_arb_leaf {
+ __u64 qw;
+ struct {
+ __u64 pri : 3;
+ __u64: 1;
+ __u64 parent : 3;
+ __u64: 1;
+ __u64 mfs_out_sel : 2;
+ __u64 mfs_in_sel : 2;
+ __u64 enable_in : 1;
+ __u64: 51;
+ };
+};
+
+#define C_OXE_CFG_ARB_LEAF_OUT_A_OFFSET(idx) (0x00001900 + ((idx) * 8))
+#define C_OXE_CFG_ARB_LEAF_OUT_A_ENTRIES 10
+#define C_OXE_CFG_ARB_LEAF_OUT_A(idx) (C_OXE_BASE + C_OXE_CFG_ARB_LEAF_OUT_A_OFFSET(idx))
+#define C_OXE_CFG_ARB_LEAF_OUT_A_SIZE 0x00000050
+
+union c_oxe_cfg_arb_leaf_out_a {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64: 34;
+ };
+};
+
+#define C_OXE_CFG_ARB_LEAF_OUT_C_OFFSET(idx) (0x00001980 + ((idx) * 8))
+#define C_OXE_CFG_ARB_LEAF_OUT_C_ENTRIES 10
+#define C_OXE_CFG_ARB_LEAF_OUT_C(idx) (C_OXE_BASE + C_OXE_CFG_ARB_LEAF_OUT_C_OFFSET(idx))
+#define C_OXE_CFG_ARB_LEAF_OUT_C_SIZE 0x00000050
+
+union c_oxe_cfg_arb_leaf_out_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_ARB_LEAF_IN_A_OFFSET(idx) (0x00001a00 + ((idx) * 8))
+#define C_OXE_CFG_ARB_LEAF_IN_A_ENTRIES 10
+#define C_OXE_CFG_ARB_LEAF_IN_A(idx) (C_OXE_BASE + C_OXE_CFG_ARB_LEAF_IN_A_OFFSET(idx))
+#define C_OXE_CFG_ARB_LEAF_IN_A_SIZE 0x00000050
+
+union c_oxe_cfg_arb_leaf_in_a {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64: 34;
+ };
+};
+
+#define C_OXE_CFG_ARB_LEAF_IN_C_OFFSET(idx) (0x00001a80 + ((idx) * 8))
+#define C_OXE_CFG_ARB_LEAF_IN_C_ENTRIES 10
+#define C_OXE_CFG_ARB_LEAF_IN_C(idx) (C_OXE_BASE + C_OXE_CFG_ARB_LEAF_IN_C_OFFSET(idx))
+#define C_OXE_CFG_ARB_LEAF_IN_C_SIZE 0x00000050
+
+union c_oxe_cfg_arb_leaf_in_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_ARB_BRANCH_OFFSET(idx) (0x00001b00 + ((idx) * 8))
+#define C_OXE_CFG_ARB_BRANCH_ENTRIES 5
+#define C_OXE_CFG_ARB_BRANCH(idx) (C_OXE_BASE + C_OXE_CFG_ARB_BRANCH_OFFSET(idx))
+#define C_OXE_CFG_ARB_BRANCH_SIZE 0x00000028
+
+union c_oxe_cfg_arb_branch {
+ __u64 qw;
+ struct {
+ __u64 pri : 3;
+ __u64: 1;
+ __u64 mfs_out_sel : 2;
+ __u64 mfs_in_sel : 2;
+ __u64: 56;
+ };
+};
+
+#define C_OXE_CFG_ARB_BRANCH_OUT_A_OFFSET(idx) (0x00001b40 + ((idx) * 8))
+#define C_OXE_CFG_ARB_BRANCH_OUT_A_ENTRIES 5
+#define C_OXE_CFG_ARB_BRANCH_OUT_A(idx) (C_OXE_BASE + C_OXE_CFG_ARB_BRANCH_OUT_A_OFFSET(idx))
+#define C_OXE_CFG_ARB_BRANCH_OUT_A_SIZE 0x00000028
+
+union c_oxe_cfg_arb_branch_out_a {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64: 34;
+ };
+};
+
+#define C_OXE_CFG_ARB_BRANCH_OUT_C_OFFSET(idx) (0x00001b80 + ((idx) * 8))
+#define C_OXE_CFG_ARB_BRANCH_OUT_C_ENTRIES 5
+#define C_OXE_CFG_ARB_BRANCH_OUT_C(idx) (C_OXE_BASE + C_OXE_CFG_ARB_BRANCH_OUT_C_OFFSET(idx))
+#define C_OXE_CFG_ARB_BRANCH_OUT_C_SIZE 0x00000028
+
+union c_oxe_cfg_arb_branch_out_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_ARB_BRANCH_IN_A_OFFSET(idx) (0x00001bc0 + ((idx) * 8))
+#define C_OXE_CFG_ARB_BRANCH_IN_A_ENTRIES 5
+#define C_OXE_CFG_ARB_BRANCH_IN_A(idx) (C_OXE_BASE + C_OXE_CFG_ARB_BRANCH_IN_A_OFFSET(idx))
+#define C_OXE_CFG_ARB_BRANCH_IN_A_SIZE 0x00000028
+
+union c_oxe_cfg_arb_branch_in_a {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64: 34;
+ };
+};
+
+#define C_OXE_CFG_ARB_BRANCH_IN_C_OFFSET(idx) (0x00001c00 + ((idx) * 8))
+#define C_OXE_CFG_ARB_BRANCH_IN_C_ENTRIES 5
+#define C_OXE_CFG_ARB_BRANCH_IN_C(idx) (C_OXE_BASE + C_OXE_CFG_ARB_BRANCH_IN_C_OFFSET(idx))
+#define C_OXE_CFG_ARB_BRANCH_IN_C_SIZE 0x00000028
+
+union c_oxe_cfg_arb_branch_in_c {
+ __u64 qw;
+ struct {
+ __u64 fill_qty : 11;
+ __u64: 1;
+ __u64 limit : 18;
+ __u64 enable : 1;
+ __u64: 33;
+ };
+};
+
+#define C_OXE_CFG_FGFC_CNT_OFFSET(idx) (0x00001c40 + ((idx) * 8))
+#define C_OXE_CFG_FGFC_CNT_ENTRIES 4
+#define C_OXE_CFG_FGFC_CNT(idx) (C_OXE_BASE + C_OXE_CFG_FGFC_CNT_OFFSET(idx))
+#define C_OXE_CFG_FGFC_CNT_SIZE 0x00000020
+
+union c_oxe_cfg_fgfc_cnt {
+ __u64 qw;
+ struct {
+ __u64 vni_match : 16;
+ __u64 vni_mask : 16;
+ __u64: 32;
+ };
+};
+
+#define C_OXE_STS_COMMON_OFFSET 0x00002000
+#define C_OXE_STS_COMMON (C_OXE_BASE + C_OXE_STS_COMMON_OFFSET)
+#define C_OXE_STS_COMMON_SIZE 0x00000008
+
+union c_oxe_sts_common {
+ __u64 qw;
+ struct {
+ __u64 init_done : 1;
+ __u64: 63;
+ };
+};
+
+#define C_PARBS_CFG_CRNC_OFFSET 0x00000000
+#define C_PARBS_CFG_CRNC (C_PARBS_BASE + C_PARBS_CFG_CRNC_OFFSET)
+#define C_PARBS_CFG_CRNC_SIZE 0x00000008
+
+union c_parbs_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_PARBS_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_PARBS_CFG_RT_OFFSET (C_PARBS_BASE + C_PARBS_CFG_RT_OFFSET_OFFSET)
+#define C_PARBS_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_parbs_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_PARBS_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_PARBS_ERR_ELAPSED_TIME (C_PARBS_BASE + C_PARBS_ERR_ELAPSED_TIME_OFFSET)
+#define C_PARBS_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_parbs_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_PARBS_ERR_FLG_OFFSET 0x00000108
+#define C_PARBS_ERR_FLG (C_PARBS_BASE + C_PARBS_ERR_FLG_OFFSET)
+#define C_PARBS_ERR_FLG_SIZE 0x00000008
+
+union c_parbs_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 7;
+ __u64 cq_tarb_hdr_cor : 1;
+ __u64 cq_tarb_hdr_ucor : 1;
+ __u64 cq_tarb_data_cor : 1;
+ __u64 cq_tarb_data_ucor : 1;
+ __u64 ee_tarb_hdr_cor : 1;
+ __u64 ee_tarb_hdr_ucor : 1;
+ __u64 ee_tarb_data_cor : 1;
+ __u64 ee_tarb_data_ucor : 1;
+ __u64 ixe_tarb_hdr_cor : 1;
+ __u64 ixe_tarb_hdr_ucor : 1;
+ __u64 ixe_tarb_data_cor : 1;
+ __u64 ixe_tarb_data_ucor : 1;
+ __u64 oxe_tarb_hdr_cor : 1;
+ __u64 oxe_tarb_hdr_ucor : 1;
+ __u64 atu_tarb_hdr_cor : 1;
+ __u64 atu_tarb_hdr_ucor : 1;
+ __u64 atu_tarb_data_cor : 1;
+ __u64 atu_tarb_data_ucor : 1;
+ __u64 tarb_pi_hdr_cor : 1;
+ __u64 tarb_pi_hdr_ucor : 1;
+ __u64 tarb_pi_data_cor : 1;
+ __u64 tarb_pi_data_ucor : 1;
+ __u64 cq_p_fifo_overrun : 1;
+ __u64 cq_p_fifo_underrun : 1;
+ __u64 cq_np_fifo_overrun : 1;
+ __u64 cq_np_fifo_underrun : 1;
+ __u64 ee_p_fifo_overrun : 1;
+ __u64 ee_p_fifo_underrun : 1;
+ __u64 ixe_p_fifo_overrun : 1;
+ __u64 ixe_p_fifo_underrun : 1;
+ __u64 ixe_np_fifo_overrun : 1;
+ __u64 ixe_np_fifo_underrun : 1;
+ __u64 oxe_np_fifo_overrun : 1;
+ __u64 oxe_np_fifo_underrun : 1;
+ __u64 atu_p_fifo_overrun : 1;
+ __u64 atu_p_fifo_underrun : 1;
+ __u64 atu_np_fifo_overrun : 1;
+ __u64 atu_np_fifo_underrun : 1;
+ __u64 ord_p_fifo_overrun : 1;
+ __u64 ord_p_fifo_underrun : 1;
+ __u64 ord_np_fifo_overrun : 1;
+ __u64 ord_np_fifo_underrun : 1;
+ __u64 ord_np_cnt_overrun : 1;
+ __u64 ord_np_cnt_underrun : 1;
+ __u64 tarb_pi_p_cdt_underflow : 1;
+ __u64 tarb_pi_np_cdt_underflow : 1;
+ __u64: 2;
+ };
+};
+
+#define C_PARBS_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_PARBS_ERR_FIRST_FLG (C_PARBS_BASE + C_PARBS_ERR_FIRST_FLG_OFFSET)
+#define C_PARBS_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PARBS_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_PARBS_ERR_FIRST_FLG_TS (C_PARBS_BASE + C_PARBS_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PARBS_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PARBS_ERR_CLR_OFFSET 0x00000120
+#define C_PARBS_ERR_CLR (C_PARBS_BASE + C_PARBS_ERR_CLR_OFFSET)
+#define C_PARBS_ERR_CLR_SIZE 0x00000008
+#define C_PARBS_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_PARBS_ERR_IRQA_MSK (C_PARBS_BASE + C_PARBS_ERR_IRQA_MSK_OFFSET)
+#define C_PARBS_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PARBS_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_PARBS_ERR_IRQB_MSK (C_PARBS_BASE + C_PARBS_ERR_IRQB_MSK_OFFSET)
+#define C_PARBS_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PARBS_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_PARBS_ERR_INFO_MSK (C_PARBS_BASE + C_PARBS_ERR_INFO_MSK_OFFSET)
+#define C_PARBS_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PARBS_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_PARBS_ERR_INFO_MEM (C_PARBS_BASE + C_PARBS_ERR_INFO_MEM_OFFSET)
+#define C_PARBS_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_parbs_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 11;
+ __u64: 1;
+ __u64 cor_mem_id : 4;
+ __u64: 3;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 11;
+ __u64: 1;
+ __u64 ucor_mem_id : 4;
+ __u64: 3;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_PARBS_EXT_ERR_FLG_OFFSET 0x00000208
+#define C_PARBS_EXT_ERR_FLG (C_PARBS_BASE + C_PARBS_EXT_ERR_FLG_OFFSET)
+#define C_PARBS_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_parbs_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 pi_rarb_hdr_cor : 1;
+ __u64 pi_rarb_hdr_ucor : 1;
+ __u64 pi_rarb_data_cor : 1;
+ __u64 pi_rarb_data_ucor : 1;
+ __u64: 59;
+ };
+};
+
+#define C_PARBS_EXT_ERR_FIRST_FLG_OFFSET 0x00000210
+#define C_PARBS_EXT_ERR_FIRST_FLG (C_PARBS_BASE + C_PARBS_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_PARBS_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PARBS_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000218
+#define C_PARBS_EXT_ERR_FIRST_FLG_TS (C_PARBS_BASE + C_PARBS_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PARBS_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PARBS_EXT_ERR_CLR_OFFSET 0x00000220
+#define C_PARBS_EXT_ERR_CLR (C_PARBS_BASE + C_PARBS_EXT_ERR_CLR_OFFSET)
+#define C_PARBS_EXT_ERR_CLR_SIZE 0x00000008
+#define C_PARBS_EXT_ERR_IRQA_MSK_OFFSET 0x00000228
+#define C_PARBS_EXT_ERR_IRQA_MSK (C_PARBS_BASE + C_PARBS_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_PARBS_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PARBS_EXT_ERR_IRQB_MSK_OFFSET 0x00000230
+#define C_PARBS_EXT_ERR_IRQB_MSK (C_PARBS_BASE + C_PARBS_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_PARBS_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PARBS_EXT_ERR_INFO_MSK_OFFSET 0x00000240
+#define C_PARBS_EXT_ERR_INFO_MSK (C_PARBS_BASE + C_PARBS_EXT_ERR_INFO_MSK_OFFSET)
+#define C_PARBS_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PCT_CFG_CRNC_OFFSET 0x00000000
+#define C_PCT_CFG_CRNC (C_PCT_BASE + C_PCT_CFG_CRNC_OFFSET)
+#define C_PCT_CFG_CRNC_SIZE 0x00000008
+
+union c_pct_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_PCT_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_PCT_MSC_SHADOW_ACTION (C_PCT_BASE + C_PCT_MSC_SHADOW_ACTION_OFFSET)
+#define C_PCT_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_PCT_MSC_SHADOW_OFFSET 0x00000040
+#define C_PCT_MSC_SHADOW (C_PCT_BASE + C_PCT_MSC_SHADOW_OFFSET)
+#define C_PCT_MSC_SHADOW_SIZE 0x00000080
+
+union c_pct_msc_shadow {
+ __u64 qw[16];
+};
+
+#define C_PCT_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_PCT_ERR_ELAPSED_TIME (C_PCT_BASE + C_PCT_ERR_ELAPSED_TIME_OFFSET)
+#define C_PCT_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_pct_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C1_PCT_ERR_FLG_OFFSET 0x00000108
+#define C1_PCT_ERR_FLG (C_PCT_BASE + C1_PCT_ERR_FLG_OFFSET)
+#define C1_PCT_ERR_FLG_SIZE 0x00000008
+
+union c1_pct_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64 srb_alloc_dup : 1;
+ __u64 srb_dealloc_dup : 1;
+ __u64: 1;
+ __u64 flop_fifo_cor : 1;
+ __u64 mst_cam_free_cor : 1;
+ __u64 sct_cam_free_cor : 1;
+ __u64 tct_cam_free_cor : 1;
+ __u64 trs_cam_free_cor : 1;
+ __u64 sct_tbl_cor : 1;
+ __u64 smt_tbl_cor : 1;
+ __u64 spt_tbl_cor : 1;
+ __u64 tct_tbl_cor : 1;
+ __u64 trs_tbl_cor : 1;
+ __u64 req_redo_cor : 1;
+ __u64 cls_clr_req_gen_cor : 1;
+ __u64 srb_nlist_ram_cor : 1;
+ __u64 srb_data_ram_cor : 1;
+ __u64 flop_fifo_ucor : 1;
+ __u64 mst_cam_free_ucor : 1;
+ __u64 sct_cam_free_ucor : 1;
+ __u64 tct_cam_free_ucor : 1;
+ __u64 trs_cam_free_ucor : 1;
+ __u64 sct_tbl_ucor : 1;
+ __u64 smt_tbl_ucor : 1;
+ __u64 spt_tbl_ucor : 1;
+ __u64 tct_tbl_ucor : 1;
+ __u64 trs_tbl_ucor : 1;
+ __u64 req_redo_ucor : 1;
+ __u64 cls_clr_req_gen_ucor : 1;
+ __u64 srb_nlist_ram_ucor : 1;
+ __u64 srb_data_ram_ucor : 1;
+ __u64 mst_cam_ucor : 1;
+ __u64 sct_cam_ucor : 1;
+ __u64 tct_cam_ucor : 1;
+ __u64 trs_cam_ucor : 1;
+ __u64 fifo_err : 1;
+ __u64 credit_uflw : 1;
+ __u64: 18;
+ };
+};
+
+#define C2_PCT_ERR_FLG_OFFSET 0x00000108
+#define C2_PCT_ERR_FLG (C_PCT_BASE + C2_PCT_ERR_FLG_OFFSET)
+#define C2_PCT_ERR_FLG_SIZE 0x00000008
+
+union c2_pct_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64 srb_alloc_dup : 1;
+ __u64 srb_dealloc_dup : 1;
+ __u64: 1;
+ __u64 flop_fifo_cor : 1;
+ __u64 mst_cam_free_cor : 1;
+ __u64 sct_cam_free_cor : 1;
+ __u64 tct_cam_free_cor : 1;
+ __u64 trs_cam_free_cor : 1;
+ __u64 sct_tbl_cor : 1;
+ __u64 smt_tbl_cor : 1;
+ __u64 spt_tbl_cor : 1;
+ __u64 tct_tbl_cor : 1;
+ __u64 trs_tbl_cor : 1;
+ __u64 req_redo_cor : 1;
+ __u64 cls_clr_req_gen_cor : 1;
+ __u64 srb_nlist_ram_cor : 1;
+ __u64 srb_data_ram_cor : 1;
+ __u64 cls_rsp_gen_cor : 1;
+ __u64 nack_trs_rsp_gen_cor : 1;
+ __u64 flop_fifo_ucor : 1;
+ __u64 mst_cam_free_ucor : 1;
+ __u64 sct_cam_free_ucor : 1;
+ __u64 tct_cam_free_ucor : 1;
+ __u64 trs_cam_free_ucor : 1;
+ __u64 sct_tbl_ucor : 1;
+ __u64 smt_tbl_ucor : 1;
+ __u64 spt_tbl_ucor : 1;
+ __u64 tct_tbl_ucor : 1;
+ __u64 trs_tbl_ucor : 1;
+ __u64 req_redo_ucor : 1;
+ __u64 cls_clr_req_gen_ucor : 1;
+ __u64 srb_nlist_ram_ucor : 1;
+ __u64 srb_data_ram_ucor : 1;
+ __u64 mst_cam_ucor : 1;
+ __u64 sct_cam_ucor : 1;
+ __u64 tct_cam_ucor : 1;
+ __u64 trs_cam_ucor : 1;
+ __u64 nack_trs_rsp_gen_ucor : 1;
+ __u64 cls_rsp_gen_ucor : 1;
+ __u64 fifo_err : 1;
+ __u64 credit_uflw : 1;
+ __u64: 14;
+ };
+};
+
+#define C_PCT_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_PCT_ERR_FIRST_FLG (C_PCT_BASE + C_PCT_ERR_FIRST_FLG_OFFSET)
+#define C_PCT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PCT_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_PCT_ERR_FIRST_FLG_TS (C_PCT_BASE + C_PCT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PCT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PCT_ERR_CLR_OFFSET 0x00000120
+#define C_PCT_ERR_CLR (C_PCT_BASE + C_PCT_ERR_CLR_OFFSET)
+#define C_PCT_ERR_CLR_SIZE 0x00000008
+#define C_PCT_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_PCT_ERR_IRQA_MSK (C_PCT_BASE + C_PCT_ERR_IRQA_MSK_OFFSET)
+#define C_PCT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PCT_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_PCT_ERR_IRQB_MSK (C_PCT_BASE + C_PCT_ERR_IRQB_MSK_OFFSET)
+#define C_PCT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PCT_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_PCT_ERR_INFO_MSK (C_PCT_BASE + C_PCT_ERR_INFO_MSK_OFFSET)
+#define C_PCT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PCT_EXT_ERR_FLG_OFFSET 0x00000148
+#define C_PCT_EXT_ERR_FLG (C_PCT_BASE + C_PCT_EXT_ERR_FLG_OFFSET)
+#define C_PCT_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_pct_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 sct_tbl_dealloc : 1;
+ __u64 sct_tbl_alloc : 1;
+ __u64 sct_tbl_rd_misc_unused : 1;
+ __u64 sct_tbl_wr_misc_unused : 1;
+ __u64 sct_tbl_rd_ram_unused : 1;
+ __u64 sct_tbl_wr_ram_unused : 1;
+ __u64 smt_tbl_dealloc : 1;
+ __u64 smt_tbl_alloc : 1;
+ __u64 smt_tbl_rd_ram_unused : 1;
+ __u64 smt_tbl_wr_ram_unused : 1;
+ __u64 spt_tbl_dealloc : 1;
+ __u64 spt_tbl_alloc : 1;
+ __u64 spt_tbl_rd_misc_unused : 1;
+ __u64 spt_tbl_wr_misc_unused : 1;
+ __u64 spt_tbl_rd_ram_unused : 1;
+ __u64 spt_tbl_wr_ram_unused : 1;
+ __u64 spt_tbl_set_wrong_status : 1;
+ __u64 tct_tbl_dealloc : 1;
+ __u64 tct_tbl_alloc : 1;
+ __u64 tct_tbl_rd_misc_unused : 1;
+ __u64 tct_tbl_rd_ram_unused : 1;
+ __u64 tct_tbl_wr_ram_unused : 1;
+ __u64 trs_tbl_dealloc : 1;
+ __u64 trs_tbl_alloc : 1;
+ __u64 trs_tbl_rd_ram_unused : 1;
+ __u64 trs_tbl_wr_ram_unused : 1;
+ __u64 oxe_sct_miss_on_mid : 1;
+ __u64 oxe_failed_sct_alloc : 1;
+ __u64 oxe_illegal_req : 1;
+ __u64 oxe_new_conn_not_som : 1;
+ __u64 oxe_invalid_smt_not_som : 1;
+ __u64 oxe_illegal_access2_fsm : 1;
+ __u64 oxe_smt_req_cnt_exceed : 1;
+ __u64 oxe_sct_req_cnt_exceed : 1;
+ __u64 ixe_req_tct_not_in_use : 1;
+ __u64 ixe_req_tct_miss_unordered_mid : 1;
+ __u64 ixe_req_mst_missing : 1;
+ __u64 ixe_req_clr_out_of_range : 1;
+ __u64 ixe_rsp_spt_not_in_use : 1;
+ __u64 ixe_rsp_spt_status_not_pend : 1;
+ __u64 ixe_rsp_smt_pend_cnt_exceed : 1;
+ __u64 ixe_rsp_sct_pend_cnt_exceed : 1;
+ __u64 ixe_rsp_smt_invalid : 1;
+ __u64 ixe_rsp_spt_not_get_vld : 1;
+ __u64 ixe_rsp_cls_not_pend : 1;
+ __u64 ixe_gcomp_spt_not_in_use : 1;
+ __u64 ixe_gcomp_not_get_ack_rcvd : 1;
+ __u64 ixe_gcomp_smt_pend_cnt_exceed : 1;
+ __u64 ixe_gcomp_sct_pend_cnt_exceed : 1;
+ __u64 ixe_gcomp_smt_invalid : 1;
+ __u64 ixe_gcomp_spt_not_get_vld : 1;
+ __u64 src_cls_spt_wrong_sct : 1;
+ __u64 src_cls_spt_not_used : 1;
+ __u64 src_cls_spt_not_opcomp : 1;
+ __u64 src_cls_bad_close : 1;
+ __u64 pkto_illegal_req : 1;
+ __u64 pkto_illegal_pkttype : 1;
+ __u64 pkto_head_fsm : 1;
+ __u64 srb_wr_rd_same_cycle : 1;
+ __u64 sct_miss_unrestricted_mid : 1;
+ __u64 mbe_in_ctrls : 1;
+ __u64 sct_cam_err : 1;
+ __u64 mst_cam_err : 1;
+ };
+};
+
+#define C_PCT_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C_PCT_EXT_ERR_FIRST_FLG (C_PCT_BASE + C_PCT_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_PCT_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PCT_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C_PCT_EXT_ERR_FIRST_FLG_TS (C_PCT_BASE + C_PCT_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PCT_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PCT_EXT_ERR_CLR_OFFSET 0x00000160
+#define C_PCT_EXT_ERR_CLR (C_PCT_BASE + C_PCT_EXT_ERR_CLR_OFFSET)
+#define C_PCT_EXT_ERR_CLR_SIZE 0x00000008
+#define C_PCT_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C_PCT_EXT_ERR_IRQA_MSK (C_PCT_BASE + C_PCT_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_PCT_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PCT_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C_PCT_EXT_ERR_IRQB_MSK (C_PCT_BASE + C_PCT_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_PCT_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PCT_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C_PCT_EXT_ERR_INFO_MSK (C_PCT_BASE + C_PCT_EXT_ERR_INFO_MSK_OFFSET)
+#define C_PCT_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PCT_ERR_INFO_MEM_OFFSET 0x00000188
+#define C_PCT_ERR_INFO_MEM (C_PCT_BASE + C_PCT_ERR_INFO_MEM_OFFSET)
+#define C_PCT_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_pct_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64 cor_address : 13;
+ __u64 cor_mem_id : 7;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64 ucor_address : 13;
+ __u64 ucor_mem_id : 7;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_PCT_ERR_INFO_FIFO_OFFSET 0x00000190
+#define C_PCT_ERR_INFO_FIFO (C_PCT_BASE + C_PCT_ERR_INFO_FIFO_OFFSET)
+#define C_PCT_ERR_INFO_FIFO_SIZE 0x00000008
+
+union c_pct_err_info_fifo {
+ __u64 qw;
+ struct {
+ __u64 overrun : 1;
+ __u64 underrun : 1;
+ __u64: 6;
+ __u64 fifo_id : 6;
+ __u64: 50;
+ };
+};
+
+#define C_PCT_ERR_INFO_CC_OFFSET 0x00000198
+#define C_PCT_ERR_INFO_CC (C_PCT_BASE + C_PCT_ERR_INFO_CC_OFFSET)
+#define C_PCT_ERR_INFO_CC_SIZE 0x00000008
+
+union c_pct_err_info_cc {
+ __u64 qw;
+ struct {
+ __u64 cc_id : 6;
+ __u64: 2;
+ __u64 sub_id : 3;
+ __u64: 53;
+ };
+};
+
+#define C_PCT_ERR_INFO_EXT_OFFSET 0x000001a0
+#define C_PCT_ERR_INFO_EXT (C_PCT_BASE + C_PCT_ERR_INFO_EXT_OFFSET)
+#define C_PCT_ERR_INFO_EXT_SIZE 0x00000008
+
+union c_pct_err_info_ext {
+ __u64 qw;
+ struct {
+ __u64 sct_wr_err_id : 5;
+ __u64 sct_rd_err_id : 5;
+ __u64: 2;
+ __u64 smt_wr_err_id : 4;
+ __u64 smt_rd_err_id : 4;
+ __u64 spt_wr_err_id : 5;
+ __u64 spt_rd_err_id : 5;
+ __u64: 2;
+ __u64 tct_wr_err_id : 3;
+ __u64 tct_rd_err_id : 3;
+ __u64: 2;
+ __u64 trs_wr_err_id : 3;
+ __u64 trs_rd_err_id : 3;
+ __u64: 2;
+ __u64 mbe_err_id : 5;
+ __u64: 11;
+ };
+};
+
+#define C_PCT_CFG_EQ_RETRY_Q_HANDLE_OFFSET 0x00000300
+#define C_PCT_CFG_EQ_RETRY_Q_HANDLE (C_PCT_BASE + C_PCT_CFG_EQ_RETRY_Q_HANDLE_OFFSET)
+#define C_PCT_CFG_EQ_RETRY_Q_HANDLE_SIZE 0x00000008
+
+union c_pct_cfg_eq_retry_q_handle {
+ __u64 qw;
+ struct {
+ __u64 eq_handle : 11;
+ __u64: 53;
+ };
+};
+
+#define C_PCT_CFG_EQ_TGT_Q_HANDLE_OFFSET 0x00000308
+#define C_PCT_CFG_EQ_TGT_Q_HANDLE (C_PCT_BASE + C_PCT_CFG_EQ_TGT_Q_HANDLE_OFFSET)
+#define C_PCT_CFG_EQ_TGT_Q_HANDLE_SIZE 0x00000008
+
+union c_pct_cfg_eq_tgt_q_handle {
+ __u64 qw;
+ struct {
+ __u64 eq_handle : 11;
+ __u64: 53;
+ };
+};
+
+#define C_PCT_CFG_EQ_CONN_LD_Q_HANDLE_OFFSET 0x00000310
+#define C_PCT_CFG_EQ_CONN_LD_Q_HANDLE (C_PCT_BASE + C_PCT_CFG_EQ_CONN_LD_Q_HANDLE_OFFSET)
+#define C_PCT_CFG_EQ_CONN_LD_Q_HANDLE_SIZE 0x00000008
+
+union c_pct_cfg_eq_conn_ld_q_handle {
+ __u64 qw;
+ struct {
+ __u64 eq_handle : 11;
+ __u64: 53;
+ };
+};
+
+#define C_PCT_CFG_SRB_RETRY_PTRS_OFFSET(idx) (0x000003e0 + ((idx) * 8))
+#define C_PCT_CFG_SRB_RETRY_PTRS_ENTRIES 4
+#define C_PCT_CFG_SRB_RETRY_PTRS(idx) (C_PCT_BASE + C_PCT_CFG_SRB_RETRY_PTRS_OFFSET(idx))
+#define C_PCT_CFG_SRB_RETRY_PTRS_SIZE 0x00000020
+
+struct c_pct_cfg_srb_retry_ptrs_entry {
+ __u32 ptr : 11;
+ __u32: 1;
+ __u32 vld : 1;
+ __u32: 3;
+ __u32 spt_idx : 11;
+ __u32: 1;
+ __u32 try_num : 3;
+ __u32: 1;
+};
+
+union c_pct_cfg_srb_retry_ptrs {
+ __u64 qw;
+ struct c_pct_cfg_srb_retry_ptrs_entry e[2];
+};
+
+#define C_PCT_CFG_SRB_RETRY_CTRL_OFFSET 0x00000400
+#define C_PCT_CFG_SRB_RETRY_CTRL (C_PCT_BASE + C_PCT_CFG_SRB_RETRY_CTRL_OFFSET)
+#define C_PCT_CFG_SRB_RETRY_CTRL_SIZE 0x00000008
+
+union c_pct_cfg_srb_retry_ctrl {
+ __u64 qw;
+ struct {
+ __u64 pcp_pause_st : 8;
+ __u64 current_ptr : 3;
+ __u64: 5;
+ __u64 grp_nxt : 1;
+ __u64: 7;
+ __u64 error : 1;
+ __u64: 3;
+ __u64 sw_abort : 1;
+ __u64: 3;
+ __u64 hw_sw_sync : 1;
+ __u64: 3;
+ __u64 pause_mode : 1;
+ __u64: 27;
+ };
+};
+
+#define C1_PCT_CFG_SRB_RETRY_GRP_CTRL_OFFSET(idx) (0x00000408 + ((idx) * 8))
+#define C1_PCT_CFG_SRB_RETRY_GRP_CTRL_ENTRIES 2
+#define C1_PCT_CFG_SRB_RETRY_GRP_CTRL(idx) (C_PCT_BASE + C1_PCT_CFG_SRB_RETRY_GRP_CTRL_OFFSET(idx))
+#define C1_PCT_CFG_SRB_RETRY_GRP_CTRL_SIZE 0x00000010
+
+union c1_pct_cfg_srb_retry_grp_ctrl {
+ __u64 qw;
+ struct {
+ __u64 grp_loaded : 1;
+ __u64 grp_active : 1;
+ __u64 grp_paused : 1;
+ __u64 grp_sct_idx_vld : 1;
+ __u64 grp_sct_idx : 12;
+ __u64 grp_pcp : 3;
+ __u64: 5;
+ __u64 grp_unset_clr_seqnum : 1;
+ __u64: 39;
+ };
+};
+
+#define C2_PCT_CFG_SRB_RETRY_GRP_CTRL_OFFSET(idx) (0x00000408 + ((idx) * 8))
+#define C2_PCT_CFG_SRB_RETRY_GRP_CTRL_ENTRIES 2
+#define C2_PCT_CFG_SRB_RETRY_GRP_CTRL(idx) (C_PCT_BASE + C2_PCT_CFG_SRB_RETRY_GRP_CTRL_OFFSET(idx))
+#define C2_PCT_CFG_SRB_RETRY_GRP_CTRL_SIZE 0x00000010
+
+union c2_pct_cfg_srb_retry_grp_ctrl {
+ __u64 qw;
+ struct {
+ __u64 grp_loaded : 1;
+ __u64 grp_active : 1;
+ __u64 grp_paused : 1;
+ __u64 grp_sct_idx_vld : 1;
+ __u64 grp_sct_idx : 12;
+ __u64 grp_pcp : 3;
+ __u64: 5;
+ __u64 grp_update_clr_seqnum_en : 1;
+ __u64 grp_update_clr_seqnum : 12;
+ __u64: 27;
+ };
+};
+
+#define C_PCT_CFG_PKT_MISC_OFFSET 0x00000430
+#define C_PCT_CFG_PKT_MISC (C_PCT_BASE + C_PCT_CFG_PKT_MISC_OFFSET)
+#define C_PCT_CFG_PKT_MISC_SIZE 0x00000008
+
+union c_pct_cfg_pkt_misc {
+ __u64 qw;
+ struct {
+ __u64 sm_fab_hdr : 4;
+ __u64: 4;
+ __u64 ptl_proto : 8;
+ __u64 pktid_4000 : 1;
+ __u64: 7;
+ __u64 simple_mode : 1;
+ __u64: 3;
+ __u64 trs_pend_rsp_nack_disable : 1;
+ __u64: 15;
+ __u64 sfa_nid : 20;
+ };
+};
+
+#define C_PCT_CFG_TIMING_OFFSET 0x00000440
+#define C_PCT_CFG_TIMING (C_PCT_BASE + C_PCT_CFG_TIMING_OFFSET)
+#define C_PCT_CFG_TIMING_SIZE 0x00000008
+
+union c_pct_cfg_timing {
+ __u64 qw;
+ struct {
+ __u64 stall_ctr : 5;
+ __u64: 3;
+ __u64 spt_timeout_epoch_sel : 6;
+ __u64: 2;
+ __u64 sct_idle_epoch_sel : 6;
+ __u64: 2;
+ __u64 sct_close_epoch_sel : 6;
+ __u64: 2;
+ __u64 tct_timeout_epoch_sel : 6;
+ __u64: 2;
+ __u64 put_get_same_sct_en : 1;
+ __u64: 7;
+ __u64 accept_late_spt_rsp : 1;
+ __u64: 15;
+ };
+};
+
+#define C1_PCT_CFG_IXE_REQ_FIFO_LIMITS_OFFSET 0x00000508
+#define C1_PCT_CFG_IXE_REQ_FIFO_LIMITS (C_PCT_BASE + C1_PCT_CFG_IXE_REQ_FIFO_LIMITS_OFFSET)
+#define C1_PCT_CFG_IXE_REQ_FIFO_LIMITS_SIZE 0x00000008
+
+union c1_pct_cfg_ixe_req_fifo_limits {
+ __u64 qw;
+ struct {
+ __u64 ixe_req_clr_limit : 6;
+ __u64: 2;
+ __u64 ixe_req_clr1_limit : 3;
+ __u64: 5;
+ __u64 ixe_req_clr2_limit : 3;
+ __u64: 5;
+ __u64 ixe_req_rsp_limit : 5;
+ __u64: 35;
+ };
+};
+
+#define C2_PCT_CFG_IXE_REQ_FIFO_LIMITS_OFFSET 0x00000508
+#define C2_PCT_CFG_IXE_REQ_FIFO_LIMITS (C_PCT_BASE + C2_PCT_CFG_IXE_REQ_FIFO_LIMITS_OFFSET)
+#define C2_PCT_CFG_IXE_REQ_FIFO_LIMITS_SIZE 0x00000008
+
+union c2_pct_cfg_ixe_req_fifo_limits {
+ __u64 qw;
+ struct {
+ __u64 ixe_req_clr_limit : 6;
+ __u64: 2;
+ __u64 ixe_req_clr1_limit : 3;
+ __u64: 5;
+ __u64 ixe_req_clr2_limit : 3;
+ __u64: 5;
+ __u64 nack_trs_rsp_limit : 4;
+ __u64: 36;
+ };
+};
+
+#define C_PCT_CFG_IXE_RSP_FIFO_LIMITS_OFFSET 0x00000528
+#define C_PCT_CFG_IXE_RSP_FIFO_LIMITS (C_PCT_BASE + C_PCT_CFG_IXE_RSP_FIFO_LIMITS_OFFSET)
+#define C_PCT_CFG_IXE_RSP_FIFO_LIMITS_SIZE 0x00000008
+
+union c_pct_cfg_ixe_rsp_fifo_limits {
+ __u64 qw;
+ struct {
+ __u64 clr_limit : 4;
+ __u64 ee_limit : 5;
+ __u64: 3;
+ __u64 cq_limit : 5;
+ __u64: 3;
+ __u64 srb_dealloc_limit : 5;
+ __u64: 3;
+ __u64 smt_cdt_ack_limit : 4;
+ __u64 spt_cdt_ack_limit : 4;
+ __u64 sct_cdt_ack_limit : 4;
+ __u64: 24;
+ };
+};
+
+#define C_PCT_CFG_TGT_CLR_REQ_FIFO_LIMIT_OFFSET 0x00000538
+#define C_PCT_CFG_TGT_CLR_REQ_FIFO_LIMIT (C_PCT_BASE + C_PCT_CFG_TGT_CLR_REQ_FIFO_LIMIT_OFFSET)
+#define C_PCT_CFG_TGT_CLR_REQ_FIFO_LIMIT_SIZE 0x00000008
+
+union c_pct_cfg_tgt_clr_req_fifo_limit {
+ __u64 qw;
+ struct {
+ __u64 tgt_clr_req_limit : 6;
+ __u64: 2;
+ __u64 mst_dealloc_fifo_limit : 4;
+ __u64: 52;
+ };
+};
+
+#define C1_PCT_CFG_TRS_TC_DED_LIMIT_OFFSET(idx) (0x00000600 + ((idx) * 8))
+#define C1_PCT_CFG_TRS_TC_DED_LIMIT_ENTRIES 8
+#define C1_PCT_CFG_TRS_TC_DED_LIMIT(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_TC_DED_LIMIT_OFFSET(idx))
+#define C1_PCT_CFG_TRS_TC_DED_LIMIT_SIZE 0x00000040
+
+union c1_pct_cfg_trs_tc_ded_limit {
+ __u64 qw;
+ struct {
+ __u64 ded_limit : 12;
+ __u64: 52;
+ };
+};
+
+#define C2_PCT_CFG_TRS_TC_DED_LIMIT_OFFSET(idx) (0x00000600 + ((idx) * 8))
+#define C2_PCT_CFG_TRS_TC_DED_LIMIT_ENTRIES 8
+#define C2_PCT_CFG_TRS_TC_DED_LIMIT(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_TC_DED_LIMIT_OFFSET(idx))
+#define C2_PCT_CFG_TRS_TC_DED_LIMIT_SIZE 0x00000040
+
+union c2_pct_cfg_trs_tc_ded_limit {
+ __u64 qw;
+ struct {
+ __u64 ded_limit : 14;
+ __u64: 50;
+ };
+};
+
+#define C1_PCT_CFG_TRS_TC_MAX_LIMIT_OFFSET(idx) (0x00000640 + ((idx) * 8))
+#define C1_PCT_CFG_TRS_TC_MAX_LIMIT_ENTRIES 8
+#define C1_PCT_CFG_TRS_TC_MAX_LIMIT(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_TC_MAX_LIMIT_OFFSET(idx))
+#define C1_PCT_CFG_TRS_TC_MAX_LIMIT_SIZE 0x00000040
+
+union c1_pct_cfg_trs_tc_max_limit {
+ __u64 qw;
+ struct {
+ __u64 max_limit : 12;
+ __u64: 52;
+ };
+};
+
+#define C2_PCT_CFG_TRS_TC_MAX_LIMIT_OFFSET(idx) (0x00000640 + ((idx) * 8))
+#define C2_PCT_CFG_TRS_TC_MAX_LIMIT_ENTRIES 8
+#define C2_PCT_CFG_TRS_TC_MAX_LIMIT(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_TC_MAX_LIMIT_OFFSET(idx))
+#define C2_PCT_CFG_TRS_TC_MAX_LIMIT_SIZE 0x00000040
+
+union c2_pct_cfg_trs_tc_max_limit {
+ __u64 qw;
+ struct {
+ __u64 max_limit : 14;
+ __u64: 50;
+ };
+};
+
+#define C1_PCT_CFG_TRS_CRDT_LIMITS_OFFSET 0x00000680
+#define C1_PCT_CFG_TRS_CRDT_LIMITS (C_PCT_BASE + C1_PCT_CFG_TRS_CRDT_LIMITS_OFFSET)
+#define C1_PCT_CFG_TRS_CRDT_LIMITS_SIZE 0x00000008
+
+union c1_pct_cfg_trs_crdt_limits {
+ __u64 qw;
+ struct {
+ __u64 total_limit : 12;
+ __u64: 4;
+ __u64 shared_limit : 12;
+ __u64: 36;
+ };
+};
+
+#define C2_PCT_CFG_TRS_CRDT_LIMITS_OFFSET 0x00000680
+#define C2_PCT_CFG_TRS_CRDT_LIMITS (C_PCT_BASE + C2_PCT_CFG_TRS_CRDT_LIMITS_OFFSET)
+#define C2_PCT_CFG_TRS_CRDT_LIMITS_SIZE 0x00000008
+
+union c2_pct_cfg_trs_crdt_limits {
+ __u64 qw;
+ struct {
+ __u64 total_limit : 14;
+ __u64: 2;
+ __u64 shared_limit : 14;
+ __u64: 34;
+ };
+};
+
+#define C_PCT_CFG_MST_TC_DED_LIMIT_OFFSET(idx) (0x00000690 + ((idx) * 8))
+#define C_PCT_CFG_MST_TC_DED_LIMIT_ENTRIES 8
+#define C_PCT_CFG_MST_TC_DED_LIMIT(idx) (C_PCT_BASE + C_PCT_CFG_MST_TC_DED_LIMIT_OFFSET(idx))
+#define C_PCT_CFG_MST_TC_DED_LIMIT_SIZE 0x00000040
+
+union c_pct_cfg_mst_tc_ded_limit {
+ __u64 qw;
+ struct {
+ __u64 ded_limit : 12;
+ __u64: 52;
+ };
+};
+
+#define C_PCT_CFG_MST_TC_MAX_LIMIT_OFFSET(idx) (0x000006d0 + ((idx) * 8))
+#define C_PCT_CFG_MST_TC_MAX_LIMIT_ENTRIES 8
+#define C_PCT_CFG_MST_TC_MAX_LIMIT(idx) (C_PCT_BASE + C_PCT_CFG_MST_TC_MAX_LIMIT_OFFSET(idx))
+#define C_PCT_CFG_MST_TC_MAX_LIMIT_SIZE 0x00000040
+
+union c_pct_cfg_mst_tc_max_limit {
+ __u64 qw;
+ struct {
+ __u64 max_limit : 12;
+ __u64: 52;
+ };
+};
+
+#define C_PCT_CFG_MST_CRDT_LIMITS_OFFSET 0x00000710
+#define C_PCT_CFG_MST_CRDT_LIMITS (C_PCT_BASE + C_PCT_CFG_MST_CRDT_LIMITS_OFFSET)
+#define C_PCT_CFG_MST_CRDT_LIMITS_SIZE 0x00000008
+
+union c_pct_cfg_mst_crdt_limits {
+ __u64 qw;
+ struct {
+ __u64 total_limit : 12;
+ __u64: 4;
+ __u64 shared_limit : 12;
+ __u64: 36;
+ };
+};
+
+#define C_PCT_CFG_TCT_TC_DED_LIMIT_OFFSET(idx) (0x00000720 + ((idx) * 8))
+#define C_PCT_CFG_TCT_TC_DED_LIMIT_ENTRIES 8
+#define C_PCT_CFG_TCT_TC_DED_LIMIT(idx) (C_PCT_BASE + C_PCT_CFG_TCT_TC_DED_LIMIT_OFFSET(idx))
+#define C_PCT_CFG_TCT_TC_DED_LIMIT_SIZE 0x00000040
+
+union c_pct_cfg_tct_tc_ded_limit {
+ __u64 qw;
+ struct {
+ __u64 ded_limit : 14;
+ __u64: 50;
+ };
+};
+
+#define C_PCT_CFG_TCT_TC_MAX_LIMIT_OFFSET(idx) (0x00000760 + ((idx) * 8))
+#define C_PCT_CFG_TCT_TC_MAX_LIMIT_ENTRIES 8
+#define C_PCT_CFG_TCT_TC_MAX_LIMIT(idx) (C_PCT_BASE + C_PCT_CFG_TCT_TC_MAX_LIMIT_OFFSET(idx))
+#define C_PCT_CFG_TCT_TC_MAX_LIMIT_SIZE 0x00000040
+
+union c_pct_cfg_tct_tc_max_limit {
+ __u64 qw;
+ struct {
+ __u64 max_limit : 14;
+ __u64: 50;
+ };
+};
+
+#define C_PCT_CFG_TCT_CRDT_LIMITS_OFFSET 0x000007a0
+#define C_PCT_CFG_TCT_CRDT_LIMITS (C_PCT_BASE + C_PCT_CFG_TCT_CRDT_LIMITS_OFFSET)
+#define C_PCT_CFG_TCT_CRDT_LIMITS_SIZE 0x00000008
+
+union c_pct_cfg_tct_crdt_limits {
+ __u64 qw;
+ struct {
+ __u64 total_limit : 14;
+ __u64: 2;
+ __u64 shared_limit : 14;
+ __u64: 34;
+ };
+};
+
+#define C_PCT_CFG_RSP_DSCP_REQ_TC_MAP_OFFSET(idx) (0x00000800 + ((idx) * 8))
+#define C_PCT_CFG_RSP_DSCP_REQ_TC_MAP_ENTRIES 4
+#define C_PCT_CFG_RSP_DSCP_REQ_TC_MAP(idx) (C_PCT_BASE + C_PCT_CFG_RSP_DSCP_REQ_TC_MAP_OFFSET(idx))
+#define C_PCT_CFG_RSP_DSCP_REQ_TC_MAP_SIZE 0x00000020
+
+union c_pct_cfg_rsp_dscp_req_tc_map {
+ __u64 qw;
+ struct {
+ __u64 dscp0_tc : 3;
+ __u64: 1;
+ __u64 dscp1_tc : 3;
+ __u64: 1;
+ __u64 dscp2_tc : 3;
+ __u64: 1;
+ __u64 dscp3_tc : 3;
+ __u64: 1;
+ __u64 dscp4_tc : 3;
+ __u64: 1;
+ __u64 dscp5_tc : 3;
+ __u64: 1;
+ __u64 dscp6_tc : 3;
+ __u64: 1;
+ __u64 dscp7_tc : 3;
+ __u64: 1;
+ __u64 dscp8_tc : 3;
+ __u64: 1;
+ __u64 dscp9_tc : 3;
+ __u64: 1;
+ __u64 dscp10_tc : 3;
+ __u64: 1;
+ __u64 dscp11_tc : 3;
+ __u64: 1;
+ __u64 dscp12_tc : 3;
+ __u64: 1;
+ __u64 dscp13_tc : 3;
+ __u64: 1;
+ __u64 dscp14_tc : 3;
+ __u64: 1;
+ __u64 dscp15_tc : 3;
+ __u64: 1;
+ };
+};
+
+#define C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_OFFSET(idx) (0x00000820 + ((idx) * 8))
+#define C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_ENTRIES 8
+#define C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP(idx) \
+ (C_PCT_BASE + C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_OFFSET(idx))
+#define C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_SIZE 0x00000040
+
+struct c_rsp_dscp {
+ __u8 rsp_dscp : 6;
+ __u8: 2;
+};
+
+#define C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_ARRAY_SIZE 8
+union c_pct_cfg_req_dscp_rsp_dscp_map {
+ __u64 qw;
+ struct c_rsp_dscp map[C_PCT_CFG_REQ_DSCP_RSP_DSCP_MAP_ARRAY_SIZE];
+};
+
+#define C_PCT_CFG_REQ_TC_RSP_TC_MAP_OFFSET 0x00000860
+#define C_PCT_CFG_REQ_TC_RSP_TC_MAP (C_PCT_BASE + C_PCT_CFG_REQ_TC_RSP_TC_MAP_OFFSET)
+#define C_PCT_CFG_REQ_TC_RSP_TC_MAP_SIZE 0x00000008
+
+union c_pct_cfg_req_tc_rsp_tc_map {
+ __u64 qw;
+ struct {
+ __u64 req_tc0 : 3;
+ __u64: 1;
+ __u64 req_tc1 : 3;
+ __u64: 1;
+ __u64 req_tc2 : 3;
+ __u64: 1;
+ __u64 req_tc3 : 3;
+ __u64: 1;
+ __u64 req_tc4 : 3;
+ __u64: 1;
+ __u64 req_tc5 : 3;
+ __u64: 1;
+ __u64 req_tc6 : 3;
+ __u64: 1;
+ __u64 req_tc7 : 3;
+ __u64: 33;
+ };
+};
+
+#define C_PCT_CFG_SCT_TAG_DFA_MASK_OFFSET(idx) (0x00000878 + ((idx) * 8))
+#define C_PCT_CFG_SCT_TAG_DFA_MASK_ENTRIES 16
+#define C_PCT_CFG_SCT_TAG_DFA_MASK(idx) (C_PCT_BASE + C_PCT_CFG_SCT_TAG_DFA_MASK_OFFSET(idx))
+#define C_PCT_CFG_SCT_TAG_DFA_MASK_SIZE 0x00000080
+
+union c_pct_cfg_sct_tag_dfa_mask {
+ __u64 qw;
+ struct {
+ __u16 dfa_mask : 12;
+ __u16: 4;
+ } dscp[4];
+};
+
+#define C_PCT_CFG_SW_RECYCLE_SPT_OFFSET 0x00000908
+#define C_PCT_CFG_SW_RECYCLE_SPT (C_PCT_BASE + C_PCT_CFG_SW_RECYCLE_SPT_OFFSET)
+#define C_PCT_CFG_SW_RECYCLE_SPT_SIZE 0x00000008
+
+union c_pct_cfg_sw_recycle_spt {
+ __u64 qw;
+ struct {
+ __u64 spt_idx : 11;
+ __u64: 5;
+ __u64 bc : 4;
+ __u64: 44;
+ };
+};
+
+#define C_PCT_CFG_SW_RECYCLE_SCT_OFFSET 0x00000910
+#define C_PCT_CFG_SW_RECYCLE_SCT (C_PCT_BASE + C_PCT_CFG_SW_RECYCLE_SCT_OFFSET)
+#define C_PCT_CFG_SW_RECYCLE_SCT_SIZE 0x00000008
+
+union c_pct_cfg_sw_recycle_sct {
+ __u64 qw;
+ struct {
+ __u64 sct_idx : 12;
+ __u64: 4;
+ __u64 bc : 4;
+ __u64: 44;
+ };
+};
+
+#define C_PCT_CFG_SW_SIM_SRC_RSP_OFFSET 0x00000918
+#define C_PCT_CFG_SW_SIM_SRC_RSP (C_PCT_BASE + C_PCT_CFG_SW_SIM_SRC_RSP_OFFSET)
+#define C_PCT_CFG_SW_SIM_SRC_RSP_SIZE 0x00000008
+
+union c_pct_cfg_sw_sim_src_rsp {
+ __u64 qw;
+ struct {
+ __u64 spt_sct_idx : 12;
+ __u64: 12;
+ __u64 return_code : 6;
+ __u64: 2;
+ __u64 opcode : 4;
+ __u64: 4;
+ __u64 rsp_not_gcomp : 1;
+ __u64: 7;
+ __u64 loaded : 1;
+ __u64: 15;
+ };
+};
+
+#define C_PCT_CFG_SW_RETRY_SRC_CLS_REQ_OFFSET 0x00000920
+#define C_PCT_CFG_SW_RETRY_SRC_CLS_REQ (C_PCT_BASE + C_PCT_CFG_SW_RETRY_SRC_CLS_REQ_OFFSET)
+#define C_PCT_CFG_SW_RETRY_SRC_CLS_REQ_SIZE 0x00000008
+
+union c_pct_cfg_sw_retry_src_cls_req {
+ __u64 qw;
+ struct {
+ __u64 sct_idx : 12;
+ __u64: 3;
+ __u64 close_not_clear : 1;
+ __u64 loaded : 1;
+ __u64: 47;
+ };
+};
+
+#define C_PCT_CFG_SW_SIM_TGT_CLS_REQ_OFFSET 0x00000928
+#define C_PCT_CFG_SW_SIM_TGT_CLS_REQ (C_PCT_BASE + C_PCT_CFG_SW_SIM_TGT_CLS_REQ_OFFSET)
+#define C_PCT_CFG_SW_SIM_TGT_CLS_REQ_SIZE 0x00000008
+
+union c_pct_cfg_sw_sim_tgt_cls_req {
+ __u64 qw;
+ struct {
+ __u64 tct_idx : 13;
+ __u64: 3;
+ __u64 loaded : 1;
+ __u64: 47;
+ };
+};
+
+#define C_PCT_CFG_SCT_RAM0_OFFSET(idx) (0x00028000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_RAM0_ENTRIES 4096
+#define C_PCT_CFG_SCT_RAM0(idx) (C_PCT_BASE + C_PCT_CFG_SCT_RAM0_OFFSET(idx))
+#define C_PCT_CFG_SCT_RAM0_SIZE 0x00008000
+
+union c_pct_cfg_sct_ram0 {
+ __u64 qw;
+ struct {
+ __u64 clr_tail : 11;
+ __u64: 5;
+ __u64 req_pend_cnt : 11;
+ __u64: 37;
+ };
+};
+
+#define C_PCT_CFG_SCT_RAM1_OFFSET(idx) (0x00030000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_RAM1_ENTRIES 4096
+#define C_PCT_CFG_SCT_RAM1(idx) (C_PCT_BASE + C_PCT_CFG_SCT_RAM1_OFFSET(idx))
+#define C_PCT_CFG_SCT_RAM1_SIZE 0x00008000
+
+union c_pct_cfg_sct_ram1 {
+ __u64 qw;
+ struct {
+ __u64 put_comp_cnt : 11;
+ __u64: 5;
+ __u64 mcu : 7;
+ __u64: 1;
+ __u64 pcp : 3;
+ __u64: 1;
+ __u64 bc : 4;
+ __u64: 8;
+ __u64 sw_recycle : 1;
+ __u64: 23;
+ };
+};
+
+#define C_PCT_CFG_SCT_RAM2_OFFSET(idx) (0x00040000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_RAM2_ENTRIES 4096
+#define C_PCT_CFG_SCT_RAM2(idx) (C_PCT_BASE + C_PCT_CFG_SCT_RAM2_OFFSET(idx))
+#define C_PCT_CFG_SCT_RAM2_SIZE 0x00008000
+
+union c_pct_cfg_sct_ram2 {
+ __u64 qw;
+ struct {
+ __u64: 16;
+ __u64 clr_head : 11;
+ __u64: 5;
+ __u64 req_seqno : 12;
+ __u64: 20;
+ };
+};
+
+#define C_PCT_CFG_SCT_RAM3_OFFSET(idx) (0x00050000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_RAM3_ENTRIES 4096
+#define C_PCT_CFG_SCT_RAM3(idx) (C_PCT_BASE + C_PCT_CFG_SCT_RAM3_OFFSET(idx))
+#define C_PCT_CFG_SCT_RAM3_SIZE 0x00008000
+
+union c_pct_cfg_sct_ram3 {
+ __u64 qw;
+ struct {
+ __u64 close_try : 3;
+ __u64 hw_clr_cls_dis : 1;
+ __u64: 60;
+ };
+};
+
+#define C_PCT_CFG_SCT_RAM4_OFFSET(idx) (0x00060000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_RAM4_ENTRIES 4096
+#define C_PCT_CFG_SCT_RAM4(idx) (C_PCT_BASE + C_PCT_CFG_SCT_RAM4_OFFSET(idx))
+#define C_PCT_CFG_SCT_RAM4_SIZE 0x00008000
+
+union c_pct_cfg_sct_ram4 {
+ __u64 qw;
+ struct {
+ __u64 get_comp_cnt : 11;
+ __u64: 53;
+ };
+};
+
+#define C_PCT_CFG_SCT_CAM_OFFSET(idx) (0x00070000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_CAM_ENTRIES 4096
+#define C_PCT_CFG_SCT_CAM(idx) (C_PCT_BASE + C_PCT_CFG_SCT_CAM_OFFSET(idx))
+#define C_PCT_CFG_SCT_CAM_SIZE 0x00008000
+
+union c_pct_cfg_sct_cam {
+ __u64 qw;
+ struct {
+ __u64 dfa : 32;
+ __u64 vni : 16;
+ __u64 mcu_group : 2;
+ __u64: 2;
+ __u64 dscp : 6;
+ __u64: 2;
+ __u64 vld : 1;
+ __u64: 3;
+ };
+};
+
+#define C_PCT_CFG_SMT_RAM0_OFFSET(idx) (0x00080000 + ((idx) * 8))
+#define C_PCT_CFG_SMT_RAM0_ENTRIES 256
+#define C_PCT_CFG_SMT_RAM0(idx) (C_PCT_BASE + C_PCT_CFG_SMT_RAM0_OFFSET(idx))
+#define C_PCT_CFG_SMT_RAM0_SIZE 0x00000800
+
+union c_pct_cfg_smt_ram0 {
+ __u64 qw;
+ struct {
+ __u64 sw_retry : 1;
+ __u64 return_code : 6;
+ __u64 tgt_error : 1;
+ __u64 req_comp_cnt : 11;
+ __u64: 5;
+ __u64 mcu : 7;
+ __u64: 1;
+ __u64 bc : 4;
+ __u64: 4;
+ __u64 unrestricted : 1;
+ __u64: 23;
+ };
+};
+
+#define C_PCT_CFG_SMT_RAM1_OFFSET(idx) (0x00088000 + ((idx) * 8))
+#define C_PCT_CFG_SMT_RAM1_ENTRIES 256
+#define C_PCT_CFG_SMT_RAM1(idx) (C_PCT_BASE + C_PCT_CFG_SMT_RAM1_OFFSET(idx))
+#define C_PCT_CFG_SMT_RAM1_SIZE 0x00000800
+
+union c_pct_cfg_smt_ram1 {
+ __u64 qw;
+ struct {
+ __u64 last_req : 1;
+ __u64 req_pend_cnt : 11;
+ __u64: 52;
+ };
+};
+
+#define C_PCT_CFG_SPT_RAM0_OFFSET(idx) (0x000a0000 + ((idx) * 64))
+#define C_PCT_CFG_SPT_RAM0_ENTRIES 2048
+#define C_PCT_CFG_SPT_RAM0(idx) (C_PCT_BASE + C_PCT_CFG_SPT_RAM0_OFFSET(idx))
+#define C_PCT_CFG_SPT_RAM0_SIZE 0x00020000
+
+union c_pct_cfg_spt_ram0 {
+ __u64 qw[6];
+ struct {
+ __u64 sw_recycle : 1;
+ __u64 hrp : 1;
+ __u64 req_mp : 1;
+ __u64 req_order : 1;
+ __u64 eom : 1;
+ __u64: 3;
+ __u64 event_send_disable : 1;
+ __u64 event_success_disable : 1;
+ __u64 event_ct_send : 1;
+ __u64 event_ct_reply : 1;
+ __u64 event_ct_ack : 1;
+ __u64 event_ct_bytes : 1;
+ __u64 lpe_gen_rndzvs_get : 1;
+ __u64: 1;
+ __u64 mlength : 32;
+ __u64 ptl_list : 2;
+ __u64: 14;
+ __u64 comp_data;
+ __u64 comp_cq : 11;
+ __u64: 5;
+ __u64 comp_ct : 11;
+ __u64: 5;
+ __u64 comp_eq : 11;
+ __u64: 21;
+ __u64 smt_idx : 8;
+ __u64: 56;
+ __u64 get_addr : 57;
+ __u64: 6;
+ __u64 get_with_local_flag : 1;
+ __u64 get_atc : 10;
+ __u64: 2;
+ __u64 get_vld : 1;
+ __u64: 3;
+ __u64 pcp : 3;
+ __u64: 1;
+ __u64 bc : 4;
+ __u64 mcu : 7;
+ __u64: 1;
+ __u64 timestamp : 20;
+ __u64: 12;
+ };
+};
+
+#define C_PCT_CFG_SPT_RAM1_OFFSET(idx) (0x000c0000 + ((idx) * 8))
+#define C_PCT_CFG_SPT_RAM1_ENTRIES 2048
+#define C_PCT_CFG_SPT_RAM1(idx) (C_PCT_BASE + C_PCT_CFG_SPT_RAM1_OFFSET(idx))
+#define C_PCT_CFG_SPT_RAM1_SIZE 0x00004000
+
+union c_pct_cfg_spt_ram1 {
+ __u64 qw;
+ struct {
+ __u64 clr_nxt : 11;
+ __u64: 5;
+ __u64 sct_idx : 12;
+ __u64: 36;
+ };
+};
+
+#define C_PCT_CFG_SPT_RAM2_OFFSET(idx) (0x000c8000 + ((idx) * 8))
+#define C_PCT_CFG_SPT_RAM2_ENTRIES 2048
+#define C_PCT_CFG_SPT_RAM2(idx) (C_PCT_BASE + C_PCT_CFG_SPT_RAM2_OFFSET(idx))
+#define C_PCT_CFG_SPT_RAM2_SIZE 0x00004000
+
+union c_pct_cfg_spt_ram2 {
+ __u64 qw;
+ struct {
+ __u64 srb_ptr : 11;
+ __u64: 5;
+ __u64 sct_seqno : 12;
+ __u64: 4;
+ __u64 return_code : 6;
+ __u64: 26;
+ };
+};
+
+#define C_PCT_CFG_TCT_RAM_OFFSET(idx) (0x000d0000 + ((idx) * 8))
+#define C_PCT_CFG_TCT_RAM_ENTRIES 8192
+#define C_PCT_CFG_TCT_RAM(idx) (C_PCT_BASE + C_PCT_CFG_TCT_RAM_OFFSET(idx))
+#define C_PCT_CFG_TCT_RAM_SIZE 0x00010000
+
+union c_pct_cfg_tct_ram {
+ __u64 qw;
+ struct {
+ __u64 last_active_mst : 11;
+ __u64: 3;
+ __u64 last_active_mst_is_put : 1;
+ __u64 last_active_mst_vld : 1;
+ __u64 clr_seqno : 12;
+ __u64: 4;
+ __u64 exp_seqno : 12;
+ __u64: 4;
+ __u64 tc : 3;
+ __u64: 13;
+ };
+};
+
+#define C_PCT_CFG_TCT_CAM_OFFSET(idx) (0x000e0000 + ((idx) * 8))
+#define C_PCT_CFG_TCT_CAM_ENTRIES 8192
+#define C_PCT_CFG_TCT_CAM(idx) (C_PCT_BASE + C_PCT_CFG_TCT_CAM_OFFSET(idx))
+#define C_PCT_CFG_TCT_CAM_SIZE 0x00010000
+
+union c_pct_cfg_tct_cam {
+ __u64 qw;
+ struct {
+ __u64 sfa_nid : 20;
+ __u64: 4;
+ __u64 sct_idx : 12;
+ __u64: 24;
+ __u64 vld : 1;
+ __u64: 3;
+ };
+};
+
+#define C1_PCT_CFG_TRS_RAM0_OFFSET(idx) (0x000f0000 + ((idx) * 8))
+#define C1_PCT_CFG_TRS_RAM0_ENTRIES 2048
+#define C1_PCT_CFG_TRS_RAM0(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_RAM0_OFFSET(idx))
+#define C1_PCT_CFG_TRS_RAM0_SIZE 0x00004000
+
+union c_pct_cfg_trs_ram0 {
+ __u64 qw;
+ struct {
+ __u64 mst_idx : 11;
+ __u64: 5;
+ __u64 put_not_get : 1;
+ __u64: 7;
+ __u64 mst_idx_dealloc_vld : 1;
+ __u64: 39;
+ };
+};
+
+#define C2_PCT_CFG_TRS_RAM0_OFFSET(idx) (0x000f0000 + ((idx) * 8))
+#define C2_PCT_CFG_TRS_RAM0_ENTRIES 8192
+#define C2_PCT_CFG_TRS_RAM0(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_RAM0_OFFSET(idx))
+#define C2_PCT_CFG_TRS_RAM0_SIZE 0x00010000
+
+#define C1_PCT_CFG_TRS_RAM1_OFFSET(idx) (0x00100000 + ((idx) * 32))
+#define C1_PCT_CFG_TRS_RAM1_ENTRIES 2048
+#define C1_PCT_CFG_TRS_RAM1(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_RAM1_OFFSET(idx))
+#define C1_PCT_CFG_TRS_RAM1_SIZE 0x00010000
+
+union c_pct_cfg_trs_ram1 {
+ __u64 qw[3];
+ struct {
+ __u64 data_lower;
+ __u64 data_upper;
+ __u64 famo_data_vld : 1;
+ __u64: 7;
+ __u64 return_code : 6;
+ __u64: 2;
+ __u64 ptl_list : 2;
+ __u64: 6;
+ __u64 rsp_len : 5;
+ __u64: 3;
+ __u64 pend_rsp : 1;
+ __u64: 31;
+ };
+};
+
+#define C2_PCT_CFG_TRS_RAM1_OFFSET(idx) (0x00100000 + ((idx) * 32))
+#define C2_PCT_CFG_TRS_RAM1_ENTRIES 8192
+#define C2_PCT_CFG_TRS_RAM1(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_RAM1_OFFSET(idx))
+#define C2_PCT_CFG_TRS_RAM1_SIZE 0x00040000
+
+#define C1_PCT_CFG_TRS_CAM_OFFSET(idx) (0x00110000 + ((idx) * 8))
+#define C1_PCT_CFG_TRS_CAM_ENTRIES 2048
+#define C1_PCT_CFG_TRS_CAM(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_CAM_OFFSET(idx))
+#define C1_PCT_CFG_TRS_CAM_SIZE 0x00004000
+
+union c_pct_cfg_trs_cam {
+ __u64 qw;
+ struct {
+ __u64 req_seqno : 12;
+ __u64: 4;
+ __u64 tct_idx : 13;
+ __u64: 3;
+ __u64 vld : 1;
+ __u64: 31;
+ };
+};
+
+#define C2_PCT_CFG_TRS_CAM_OFFSET(idx) (0x00180000 + ((idx) * 8))
+#define C2_PCT_CFG_TRS_CAM_ENTRIES 8192
+#define C2_PCT_CFG_TRS_CAM(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_CAM_OFFSET(idx))
+#define C2_PCT_CFG_TRS_CAM_SIZE 0x00010000
+
+#define C1_PCT_CFG_MST_CAM_OFFSET(idx) (0x00114000 + ((idx) * 8))
+#define C_PCT_CFG_MST_CAM_ENTRIES 2048
+#define C1_PCT_CFG_MST_CAM_ENTRIES C_PCT_CFG_MST_CAM_ENTRIES
+#define C1_PCT_CFG_MST_CAM(idx) (C_PCT_BASE + C1_PCT_CFG_MST_CAM_OFFSET(idx))
+#define C_PCT_CFG_MST_CAM_SIZE 0x00004000
+#define C1_PCT_CFG_MST_CAM_SIZE C_PCT_CFG_MST_CAM_SIZE
+
+union c_pct_cfg_mst_cam {
+ __u64 qw;
+ struct {
+ __u64 msg_id : 11;
+ __u64: 5;
+ __u64 multi_pkt : 1;
+ __u64: 7;
+ __u64 sfa_nid : 20;
+ __u64 vld : 1;
+ __u64: 19;
+ };
+};
+
+#define C2_PCT_CFG_MST_CAM_OFFSET(idx) (0x00190000 + ((idx) * 8))
+#define C2_PCT_CFG_MST_CAM_ENTRIES C_PCT_CFG_MST_CAM_ENTRIES
+#define C2_PCT_CFG_MST_CAM(idx) (C_PCT_BASE + C2_PCT_CFG_MST_CAM_OFFSET(idx))
+#define C2_PCT_CFG_MST_CAM_SIZE C_PCT_CFG_MST_CAM_SIZE
+
+#define C1_PCT_CFG_SPT_MISC_INFO_OFFSET(idx) (0x00118000 + ((idx) * 8))
+#define C_PCT_CFG_SPT_MISC_INFO_ENTRIES 2048
+#define C1_PCT_CFG_SPT_MISC_INFO_ENTRIES C_PCT_CFG_SPT_MISC_INFO_ENTRIES
+#define C1_PCT_CFG_SPT_MISC_INFO(idx) (C_PCT_BASE + C1_PCT_CFG_SPT_MISC_INFO_OFFSET(idx))
+#define C_PCT_CFG_SPT_MISC_INFO_SIZE 0x00004000
+#define C1_PCT_CFG_SPT_MISC_INFO_SIZE C_PCT_CFG_SPT_MISC_INFO_SIZE
+
+union c_pct_cfg_spt_misc_info {
+ __u64 qw;
+ struct {
+ __u64 start_epoch : 2;
+ __u64: 6;
+ __u64 to_flag : 1;
+ __u64: 7;
+ __u64 req_try : 3;
+ __u64: 5;
+ __u64 rsp_status : 2;
+ __u64: 6;
+ __u64 sw_retry : 1;
+ __u64: 7;
+ __u64 pkt_sent : 1;
+ __u64: 7;
+ __u64 vld : 1;
+ __u64: 15;
+ };
+};
+
+#define C2_PCT_CFG_SPT_MISC_INFO_OFFSET(idx) (0x00194000 + ((idx) * 8))
+#define C2_PCT_CFG_SPT_MISC_INFO_ENTRIES C_PCT_CFG_SPT_MISC_INFO_ENTRIES
+#define C2_PCT_CFG_SPT_MISC_INFO(idx) (C_PCT_BASE + C2_PCT_CFG_SPT_MISC_INFO_OFFSET(idx))
+#define C2_PCT_CFG_SPT_MISC_INFO_SIZE C_PCT_CFG_SPT_MISC_INFO_SIZE
+
+#define C1_PCT_CFG_SCT_MISC_INFO_OFFSET(idx) (0x00120000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_MISC_INFO_ENTRIES 4096
+#define C1_PCT_CFG_SCT_MISC_INFO_ENTRIES C_PCT_CFG_SCT_MISC_INFO_ENTRIES
+#define C1_PCT_CFG_SCT_MISC_INFO(idx) (C_PCT_BASE + C1_PCT_CFG_SCT_MISC_INFO_OFFSET(idx))
+#define C_PCT_CFG_SCT_MISC_INFO_SIZE 0x00008000
+#define C1_PCT_CFG_SCT_MISC_INFO_SIZE C_PCT_CFG_SCT_MISC_INFO_SIZE
+
+union c_pct_cfg_sct_misc_info {
+ __u64 qw;
+ struct {
+ __u64 req_redo_vld : 1;
+ __u64: 7;
+ __u64 deny_new_msg : 1;
+ __u64: 7;
+ __u64 at_msg_boundary : 1;
+ __u64: 7;
+ __u64 clr_empty : 1;
+ __u64: 7;
+ __u64 last_active_epoch : 2;
+ __u64: 6;
+ __u64 sct_status : 3;
+ __u64: 21;
+ };
+};
+
+#define C2_PCT_CFG_SCT_MISC_INFO_OFFSET(idx) (0x00198000 + ((idx) * 8))
+#define C2_PCT_CFG_SCT_MISC_INFO_ENTRIES C_PCT_CFG_SCT_MISC_INFO_ENTRIES
+#define C2_PCT_CFG_SCT_MISC_INFO(idx) (C_PCT_BASE + C2_PCT_CFG_SCT_MISC_INFO_OFFSET(idx))
+#define C2_PCT_CFG_SCT_MISC_INFO_SIZE C_PCT_CFG_SCT_MISC_INFO_SIZE
+
+#define C1_PCT_CFG_TCT_MISC_INFO_OFFSET(idx) (0x00130000 + ((idx) * 8))
+#define C1_PCT_CFG_TCT_MISC_INFO_ENTRIES 8192
+#define C1_PCT_CFG_TCT_MISC_INFO(idx) (C_PCT_BASE + C1_PCT_CFG_TCT_MISC_INFO_OFFSET(idx))
+#define C1_PCT_CFG_TCT_MISC_INFO_SIZE 0x00010000
+
+union c1_pct_cfg_tct_misc_info {
+ __u64 qw;
+ struct {
+ __u64 last_active_epoch : 2;
+ __u64: 6;
+ __u64 to_flag : 1;
+ __u64: 7;
+ __u64 vld : 1;
+ __u64: 47;
+ };
+};
+
+#define C2_PCT_CFG_TCT_MISC_INFO_OFFSET(idx) (0x001a0000 + ((idx) * 8))
+#define C2_PCT_CFG_TCT_MISC_INFO_ENTRIES 8192
+#define C2_PCT_CFG_TCT_MISC_INFO(idx) (C_PCT_BASE + C2_PCT_CFG_TCT_MISC_INFO_OFFSET(idx))
+#define C2_PCT_CFG_TCT_MISC_INFO_SIZE 0x00010000
+
+union c2_pct_cfg_tct_misc_info {
+ __u64 qw;
+ struct {
+ __u64 last_active_epoch : 2;
+ __u64: 6;
+ __u64 to_flag : 1;
+ __u64: 3;
+ __u64 closing : 1;
+ __u64: 3;
+ __u64 vld : 1;
+ __u64: 47;
+ };
+};
+
+#define C1_PCT_CFG_SCT_INVALIDATE_OFFSET(idx) (0x00140000 + ((idx) * 8))
+#define C_PCT_CFG_SCT_INVALIDATE_ENTRIES 4096
+#define C1_PCT_CFG_SCT_INVALIDATE_ENTRIES C_PCT_CFG_SCT_INVALIDATE_ENTRIES
+#define C1_PCT_CFG_SCT_INVALIDATE(idx) (C_PCT_BASE + C1_PCT_CFG_SCT_INVALIDATE_OFFSET(idx))
+#define C_PCT_CFG_SCT_INVALIDATE_SIZE 0x00008000
+#define C1_PCT_CFG_SCT_INVALIDATE_SIZE C_PCT_CFG_SCT_INVALIDATE_SIZE
+
+union c_pct_cfg_sct_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C2_PCT_CFG_SCT_INVALIDATE_OFFSET(idx) (0x001d0000 + ((idx) * 8))
+#define C2_PCT_CFG_SCT_INVALIDATE_ENTRIES C_PCT_CFG_SCT_INVALIDATE_ENTRIES
+#define C2_PCT_CFG_SCT_INVALIDATE(idx) (C_PCT_BASE + C2_PCT_CFG_SCT_INVALIDATE_OFFSET(idx))
+#define C2_PCT_CFG_SCT_INVALIDATE_SIZE C_PCT_CFG_SCT_INVALIDATE_SIZE
+
+#define C1_PCT_CFG_TCT_INVALIDATE_OFFSET(idx) (0x00150000 + ((idx) * 8))
+#define C_PCT_CFG_TCT_INVALIDATE_ENTRIES 8192
+#define C1_PCT_CFG_TCT_INVALIDATE_ENTRIES C_PCT_CFG_TCT_INVALIDATE_ENTRIES
+#define C1_PCT_CFG_TCT_INVALIDATE(idx) (C_PCT_BASE + C1_PCT_CFG_TCT_INVALIDATE_OFFSET(idx))
+#define C_PCT_CFG_TCT_INVALIDATE_SIZE 0x00010000
+#define C1_PCT_CFG_TCT_INVALIDATE_SIZE C_PCT_CFG_TCT_INVALIDATE_SIZE
+
+union c_pct_cfg_tct_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C2_PCT_CFG_TCT_INVALIDATE_OFFSET(idx) (0x001b0000 + ((idx) * 8))
+#define C2_PCT_CFG_TCT_INVALIDATE_ENTRIES C_PCT_CFG_TCT_INVALIDATE_ENTRIES
+#define C2_PCT_CFG_TCT_INVALIDATE(idx) (C_PCT_BASE + C2_PCT_CFG_TCT_INVALIDATE_OFFSET(idx))
+#define C2_PCT_CFG_TCT_INVALIDATE_SIZE C_PCT_CFG_TCT_INVALIDATE_SIZE
+
+#define C1_PCT_CFG_TRS_INVALIDATE_OFFSET(idx) (0x00168000 + ((idx) * 8))
+#define C1_PCT_CFG_TRS_INVALIDATE_ENTRIES 2048
+#define C1_PCT_CFG_TRS_INVALIDATE(idx) (C_PCT_BASE + C1_PCT_CFG_TRS_INVALIDATE_OFFSET(idx))
+#define C1_PCT_CFG_TRS_INVALIDATE_SIZE 0x00004000
+
+union c_pct_cfg_trs_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C2_PCT_CFG_TRS_INVALIDATE_OFFSET(idx) (0x001c0000 + ((idx) * 8))
+#define C2_PCT_CFG_TRS_INVALIDATE_ENTRIES 8192
+#define C2_PCT_CFG_TRS_INVALIDATE(idx) (C_PCT_BASE + C2_PCT_CFG_TRS_INVALIDATE_OFFSET(idx))
+#define C2_PCT_CFG_TRS_INVALIDATE_SIZE 0x00010000
+
+#define C1_PCT_CFG_MST_INVALIDATE_OFFSET(idx) (0x00170000 + ((idx) * 8))
+#define C_PCT_CFG_MST_INVALIDATE_ENTRIES 2048
+#define C1_PCT_CFG_MST_INVALIDATE_ENTRIES C_PCT_CFG_MST_INVALIDATE_ENTRIES
+#define C1_PCT_CFG_MST_INVALIDATE(idx) (C_PCT_BASE + C1_PCT_CFG_MST_INVALIDATE_OFFSET(idx))
+#define C_PCT_CFG_MST_INVALIDATE_SIZE 0x00004000
+#define C1_PCT_CFG_MST_INVALIDATE_SIZE C_PCT_CFG_MST_INVALIDATE_SIZE
+
+union c_pct_cfg_mst_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C2_PCT_CFG_MST_INVALIDATE_OFFSET(idx) (0x001d8000 + ((idx) * 8))
+#define C2_PCT_CFG_MST_INVALIDATE_ENTRIES C_PCT_CFG_MST_INVALIDATE_ENTRIES
+#define C2_PCT_CFG_MST_INVALIDATE(idx) (C_PCT_BASE + C2_PCT_CFG_MST_INVALIDATE_OFFSET(idx))
+#define C2_PCT_CFG_MST_INVALIDATE_SIZE C_PCT_CFG_MST_INVALIDATE_SIZE
+
+#define C1_PCT_CFG_SRB_LINK_LIST_OFFSET(idx) (0x00178000 + ((idx) * 8))
+#define C_PCT_CFG_SRB_LINK_LIST_ENTRIES 2048
+#define C1_PCT_CFG_SRB_LINK_LIST_ENTRIES C_PCT_CFG_SRB_LINK_LIST_ENTRIES
+#define C1_PCT_CFG_SRB_LINK_LIST(idx) (C_PCT_BASE + C1_PCT_CFG_SRB_LINK_LIST_OFFSET(idx))
+#define C_PCT_CFG_SRB_LINK_LIST_SIZE 0x00004000
+#define C1_PCT_CFG_SRB_LINK_LIST_SIZE C_PCT_CFG_SRB_LINK_LIST_SIZE
+
+union c_pct_cfg_srb_link_list {
+ __u64 qw;
+ struct {
+ __u64 tail : 1;
+ __u64: 7;
+ __u64 next_ptr : 11;
+ __u64: 45;
+ };
+};
+
+#define C2_PCT_CFG_SRB_LINK_LIST_OFFSET(idx) (0x001e0000 + ((idx) * 8))
+#define C2_PCT_CFG_SRB_LINK_LIST_ENTRIES C_PCT_CFG_SRB_LINK_LIST_ENTRIES
+#define C2_PCT_CFG_SRB_LINK_LIST(idx) (C_PCT_BASE + C2_PCT_CFG_SRB_LINK_LIST_OFFSET(idx))
+#define C2_PCT_CFG_SRB_LINK_LIST_SIZE C_PCT_CFG_SRB_LINK_LIST_SIZE
+
+#define C_PCT_CFG_SRB_CELL_DATA_OFFSET(idx) (0x00200000 + ((idx) * 128))
+#define C_PCT_CFG_SRB_CELL_DATA_ENTRIES 8192
+#define C_PCT_CFG_SRB_CELL_DATA(idx) (C_PCT_BASE + C_PCT_CFG_SRB_CELL_DATA_OFFSET(idx))
+#define C_PCT_CFG_SRB_CELL_DATA_SIZE 0x00100000
+
+union c_pct_cfg_srb_cell_data {
+ __u64 qw[9];
+ struct {
+ __u64 byte_len : 14;
+ __u64: 2;
+ __u64 fmt : 1;
+ __u64 eopb : 1;
+ __u64 eop : 1;
+ __u64 sop : 1;
+ __u64: 44;
+ __u64 word0;
+ __u64 word1;
+ __u64 word2;
+ __u64 word3;
+ __u64 word4;
+ __u64 word5;
+ __u64 word6;
+ __u64 word7;
+ };
+};
+
+#define C_PCT_PRF_SCT_STATUS_OFFSET 0x00300100
+#define C_PCT_PRF_SCT_STATUS (C_PCT_BASE + C_PCT_PRF_SCT_STATUS_OFFSET)
+#define C_PCT_PRF_SCT_STATUS_SIZE 0x00000008
+
+union c_pct_prf_sct_status {
+ __u64 qw;
+ struct {
+ __u64 sct_in_use : 13;
+ __u64: 19;
+ __u64 max_sct_in_use : 13;
+ __u64: 19;
+ };
+};
+
+#define C_PCT_PRF_TCT_STATUS_OFFSET 0x00300108
+#define C_PCT_PRF_TCT_STATUS (C_PCT_BASE + C_PCT_PRF_TCT_STATUS_OFFSET)
+#define C_PCT_PRF_TCT_STATUS_SIZE 0x00000008
+
+union c_pct_prf_tct_status {
+ __u64 qw;
+ struct {
+ __u64 tct_in_use : 14;
+ __u64: 18;
+ __u64 max_tct_in_use : 14;
+ __u64: 18;
+ };
+};
+
+#define C_PCT_PRF_SPT_STATUS_OFFSET 0x00300110
+#define C_PCT_PRF_SPT_STATUS (C_PCT_BASE + C_PCT_PRF_SPT_STATUS_OFFSET)
+#define C_PCT_PRF_SPT_STATUS_SIZE 0x00000008
+
+union c_pct_prf_spt_status {
+ __u64 qw;
+ struct {
+ __u64 spt_in_use : 12;
+ __u64: 20;
+ __u64 max_spt_in_use : 12;
+ __u64: 20;
+ };
+};
+
+#define C_PCT_PRF_SMT_STATUS_OFFSET 0x00300118
+#define C_PCT_PRF_SMT_STATUS (C_PCT_BASE + C_PCT_PRF_SMT_STATUS_OFFSET)
+#define C_PCT_PRF_SMT_STATUS_SIZE 0x00000008
+
+union c_pct_prf_smt_status {
+ __u64 qw;
+ struct {
+ __u64 smt_in_use : 9;
+ __u64: 23;
+ __u64 max_smt_in_use : 9;
+ __u64: 23;
+ };
+};
+
+#define C1_PCT_PRF_TRS_STATUS_OFFSET 0x00300120
+#define C1_PCT_PRF_TRS_STATUS (C_PCT_BASE + C1_PCT_PRF_TRS_STATUS_OFFSET)
+#define C1_PCT_PRF_TRS_STATUS_SIZE 0x00000008
+
+union c1_pct_prf_trs_status {
+ __u64 qw;
+ struct {
+ __u64 trs_in_use : 12;
+ __u64: 20;
+ __u64 max_trs_in_use : 12;
+ __u64: 20;
+ };
+};
+
+#define C2_PCT_PRF_TRS_STATUS_OFFSET 0x00300120
+#define C2_PCT_PRF_TRS_STATUS (C_PCT_BASE + C2_PCT_PRF_TRS_STATUS_OFFSET)
+#define C2_PCT_PRF_TRS_STATUS_SIZE 0x00000008
+
+union c2_pct_prf_trs_status {
+ __u64 qw;
+ struct {
+ __u64 trs_in_use : 14;
+ __u64: 18;
+ __u64 max_trs_in_use : 14;
+ __u64: 18;
+ };
+};
+
+#define C_PCT_PRF_SRB_STATUS_OFFSET 0x00300128
+#define C_PCT_PRF_SRB_STATUS (C_PCT_BASE + C_PCT_PRF_SRB_STATUS_OFFSET)
+#define C_PCT_PRF_SRB_STATUS_SIZE 0x00000008
+
+union c_pct_prf_srb_status {
+ __u64 qw;
+ struct {
+ __u64 srb_in_use : 12;
+ __u64: 20;
+ __u64 max_srb_in_use : 12;
+ __u64: 20;
+ };
+};
+
+#define C_PCT_PRF_MST_STATUS_OFFSET 0x00300130
+#define C_PCT_PRF_MST_STATUS (C_PCT_BASE + C_PCT_PRF_MST_STATUS_OFFSET)
+#define C_PCT_PRF_MST_STATUS_SIZE 0x00000008
+
+union c_pct_prf_mst_status {
+ __u64 qw;
+ struct {
+ __u64 mst_in_use : 12;
+ __u64: 20;
+ __u64 max_mst_in_use : 12;
+ __u64: 20;
+ };
+};
+
+#define C_PI_CFG_CRNC_OFFSET 0x00000000
+#define C_PI_CFG_CRNC (C_PI_BASE + C_PI_CFG_CRNC_OFFSET)
+#define C_PI_CFG_CRNC_SIZE 0x00000008
+
+union c_pi_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_PI_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_PI_CFG_RT_OFFSET (C_PI_BASE + C_PI_CFG_RT_OFFSET_OFFSET)
+#define C_PI_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_pi_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_PI_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_PI_MSC_SHADOW_ACTION (C_PI_BASE + C_PI_MSC_SHADOW_ACTION_OFFSET)
+#define C_PI_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_PI_MSC_SHADOW_OFFSET 0x00000040
+#define C_PI_MSC_SHADOW (C_PI_BASE + C_PI_MSC_SHADOW_OFFSET)
+#define C_PI_MSC_SHADOW_SIZE 0x00000010
+
+union c_pi_msc_shadow {
+ __u64 qw[2];
+};
+
+#define C_PI_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_PI_ERR_ELAPSED_TIME (C_PI_BASE + C_PI_ERR_ELAPSED_TIME_OFFSET)
+#define C_PI_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_pi_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_PI_ERR_FLG_OFFSET 0x00000108
+#define C_PI_ERR_FLG (C_PI_BASE + C_PI_ERR_FLG_OFFSET)
+#define C_PI_ERR_FLG_SIZE 0x00000008
+
+union c_pi_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 7;
+ __u64 acxt_cor : 1;
+ __u64 acxt_ucor : 1;
+ __u64 sriovt_cor : 1;
+ __u64 sriovt_ucor : 1;
+ __u64 dmac_desc_cor : 1;
+ __u64 dmac_desc_ucor : 1;
+ __u64 pri_mb_xlat_rtrgt_fifo_cor : 4;
+ __u64 pri_mb_xlat_rtrgt_fifo_ucor : 4;
+ __u64 pri_rarb_xlat_rtrgt_fifo_cor : 4;
+ __u64 pri_rarb_xlat_rtrgt_fifo_ucor : 4;
+ __u64 pri_rarb_xlat_rbyp_fifo_cor : 4;
+ __u64 pri_rarb_xlat_rbyp_fifo_ucor : 4;
+ __u64 pti_tarb_xlat_pipe0_hdr_cor : 1;
+ __u64 pti_tarb_xlat_pipe0_hdr_ucor : 1;
+ __u64 pti_tarb_xlat_pipe3_hdr_cor : 1;
+ __u64 pti_tarb_xlat_pipe3_hdr_ucor : 1;
+ __u64 pti_tarb_xlat_pipe3_data_cor : 1;
+ __u64 pti_tarb_xlat_pipe3_data_ucor : 1;
+ __u64 pti_tarb_xlat_unexpected_dv : 1;
+ __u64 pti_tarb_xlat_ac_en_error : 1;
+ __u64 pti_tarb_xlat_cfg_vf_en_error : 1;
+ __u64 pti_tarb_xlat_cfg_vf_num_error : 1;
+ __u64 pti_tarb_xlat_cfg_vf_bme_error : 1;
+ __u64 pti_tarb_xlat_cfg_bme_error : 1;
+ __u64 pti_tarb_xlat_cfg_amo_error : 1;
+ __u64: 3;
+ __u64 uc_attention : 2;
+ };
+};
+
+#define C_PI_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_PI_ERR_FIRST_FLG (C_PI_BASE + C_PI_ERR_FIRST_FLG_OFFSET)
+#define C_PI_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PI_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_PI_ERR_FIRST_FLG_TS (C_PI_BASE + C_PI_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PI_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PI_ERR_CLR_OFFSET 0x00000120
+#define C_PI_ERR_CLR (C_PI_BASE + C_PI_ERR_CLR_OFFSET)
+#define C_PI_ERR_CLR_SIZE 0x00000008
+#define C_PI_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_PI_ERR_IRQA_MSK (C_PI_BASE + C_PI_ERR_IRQA_MSK_OFFSET)
+#define C_PI_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PI_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_PI_ERR_IRQB_MSK (C_PI_BASE + C_PI_ERR_IRQB_MSK_OFFSET)
+#define C_PI_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PI_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_PI_ERR_INFO_MSK (C_PI_BASE + C_PI_ERR_INFO_MSK_OFFSET)
+#define C_PI_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PI_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_PI_ERR_INFO_MEM (C_PI_BASE + C_PI_ERR_INFO_MEM_OFFSET)
+#define C_PI_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_pi_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 11;
+ __u64: 1;
+ __u64 cor_address : 13;
+ __u64: 1;
+ __u64 cor_mem_id : 5;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 11;
+ __u64: 1;
+ __u64 ucor_address : 13;
+ __u64: 1;
+ __u64 ucor_mem_id : 5;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_PI_ERR_INFO_TARB_OFFSET 0x00000190
+#define C_PI_ERR_INFO_TARB (C_PI_BASE + C_PI_ERR_INFO_TARB_OFFSET)
+#define C_PI_ERR_INFO_TARB_SIZE 0x00000010
+
+union c_pi_err_info_tarb {
+ __u64 qw[2];
+ struct {
+ __u64 msg_type : 4;
+ __u64 acid : 10;
+ __u64 msg_49_0 : 50;
+ __u64 msg_84_50 : 35;
+ __u64 source : 3;
+ __u64: 26;
+ };
+};
+
+#define C_PI_EXT_ERR_FLG_OFFSET 0x00000208
+#define C_PI_EXT_ERR_FLG (C_PI_BASE + C_PI_EXT_ERR_FLG_OFFSET)
+#define C_PI_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_pi_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 pri_mb_xlat_rtrgt_abort_error : 1;
+ __u64 pri_mb_xlat_rtrgt_hdr_parity_error : 1;
+ __u64 pri_mb_xlat_rtrgt_data_parity_error : 1;
+ __u64 pri_mb_xlat_axi_wr_decerr : 1;
+ __u64 pri_mb_xlat_axi_wr_slverr : 1;
+ __u64 pri_mb_xlat_axi_rd_decerr : 1;
+ __u64 pri_mb_xlat_axi_rd_slverr : 1;
+ __u64 pri_mb_xlat_axi_rd_parity_error : 1;
+ __u64 pri_mb_xlat_msg_tlp_discard : 1;
+ __u64 pri_mb_xlat_unexpected_np_tlp : 1;
+ __u64 pri_mb_xlat_unexpected_tlp : 1;
+ __u64 pri_mb_xlat_pf_addr_error : 1;
+ __u64 pri_mb_xlat_vf_addr_error : 1;
+ __u64 pri_mb_xlat_rom_wr_error : 1;
+ __u64 pri_mb_xlat_partial_discard : 1;
+ __u64 pri_mb_xlat_rtrgt_fifo_underrun : 1;
+ __u64 pri_mb_xlat_rtrgt_rdy_fifo_underrun : 1;
+ __u64 pri_mb_xlat_comp_fifo_overrun : 1;
+ __u64 pri_mb_xlat_comp_ca : 1;
+ __u64 pri_mb_xlat_comp_ur : 1;
+ __u64 pri_rarb_xlat_rtrgt_abort_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_hdr_parity_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_data_parity_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_unexpected_tlp : 1;
+ __u64 pri_rarb_xlat_rtrgt_unexpected_msg : 1;
+ __u64 pri_rarb_xlat_rtrgt_vf_addr_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_vf_en_num_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_vf_en_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_inv_req_vf_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_inv_req_dev_id_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_prgr_vf_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_prgr_dev_id_error : 1;
+ __u64 pri_rarb_xlat_rtrgt_fifo_underrun : 1;
+ __u64 pri_rarb_xlat_rtrgt_rdy_fifo_underrun : 1;
+ __u64 pri_rarb_xlat_rbyp_abort_error : 1;
+ __u64 pri_rarb_xlat_rbyp_hdr_parity_error : 1;
+ __u64 pri_rarb_xlat_rbyp_data_parity_error : 1;
+ __u64 pri_rarb_xlat_rbyp_tag_error : 1;
+ __u64 pri_rarb_xlat_rbyp_unexpected_tlp_error : 1;
+ __u64 pri_rarb_xlat_rbyp_fifo_underrun : 1;
+ __u64 pri_rarb_xlat_rbyp_rdy_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_p_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_np_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_ord_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_np_err_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_np_err_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_pti_pri_cpl_to_fifo_underrun : 1;
+ __u64 dmac_axi_rd_decerr : 1;
+ __u64 dmac_axi_rd_slverr : 1;
+ __u64 dmac_axi_rd_parity_error : 1;
+ __u64 ahb_overwrite : 1;
+ __u64 ahb_resp_err : 1;
+ __u64: 11;
+ };
+};
+
+#define C_PI_EXT_ERR_FIRST_FLG_OFFSET 0x00000210
+#define C_PI_EXT_ERR_FIRST_FLG (C_PI_BASE + C_PI_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_PI_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PI_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000218
+#define C_PI_EXT_ERR_FIRST_FLG_TS (C_PI_BASE + C_PI_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PI_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PI_EXT_ERR_CLR_OFFSET 0x00000220
+#define C_PI_EXT_ERR_CLR (C_PI_BASE + C_PI_EXT_ERR_CLR_OFFSET)
+#define C_PI_EXT_ERR_CLR_SIZE 0x00000008
+#define C_PI_EXT_ERR_IRQA_MSK_OFFSET 0x00000228
+#define C_PI_EXT_ERR_IRQA_MSK (C_PI_BASE + C_PI_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_PI_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PI_EXT_ERR_IRQB_MSK_OFFSET 0x00000230
+#define C_PI_EXT_ERR_IRQB_MSK (C_PI_BASE + C_PI_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_PI_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PI_EXT_ERR_INFO_MSK_OFFSET 0x00000240
+#define C_PI_EXT_ERR_INFO_MSK (C_PI_BASE + C_PI_EXT_ERR_INFO_MSK_OFFSET)
+#define C_PI_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PI_ERR_INFO_RTRGT_OFFSET 0x00000250
+#define C_PI_ERR_INFO_RTRGT (C_PI_BASE + C_PI_ERR_INFO_RTRGT_OFFSET)
+#define C_PI_ERR_INFO_RTRGT_SIZE 0x00000018
+
+union c_pi_err_info_rtrgt {
+ __u64 qw[3];
+ struct {
+ __u64 addr;
+ __u64 tlp_type : 5;
+ __u64 fmt : 2;
+ __u64 tc : 3;
+ __u64 attr : 3;
+ __u64 td : 1;
+ __u64 th : 1;
+ __u64 poisoned : 1;
+ __u64 reqid : 16;
+ __u64 tag : 10;
+ __u64 dw_len : 10;
+ __u64 first_be : 4;
+ __u64 last_be : 4;
+ __u64 ats : 2;
+ __u64 ph : 2;
+ __u64 st : 8;
+ __u64 vfunc_num : 6;
+ __u64 vfunc_active : 1;
+ __u64 nw : 1;
+ __u64 ecrc_err : 1;
+ __u64 dllp_abort : 1;
+ __u64 tlp_abort : 1;
+ __u64: 13;
+ __u64 tlp_prfx : 32;
+ };
+};
+
+#define C_PI_ERR_INFO_RBYP_OFFSET 0x00000280
+#define C_PI_ERR_INFO_RBYP (C_PI_BASE + C_PI_ERR_INFO_RBYP_OFFSET)
+#define C_PI_ERR_INFO_RBYP_SIZE 0x00000018
+
+union c_pi_err_info_rbyp {
+ __u64 qw[3];
+ struct {
+ __u64 addr : 7;
+ __u64: 9;
+ __u64 ats : 2;
+ __u64 ph : 2;
+ __u64: 12;
+ __u64 byte_cnt : 12;
+ __u64: 4;
+ __u64 completer_id : 16;
+ __u64 tlp_type : 5;
+ __u64 fmt : 2;
+ __u64 tc : 3;
+ __u64 attr : 3;
+ __u64 td : 1;
+ __u64 th : 1;
+ __u64 poisoned : 1;
+ __u64 reqid : 16;
+ __u64 tag : 10;
+ __u64 dw_len : 10;
+ __u64 cpl_status : 3;
+ __u64 cpl_last : 1;
+ __u64 bcm : 1;
+ __u64 ecrc_err : 1;
+ __u64 dllp_abort : 1;
+ __u64 tlp_abort : 1;
+ __u64: 4;
+ __u64 tlp_prfx : 32;
+ __u64: 32;
+ };
+};
+
+#define C_PI_ERR_INFO_DMAC_OFFSET 0x000002a0
+#define C_PI_ERR_INFO_DMAC (C_PI_BASE + C_PI_ERR_INFO_DMAC_OFFSET)
+#define C_PI_ERR_INFO_DMAC_SIZE 0x00000008
+
+union c_pi_err_info_dmac {
+ __u64 qw;
+ struct {
+ __u64 desc_addr : 10;
+ __u64: 54;
+ };
+};
+
+#define C_PI_CFG_PRI_SRIOV_OFFSET 0x00001100
+#define C_PI_CFG_PRI_SRIOV (C_PI_BASE + C_PI_CFG_PRI_SRIOV_OFFSET)
+#define C_PI_CFG_PRI_SRIOV_SIZE 0x00000008
+
+union c_pi_cfg_pri_sriov {
+ __u64 qw;
+ struct {
+ __u64 vf_offset : 16;
+ __u64 vf_stride : 16;
+ __u64: 32;
+ };
+};
+
+#define C_PI_CFG_DMAC_CPL_ADDR_OFFSET 0x00002000
+#define C_PI_CFG_DMAC_CPL_ADDR (C_PI_BASE + C_PI_CFG_DMAC_CPL_ADDR_OFFSET)
+#define C_PI_CFG_DMAC_CPL_ADDR_SIZE 0x00000008
+
+union c_pi_cfg_dmac_cpl_addr {
+ __u64 qw;
+ struct {
+ __u64: 3;
+ __u64 address : 61;
+ };
+};
+
+#define C_PI_CFG_DMAC_OFFSET 0x00002008
+#define C_PI_CFG_DMAC (C_PI_BASE + C_PI_CFG_DMAC_OFFSET)
+#define C_PI_CFG_DMAC_SIZE 0x00000008
+
+union c_pi_cfg_dmac {
+ __u64 qw;
+ struct {
+ __u64 desc_index : 10;
+ __u64: 2;
+ __u64 enable : 1;
+ __u64 start : 1;
+ __u64 done : 1;
+ __u64 cpl_event_enable : 1;
+ __u64 status : 2;
+ __u64 irq_on_done : 1;
+ __u64 irq_on_error : 1;
+ __u64: 44;
+ };
+};
+
+#define C_PI_CFG_SRIOVT_OFFSET(idx) (0x00010000 + ((idx) * 8))
+#define C_PI_CFG_SRIOVT_ENTRIES 6144
+#define C_PI_CFG_SRIOVT(idx) (C_PI_BASE + C_PI_CFG_SRIOVT_OFFSET(idx))
+#define C_PI_CFG_SRIOVT_SIZE 0x0000c000
+
+union c_pi_cfg_sriovt {
+ __u64 qw;
+ struct {
+ __u64 vf_num : 6;
+ __u64 vf_en : 1;
+ __u64: 57;
+ };
+};
+
+#define C_PI_CFG_ACXT_OFFSET(idx) (0x00020000 + ((idx) * 8))
+#define C_PI_CFG_ACXT_ENTRIES 1024
+#define C_PI_CFG_ACXT(idx) (C_PI_BASE + C_PI_CFG_ACXT_OFFSET(idx))
+#define C_PI_CFG_ACXT_SIZE 0x00002000
+
+union c_pi_cfg_acxt {
+ __u64 qw;
+ struct {
+ __u64 ac_en : 1;
+ __u64 vf_en : 1;
+ __u64 vf_num : 6;
+ __u64 steering_tag : 8;
+ __u64 ph_en : 1;
+ __u64 phints : 2;
+ __u64 no_snoop : 1;
+ __u64 mem_rd_ro : 1;
+ __u64 flush_req_ro : 1;
+ __u64 translation_req_ro : 1;
+ __u64 fetching_amo_ro : 1;
+ __u64 ido : 1;
+ __u64 at1 : 1;
+ __u64 pasid_en : 1;
+ __u64 pasid : 20;
+ __u64 pasid_rsvd : 2;
+ __u64 pasid_er : 1;
+ __u64 pasid_pmr : 1;
+ __u64 reserved : 13;
+ };
+};
+
+#define C_PI_CFG_DMAC_DESC_OFFSET(idx) (0x00030000 + ((idx) * 16))
+#define C_PI_CFG_DMAC_DESC_ENTRIES 1024
+/*
+ * Since there are an 'abundance' of DMAC descriptors, some of them have
+ * been repurposed & reserved as 'scratch registers' for other purposes.
+ *
+ * Such as for communication between UC & HOST (see cass_uc.c).
+ *
+ * The rule is a contiguous block of descriptors from
+ *
+ * I ... (C_PI_CFG_DMAC_DESC_ENTRIES - 1)
+ *
+ * will be the reserved pool not to be used by the DMAC for DMAing.
+ */
+#define C_PI_CFG_DMAC_DESC_NUM_RSVD_ENTRIES 32
+#define C_PI_CFG_DMAC_DESC_NUM_AVAILABLE_ENTRIES \
+ (C_PI_CFG_DMAC_DESC_ENTRIES - C_PI_CFG_DMAC_DESC_NUM_RSVD_ENTRIES)
+
+#define C_PI_CFG_DMAC_DESC(idx) (C_PI_BASE + C_PI_CFG_DMAC_DESC_OFFSET(idx))
+#define C_PI_CFG_DMAC_DESC_SIZE 0x00004000
+
+union c_pi_cfg_dmac_desc {
+ __u64 qw[2];
+ struct {
+ __u64 reserved0 : 3;
+ __u64 dst_addr : 61;
+ __u64 reserved1 : 3;
+ __u64 src_addr : 27;
+ __u64 reserved2 : 2;
+ __u64 length : 20;
+ __u64 cont : 1;
+ __u64 reserved3 : 11;
+ };
+};
+
+#define C_PI_IPD_CFG_CRNC_OFFSET 0x00000000
+#define C_PI_IPD_CFG_CRNC (C_PI_IPD_BASE + C_PI_IPD_CFG_CRNC_OFFSET)
+#define C_PI_IPD_CFG_CRNC_SIZE 0x00000008
+
+union c_pi_ipd_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_PI_IPD_CFG_RT_OFFSET_OFFSET 0x00000020
+#define C_PI_IPD_CFG_RT_OFFSET (C_PI_IPD_BASE + C_PI_IPD_CFG_RT_OFFSET_OFFSET)
+#define C_PI_IPD_CFG_RT_OFFSET_SIZE 0x00000008
+
+union c_pi_ipd_cfg_rt_offset {
+ __u64 qw;
+ struct {
+ __u64 seconds : 48;
+ __u64: 16;
+ };
+};
+
+#define C_PI_IPD_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_PI_IPD_MSC_SHADOW_ACTION (C_PI_IPD_BASE + C_PI_IPD_MSC_SHADOW_ACTION_OFFSET)
+#define C_PI_IPD_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_PI_IPD_MSC_SHADOW_OFFSET 0x00000040
+#define C_PI_IPD_MSC_SHADOW (C_PI_IPD_BASE + C_PI_IPD_MSC_SHADOW_OFFSET)
+#define C_PI_IPD_MSC_SHADOW_SIZE 0x00000028
+
+union c_pi_ipd_msc_shadow {
+ __u64 qw[5];
+};
+
+#define C_PI_IPD_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_PI_IPD_ERR_ELAPSED_TIME (C_PI_IPD_BASE + C_PI_IPD_ERR_ELAPSED_TIME_OFFSET)
+#define C_PI_IPD_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_pi_ipd_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_PI_IPD_ERR_FLG_OFFSET 0x00000108
+#define C_PI_IPD_ERR_FLG (C_PI_IPD_BASE + C_PI_IPD_ERR_FLG_OFFSET)
+#define C_PI_IPD_ERR_FLG_SIZE 0x00000008
+
+union c_pi_ipd_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 7;
+ __u64 event_cnt_ovf : 1;
+ __u64 event_ram_cor : 1;
+ __u64 event_ram_ucor : 1;
+ __u64 msix_table_cor : 1;
+ __u64 msix_table_ucor : 1;
+ __u64 msix_pba_cor : 1;
+ __u64 msix_pba_ucor : 1;
+ __u64 pti_tarb_xlat_p_fifo_cor : 4;
+ __u64 pti_tarb_xlat_p_fifo_ucor : 4;
+ __u64 pti_tarb_xlat_np_fifo_cor : 3;
+ __u64 pti_tarb_xlat_np_fifo_ucor : 3;
+ __u64 pti_tarb_xlat_tbuf_cor : 1;
+ __u64 pti_tarb_xlat_tbuf_ucor : 1;
+ __u64 pti_tarb_xlat_cpl_to_fifo_cor : 1;
+ __u64 pti_tarb_xlat_cpl_to_fifo_ucor : 1;
+ __u64 pri_mb_xlat_comp_fifo_cor : 4;
+ __u64 pri_mb_xlat_comp_fifo_ucor : 4;
+ __u64 pti_msixc_fifo_cor : 1;
+ __u64 pti_msixc_fifo_ucor : 1;
+ __u64 msixc_pti_fifo_cor : 1;
+ __u64 msixc_pti_fifo_ucor : 1;
+ __u64 dmac_p_fifo_cor : 4;
+ __u64 dmac_p_fifo_ucor : 4;
+ __u64: 3;
+ };
+};
+
+#define C_PI_IPD_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_PI_IPD_ERR_FIRST_FLG (C_PI_IPD_BASE + C_PI_IPD_ERR_FIRST_FLG_OFFSET)
+#define C_PI_IPD_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PI_IPD_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_PI_IPD_ERR_FIRST_FLG_TS (C_PI_IPD_BASE + C_PI_IPD_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PI_IPD_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PI_IPD_ERR_CLR_OFFSET 0x00000120
+#define C_PI_IPD_ERR_CLR (C_PI_IPD_BASE + C_PI_IPD_ERR_CLR_OFFSET)
+#define C_PI_IPD_ERR_CLR_SIZE 0x00000008
+#define C_PI_IPD_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_PI_IPD_ERR_IRQA_MSK (C_PI_IPD_BASE + C_PI_IPD_ERR_IRQA_MSK_OFFSET)
+#define C_PI_IPD_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PI_IPD_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_PI_IPD_ERR_IRQB_MSK (C_PI_IPD_BASE + C_PI_IPD_ERR_IRQB_MSK_OFFSET)
+#define C_PI_IPD_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PI_IPD_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_PI_IPD_ERR_INFO_MSK (C_PI_IPD_BASE + C_PI_IPD_ERR_INFO_MSK_OFFSET)
+#define C_PI_IPD_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PI_IPD_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_PI_IPD_ERR_INFO_MEM (C_PI_IPD_BASE + C_PI_IPD_ERR_INFO_MEM_OFFSET)
+#define C_PI_IPD_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_pi_ipd_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 10;
+ __u64: 2;
+ __u64 cor_address : 12;
+ __u64: 2;
+ __u64 cor_mem_id : 5;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 10;
+ __u64: 2;
+ __u64 ucor_address : 12;
+ __u64: 2;
+ __u64 ucor_mem_id : 5;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_PI_IPD_EXT_ERR_FLG_OFFSET 0x00000208
+#define C_PI_IPD_EXT_ERR_FLG (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_FLG_OFFSET)
+#define C_PI_IPD_EXT_ERR_FLG_SIZE 0x00000008
+
+union c_pi_ipd_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 ip_app_parity_errs : 3;
+ __u64 ip_radm_qoverflow : 1;
+ __u64 ip_radm_msg_unlock : 1;
+ __u64 ip_radm_pm_turnoff : 1;
+ __u64 ip_wake : 1;
+ __u64 ip_cfg_uncor_internal_err_sts : 1;
+ __u64 ip_cfg_corrected_internal_err_sts : 1;
+ __u64 ip_cfg_rcvr_overflow_err_sts : 1;
+ __u64 ip_cfg_fc_protocol_err_sts : 1;
+ __u64 ip_cfg_mlf_tlp_err_sts : 1;
+ __u64 ip_cfg_surprise_down_er_sts : 1;
+ __u64 ip_cfg_dl_protocol_err_sts : 1;
+ __u64 ip_cfg_ecrc_err_sts : 1;
+ __u64 ip_cfg_replay_number_rollover_err_sts : 1;
+ __u64 ip_cfg_replay_timer_timeout_err_sts : 1;
+ __u64 ip_cfg_bad_dllp_err_sts : 1;
+ __u64 ip_cfg_bad_tlp_err_sts : 1;
+ __u64 ip_cfg_rcvr_err_sts : 1;
+ __u64: 5;
+ __u64 pti_tarb_xlat_xali_ph_crd_warn : 1;
+ __u64 pti_tarb_xlat_xali_pd_crd_warn : 1;
+ __u64 pti_tarb_xlat_xali_nph_crd_warn : 1;
+ __u64 pti_tarb_xlat_xali_npd_crd_warn : 1;
+ __u64 pti_tarb_xlat_ten_bit_tag_msb_error : 1;
+ __u64 pti_tarb_xlat_p_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_np_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_ord_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_cpl_to_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_cpl_to_fifo_underrun : 1;
+ __u64 pti_tarb_xlat_pti_pri_cpl_to_fifo_overrun : 1;
+ __u64 pti_tarb_xlat_ord_np_cnt_overrun : 1;
+ __u64 pti_tarb_xlat_ord_np_cnt_underrun : 1;
+ __u64 pri_rtrgt_hdr_parity_error : 1;
+ __u64 pri_rtrgt_data_parity_error : 1;
+ __u64 pri_rtrgt_abort : 1;
+ __u64 pri_rbyp_hdr_parity_error : 1;
+ __u64 pri_rbyp_data_parity_error : 1;
+ __u64 pri_rbyp_abort : 1;
+ __u64 pri_rarb_xlat_rtrgt_fifo_overrun : 1;
+ __u64 pri_rarb_xlat_rtrgt_rdy_fifo_overrun : 1;
+ __u64 pri_rarb_xlat_rbyp_fifo_overrun : 1;
+ __u64 pri_rarb_xlat_rbyp_rdy_fifo_overrun : 1;
+ __u64 pri_mb_xlat_rtrgt_fifo_overrun : 1;
+ __u64 pri_mb_xlat_rtrgt_rdy_fifo_overrun : 1;
+ __u64 pri_mb_xlat_comp_fifo_underrun : 1;
+ __u64 msixc_pti_fifo_overrun : 1;
+ __u64 msixc_pti_fifo_underrun : 1;
+ __u64 pti_msixc_fifo_overrun : 1;
+ __u64 pti_msixc_fifo_underrun : 1;
+ __u64 msix_disabled_error : 1;
+ __u64 msix_hg_vf_size_error : 1;
+ __u64 msix_pti_idx_error : 1;
+ __u64 dmac_bme_error : 1;
+ __u64: 4;
+ };
+};
+
+#define C_PI_IPD_EXT_ERR_FIRST_FLG_OFFSET 0x00000210
+#define C_PI_IPD_EXT_ERR_FIRST_FLG (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_FIRST_FLG_OFFSET)
+#define C_PI_IPD_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_PI_IPD_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000218
+#define C_PI_IPD_EXT_ERR_FIRST_FLG_TS (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C_PI_IPD_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_PI_IPD_EXT_ERR_CLR_OFFSET 0x00000220
+#define C_PI_IPD_EXT_ERR_CLR (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_CLR_OFFSET)
+#define C_PI_IPD_EXT_ERR_CLR_SIZE 0x00000008
+#define C_PI_IPD_EXT_ERR_IRQA_MSK_OFFSET 0x00000228
+#define C_PI_IPD_EXT_ERR_IRQA_MSK (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_IRQA_MSK_OFFSET)
+#define C_PI_IPD_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_PI_IPD_EXT_ERR_IRQB_MSK_OFFSET 0x00000230
+#define C_PI_IPD_EXT_ERR_IRQB_MSK (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_IRQB_MSK_OFFSET)
+#define C_PI_IPD_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_PI_IPD_EXT_ERR_INFO_MSK_OFFSET 0x00000240
+#define C_PI_IPD_EXT_ERR_INFO_MSK (C_PI_IPD_BASE + C_PI_IPD_EXT_ERR_INFO_MSK_OFFSET)
+#define C_PI_IPD_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C_PI_IPD_CFG_MSIXC_OFFSET 0x00004000
+#define C_PI_IPD_CFG_MSIXC (C_PI_IPD_BASE + C_PI_IPD_CFG_MSIXC_OFFSET)
+#define C_PI_IPD_CFG_MSIXC_SIZE 0x00000008
+
+union c_pi_ipd_cfg_msixc {
+ __u64 qw;
+ struct {
+ __u64 legacy_irq_enable : 1;
+ __u64 legacy_irq_mask : 1;
+ __u64 legacy_irq_asserted : 1;
+ __u64: 5;
+ __u64 vf_pf_irq_enable : 1;
+ __u64: 55;
+ };
+};
+
+#define C_PI_IPD_CFG_VF_PF_IRQ_MASK_OFFSET 0x00004010
+#define C_PI_IPD_CFG_VF_PF_IRQ_MASK (C_PI_IPD_BASE + C_PI_IPD_CFG_VF_PF_IRQ_MASK_OFFSET)
+#define C_PI_IPD_CFG_VF_PF_IRQ_MASK_SIZE 0x00000008
+
+union c_pi_ipd_cfg_vf_pf_irq_mask {
+ __u64 qw;
+ struct {
+ __u64 mask;
+ };
+};
+
+#define C_PI_IPD_STS_VF_PF_IRQ_OFFSET 0x00004018
+#define C_PI_IPD_STS_VF_PF_IRQ (C_PI_IPD_BASE + C_PI_IPD_STS_VF_PF_IRQ_OFFSET)
+#define C_PI_IPD_STS_VF_PF_IRQ_SIZE 0x00000008
+
+union c_pi_ipd_sts_vf_pf_irq {
+ __u64 qw;
+ struct {
+ __u64 irq;
+ };
+};
+
+#define C_PI_IPD_CFG_VF_PF_IRQ_CLR_OFFSET 0x00004020
+#define C_PI_IPD_CFG_VF_PF_IRQ_CLR (C_PI_IPD_BASE + C_PI_IPD_CFG_VF_PF_IRQ_CLR_OFFSET)
+#define C_PI_IPD_CFG_VF_PF_IRQ_CLR_SIZE 0x00000008
+
+union c_pi_ipd_cfg_vf_pf_irq_clr {
+ __u64 qw;
+ struct {
+ __u64 clr;
+ };
+};
+
+#define C_PI_IPD_CFG_PF_VF_IRQ_OFFSET 0x00004028
+#define C_PI_IPD_CFG_PF_VF_IRQ (C_PI_IPD_BASE + C_PI_IPD_CFG_PF_VF_IRQ_OFFSET)
+#define C_PI_IPD_CFG_PF_VF_IRQ_SIZE 0x00000008
+
+union c_pi_ipd_cfg_pf_vf_irq {
+ __u64 qw;
+ struct {
+ __u64 irq;
+ };
+};
+
+#define C_PI_IPD_CFG_EVENT_CNTS_OFFSET 0x00005000
+#define C_PI_IPD_CFG_EVENT_CNTS (C_PI_IPD_BASE + C_PI_IPD_CFG_EVENT_CNTS_OFFSET)
+#define C_PI_IPD_CFG_EVENT_CNTS_SIZE 0x00000008
+
+union c_pi_ipd_cfg_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 enable : 1;
+ __u64 init : 1;
+ __u64 init_done : 1;
+ __u64 warm_rst_disable : 1;
+ __u64 ovf_cnt : 16;
+ __u64: 44;
+ };
+};
+
+#define C_PI_IPD_STS_EVENT_CNTS_OFFSET(idx) (0x00006000 + ((idx) * 8))
+#ifndef C_PI_IPD_STS_EVENT_CNTS_ENTRIES
+#define C_PI_IPD_STS_EVENT_CNTS_ENTRIES 128
+#endif
+#define C_PI_IPD_STS_EVENT_CNTS(idx) (C_PI_IPD_BASE + C_PI_IPD_STS_EVENT_CNTS_OFFSET(idx))
+#define C_PI_IPD_STS_EVENT_CNTS_SIZE 0x00000400
+
+union c_pi_ipd_sts_event_cnts {
+ __u64 qw;
+ struct {
+ __u64 cnt : 56;
+ __u64: 8;
+ };
+};
+
+#define C_PI_IPD_CFG_MSIX_TABLE_OFFSET(idx) (0x00010000 + ((idx) * 16))
+#define C_PI_IPD_CFG_MSIX_TABLE_ENTRIES 4096
+#define C_PI_IPD_CFG_MSIX_TABLE(idx) (C_PI_IPD_BASE + C_PI_IPD_CFG_MSIX_TABLE_OFFSET(idx))
+#define C_PI_IPD_CFG_MSIX_TABLE_SIZE 0x00010000
+
+union c_pi_ipd_cfg_msix_table {
+ __u64 qw[2];
+ struct {
+ __u64 msg_addr;
+ __u64 msg_data : 32;
+ __u64 vector_ctl_mask : 1;
+ __u64 vector_ctl_rsvd : 31;
+ };
+};
+
+#define C_PI_IPD_CFG_VF_MSIX_TABLE_OFFSET(idx) (0x00400000 + ((idx) * 16))
+#define C_PI_IPD_CFG_VF_MSIX_TABLE_ENTRIES 131072
+#define C_PI_IPD_CFG_VF_MSIX_TABLE(idx) (C_PI_IPD_BASE + C_PI_IPD_CFG_VF_MSIX_TABLE_OFFSET(idx))
+#define C_PI_IPD_CFG_VF_MSIX_TABLE_SIZE 0x00200000
+
+union c_pi_ipd_cfg_vf_msix_table {
+ __u64 qw[2];
+ struct {
+ __u64 msg_addr;
+ __u64 msg_data : 32;
+ __u64 vector_ctl_mask : 1;
+ __u64 vector_ctl_rsvd : 31;
+ };
+};
+
+#define C_RMU_CFG_CRNC_OFFSET 0x00000000
+#define C_RMU_CFG_CRNC (C_RMU_BASE + C_RMU_CFG_CRNC_OFFSET)
+#define C_RMU_CFG_CRNC_SIZE 0x00000008
+
+union c_rmu_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define C_RMU_MSC_SHADOW_ACTION_OFFSET 0x00000038
+#define C_RMU_MSC_SHADOW_ACTION (C_RMU_BASE + C_RMU_MSC_SHADOW_ACTION_OFFSET)
+#define C_RMU_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define C_RMU_MSC_SHADOW_OFFSET 0x00000040
+#define C_RMU_MSC_SHADOW (C_RMU_BASE + C_RMU_MSC_SHADOW_OFFSET)
+#define C_RMU_MSC_SHADOW_SIZE 0x00000020
+
+union c_rmu_msc_shadow {
+ __u64 qw[4];
+};
+
+#define C_RMU_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define C_RMU_ERR_ELAPSED_TIME (C_RMU_BASE + C_RMU_ERR_ELAPSED_TIME_OFFSET)
+#define C_RMU_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union c_rmu_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define C_RMU_ERR_FLG_OFFSET 0x00000108
+#define C_RMU_ERR_FLG (C_RMU_BASE + C_RMU_ERR_FLG_OFFSET)
+#define C_RMU_ERR_FLG_SIZE 0x00000008
+
+union c_rmu_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 crnc_ring_sync_error : 1;
+ __u64 crnc_ring_ecc_sbe : 1;
+ __u64 crnc_ring_ecc_mbe : 1;
+ __u64 crnc_ring_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_unknown : 1;
+ __u64 crnc_csr_cmd_incomplete : 1;
+ __u64 crnc_buf_ecc_sbe : 1;
+ __u64 crnc_buf_ecc_mbe : 1;
+ __u64: 23;
+ __u64 ptl_idx_mem_cor : 1;
+ __u64 ptlte_set_ctrl_mem_cor : 1;
+ __u64 ptl_idx_indir_mem_cor : 1;
+ __u64: 1;
+ __u64 vni_list_mem_ucor : 1;
+ __u64 vni_list_vld_mem_ucor : 1;
+ __u64 ptl_list_mem_ucor : 1;
+ __u64 ptl_list_vld_mem_ucor : 1;
+ __u64 ptl_idx_mem_ucor : 1;
+ __u64 ptlte_set_list_mem_ucor : 1;
+ __u64 ptlte_set_list_vld_mem_ucor : 1;
+ __u64 ptlte_set_ctrl_mem_ucor : 1;
+ __u64 ptl_idx_indir_mem_ucor : 1;
+ __u64: 3;
+ __u64 ptl_invld_dfa : 1;
+ __u64 ptl_invld_vni : 1;
+ __u64 ptl_no_ptlte : 1;
+ __u64 enet_frame_rejected : 1;
+ __u64 enet_ptlte_set_ctrl_err : 1;
+ __u64: 11;
+ };
+};
+
+#define C_RMU_ERR_FIRST_FLG_OFFSET 0x00000110
+#define C_RMU_ERR_FIRST_FLG (C_RMU_BASE + C_RMU_ERR_FIRST_FLG_OFFSET)
+#define C_RMU_ERR_FIRST_FLG_SIZE 0x00000008
+#define C_RMU_ERR_FIRST_FLG_TS_OFFSET 0x00000118
+#define C_RMU_ERR_FIRST_FLG_TS (C_RMU_BASE + C_RMU_ERR_FIRST_FLG_TS_OFFSET)
+#define C_RMU_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C_RMU_ERR_CLR_OFFSET 0x00000120
+#define C_RMU_ERR_CLR (C_RMU_BASE + C_RMU_ERR_CLR_OFFSET)
+#define C_RMU_ERR_CLR_SIZE 0x00000008
+#define C_RMU_ERR_IRQA_MSK_OFFSET 0x00000128
+#define C_RMU_ERR_IRQA_MSK (C_RMU_BASE + C_RMU_ERR_IRQA_MSK_OFFSET)
+#define C_RMU_ERR_IRQA_MSK_SIZE 0x00000008
+#define C_RMU_ERR_IRQB_MSK_OFFSET 0x00000130
+#define C_RMU_ERR_IRQB_MSK (C_RMU_BASE + C_RMU_ERR_IRQB_MSK_OFFSET)
+#define C_RMU_ERR_IRQB_MSK_SIZE 0x00000008
+#define C_RMU_ERR_INFO_MSK_OFFSET 0x00000140
+#define C_RMU_ERR_INFO_MSK (C_RMU_BASE + C_RMU_ERR_INFO_MSK_OFFSET)
+#define C_RMU_ERR_INFO_MSK_SIZE 0x00000008
+#define C_RMU_ERR_INFO_MEM_OFFSET 0x00000180
+#define C_RMU_ERR_INFO_MEM (C_RMU_BASE + C_RMU_ERR_INFO_MEM_OFFSET)
+#define C_RMU_ERR_INFO_MEM_SIZE 0x00000008
+
+union c_rmu_err_info_mem {
+ __u64 qw;
+ struct {
+ __u64 cor_syndrome : 12;
+ __u64 cor_address : 13;
+ __u64: 1;
+ __u64 cor_mem_id : 4;
+ __u64: 1;
+ __u64 cor_csr_detected : 1;
+ __u64 ucor_syndrome : 12;
+ __u64 ucor_address : 13;
+ __u64: 1;
+ __u64 ucor_mem_id : 4;
+ __u64: 1;
+ __u64 ucor_csr_detected : 1;
+ };
+};
+
+#define C_RMU_ERR_INFO_PTL_INVLD_DFA_OFFSET 0x00000188
+#define C_RMU_ERR_INFO_PTL_INVLD_DFA (C_RMU_BASE + C_RMU_ERR_INFO_PTL_INVLD_DFA_OFFSET)
+#define C_RMU_ERR_INFO_PTL_INVLD_DFA_SIZE 0x00000008
+
+union c_rmu_err_info_ptl_invld_dfa {
+ __u64 qw;
+ struct {
+ __u64 dfa : 32;
+ __u64 sfa : 32;
+ };
+};
+
+#define C_RMU_ERR_INFO_PTL_INVLD_VNI_OFFSET 0x00000190
+#define C_RMU_ERR_INFO_PTL_INVLD_VNI (C_RMU_BASE + C_RMU_ERR_INFO_PTL_INVLD_VNI_OFFSET)
+#define C_RMU_ERR_INFO_PTL_INVLD_VNI_SIZE 0x00000008
+
+union c_rmu_err_info_ptl_invld_vni {
+ __u64 qw;
+ struct {
+ __u64 vni : 16;
+ __u64: 16;
+ __u64 sfa : 32;
+ };
+};
+
+#define C_RMU_ERR_INFO_PTL_NO_PTLTE_OFFSET 0x00000198
+#define C_RMU_ERR_INFO_PTL_NO_PTLTE (C_RMU_BASE + C_RMU_ERR_INFO_PTL_NO_PTLTE_OFFSET)
+#define C_RMU_ERR_INFO_PTL_NO_PTLTE_SIZE 0x00000008
+
+union c_rmu_err_info_ptl_no_ptlte {
+ __u64 qw;
+ struct {
+ __u64 index_ext : 5;
+ __u64 multicast_id : 13;
+ __u64: 2;
+ __u64 is_multicast : 1;
+ __u64: 3;
+ __u64 vni_list_idx : 8;
+ __u64 sfa : 32;
+ };
+};
+
+#define C_RMU_ERR_INFO_ENET_NO_PTLTE_SET_OFFSET 0x000001c0
+#define C_RMU_ERR_INFO_ENET_NO_PTLTE_SET (C_RMU_BASE + C_RMU_ERR_INFO_ENET_NO_PTLTE_SET_OFFSET)
+#define C_RMU_ERR_INFO_ENET_NO_PTLTE_SET_SIZE 0x00000028
+
+union c_rmu_err_info_enet_no_ptlte_set {
+ __u64 qw[5];
+ struct {
+ union {
+ struct {
+ __u64 dipv6_lower;
+ __u64 dipv6_upper;
+ __u64 sipv6_lower;
+ __u64 sipv6_upper;
+ };
+ struct {
+ __u32 dipv4;
+ __u32 unused_opt_ipv4_0;
+ __u64 unused_opt_ipv4_1;
+ __u32 sipv4;
+ __u32 unused_opt_ipv4_2;
+ __u64 unused_opt_ipv4_3;
+ };
+ struct {
+ __u64 dmac : 48;
+ __u64 vid : 12;
+ __u64 dei : 1;
+ __u64 pcp : 3;
+ __u64 vlan_present : 1;
+ __u64 unused_ieee_802_3_0 : 63;
+ };
+ };
+ __u64 smac : 48;
+ __u64 tc : 3;
+ __u64: 1;
+ __u64 lossless : 1;
+ __u64: 3;
+ __u64 frame_type : 2;
+ __u64 ip_v4_present : 1;
+ __u64 ip_v6_present : 1;
+ __u64: 4;
+ };
+};
+
+#define C_RMU_ERR_INFO_ENET_BAD_PTLTE_SET_CTRL_OFFSET 0x000001e8
+#define C_RMU_ERR_INFO_ENET_BAD_PTLTE_SET_CTRL \
+ (C_RMU_BASE + C_RMU_ERR_INFO_ENET_BAD_PTLTE_SET_CTRL_OFFSET)
+#define C_RMU_ERR_INFO_ENET_BAD_PTLTE_SET_CTRL_SIZE 0x00000008
+
+union c_rmu_err_info_enet_bad_ptlte_set_ctrl {
+ __u64 qw;
+ struct {
+ __u64 ptlte_set_ctrl_entry : 7;
+ __u64: 1;
+ __u64 hash_type : 5;
+ __u64: 3;
+ __u64 portal_index_indir_base : 11;
+ __u64: 1;
+ __u64 hash_bits : 4;
+ __u64 hash_value : 32;
+ };
+};
+
+#define C_RMU_CFG_VNI_LIST_X_OFFSET(idx) (0x00001000 + ((idx) * 8))
+#define C_RMU_CFG_VNI_LIST_X(idx) (C_RMU_BASE + C_RMU_CFG_VNI_LIST_X_OFFSET(idx))
+#define C_RMU_CFG_VNI_LIST_X_SIZE 0x00000800
+#define C_RMU_CFG_VNI_LIST_Y_OFFSET(idx) (0x00001800 + ((idx) * 8))
+#define C_RMU_CFG_VNI_LIST_ENTRIES 256
+#define C_RMU_CFG_VNI_LIST_Y(idx) (C_RMU_BASE + C_RMU_CFG_VNI_LIST_Y_OFFSET(idx))
+#define C_RMU_CFG_VNI_LIST_Y_SIZE 0x00000800
+
+union c_rmu_cfg_vni_list {
+ __u64 qw;
+ struct {
+ __u64 vni : 16;
+ __u64 valid : 1;
+ __u64: 47;
+ };
+};
+
+#define C_RMU_CFG_VNI_LIST_INVALIDATE_OFFSET(idx) (0x00002000 + ((idx) * 8))
+#define C_RMU_CFG_VNI_LIST_INVALIDATE(idx) (C_RMU_BASE + C_RMU_CFG_VNI_LIST_INVALIDATE_OFFSET(idx))
+#define C_RMU_CFG_VNI_LIST_INVALIDATE_SIZE 0x00000800
+
+union c_rmu_cfg_vni_list_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C_RMU_CFG_VNI_LIST_CHK_OFFSET 0x00000400
+#define C_RMU_CFG_VNI_LIST_CHK (C_RMU_BASE + C_RMU_CFG_VNI_LIST_CHK_OFFSET)
+#define C_RMU_CFG_VNI_LIST_CHK_SIZE 0x00000008
+
+union c_rmu_cfg_vni_list_chk {
+ __u64 qw;
+ struct {
+ __u64 intrvl : 32;
+ __u64: 32;
+ };
+};
+
+#define C_RMU_CFG_PORTAL_LIST_X_OFFSET(idx) (0x00010000 + ((idx) * 8))
+#define C_RMU_CFG_PORTAL_LIST_X(idx) (C_RMU_BASE + C_RMU_CFG_PORTAL_LIST_X_OFFSET(idx))
+#define C_RMU_CFG_PORTAL_LIST_X_SIZE 0x00005000
+#define C_RMU_CFG_PORTAL_LIST_Y_OFFSET(idx) (0x00018000 + ((idx) * 8))
+#define C_RMU_CFG_PORTAL_LIST_ENTRIES 2560
+#define C_RMU_CFG_PORTAL_LIST_Y(idx) (C_RMU_BASE + C_RMU_CFG_PORTAL_LIST_Y_OFFSET(idx))
+#define C_RMU_CFG_PORTAL_LIST_Y_SIZE 0x00005000
+
+union c_rmu_cfg_portal_list {
+ __u64 qw;
+ struct {
+ union {
+ struct {
+ __u64 index_ext : 5;
+ __u64 multicast_id : 13;
+ __u64: 2;
+ __u64 is_multicast : 1;
+ __u64: 3;
+ __u64 vni_list_idx : 8;
+ __u64 valid : 1;
+ __u64: 31;
+ };
+ struct {
+ __u64: 5;
+ __u64 endpoint_defined : 12;
+ __u64: 7;
+ };
+ };
+ };
+};
+
+#define C_RMU_CFG_PORTAL_LIST_INVALIDATE_OFFSET(idx) (0x00020000 + ((idx) * 8))
+#define C_RMU_CFG_PORTAL_LIST_INVALIDATE(idx) \
+ (C_RMU_BASE + C_RMU_CFG_PORTAL_LIST_INVALIDATE_OFFSET(idx))
+#define C_RMU_CFG_PORTAL_LIST_INVALIDATE_SIZE 0x00005000
+
+union c_rmu_cfg_portal_list_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C_RMU_CFG_PORTAL_LIST_CHK_OFFSET 0x00000408
+#define C_RMU_CFG_PORTAL_LIST_CHK (C_RMU_BASE + C_RMU_CFG_PORTAL_LIST_CHK_OFFSET)
+#define C_RMU_CFG_PORTAL_LIST_CHK_SIZE 0x00000008
+
+union c_rmu_cfg_portal_list_chk {
+ __u64 qw;
+ struct {
+ __u64 intrvl : 32;
+ __u64: 32;
+ };
+};
+
+#define C_RMU_CFG_PORTAL_INDEX_TABLE_OFFSET(idx) (0x00004000 + ((idx) * 8))
+#define C_RMU_CFG_PORTAL_INDEX_TABLE_ENTRIES 640
+#define C_RMU_CFG_PORTAL_INDEX_TABLE(idx) (C_RMU_BASE + C_RMU_CFG_PORTAL_INDEX_TABLE_OFFSET(idx))
+#define C_RMU_CFG_PORTAL_INDEX_TABLE_SIZE 0x00001400
+
+#define C_RMU_CFG_PORTAL_INDEX_TABLE_ARRAY_SIZE 4
+union c_rmu_cfg_portal_index_table {
+ __u64 qw;
+ struct {
+ __u16 phys_portal_table_idx : 11;
+ __u16: 5;
+ } e[C_RMU_CFG_PORTAL_INDEX_TABLE_ARRAY_SIZE];
+};
+
+#define C_RMU_CFG_PTLTE_SET_LIST_X_OFFSET(idx) (0x00006000 + ((idx) * 32))
+#define C_RMU_CFG_PTLTE_SET_LIST_X(idx) (C_RMU_BASE + C_RMU_CFG_PTLTE_SET_LIST_X_OFFSET(idx))
+#define C_RMU_CFG_PTLTE_SET_LIST_X_SIZE 0x00001000
+#define C_RMU_CFG_PTLTE_SET_LIST_Y_OFFSET(idx) (0x00007000 + ((idx) * 32))
+#define C_RMU_CFG_PTLTE_SET_LIST_ENTRIES 128
+#define C_RMU_CFG_PTLTE_SET_LIST_Y(idx) (C_RMU_BASE + C_RMU_CFG_PTLTE_SET_LIST_Y_OFFSET(idx))
+#define C_RMU_CFG_PTLTE_SET_LIST_Y_SIZE 0x00001000
+
+union c_rmu_cfg_ptlte_set_list {
+ __u64 qw[4];
+ struct {
+ union {
+ struct {
+ __u64 dmac : 48;
+ __u64 vid : 12;
+ __u64 dei : 1;
+ __u64 pcp : 3;
+ };
+ __u64 dipv6[2];
+ struct {
+ __u32 dipv4;
+ __u32 opt_ipv4_unused_0;
+ union {
+ struct {
+ __u64 vlan_present : 1;
+ __u64 ieee_802_3_unused : 63;
+ };
+ __u64 opt_ipv4_unused_1;
+ };
+ };
+ };
+ __u64 lossless : 1;
+ __u64: 7;
+ __u64 frame_type : 2;
+ __u64: 54;
+ __u64 valid : 1;
+ __u64: 63;
+ };
+};
+
+#define C_RMU_CFG_PTLTE_SET_LIST_INVALIDATE_OFFSET(idx) (0x00008000 + ((idx) * 32))
+#define C_RMU_CFG_PTLTE_SET_LIST_INVALIDATE(idx) \
+ (C_RMU_BASE + C_RMU_CFG_PTLTE_SET_LIST_INVALIDATE_OFFSET(idx))
+#define C_RMU_CFG_PTLTE_SET_LIST_INVALIDATE_SIZE 0x00001000
+
+union c_rmu_cfg_ptlte_set_list_invalidate {
+ __u64 qw;
+ struct {
+ __u64 invalidate : 1;
+ __u64: 63;
+ };
+};
+
+#define C_RMU_CFG_PTLTE_SET_LIST_CHK_OFFSET 0x00000418
+#define C_RMU_CFG_PTLTE_SET_LIST_CHK (C_RMU_BASE + C_RMU_CFG_PTLTE_SET_LIST_CHK_OFFSET)
+#define C_RMU_CFG_PTLTE_SET_LIST_CHK_SIZE 0x00000008
+
+union c_rmu_cfg_ptlte_set_list_chk {
+ __u64 qw;
+ struct {
+ __u64 intrvl : 32;
+ __u64: 32;
+ };
+};
+
+#define C_RMU_CFG_PTLTE_SET_CTRL_TABLE_OFFSET(idx) (0x00009000 + ((idx) * 8))
+#define C_RMU_CFG_PTLTE_SET_CTRL_TABLE_ENTRIES 64
+#define C_RMU_CFG_PTLTE_SET_CTRL_TABLE(idx) \
+ (C_RMU_BASE + C_RMU_CFG_PTLTE_SET_CTRL_TABLE_OFFSET(idx))
+#define C_RMU_CFG_PTLTE_SET_CTRL_TABLE_SIZE 0x00000200
+
+struct c_rmu_cfg_ptlte_set_ctrl_table_entry {
+ __u32 portal_index_indir_base : 11;
+ __u32: 1;
+ __u32 hash_bits : 4;
+ __u32 hash_types_enabled : 16;
+};
+
+#define C_RMU_CFG_PTLTE_SET_CTRL_TABLE_ARRAY_SIZE 2
+union c_rmu_cfg_ptlte_set_ctrl_table {
+ __u64 qw;
+ struct c_rmu_cfg_ptlte_set_ctrl_table_entry e[C_RMU_CFG_PTLTE_SET_CTRL_TABLE_ARRAY_SIZE];
+};
+
+#define C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_OFFSET(idx) (0x0000a000 + ((idx) * 8))
+#define C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_ENTRIES 544
+#define C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE(idx) \
+ (C_RMU_BASE + C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_OFFSET(idx))
+#define C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_SIZE 0x00001100
+
+#define C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_ARRAY_SIZE 4
+union c_rmu_cfg_portal_index_indir_table {
+ __u64 qw;
+ struct {
+ __u16 phys_portal_table_idx : 11;
+ __u16: 5;
+ } e[C_RMU_CFG_PORTAL_INDEX_INDIR_TABLE_ARRAY_SIZE];
+};
+
+#define C_RMU_CFG_HASH_KEY_OFFSET 0x00000440
+#define C_RMU_CFG_HASH_KEY (C_RMU_BASE + C_RMU_CFG_HASH_KEY_OFFSET)
+#define C_RMU_CFG_HASH_KEY_SIZE 0x00000030
+
+union c_rmu_cfg_hash_key {
+ __u64 qw[6];
+ struct {
+ __u64 key_wd_0;
+ __u64 key_wd_1;
+ __u64 key_wd_2;
+ __u64 key_wd_3;
+ __u64 key_wd_4;
+ __u64 key_wd_5 : 31;
+ __u64: 33;
+ };
+};
+
+#define C_RMU_STS_INIT_DONE_OFFSET 0x00000818
+#define C_RMU_STS_INIT_DONE (C_RMU_BASE + C_RMU_STS_INIT_DONE_OFFSET)
+#define C_RMU_STS_INIT_DONE_SIZE 0x00000008
+
+union c_rmu_sts_init_done {
+ __u64 qw;
+ struct {
+ __u64 init_done : 1;
+ __u64 warm_reset : 1;
+ __u64: 62;
+ };
+};
+
+#define C2_HNI_EXT_ERR_FLG_OFFSET 0x00000148
+#define C2_HNI_EXT_ERR_FLG (C_HNI_BASE + C2_HNI_EXT_ERR_FLG_OFFSET)
+#define C2_HNI_EXT_ERR_FLG_SIZE 0x00000008
+
+union c2_hni_ext_err_flg {
+ __u64 qw;
+ struct {
+ __u64 sw_diag : 1;
+ __u64 pmi_err : 1;
+ __u64 fsm_err : 1;
+ __u64 pmi_ack : 1;
+ __u64 rx_ctrl_perr : 1;
+ __u64 tx_ctrl_perr : 1;
+ __u64: 58;
+ };
+};
+
+#define C2_HNI_EXT_ERR_FIRST_FLG_OFFSET 0x00000150
+#define C2_HNI_EXT_ERR_FIRST_FLG (C_HNI_BASE + C2_HNI_EXT_ERR_FIRST_FLG_OFFSET)
+#define C2_HNI_EXT_ERR_FIRST_FLG_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_FIRST_FLG_TS_OFFSET 0x00000158
+#define C2_HNI_EXT_ERR_FIRST_FLG_TS (C_HNI_BASE + C2_HNI_EXT_ERR_FIRST_FLG_TS_OFFSET)
+#define C2_HNI_EXT_ERR_FIRST_FLG_TS_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_CLR_OFFSET 0x00000160
+#define C2_HNI_EXT_ERR_CLR (C_HNI_BASE + C2_HNI_EXT_ERR_CLR_OFFSET)
+#define C2_HNI_EXT_ERR_CLR_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_IRQA_MSK_OFFSET 0x00000168
+#define C2_HNI_EXT_ERR_IRQA_MSK (C_HNI_BASE + C2_HNI_EXT_ERR_IRQA_MSK_OFFSET)
+#define C2_HNI_EXT_ERR_IRQA_MSK_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_IRQB_MSK_OFFSET 0x00000170
+#define C2_HNI_EXT_ERR_IRQB_MSK (C_HNI_BASE + C2_HNI_EXT_ERR_IRQB_MSK_OFFSET)
+#define C2_HNI_EXT_ERR_IRQB_MSK_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_INFO_MSK_OFFSET 0x00000180
+#define C2_HNI_EXT_ERR_INFO_MSK (C_HNI_BASE + C2_HNI_EXT_ERR_INFO_MSK_OFFSET)
+#define C2_HNI_EXT_ERR_INFO_MSK_SIZE 0x00000008
+#define C2_HNI_EXT_ERR_INFO_PMI_OFFSET 0x000001c8
+#define C2_HNI_EXT_ERR_INFO_PMI (C_HNI_BASE + C2_HNI_EXT_ERR_INFO_PMI_OFFSET)
+#define C2_HNI_EXT_ERR_INFO_PMI_SIZE 0x00000008
+
+union c2_hni_ext_err_info_pmi {
+ __u64 qw;
+ struct {
+ __u64 pmi_lp_error : 1;
+ __u64: 63;
+ };
+};
+
+#define C2_HNI_EXT_ERR_INFO_FSM_OFFSET 0x000001d0
+#define C2_HNI_EXT_ERR_INFO_FSM (C_HNI_BASE + C2_HNI_EXT_ERR_INFO_FSM_OFFSET)
+#define C2_HNI_EXT_ERR_INFO_FSM_SIZE 0x00000008
+
+union c2_hni_ext_err_info_fsm {
+ __u64 qw;
+ struct {
+ __u64 fsm_timeout : 1;
+ __u64 fsm_illegal_access : 1;
+ __u64: 62;
+ };
+};
+
+#define C2_HNI_SERDES_PMI_DATA_OFFSET 0x00000a08
+#define C2_HNI_SERDES_PMI_DATA (C_HNI_BASE + C2_HNI_SERDES_PMI_DATA_OFFSET)
+#define C2_HNI_SERDES_PMI_DATA_SIZE 0x00000008
+
+union c2_hni_serdes_pmi_data {
+ __u64 qw;
+ struct {
+ __u64 pmi_lp_rddata : 16;
+ __u64 pmi_lp_wrdata : 16;
+ __u64 pmi_lp_maskdata : 16;
+ __u64: 16;
+ };
+};
+
+#define C2_HNI_SERDES_PMI_CTL_OFFSET 0x00000a10
+#define C2_HNI_SERDES_PMI_CTL (C_HNI_BASE + C2_HNI_SERDES_PMI_CTL_OFFSET)
+#define C2_HNI_SERDES_PMI_CTL_SIZE 0x00000008
+
+union c2_hni_serdes_pmi_ctl {
+ __u64 qw;
+ struct {
+ __u64 pmi_lp_addr : 32;
+ __u64 pmi_lp_write : 1;
+ __u64 pmi_lp_read_vld : 1;
+ __u64 pmi_lp_ack : 1;
+ __u64 pmi_lp_error : 1;
+ __u64 pmi_lp_en : 1;
+ __u64: 27;
+ };
+};
+
+#define SS2_PORT_PML_CFG_CRNC_OFFSET 0x00000000
+#define SS2_PORT_PML_CFG_CRNC (C_HNI_PML_BASE + SS2_PORT_PML_CFG_CRNC_OFFSET)
+#define SS2_PORT_PML_CFG_CRNC_SIZE 0x00000008
+
+union ss2_port_pml_cfg_crnc {
+ __u64 qw;
+ struct {
+ __u64 csr_timeout : 8;
+ __u64 mcast_id : 10;
+ __u64: 1;
+ __u64 mcast_enable : 1;
+ __u64 mcast_mask : 10;
+ __u64: 34;
+ };
+};
+
+#define SS2_PORT_PML_MSC_SHADOW_ACTION_OFFSET 0x00000028
+#define SS2_PORT_PML_MSC_SHADOW_ACTION (C_HNI_PML_BASE + SS2_PORT_PML_MSC_SHADOW_ACTION_OFFSET)
+#define SS2_PORT_PML_MSC_SHADOW_ACTION_SIZE 0x00000008
+#define SS2_PORT_PML_MSC_SHADOW_OFFSET 0x00000030
+#define SS2_PORT_PML_MSC_SHADOW (C_HNI_PML_BASE + SS2_PORT_PML_MSC_SHADOW_OFFSET)
+#define SS2_PORT_PML_MSC_SHADOW_SIZE 0x00000040
+
+union ss2_port_pml_msc_shadow {
+ __u64 qw[5];
+};
+
+#define SS2_PORT_PML_ERR_ELAPSED_TIME_OFFSET 0x00000100
+#define SS2_PORT_PML_ERR_ELAPSED_TIME (C_HNI_PML_BASE + SS2_PORT_PML_ERR_ELAPSED_TIME_OFFSET)
+#define SS2_PORT_PML_ERR_ELAPSED_TIME_SIZE 0x00000008
+
+union ss2_port_pml_err_elapsed_time {
+ __u64 qw;
+ struct {
+ __u64 nanoseconds : 30;
+ __u64 seconds : 34;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_EDC_COR_OFFSET 0x00000300
+#define SS2_PORT_PML_ERR_INFO_EDC_COR (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_EDC_COR_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_EDC_COR_SIZE 0x00000008
+
+union ss2_port_pml_err_info_edc_cor {
+ __u64 qw;
+ struct {
+ __u64 syndrome : 12;
+ __u64 address : 14;
+ __u64: 1;
+ __u64 csr_detected : 1;
+ __u64 mem_id : 5;
+ __u64: 31;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_EDC_UCOR_OFFSET 0x00000308
+#define SS2_PORT_PML_ERR_INFO_EDC_UCOR (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_EDC_UCOR_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_EDC_UCOR_SIZE 0x00000008
+
+union ss2_port_pml_err_info_edc_ucor {
+ __u64 qw;
+ struct {
+ __u64 syndrome : 12;
+ __u64 address : 14;
+ __u64: 1;
+ __u64 csr_detected : 1;
+ __u64 mem_id : 5;
+ __u64: 31;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_SBE_OFFSET 0x00000360
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_SBE \
+ (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_LLR_TX_DP_SBE_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_SBE_SIZE 0x00000008
+
+union ss2_port_pml_err_info_llr_tx_dp_sbe {
+ __u64 qw;
+ struct {
+ __u64 syndrome : 11;
+ __u64: 5;
+ __u64 subport : 2;
+ __u64: 6;
+ __u64 dp_id : 3;
+ __u64: 37;
+ };
+};
+
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_MBE_OFFSET 0x00000368
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_MBE \
+ (C_HNI_PML_BASE + SS2_PORT_PML_ERR_INFO_LLR_TX_DP_MBE_OFFSET)
+#define SS2_PORT_PML_ERR_INFO_LLR_TX_DP_MBE_SIZE 0x00000008
+
+union ss2_port_pml_err_info_llr_tx_dp_mbe {
+ __u64 qw;
+ struct {
+ __u64 syndrome : 11;
+ __u64: 5;
+ __u64 subport : 2;
+ __u64: 6;
+ __u64 dp_id : 3;
+ __u64: 37;
+ };
+};
+
+#define SS2_PORT_PML_CFG_GENERAL_OFFSET 0x00000400
+#define SS2_PORT_PML_CFG_GENERAL (C_HNI_PML_BASE + SS2_PORT_PML_CFG_GENERAL_OFFSET)
+#define SS2_PORT_PML_CFG_GENERAL_SIZE 0x00000008
+
+union ss2_port_pml_cfg_general {
+ __u64 qw;
+ struct {
+ __u64 clock_period_ps : 11;
+ __u64: 53;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PORT_GROUP_OFFSET 0x00000408
+#define SS2_PORT_PML_CFG_PORT_GROUP (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PORT_GROUP_OFFSET)
+#define SS2_PORT_PML_CFG_PORT_GROUP_SIZE 0x00000008
+
+union ss2_port_pml_cfg_port_group {
+ __u64 qw;
+ struct {
+ __u64 pg_cfg : 2;
+ __u64: 6;
+ __u64 link_function : 4;
+ __u64: 52;
+ };
+};
+
+#define SS2_PORT_PML_CFG_SUBPORT_RESET_OFFSET(idx) (0x00000420 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_SUBPORT_RESET_ENTRIES 4
+#define SS2_PORT_PML_CFG_SUBPORT_RESET(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_SUBPORT_RESET_OFFSET(idx))
+#define SS2_PORT_PML_CFG_SUBPORT_RESET_SIZE 0x00000020
+
+union ss2_port_pml_cfg_subport_reset {
+ __u64 qw;
+ struct {
+ __u64 warm_rst_from_csr : 1;
+ __u64: 63;
+ };
+};
+
+#define SS2_PORT_PML_CFG_PCS_SUBPORT_OFFSET(idx) (0x00000520 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_PCS_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_PCS_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_PCS_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_PCS_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_pcs_subport {
+ __u64 qw;
+ struct {
+ __u64 pcs_enable : 1;
+ __u64 enable_auto_neg : 1;
+ __u64: 14;
+ __u64 ll_fec : 1;
+ __u64: 47;
+ };
+};
+
+#define SS2_PORT_PML_CFG_TX_PCS_SUBPORT_OFFSET(idx) (0x000006a0 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_TX_PCS_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_TX_PCS_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_TX_PCS_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_TX_PCS_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_tx_pcs_subport {
+ __u64 qw;
+ struct {
+ __u64 enable_ctl_os : 1;
+ __u64 ctl_os_rate : 1;
+ __u64: 2;
+ __u64 gearbox_credits : 5;
+ __u64: 55;
+ };
+};
+
+#define SS2_PORT_PML_CFG_RX_PCS_SUBPORT_OFFSET(idx) (0x000006e0 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_RX_PCS_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_RX_PCS_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_RX_PCS_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_RX_PCS_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_rx_pcs_subport {
+ __u64 qw;
+ struct {
+ __u64 enable_rx_sm : 1;
+ __u64 enable_ctl_os : 1;
+ __u64 enable_lock : 1;
+ __u64: 5;
+ __u64 rs_mode : 3;
+ __u64: 53;
+ };
+};
+
+#define SS2_PORT_PML_CFG_TX_MAC_SUBPORT_OFFSET(idx) (0x00000820 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_TX_MAC_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_TX_MAC_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_TX_MAC_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_TX_MAC_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_tx_mac_subport {
+ __u64 qw;
+ struct {
+ __u64 mac_operational : 1;
+ __u64 short_preamble : 1;
+ __u64: 6;
+ __u64 pcs_credits : 4;
+ __u64: 4;
+ __u64 mac_cdt_init_val : 8;
+ __u64 mac_cdt_thresh : 8;
+ __u64: 32;
+ };
+};
+
+#define SS2_PORT_PML_CFG_RX_MAC_SUBPORT_OFFSET(idx) (0x00000860 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_RX_MAC_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_RX_MAC_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_RX_MAC_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_RX_MAC_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_rx_mac_subport {
+ __u64 qw;
+ struct {
+ __u64 mac_operational : 1;
+ __u64 short_preamble : 1;
+ __u64: 62;
+ };
+};
+
+#define SS2_PORT_PML_CFG_LLR_SUBPORT_OFFSET(idx) (0x00000920 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_LLR_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_CFG_LLR_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_CFG_LLR_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_CFG_LLR_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_cfg_llr_subport {
+ __u64 qw;
+ struct {
+ __u64 llr_mode : 2;
+ __u64: 6;
+ __u64 enable_loop_timing : 1;
+ __u64: 7;
+ __u64 filter_ctl_frames : 1;
+ __u64: 3;
+ __u64 filter_lossless_when_off : 1;
+ __u64: 3;
+ __u64 mac_if_credits : 4;
+ __u64: 4;
+ __u64 link_down_behavior : 2;
+ __u64: 6;
+ __u64 max_starvation_limit : 16;
+ __u64: 8;
+ };
+};
+
+#define SS2_PORT_PML_CFG_SERDES_RX_OFFSET(idx) (0x00001000 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_SERDES_RX_ENTRIES 4
+#define SS2_PORT_PML_CFG_SERDES_RX(idx) (C_HNI_PML_BASE + SS2_PORT_PML_CFG_SERDES_RX_OFFSET(idx))
+#define SS2_PORT_PML_CFG_SERDES_RX_SIZE 0x00000020
+
+union ss2_port_pml_cfg_serdes_rx {
+ __u64 qw;
+ struct {
+ __u64 pmd_rx_lane_mode : 16;
+ __u64 pmd_rx_osr_mode : 9;
+ __u64: 3;
+ __u64 pmd_ext_los : 1;
+ __u64: 3;
+ __u64 pmd_ln_rx_h_pwrdn : 1;
+ __u64: 3;
+ __u64 pmd_ln_rx_dp_h_rstb : 1;
+ __u64: 3;
+ __u64 pmd_ln_rx_h_rstb : 1;
+ __u64: 23;
+ };
+};
+
+#define SS2_PORT_PML_CFG_SERDES_TX_OFFSET(idx) (0x00001020 + ((idx) * 8))
+#define SS2_PORT_PML_CFG_SERDES_TX_ENTRIES 4
+#define SS2_PORT_PML_CFG_SERDES_TX(idx) (C_HNI_PML_BASE + SS2_PORT_PML_CFG_SERDES_TX_OFFSET(idx))
+#define SS2_PORT_PML_CFG_SERDES_TX_SIZE 0x00000020
+
+union ss2_port_pml_cfg_serdes_tx {
+ __u64 qw;
+ struct {
+ __u64 pmd_tx_lane_mode : 16;
+ __u64 pmd_tx_osr_mode : 9;
+ __u64: 3;
+ __u64 pmd_tx_disable : 1;
+ __u64: 3;
+ __u64 pmd_ln_tx_h_pwrdn : 1;
+ __u64: 3;
+ __u64 pmd_ln_tx_dp_h_rstb : 1;
+ __u64: 3;
+ __u64 pmd_ln_tx_h_rstb : 1;
+ __u64: 23;
+ };
+};
+
+#define SS2_PORT_PML_STS_SERDES_OFFSET(idx) (0x00001200 + ((idx) * 8))
+#define SS2_PORT_PML_STS_SERDES_ENTRIES 4
+#define SS2_PORT_PML_STS_SERDES(idx) (C_HNI_PML_BASE + SS2_PORT_PML_STS_SERDES_OFFSET(idx))
+#define SS2_PORT_PML_STS_SERDES_SIZE 0x00000020
+
+union ss2_port_pml_sts_serdes {
+ __u64 qw;
+ struct {
+ __u64 pmd_signal_detect : 1;
+ __u64: 3;
+ __u64 pmd_rx_lock : 1;
+ __u64: 3;
+ __u64 pmd_rx_clk_vld : 1;
+ __u64: 3;
+ __u64 pmd_rx_data_vld : 1;
+ __u64: 3;
+ __u64 pmd_tx_clk_vld : 1;
+ __u64: 3;
+ __u64 pmd_tx_data_vld : 1;
+ __u64: 3;
+ __u64 rx_signal_ok : 1;
+ __u64: 39;
+ };
+};
+
+#define SS2_PORT_PML_STS_RX_PCS_AM_LOCK_OFFSET 0x00001380
+#define SS2_PORT_PML_STS_RX_PCS_AM_LOCK (C_HNI_PML_BASE + SS2_PORT_PML_STS_RX_PCS_AM_LOCK_OFFSET)
+#define SS2_PORT_PML_STS_RX_PCS_AM_LOCK_SIZE 0x00000008
+
+union ss2_port_pml_sts_rx_pcs_am_lock {
+ __u64 qw;
+ struct {
+ __u64 am_lock : 16;
+ __u64: 48;
+ };
+};
+
+#define SS2_PORT_PML_STS_RX_PCS_SUBPORT_OFFSET(idx) (0x000013a0 + ((idx) * 8))
+#define SS2_PORT_PML_STS_RX_PCS_SUBPORT_ENTRIES 4
+#define SS2_PORT_PML_STS_RX_PCS_SUBPORT(idx) \
+ (C_HNI_PML_BASE + SS2_PORT_PML_STS_RX_PCS_SUBPORT_OFFSET(idx))
+#define SS2_PORT_PML_STS_RX_PCS_SUBPORT_SIZE 0x00000020
+
+union ss2_port_pml_sts_rx_pcs_subport {
+ __u64 qw;
+ struct {
+ __u64: 4;
+ __u64 align_status : 1;
+ __u64: 3;
+ __u64 fault : 1;
+ __u64: 3;
+ __u64 local_fault : 1;
+ __u64: 3;
+ __u64 hi_ser : 1;
+ __u64: 47;
+ };
+};
+
+#define C2_IXE_CFG_DISP_ORD_OFFSET 0x000007a8
+#define C2_IXE_CFG_DISP_ORD (C_IXE_BASE + C2_IXE_CFG_DISP_ORD_OFFSET)
+#define C2_IXE_CFG_DISP_ORD_SIZE 0x00000008
+
+union c2_ixe_cfg_disp_ord {
+ __u64 qw;
+ struct {
+ __u64 wr_atomic_op : 1;
+ __u64 get_ro_last : 1;
+ __u64 get_ro_body : 1;
+ __u64: 61;
+ };
+};
+
+#define C2_LPE_CFG_MATCH_SEL_OFFSET 0x00000a20
+#define C2_LPE_CFG_MATCH_SEL (C_LPE_BASE + C2_LPE_CFG_MATCH_SEL_OFFSET)
+#define C2_LPE_CFG_MATCH_SEL_SIZE 0x00000008
+
+union c2_lpe_cfg_match_sel {
+ __u64 qw;
+ struct {
+ __u64 vni_cfg : 2;
+ __u64: 62;
+ };
+};
+
+#define C2_LPE_CFG_GET_FQ_DFA_MASK_OFFSET(idx) (0x00000b00 + ((idx) * 8))
+#define C2_LPE_CFG_GET_FQ_DFA_MASK_ENTRIES 16
+#define C2_LPE_CFG_GET_FQ_DFA_MASK(idx) (C_LPE_BASE + C2_LPE_CFG_GET_FQ_DFA_MASK_OFFSET(idx))
+#define C2_LPE_CFG_GET_FQ_DFA_MASK_SIZE 0x00000080
+
+union c2_lpe_cfg_get_fq_dfa_mask {
+ __u64 qw;
+ struct {
+ __u64 dscp0_dfa_mask : 12;
+ __u64: 4;
+ __u64 dscp1_dfa_mask : 12;
+ __u64: 4;
+ __u64 dscp2_dfa_mask : 12;
+ __u64: 4;
+ __u64 dscp3_dfa_mask : 12;
+ __u64: 4;
+ };
+};
+
+#define C2_OXE_ERR_INFO_SPT_CDT_ERR_OFFSET 0x000001e8
+#define C2_OXE_ERR_INFO_SPT_CDT_ERR (C_OXE_BASE + C2_OXE_ERR_INFO_SPT_CDT_ERR_OFFSET)
+#define C2_OXE_ERR_INFO_SPT_CDT_ERR_SIZE 0x00000008
+
+union c2_oxe_err_info_spt_cdt_err {
+ __u64 qw;
+ struct {
+ __u64 index : 11;
+ __u64: 5;
+ __u64 bc : 4;
+ __u64: 44;
+ };
+};
+
+#define C2_OXE_ERR_INFO_SMT_CDT_ERR_OFFSET 0x000001f0
+#define C2_OXE_ERR_INFO_SMT_CDT_ERR (C_OXE_BASE + C2_OXE_ERR_INFO_SMT_CDT_ERR_OFFSET)
+#define C2_OXE_ERR_INFO_SMT_CDT_ERR_SIZE 0x00000008
+
+union c2_oxe_err_info_smt_cdt_err {
+ __u64 qw;
+ struct {
+ __u64 index : 8;
+ __u64: 8;
+ __u64 bc : 4;
+ __u64: 44;
+ };
+};
+
+#define C2_OXE_CFG_SPT_BC_LIMIT_OFFSET(idx) (0x00000680 + ((idx) * 8))
+#define C2_OXE_CFG_SPT_BC_LIMIT_ENTRIES 10
+#define C2_OXE_CFG_SPT_BC_LIMIT(idx) (C_OXE_BASE + C2_OXE_CFG_SPT_BC_LIMIT_OFFSET(idx))
+#define C2_OXE_CFG_SPT_BC_LIMIT_SIZE 0x00000050
+
+union c2_oxe_cfg_spt_bc_limit {
+ __u64 qw;
+ struct {
+ __u64 limit : 11;
+ __u64: 53;
+ };
+};
+
+#define C2_PI_ERR_INFO_AHB_OFFSET 0x00000300
+#define C2_PI_ERR_INFO_AHB (C_PI_BASE + C2_PI_ERR_INFO_AHB_OFFSET)
+#define C2_PI_ERR_INFO_AHB_SIZE 0x00000018
+
+union c2_pi_err_info_ahb {
+ __u64 qw[3];
+ struct {
+ __u64 hwrite : 1;
+ __u64 htrans : 2;
+ __u64 hsize : 3;
+ __u64 hrdata_sel : 4;
+ __u64: 5;
+ __u64 ahb_err_id : 1;
+ __u64 haddr : 14;
+ __u64: 2;
+ __u64 hsel : 16;
+ __u64: 16;
+ __u64 req : 1;
+ __u64: 31;
+ __u64 hwdata : 32;
+ __u64 done : 16;
+ __u64 hresp : 16;
+ __u64 hrdata : 32;
+ };
+};
+
+struct c_cq_cntrs_group {
+ struct c_cq_cntrs cq;
+ struct c_tou_cntrs tou;
+ struct c_pct_cntrs pct;
+ struct c_ee_cntrs ee;
+};
+
+struct c_lpe_cntrs_group {
+ struct c_lpe_cntrs lpe;
+ struct c_ixe_cntrs ixe;
+ struct c_rmu_cntrs rmu;
+ struct c_parbs_cntrs parbs;
+ struct c_mst_cntrs mst;
+};
+
+struct c_hni_cntrs_group {
+ struct c_hni_cntrs hni;
+ struct c1_hni_pcs_cntrs pcs;
+ struct c1_hni_mac_cntrs mac;
+ struct c1_hni_llr_cntrs llr;
+ struct c1_oxe_cntrs oxe;
+};
+
+struct c_mb_cntrs_group {
+ struct c_mb_cntrs mb;
+ struct c_pi_cntrs pi;
+ struct c_atu_cntrs atu;
+};
+
+struct c_pi_ipd_cntrs_group {
+ struct c_pi_ipd_cntrs pi_ipd;
+};
+
+#define C_PI_CFG_DMAC_STATUS_AXI_RESP_OKAY (0)
+#define C_PI_CFG_DMAC_STATUS_AXI_RESP_EXOKAY (1)
+#define C_PI_CFG_DMAC_STATUS_AXI_RESP_SLVERR (2)
+#define C_PI_CFG_DMAC_STATUS_AXI_RESP_DECERR (3)
+
+#define C_PI_DMAC_CDESC_STATUS_AXI_RESP_OKAY C_PI_CFG_DMAC_STATUS_AXI_RESP_OKAY
+#define C_PI_DMAC_CDESC_STATUS_AXI_RESP_EXOKAY C_PI_CFG_DMAC_STATUS_AXI_RESP_EXOKAY
+#define C_PI_DMAC_CDESC_STATUS_AXI_RESP_SLVERR C_PI_CFG_DMAC_STATUS_AXI_RESP_SLVERR
+#define C_PI_DMAC_CDESC_STATUS_AXI_RESP_DECERR C_PI_CFG_DMAC_STATUS_AXI_RESP_DECERR
+
+#endif
--git a/kernel-headers/rdma/cxiverbs-abi.h b/kernel-headers/rdma/cxiverbs-abi.h
new file mode 100644
index 000000000000..69a3c39a3f9b
--- /dev/null
+++ b/kernel-headers/rdma/cxiverbs-abi.h
@@ -0,0 +1,658 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright 2025 Hewlett Packard Enterprise Development LP
+ *
+ * User-space ABI for the CXI InfiniBand RDMA driver.
+ * This header is shared between the kernel driver and the libcxi_verbs
+ * user-space provider in rdma-core.
+ *
+ * QPN encoding (UEC-aligned):
+ * bit 31 : addr_mode (1 = absolute, 0 = job-relative)
+ * bits [23:12]: Resource Index (PID-slice receive selector, not service ID)
+ * bits [11:0] : PIDonFEP (process-endpoint address bits)
+ */
+
+#ifndef __UAPI_RDMA_CXI_ABI_H__
+#define __UAPI_RDMA_CXI_ABI_H__
+
+#include <linux/types.h>
+
+#define CXI_IB_UVERBS_ABI_VERSION 1
+#define CXI_IBV_LNI_ANY 0xffffffffU
+
+/*
+ * alloc_ucontext / GET_CONTEXT
+ *
+ * GET_CONTEXT opens the uverbs device and returns static CXI geometry.
+ * Privileged ibv_alloc_job() creates a device-scoped job; it does not allocate
+ * an LNI or bind the ucontext. LNIs are allocated explicitly and selected by
+ * PDs. QPs require a job key belonging to their PD. PIDonFEP may be supplied
+ * as an optional default for later QP creation.
+ */
+enum cxi_ibv_alloc_ucontext_mask {
+ CXI_IBV_ALLOC_UCONTEXT_PIDONFEP = 1U << 0,
+};
+
+#define CXI_IBV_SERVICE_ID_MAX 0xfffU
+#define CXI_IBV_JOB_ID_MAX 0xffffU
+#define CXI_IBV_PIDONFEP_MAX 0xfffU
+
+/*
+ * A Slingshot GID is just the 20-bit NID: subnet_prefix is zero and the NID
+ * sits in the low bits of interface_id. Userspace never needs to know that -
+ * it exchanges GIDs like any other transport - but a GID handed back to this
+ * device must fit, or it names something we cannot reach.
+ */
+#define CXI_IBV_NID_MASK 0xfffffULL
+
+struct cxi_ibv_alloc_ucontext_cmd {
+ __u32 comp_mask; /* enum cxi_ibv_alloc_ucontext_mask */
+ __u32 pidonfep; /* UET PIDonFEP (optional default) */
+};
+
+/*
+ * TC capacity limits (one per traffic class, 0-7).
+ * Used to report per-JobID resource allocation.
+ */
+struct cxi_ibv_tc_limit {
+ __u32 tc; /* traffic class 0-7 */
+ __u32 max_ptes; /* max portal table entries for this TC */
+ __u32 max_cps; /* max communication profiles for this TC */
+ __u32 max_qps; /* max queue pairs for this TC */
+ __u32 reserved; /* for future use */
+};
+
+#define CXI_IBV_TC_MAX 8 /* 0-7 traffic classes */
+
+struct cxi_ibv_alloc_ucontext_resp {
+ __u32 nid; /* 20-bit NIC address (NID) of this port */
+ __u32 pid_bits; /* width of the PID field (6–9 bits) */
+ __u32 pid_count; /* number of PIDs per VNI */
+ __u32 pid_granule; /* PID space granularity */
+ __u32 lni_id; /* Zero; LNIs are allocated explicitly */
+ __u32 num_tc_limits; /* number of valid tc_limits[] entries */
+ /* variable-length tc_limits[] follows if num_tc_limits > 0 */
+};
+
+/*
+ * alloc_pd / ALLOC_PD
+ *
+ * The protection domain selects an explicitly allocated LNI. A nonzero
+ * preferred_svc_id must match that LNI's service; zero means no preference.
+ */
+enum cxi_ibv_alloc_pd_mask {
+ CXI_IBV_ALLOC_PD_SVC_ID_PREFERRED = 1U << 0,
+ CXI_IBV_ALLOC_PD_LNI = 1U << 1,
+};
+
+struct cxi_ibv_alloc_pd_cmd {
+ __u32 comp_mask; /* enum cxi_ibv_alloc_pd_mask */
+ __u32 preferred_svc_id; /* optional preferred service for QPs (0 = any) */
+ __u32 lni_handle;
+ __u32 reserved;
+};
+
+struct cxi_ibv_alloc_pd_resp {
+ __u32 pd_id; /* RGID-based PD identifier (informational) */
+ __u32 pad;
+};
+
+/*
+ * create_cq / CREATE_CQ
+ *
+ * The driver allocates a CXI Event Queue (EQ) of the requested size and
+ * maps the ring buffer and doorbell CSR into user space.
+ *
+ * After create_cq succeeds:
+ * - eq_buf_offset / eq_buf_size : mmap offset+size for the event-ring buffer
+ * (user polls this for completions)
+ * - eq_db_offset / eq_db_size : mmap offset+size for the EQ doorbell/CSR
+ * (user writes here to arm notifications)
+ * - eqn : hardware EQ index
+ */
+struct cxi_ibv_create_cq_cmd {
+ __u32 n_entries; /* requested event-ring depth in entries */
+ __u32 cpu_affinity; /* NUMA / CPU affinity hint for IRQ steering */
+ __u32 lni_handle;
+ __u32 reserved;
+};
+
+struct cxi_ibv_create_cq_resp {
+ __u64 eq_buf_offset; /* mmap offset for event-ring buffer */
+ __u64 eq_buf_size; /* event-ring buffer size in bytes */
+ __u64 eq_db_offset; /* mmap offset for EQ doorbell (CSR) */
+ __u64 eq_db_size; /* doorbell region size in bytes */
+ __u32 eqn; /* hardware EQ index */
+ __u32 pad;
+};
+
+/*
+ * create_qp / CREATE_QP
+ *
+ * On creation the driver allocates:
+ * - a CXI Domain (VNI + PID)
+ * - a Communication Profile (CP → LCID)
+ * - a transmit CQ (TXQ)
+ * - a target CQ (TGQ)
+ * - a Portal Table Entry (PTE) for receive matching
+ *
+ * The QP uses its required PD job key's JobID. svc_id selects the CXI
+ * service/resource pool for this QP,
+ * independently of its Resource Index, and must match the PD's LNI service.
+ * If omitted, the driver uses that service. TC
+ * defaults to CXI_TC_BEST_EFFORT unless overridden. match_bits / match_mask
+ * control the portal-level receive filter (0 / 0 = accept all).
+ *
+ * After create_qp succeeds:
+ * - txq_cmds_offset / txq_cmds_size : mmap offset+size for the TXQ command
+ * ring (user writes commands here)
+ * - txq_db_offset / txq_db_size : mmap offset+size for the TXQ doorbell
+ * - txq_idx : TXQ hardware CQ index (0–1023)
+ * - lcid : LCID assigned to this QP (from CP)
+ * - tgq_cmds_offset / tgq_cmds_size : mmap offset+size for the TGQ command
+ * ring (user appends receive buffers here)
+ * - tgq_db_offset / tgq_db_size : mmap offset+size for the TGQ doorbell
+ * - tgq_idx : TGQ hardware CQ index (1024–1535)
+ *
+ * The PTE hardware index needed to post receives is not known until the QP
+ * reaches RTR (see cxi_ibv_modify_qp_resp below).
+ */
+enum cxi_ibv_create_qp_mask {
+ CXI_IBV_CREATE_QP_SVC_ID = 1U << 0,
+ CXI_IBV_CREATE_QP_TC = 1U << 1,
+};
+
+struct cxi_ibv_create_qp_cmd {
+ __u32 comp_mask; /* enum cxi_ibv_create_qp_mask */
+ __u32 svc_id; /* optional CXI service (resource-limit pool) */
+ __u32 tc; /* enum cxi_traffic_class */
+ __u32 uec_qp_type; /* UEC QP type (reserved; use 0 until spec final) */
+ __u32 pad;
+ __u64 match_bits; /* portal match bits (0 = match all) */
+ __u64 match_mask; /* matching mask (0 = match all) */
+};
+
+struct cxi_ibv_create_qp_resp {
+ __u64 txq_cmds_offset; /* mmap offset for TXQ command ring */
+ __u64 txq_cmds_size; /* TXQ command ring size in bytes */
+ __u64 txq_db_offset; /* mmap offset for TXQ doorbell */
+ __u64 txq_db_size; /* TXQ doorbell size in bytes */
+ __u32 txq_idx; /* TXQ hardware index (0–1023) */
+ __u32 lcid; /* LCID assigned to this QP */
+ __u64 tgq_cmds_offset; /* mmap offset for TGQ command ring */
+ __u64 tgq_cmds_size; /* TGQ command ring size in bytes */
+ __u64 tgq_db_offset; /* mmap offset for TGQ doorbell */
+ __u64 tgq_db_size; /* TGQ doorbell size in bytes */
+ __u32 tgq_idx; /* TGQ hardware index (1024–1535, see cxi_cq_get_cqn()) */
+ __u32 job_id; /* JobID (VNI) the QP was created under */
+ __u32 pte_index;
+ __u32 reserved;
+};
+
+/*
+ * modify_qp / MODIFY_QP (extended)
+ *
+ * The PTE is mapped into the domain during the INIT->RTR transition, so its
+ * hardware index is not known at create_qp time. Returned here instead.
+ */
+struct cxi_ibv_modify_qp_resp {
+ __u32 pte_index; /* hardware PTLTE index, valid once QP reaches RTR */
+ __u32 pad;
+};
+
+/*
+ * query_device / QUERY_DEVICE (driver-specific extended response)
+ *
+ * When the user-space provider calls ibv_query_device_ex(), the kernel
+ * returns this struct as driver-specific data (via udata->out).
+ * The caller must pass at least sizeof(cxi_ibv_query_device_resp) bytes
+ * in the output buffer; unused bytes are zeroed.
+ *
+ * features:
+ * CXI_DEVICE_CAP_UEC_QPN - QPN uses UEC bit-31 addr_mode encoding
+ * CXI_DEVICE_CAP_TRIGGERED_OPS - counting triggers / triggered operations
+ * CXI_DEVICE_CAP_ODP - on-demand paging MRs
+ *
+ * max_ctn: highest counting-trigger number (inclusive) this device supports.
+ */
+#define CXI_DEVICE_CAP_UEC_QPN (1U << 0)
+#define CXI_DEVICE_CAP_TRIGGERED_OPS (1U << 1)
+#define CXI_DEVICE_CAP_ODP (1U << 2)
+
+/*
+ * Device-wide HW properties that the native ABI exposes via the
+ * DEV_INFO_GET ioctl (struct cxi_dev_info_use in uapi/ethernet/cxi-abi.h).
+ * The RDMA path has no ioctl/sysfs control channel, so it must return the
+ * same information here instead. Field-for-field mirror of that struct,
+ * kept separate (rather than #include'd) so this ABI header doesn't pull
+ * in the native ioctl definitions it has no use for; keep the two in sync.
+ */
+struct cxi_ibv_devinfo {
+ __u32 nid;
+ __u32 pid_bits;
+ __u32 pid_count;
+ __u32 pid_granule;
+ __u32 min_free_shift;
+ __u32 rdzv_get_idx;
+ __u32 vendor_id;
+ __u32 device_id;
+ __u32 device_rev;
+ __u32 device_proto;
+ __u32 device_platform;
+ __u32 pct_eq;
+ __s32 uc_nic;
+ __u64 link_mtu;
+ __u64 link_speed;
+ __u8 link_state;
+ __u16 num_ptes;
+ __u16 num_txqs;
+ __u16 num_tgqs;
+ __u16 num_eqs;
+ __u16 num_cts;
+ __u16 num_acs;
+ __u16 num_tles;
+ __u16 num_les;
+ __u32 cassini_version; /* enum cassini_version */
+ __u32 system_type_identifier; /* enum system_type_identifier */
+ char fru_description[16];
+ __u32 vni_matching;
+};
+
+struct cxi_ibv_query_device_resp {
+ __u32 features; /* CXI_DEVICE_CAP_* bitmask */
+ __u32 max_ctn; /* max counting trigger number */
+ struct cxi_ibv_devinfo devinfo;
+};
+
+/*
+ *
+ * The driver registers user memory with the CXI ATU (Address Translation
+ * Unit). The lkey encodes the LAC (Local Address Context) slot and the
+ * hardware MD identifier. The rkey is a random token used as the portal
+ * match-bits for remote RDMA WRITE/READ operations targeting this MR.
+ */
+/*
+ * 64-bit memory keys.
+ *
+ * lkey64 bits [2:0] LAC, the hardware address context
+ * bits [34:3] ATU memory descriptor index
+ * rkey64 an opaque token the initiator presents as the portal match bits
+ *
+ * The 32-bit lkey and rkey keep the older narrow encoding, which packs the
+ * LAC into bits [31:24] and truncates the descriptor index to 24 bits, for
+ * callers that cannot carry a wide key.
+ */
+#define CXI_LKEY64_LAC_MASK 0x7ULL
+#define CXI_LKEY64_MD_SHIFT 3
+#define CXI_LKEY64_MD_MASK 0xffffffffULL
+
+/*
+ * A caller may choose the remote key rather than take a generated one. The
+ * value is used exactly as given, so one that fits in 32 bits produces a
+ * region a 32-bit peer can reach without anything having to truncate.
+ */
+#define CXI_REG_MR_USER_RKEY (1 << 0)
+#define CXI_REG_MR_NATIVE_MAP (1 << 1)
+
+#define CXI_RKEY_MAX 0xffffffffffffULL
+
+struct cxi_ibv_reg_mr {
+ __aligned_u64 rkey64;
+ __u32 flags;
+ __u32 native_flags;
+};
+
+struct cxi_ibv_mr_info {
+ __u64 va __attribute__((packed));
+ __u64 iova __attribute__((packed));
+ __u64 length __attribute__((packed));
+ __s32 page_shift;
+ __s32 huge_shift;
+ __u32 id;
+ __u32 lac;
+};
+
+struct cxi_ibv_reg_mr_resp {
+ /*
+ * The narrow keys alias the low word of the wide ones. REG_MR is a
+ * legacy write command whose response declares __u32 driver_data[], so
+ * this payload begins at offset 12 and nothing here can be eight-byte
+ * aligned; packed drops the requirement without moving anything.
+ */
+ union {
+ __u64 lkey64 __attribute__((packed));
+ struct {
+ __u32 lkey;
+ __u32 lkey_hi;
+ };
+ };
+ union {
+ __u64 rkey64 __attribute__((packed));
+ struct {
+ __u32 rkey;
+ __u32 rkey_hi;
+ };
+ };
+ /* ATU address for @start; commands must use this, not the VA. */
+ __u64 iova __attribute__((packed));
+ struct cxi_ibv_mr_info info;
+};
+
+/*
+ * Custom uverbs for Counting Triggers (CT).
+ *
+ * The driver allocates a CXI Completion Table (CT) of the requested size and
+ * maps the ring buffer (writeback page) and doorbell CSR into user space.
+ *
+ * After create_ct succeeds:
+ * - ctn : hardware CT number (u32); used in triggered commands
+ * - wb_mmap_offset : mmap() offset for the writeback page
+ * - wb_mmap_length : size of the writeback page in bytes
+ * - db_mmap_offset : mmap() offset for the CT doorbell CSR
+ * - db_mmap_length : size of the doorbell region in bytes
+ *
+ * Object/method/attribute IDs are driver-namespace values
+ * (UVERBS_ID_DRIVER_NS = 1 << UVERBS_ID_NS_SHIFT).
+ */
+#include <rdma/ib_user_ioctl_cmds.h>
+
+enum cxi_ib_object_ids {
+ CXI_IB_OBJECT_CT = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_OBJECT_JOB_TC,
+ CXI_IB_OBJECT_LNI,
+ CXI_IB_OBJECT_SVC,
+ CXI_IB_OBJECT_CP,
+ CXI_IB_OBJECT_EQ,
+ CXI_IB_OBJECT_CSR,
+ CXI_IB_OBJECT_WAIT,
+ CXI_IB_OBJECT_CMDQ,
+};
+
+enum cxi_ib_methods_cmdq {
+ CXI_IB_METHOD_CMDQ_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_CMDQ_DESTROY,
+};
+
+enum cxi_ib_attrs_cmdq {
+ CXI_IB_ATTR_CMDQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_CMDQ_LNI,
+ CXI_IB_ATTR_CMDQ_COUNT,
+ CXI_IB_ATTR_CMDQ_INFO,
+ CXI_IB_ATTR_CMDQ_FLAGS,
+};
+
+enum cxi_ib_cmdq_flags {
+ CXI_IB_CMDQ_TRIGGER = 1U << 0,
+};
+
+struct cxi_ibv_cmdq_info {
+ __aligned_u64 commands_offset;
+ __aligned_u64 commands_length;
+ __aligned_u64 doorbell_offset;
+ __aligned_u64 doorbell_length;
+ __u32 count;
+ __u32 index;
+};
+
+enum cxi_ib_methods_wait {
+ CXI_IB_METHOD_WAIT_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+};
+
+enum cxi_ib_attrs_wait {
+ CXI_IB_ATTR_WAIT_FD = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_WAIT_LNI,
+};
+
+enum cxi_ib_methods_csr {
+ CXI_IB_METHOD_CSR_MAP = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_CSR_UNMAP,
+ CXI_IB_METHOD_CSR_INBOUND_WAIT,
+};
+
+enum cxi_ib_attrs_csr {
+ CXI_IB_ATTR_CSR_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_CSR_INFO,
+};
+
+struct cxi_ibv_csr_info {
+ __aligned_u64 offset;
+ __aligned_u64 length;
+};
+
+enum cxi_ib_methods_eq {
+ CXI_IB_METHOD_EQ_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_EQ_DESTROY,
+};
+
+enum cxi_ib_attrs_eq {
+ CXI_IB_ATTR_EQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_EQ_LNI,
+ CXI_IB_ATTR_EQ_MR,
+ CXI_IB_ATTR_EQ_CONFIG,
+ CXI_IB_ATTR_EQ_INFO,
+ CXI_IB_ATTR_EQ_FLAGS,
+ CXI_IB_ATTR_EQ_EVENT_WAIT,
+ CXI_IB_ATTR_EQ_STATUS_WAIT,
+};
+
+enum cxi_ib_eq_flags {
+ CXI_IB_EQ_REGISTER_PCT = 1U << 0,
+ CXI_IB_EQ_PASSTHROUGH = 1U << 1,
+};
+
+struct cxi_ibv_eq_config {
+ __aligned_u64 address;
+ __aligned_u64 length;
+ __u32 threshold_base;
+ __u32 threshold_delta;
+ __u32 threshold_count;
+ __u32 ec_delay;
+ __u32 cpu;
+ __u32 reserved_slots;
+};
+
+struct cxi_ibv_eq_info {
+ __aligned_u64 doorbell_offset;
+ __aligned_u64 doorbell_size;
+ __u32 eqn;
+ __u32 reserved;
+};
+
+enum cxi_ib_methods_cp {
+ CXI_IB_METHOD_CP_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_CP_DESTROY,
+};
+
+enum cxi_ib_attrs_cp {
+ CXI_IB_ATTR_CP_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_CP_LNI,
+ CXI_IB_ATTR_CP_VNI,
+ CXI_IB_ATTR_CP_TC,
+ CXI_IB_ATTR_CP_TYPE,
+ CXI_IB_ATTR_CP_INFO,
+};
+
+struct cxi_ibv_cp_info {
+ __u32 vni;
+ __u32 tc;
+ __u32 type;
+ __u32 lcid;
+};
+
+enum cxi_ib_methods_svc {
+ CXI_IB_METHOD_SVC_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_SVC_DESTROY,
+ CXI_IB_METHOD_SVC_QUERY,
+ CXI_IB_METHOD_SVC_ENABLE,
+};
+
+enum cxi_ib_attrs_svc {
+ CXI_IB_ATTR_SVC_ID = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_SVC_CONFIG,
+ CXI_IB_ATTR_SVC_FLAGS,
+ CXI_IB_ATTR_SVC_USAGE,
+ CXI_IB_ATTR_SVC_LPR,
+};
+
+enum cxi_ib_svc_flags {
+ CXI_IB_SVC_LIMITS = 1U << 0,
+ CXI_IB_SVC_CREATE_TC = 1U << 1,
+ CXI_IB_SVC_ENABLED = 1U << 2,
+};
+
+enum cxi_ib_svc_resource {
+ CXI_IB_SVC_PTES,
+ CXI_IB_SVC_TXQS,
+ CXI_IB_SVC_TGQS,
+ CXI_IB_SVC_EQS,
+ CXI_IB_SVC_CTS,
+ CXI_IB_SVC_ACS,
+ CXI_IB_SVC_TLES,
+ CXI_IB_SVC_LES,
+ CXI_IB_SVC_RSRC_COUNT,
+};
+
+#define CXI_IB_SVC_MAX_VNIS 4
+
+struct cxi_ibv_svc_config {
+ __u32 svc_id;
+ /* Reserved; must be zero. */
+ __u16 vni_min;
+ __u16 vni_max;
+ /* Exact-list length; zero means system-empty or is_range. */
+ __u32 vni_count;
+ /* System service requires CAP_SYS_ADMIN and svc_id zero on allocation. */
+ __u32 is_system_svc;
+ /* Inclusive range endpoints are carried in vnis[0] and vnis[1]. */
+ __u32 is_range;
+ __u16 vnis[CXI_IB_SVC_MAX_VNIS];
+ __u32 tc_mask;
+ __u32 uid;
+ __u32 flags;
+ __u16 maximum[CXI_IB_SVC_RSRC_COUNT];
+ __u16 reserved[CXI_IB_SVC_RSRC_COUNT];
+};
+
+struct cxi_ibv_svc_rsrc_use {
+ __u32 svc_id;
+ __u32 tle_pool_id;
+ __u16 in_use[CXI_IB_SVC_RSRC_COUNT];
+};
+
+enum cxi_ib_methods_lni {
+ CXI_IB_METHOD_LNI_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_LNI_DESTROY,
+};
+
+enum cxi_ib_attrs_lni_alloc {
+ CXI_IB_ATTR_LNI_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_LNI_ALLOC_SVC_ID,
+ CXI_IB_ATTR_LNI_ALLOC_ID,
+};
+
+enum cxi_ib_attrs_lni_destroy {
+ CXI_IB_ATTR_LNI_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+};
+
+enum cxi_ib_methods_pd {
+ CXI_IB_METHOD_PD_PID_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_PD_PID_QUERY,
+};
+
+enum cxi_ib_attrs_pd_pid {
+ CXI_IB_ATTR_PD_PID_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_PD_PID_FLAGS,
+ CXI_IB_ATTR_PD_PID_VALUE,
+};
+
+#define CXI_IB_PD_PID_ABSOLUTE (1U << 0)
+
+struct cxi_ibv_create_jkey_cmd {
+ __u32 tc;
+ __u32 reserved;
+};
+
+enum cxi_ib_methods_ct {
+ CXI_IB_METHOD_CT_ALLOC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_CT_DESTROY = (1U << UVERBS_ID_NS_SHIFT) + 1,
+};
+
+enum cxi_ib_attrs_ct_alloc {
+ CXI_IB_ATTR_CT_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_CT_ALLOC_CTN,
+ CXI_IB_ATTR_CT_ALLOC_WB_MMAP_OFFSET,
+ CXI_IB_ATTR_CT_ALLOC_WB_MMAP_LENGTH,
+ CXI_IB_ATTR_CT_ALLOC_DB_MMAP_OFFSET,
+ CXI_IB_ATTR_CT_ALLOC_DB_MMAP_LENGTH,
+ CXI_IB_ATTR_CT_ALLOC_LNI_HANDLE,
+ CXI_IB_ATTR_CT_ALLOC_WB_ADDRESS,
+};
+
+enum cxi_ib_attrs_ct_destroy {
+ CXI_IB_ATTR_CT_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT),
+};
+
+enum cxi_ib_job_tc_flags {
+ CXI_IB_JOB_TC_F_CREATE = 1U << 0,
+};
+
+enum cxi_ib_methods_job_tc {
+ CXI_IB_METHOD_JOB_TC_BIND = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_METHOD_JOB_TC_CLEAR,
+ CXI_IB_METHOD_JOB_TC_QUERY,
+};
+
+struct cxi_ibv_tc_entry {
+ __u32 tc;
+ __u32 tc_type;
+ __u32 res_req_dscp;
+ __u32 unres_req_dscp;
+ __u32 res_rsp_dscp;
+ __u32 unres_rsp_dscp;
+ __u32 req_pcp;
+ __u32 rsp_pcp;
+ __u32 ocuset;
+ __u32 cq_tc;
+ __u32 req_bc;
+ __u32 flags;
+};
+
+#define CXI_IBV_TC_ENTRY_F_CREATED_BY_RDMA (1U << 0)
+
+enum cxi_ib_attrs_job_tc_bind {
+ CXI_IB_ATTR_JOB_TC_BIND_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_JOB_TC_BIND_JOB_ID,
+ CXI_IB_ATTR_JOB_TC_BIND_TC,
+ CXI_IB_ATTR_JOB_TC_BIND_TC_TYPE,
+ CXI_IB_ATTR_JOB_TC_BIND_SVC_ID,
+ CXI_IB_ATTR_JOB_TC_BIND_PTES_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_PTES_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_TXQS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TXQS_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_TGQS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TGQS_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_EQS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_EQS_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_CTS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_CTS_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_LES_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_LES_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_TLES_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TLES_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_ACS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_ACS_RES,
+ CXI_IB_ATTR_JOB_TC_BIND_RESP_SVC_ID,
+};
+
+enum cxi_ib_attrs_job_tc_clear {
+ CXI_IB_ATTR_JOB_TC_CLEAR_TC = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_JOB_TC_CLEAR_TC_TYPE,
+};
+
+enum cxi_ib_attrs_job_tc_query {
+ CXI_IB_ATTR_JOB_TC_QUERY_MAX_ENTRIES = (1U << UVERBS_ID_NS_SHIFT),
+ CXI_IB_ATTR_JOB_TC_QUERY_RESP_COUNT,
+ CXI_IB_ATTR_JOB_TC_QUERY_RESP_ENTRIES,
+};
+
+#endif /* __UAPI_RDMA_CXI_ABI_H__ */
diff --git a/providers/cxi/cxi.h b/providers/cxi/cxi.h
new file mode 100644
index 000000000000..0f98854851a5
--- /dev/null
+++ b/providers/cxi/cxi.h
@@ -0,0 +1,265 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/*
+ * Copyright 2025 HPE. All rights reserved.
+ */
+
+#ifndef CXI_H
+#define CXI_H
+
+#include <util/util.h>
+#include <stdbool.h>
+#include <pthread.h>
+#include <stdatomic.h>
+#include <infiniband/driver.h>
+
+enum cxi_builder_opcode {
+ CXI_WR_RDMA_WRITE_WITH_IMM64 = 16,
+ CXI_WR_RDMA_WRITE64_WITH_IMM,
+ CXI_WR_RDMA_WRITE64_WITH_IMM64,
+ CXI_WR_SEND_WITH_IMM64,
+};
+
+#include <rdma/cxiverbs-abi.h>
+
+/*
+ * Hardware ring/EQ definitions (struct cxi_cq, struct cxi_eq, cxi_cq_init(),
+ * cxi_eq_init(), cxi_cq_emit_*(), cxi_build_dfa(), ...). The kernel keeps its
+ * copy in include/linux/hpe/cxi/ rather than uapi, so the provider carries a
+ * userspace copy that must be kept in step with it.
+ */
+#include "cxi_prov_hw.h"
+
+/* PCI device IDs */
+#define PCI_VENDOR_ID_CRAY 0x17db
+#define PCI_DEVICE_ID_CASSINI_1 0x0501
+#define PCI_VENDOR_ID_HPE 0x1590
+#define PCI_DEVICE_ID_CASSINI_2 0x0371
+
+/*
+ * QPN encoding, mirrors the kernel's include/uapi/rdma/cxiverbs-abi.h:
+ * bit 31 = addr_mode, bits[23:12] = Resource Index, bits[11:0] = PIDonFEP.
+ * The Resource Index is the peer's PTE pid_offset, not a CXI service ID.
+ */
+#define CXI_QPN_PID_MASK 0xfffU
+#define CXI_QPN_RI_SHIFT 12U
+#define CXI_QPN_RI_MASK 0xfff000U
+
+#define CXI_QPN_RI(qpn) (((qpn) & CXI_QPN_RI_MASK) >> CXI_QPN_RI_SHIFT)
+
+#define CXI_MAX_QPS 1024U
+#define CXI_QP_SLOT_BITS 10U
+#define CXI_SEND_COOKIE_SLOT_BITS 11U
+#define CXI_SEND_COOKIE_INDEX_BITS (CXI_QP_SLOT_BITS + CXI_SEND_COOKIE_SLOT_BITS)
+#define CXI_QP_SLOT_MASK ((1U << CXI_QP_SLOT_BITS) - 1)
+#define CXI_SEND_COOKIE_SLOT_MASK ((1U << CXI_SEND_COOKIE_SLOT_BITS) - 1)
+#define CXI_SEND_COOKIE_GENERATION_MAX (UINT64_MAX >> CXI_SEND_COOKIE_INDEX_BITS)
+
+struct cxi_device {
+ struct verbs_device verbs_dev;
+ int page_size;
+};
+
+struct cxi_context {
+ struct verbs_context verbs_ctx;
+ uint32_t nid; /* this port's NIC address */
+ uint32_t pid_bits; /* width of the PID field in match/DFA encoding */
+ uint32_t preferred_svc_id;
+ uint32_t tc;
+ bool tc_valid;
+ pthread_mutex_t tc_lock;
+ /*
+ * Device-wide HW properties fetched once via query_device's
+ * driver-specific response (see cxi_ibv_devinfo, kernel-headers/
+ * rdma/cxiverbs-abi.h). Exposed to callers outside this provider through
+ * cxidv_query_device() (cxidv.h), since a plain libibverbs consumer
+ * has no other way to reach this data.
+ */
+ struct cxi_ibv_devinfo devinfo;
+ pthread_spinlock_t qp_table_lock;
+ atomic_uint_fast64_t send_cookie_seq;
+ struct cxi_qp *qp_slots[CXI_MAX_QPS];
+ struct cxi_qp *qp_by_pte[CXI_MAX_QPS];
+ uint32_t qp_count;
+ pthread_spinlock_t mr_list_lock;
+ struct cxi_mr *mr_list;
+};
+
+struct cxi_job_key {
+ struct ibv_job_key key;
+ struct ibv_job *job;
+ uint32_t job_id;
+ struct cxi_job_key *next;
+};
+
+struct cxi_pd {
+ struct ibv_pd ibv_pd;
+ uint32_t pd_id;
+ uint32_t pidonfep;
+ bool pid_valid;
+ pthread_spinlock_t jkey_lock;
+ struct cxi_job_key *jkeys;
+};
+
+struct cxi_mr {
+ struct verbs_mr vmr;
+ struct cxi_ibv_mr_info info;
+ uint64_t rkey64;
+ uint64_t lkey64;
+ uint64_t va;
+ uint64_t iova;
+ size_t len;
+ struct cxi_mr *next;
+};
+
+/*
+ * ibv_cq wrapper. Named cxi_ibv_cq (rather than cxi_cq) because cxi_prov_hw.h
+ * already defines "struct cxi_cq" for the hardware TXQ/TGQ ring state, which
+ * this struct embeds as hw_eq below (an EQ, not a CQ, but same ring machinery).
+ */
+struct cxi_ibv_cq {
+ struct verbs_cq verbs_cq;
+ struct cxi_eq hw_eq; /* ring state for polling; see cxi_eq_init() */
+ void *eq_buf; /* mmap'd event-ring buffer */
+ size_t eq_buf_size;
+ void *eq_db; /* mmap'd EQ doorbell/CSR */
+ size_t eq_db_size;
+ uint32_t eqn;
+ uint32_t cqe;
+ struct ibv_wc cur_wc; /* completion the ibv_cq_ex cursor is on */
+ __be64 cur_imm64; /* wide immediate for cur_wc, if any */
+ uint32_t cur_job_id; /* sender's JobID for cur_wc (== VNI) */
+ uint32_t cur_src_id; /* sender-chosen src_id for cur_wc */
+ pthread_spinlock_t lock;
+};
+
+struct cxi_qp {
+ struct verbs_qp vqp;
+ struct cxi_cq hw_txq; /* ring state for posting; see cxi_cq_init() */
+ void *txq_cmds; /* mmap'd TXQ command ring */
+ size_t txq_cmds_size;
+ void *txq_db; /* mmap'd TXQ doorbell */
+ size_t txq_db_size;
+ uint32_t txq_idx;
+ uint32_t lcid;
+ uint32_t src_id; /* reported to peers; see IBV_RU_ATTR_SRC_ID */
+ struct ibv_job *job;
+ uint32_t job_id; /* JobID (VNI) the QP was created under */
+ struct cxi_cq hw_tgq; /* ring state for posting receives */
+ void *tgq_cmds; /* mmap'd TGQ command ring */
+ size_t tgq_cmds_size;
+ void *tgq_db; /* mmap'd TGQ doorbell */
+ size_t tgq_db_size;
+ uint32_t tgq_idx;
+ int pte_index; /* set once modify_qp reaches RTR, else -1 */
+ uint32_t sq_size;
+ uint32_t rq_size;
+ struct cxi_ibv_cq *send_cq;
+ uint32_t qp_slot;
+ uint64_t *send_wrids;
+ /* An ACK does not say what was sent, so remember it. */
+ uint8_t *send_opcodes;
+ uint32_t *send_job_ids;
+ uint64_t *send_cookies;
+ bool *send_slot_valid;
+ uint32_t send_tail;
+ uint32_t send_count;
+ uint64_t *recv_wrids;
+ uint32_t recv_head;
+ uint32_t recv_tail;
+ uint32_t recv_count;
+ pthread_spinlock_t sq_lock;
+ pthread_spinlock_t rq_lock;
+ pthread_mutex_t builder_lock;
+
+ /* ibv_qp_ex work-request builder state; see cxi_wr_start() in verbs.c. */
+ struct cxi_wr_build {
+ int err;
+
+ /* Fields for the work request currently being built, if any. */
+ bool have_wr;
+ uint64_t wr_id;
+ unsigned int opcode;
+ struct cxi_ah *ah;
+ uint32_t remote_qpn;
+ uint32_t remote_nid;
+ uint32_t jkey;
+ uint32_t job_id;
+ uint32_t send_slot;
+ uint64_t remote_addr;
+ uint64_t rkey64;
+ uint64_t local_addr;
+ uint64_t lkey;
+ bool sge64;
+ uint32_t length;
+ bool has_sge;
+ bool has_addr;
+ bool has_imm;
+ bool imm_is64;
+ __be32 imm32;
+ __be64 imm64;
+ } wr_build;
+ struct cxi_wr_build *pending_wrs;
+ size_t pending_count;
+ size_t pending_capacity;
+};
+
+struct cxi_ah {
+ struct ibv_ah_ex ah_ex;
+ uint32_t ah_id;
+ /*
+ * Extracted from the GID the same way as the kernel's
+ * cxi_gid_to_nid(). ah_ex.remote_qpn (0 unless created via
+ * cxi_create_ah_ex()/ibv_insert_addr()) carries the peer's
+ * PIDonFEP/RI, per Phase 3 of cxi-rdma-path-audit.md.
+ */
+ uint32_t nid;
+};
+
+static inline struct cxi_device *to_cxi_dev(struct ibv_device *ibv_dev)
+{
+ return container_of(ibv_dev, struct cxi_device, verbs_dev.device);
+}
+
+static inline struct cxi_context *to_cxi_ctx(struct ibv_context *ibv_ctx)
+{
+ return container_of(ibv_ctx, struct cxi_context, verbs_ctx.context);
+}
+
+static inline struct cxi_pd *to_cxi_pd(struct ibv_pd *ibv_pd)
+{
+ return container_of(ibv_pd, struct cxi_pd, ibv_pd);
+}
+
+static inline struct cxi_mr *to_cxi_mr(struct ibv_mr *ibv_mr)
+{
+ return container_of(ibv_mr, struct cxi_mr, vmr.ibv_mr);
+}
+
+static inline struct cxi_ibv_cq *to_cxi_ibv_cq(struct ibv_cq *ibv_cq)
+{
+ return container_of(ibv_cq, struct cxi_ibv_cq, verbs_cq.cq);
+}
+
+static inline struct cxi_ibv_cq *to_cxi_ibv_cq_ex(struct ibv_cq_ex *cq_ex)
+{
+ return container_of(cq_ex, struct cxi_ibv_cq, verbs_cq.cq_ex);
+}
+
+static inline struct cxi_qp *to_cxi_qp(struct ibv_qp *ibv_qp)
+{
+ return container_of(ibv_qp, struct cxi_qp, vqp.qp);
+}
+
+static inline struct cxi_ah *to_cxi_ah(struct ibv_ah *ibv_ah)
+{
+ struct ibv_ah_ex *ah_ex = container_of(ibv_ah, struct ibv_ah_ex, ah_base);
+
+ return container_of(ah_ex, struct cxi_ah, ah_ex);
+}
+
+static inline struct cxi_ah *to_cxi_ah_ex(struct ibv_ah_ex *ah_ex)
+{
+ return container_of(ah_ex, struct cxi_ah, ah_ex);
+}
+
+#endif /* CXI_H */
diff --git a/providers/cxi/cxi_prov_hw.h b/providers/cxi/cxi_prov_hw.h
new file mode 100644
index 000000000000..f50499472d5a
--- /dev/null
+++ b/providers/cxi/cxi_prov_hw.h
@@ -0,0 +1,1838 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright 2018-2020 Cray Inc. All rights reserved
+ *
+ * CXI event queue and command queue definitions and accessors.
+ */
+
+#ifndef __CXI_PROV_HW
+#define __CXI_PROV_HW
+
+/* Userspace copy: stand in for the kernel types and headers. */
+#include <stdbool.h>
+#include <stdint.h>
+#include <errno.h>
+#include <string.h>
+#include <ccan/array_size.h>
+#include <util/util.h>
+
+typedef uint8_t u8;
+typedef uint32_t u32;
+typedef uint64_t u64;
+typedef int32_t s32;
+
+/*
+ * wp_fence() - Fence operation used before advancing the command queue write
+ * pointer. This ensures that all commands are write visible before hardware
+ * processing the write pointer update.
+ *
+ * wc_fence() - Fence operation used to ensuring ordering between writes to
+ * write combining buffers.
+ */
+
+#if defined(__aarch64__)
+
+#define aarch64_dmb(opt) ({ asm volatile("dmb " #opt::: "memory"); })
+
+#define sfence() aarch64_dmb(oshst)
+
+/* Data memory barrier with outer shareability is enough to ensure write
+ * ordering between host memory command writes and write pointer doorbell
+ * writes.
+ */
+#define wp_fence() aarch64_dmb(oshst)
+
+/* Data memory barrier with outer shareability is enough writes to device memory
+ * gather regions (i.e. write combined regions) are ordered with respect to
+ * subsequent device memory gather region writes.
+ */
+#define wc_fence() aarch64_dmb(oshst)
+
+#elif defined(__x86_64__)
+
+static inline void sfence(void)
+{
+ __asm__ __volatile__("sfence" ::: "memory");
+}
+
+#define wp_fence() sfence()
+#define wc_fence() sfence()
+
+#else
+#error "Unsupported CPU architecture"
+#endif
+
+#include <ethernet/cassini_user_defs.h>
+
+static const u8 amo_size[16] = { 1, 1, 2, 2, 4, 4, 8, 8, 4, 8, 8, 16, 16 };
+
+/*
+ * Padding needed for a command given the command size and
+ * position. eg. a command of size 3 (256 bytes), with a wr_ptr at
+ * pos % 8 = 2 needs pad_slots[2][3] = 6 32-bytes block.
+ */
+static const u32 __cxi_pad_slots[8][4] = { { 0, 0, 0, 0 }, { 0, 1, 3, 7 }, { 0, 0, 2, 6 },
+ { 0, 1, 1, 5 }, { 0, 0, 0, 4 }, { 0, 1, 3, 3 },
+ { 0, 0, 2, 2 }, { 0, 1, 1, 1 } };
+
+/*
+ * Number of 32-bytes slots needed for a command
+ */
+static const u32 __cxi_cmd_slots[4] = { 1, 2, 4, 8 };
+
+/*
+ * Return the command size to fit a certain payload. 32 bytes or less
+ * return 0 (C_CMD_SIZE_32B), 33 to 64 returns 1 (C_CMD_SIZE_64B), ...
+ */
+static inline enum c_cmd_size __cxi_cmd_size(u32 size)
+{
+ if (size <= 16)
+ return C_CMD_SIZE_32B;
+ else
+ return (enum c_cmd_size)(8 * sizeof(u64) - __builtin_clzll((size - 1)) - 5);
+}
+
+/*
+ * Note.
+ *
+ * The hardware command granularity is 64 bytes (a slot). However the
+ * hardware also support 32 bytes commands. If a command is 32 bytes,
+ * there will always be a second 32 bytes command in that 64 bytes
+ * slot, and may be a NoOp.
+ */
+
+struct cxi_cmd32 {
+ u8 pad[32];
+};
+
+#define C_CQ_CMD_SIZE 64
+#define C_CQ_FIRST_WR_PTR 4
+#define C_CQ_FIRST_WR_PTR_32 (2 * C_CQ_FIRST_WR_PTR)
+
+#define LL_OFFSET(wp32) ((((wp32) / 2) & 0x0f) * 64)
+
+struct cxi_cmd64 {
+ u8 pad[C_CQ_CMD_SIZE];
+};
+
+union c_cmdu {
+ u8 u8;
+ struct c_cmd command;
+ struct c_cstate_cmd c_state;
+ struct c_idc_hdr idc_hdr;
+ struct c_idc_eth_cmd idc_eth;
+ struct c_idc_put_cmd idc_put;
+ struct c_idc_amo_cmd idc_amo;
+ struct c_idc_msg_hdr idc_msg;
+ struct c_nomatch_dma_cmd nomatch_dma;
+ struct c_full_dma_cmd full_dma;
+ struct c_dma_amo_cmd dma_amo;
+ struct c_dma_eth_cmd dma_eth;
+ struct c_ct_cmd ct;
+ struct c_cq_cmd cq;
+ struct c_target_cmd target;
+ struct c_set_state_cmd set_state;
+};
+
+/* User command queue */
+struct cxi_cq {
+ /* Command queue size */
+ u32 size;
+
+ /* Memory mapped write pointer location */
+ u64 *wp_addr;
+
+ /* Low-latency write regions. */
+ u8 *ll_64;
+ u8 *ll_128a;
+ u8 *ll_128u;
+
+ /* CQ status and commands buffer. CQ status occupies the first 8 32-byte
+ * slots. Commands start after.
+ */
+ union {
+ struct cxi_cmd32 *cmds32;
+ volatile struct c_cq_status *status;
+ };
+ u64 rp32;
+
+ /* CQ index. Transmit CQs use 0 to 1023, and target CQs use
+ * 1024 to 1535. Use cxi_cq_get_cqn() to retrieve the CQ
+ * number, going from 0 to 1023, or 0 to 512 respectively.
+ */
+ u32 idx;
+
+ /* 32-bytes internal write pointer */
+ u32 size32;
+ u64 wp32;
+ u64 hw_wp32;
+};
+
+#define C_EE_CFG_ECB_SIZE 64
+union c_event {
+ /* Use as event header, to access event_size and event_type
+ * only
+ */
+ struct c_event_cmd_fail hdr;
+
+ struct c_event_initiator_short init_short;
+ struct c_event_initiator_long init_long;
+ struct c_event_trig_op_short trig_short;
+ struct c_event_trig_op_long trig_long;
+ struct c_event_cmd_fail cmd_fail;
+ struct c_event_target_long tgt_long;
+ struct c_event_target_short tgt_short;
+ struct c_event_target_enet enet;
+ struct c_event_enet_fgfc enet_fgfc;
+ struct c_event_timestamp timestamp;
+ struct c_event_eq_switch eq_switch;
+ struct c_event_pct pct;
+};
+
+#define C_LE_EVENT_CT_BYTES BIT(0)
+#define C_LE_EVENT_CT_OVERFLOW BIT(1)
+#define C_LE_EVENT_CT_COMM BIT(2)
+#define C_LE_EVENT_UNLINK_DISABLE BIT(3)
+#define C_LE_EVENT_SUCCESS_DISABLE BIT(4)
+#define C_LE_EVENT_COMM_DISABLE BIT(5)
+#define C_LE_EVENT_LINK_DISABLE BIT(6)
+#define C_LE_UNRESTRICTED_END_RO BIT(7)
+#define C_LE_UNRESTRICTED_BODY_RO BIT(8)
+#define C_LE_UNEXPECTED_HDR_DISABLE BIT(9)
+#define C_LE_USE_ONCE BIT(10)
+#define C_LE_NO_TRUNCATE BIT(11)
+#define C_LE_MANAGE_LOCAL BIT(12)
+#define C_LE_OP_GET BIT(13)
+#define C_LE_OP_PUT BIT(14)
+#define C_LE_RESTART_SEQ BIT(15)
+
+static inline void cxi_target_cmd_setopts(struct c_target_cmd *cmd, u32 flags)
+{
+ if (flags & C_LE_EVENT_CT_BYTES)
+ cmd->event_ct_bytes = 1;
+ if (flags & C_LE_EVENT_CT_OVERFLOW)
+ cmd->event_ct_overflow = 1;
+ if (flags & C_LE_EVENT_CT_COMM)
+ cmd->event_ct_comm = 1;
+ if (flags & C_LE_EVENT_UNLINK_DISABLE)
+ cmd->event_unlink_disable = 1;
+ if (flags & C_LE_EVENT_SUCCESS_DISABLE)
+ cmd->event_success_disable = 1;
+ if (flags & C_LE_EVENT_COMM_DISABLE)
+ cmd->event_comm_disable = 1;
+ if (flags & C_LE_EVENT_LINK_DISABLE)
+ cmd->event_link_disable = 1;
+ if (flags & C_LE_UNRESTRICTED_END_RO)
+ cmd->unrestricted_end_ro = 1;
+ if (flags & C_LE_UNRESTRICTED_BODY_RO)
+ cmd->unrestricted_body_ro = 1;
+ if (flags & C_LE_USE_ONCE)
+ cmd->use_once = 1;
+ if (flags & C_LE_NO_TRUNCATE)
+ cmd->no_truncate = 1;
+ if (flags & C_LE_MANAGE_LOCAL)
+ cmd->manage_local = 1;
+ if (flags & C_LE_OP_GET)
+ cmd->op_get = 1;
+ if (flags & C_LE_OP_PUT)
+ cmd->op_put = 1;
+ if (flags & C_LE_RESTART_SEQ)
+ cmd->restart_seq = 1;
+}
+
+static inline s32 cxi_init_event_rc(const union c_event *event)
+{
+ if (event->hdr.event_size == C_EVENT_SIZE_16_BYTE)
+ return event->init_short.return_code;
+ return event->init_long.return_code;
+}
+
+static inline s32 cxi_tgt_event_rc(const union c_event *event)
+{
+ if (event->hdr.event_size == C_EVENT_SIZE_32_BYTE)
+ return event->tgt_short.return_code;
+ return event->tgt_long.return_code;
+}
+
+static inline s32 cxi_event_rc(const union c_event *event)
+{
+ switch (event->hdr.event_type) {
+ case C_EVENT_PUT:
+ case C_EVENT_GET:
+ case C_EVENT_ATOMIC:
+ case C_EVENT_FETCH_ATOMIC:
+ case C_EVENT_PUT_OVERFLOW:
+ case C_EVENT_GET_OVERFLOW:
+ case C_EVENT_ATOMIC_OVERFLOW:
+ case C_EVENT_FETCH_ATOMIC_OVERFLOW:
+ case C_EVENT_LINK:
+ case C_EVENT_SEARCH:
+ case C_EVENT_STATE_CHANGE:
+ case C_EVENT_UNLINK:
+ case C_EVENT_RENDEZVOUS:
+ case C_EVENT_MATCH:
+ return cxi_tgt_event_rc(event);
+
+ case C_EVENT_SEND:
+ case C_EVENT_ACK:
+ case C_EVENT_REPLY:
+ return cxi_init_event_rc(event);
+
+ case C_EVENT_ETHERNET:
+ return event->enet.return_code;
+ case C_EVENT_COMMAND_FAILURE:
+ return event->cmd_fail.return_code;
+ case C_EVENT_TRIGGERED_OP:
+ if (event->hdr.event_size == C_EVENT_SIZE_16_BYTE)
+ return event->trig_short.return_code;
+ else
+ return event->trig_long.return_code;
+ case C_EVENT_ETHERNET_FGFC:
+ return event->enet_fgfc.return_code;
+ case C_EVENT_PCT:
+ return event->pct.return_code;
+ case C_EVENT_ERROR:
+ return C_RC_NO_EVENT;
+ case C_EVENT_TIMESTAMP:
+ return event->timestamp.return_code;
+ case C_EVENT_EQ_SWITCH:
+ return event->eq_switch.return_code;
+ case C_EVENT_NULL_EVENT:
+ return C_RC_NO_EVENT;
+ }
+
+ return C_RC_NO_EVENT;
+}
+
+/* Generate match_id. match_id is present in LEs, DMA commands and EQ events.
+ * The highest 'pid_bits' bits are used to hold a PID value. The remaining,
+ * low-order 32-'pid_bits' bits are used to store an Endpoint ID. When using a
+ * PtlTE configured for logical matching, the Endpoint ID represents a logical
+ * rank ID. Otherwise, the Endpoint ID contains a 20 bit physical NIC ID.
+ */
+#define CXI_MATCH_ID(pid_bits, pid, ep) \
+ ((((pid) & ((1U << (pid_bits)) - 1)) << (32U - (pid_bits))) | \
+ ((ep) & ((1U << (32 - (pid_bits))) - 1)))
+#define CXI_MATCH_ID_ANY CXI_MATCH_ID(C_DFA_PID_BITS_MAX, C_PID_ANY, C_RANK_ANY)
+
+#define CXI_MATCH_ID_PID(pid_bits, match_id) ((match_id) >> (32 - (pid_bits)))
+#define CXI_MATCH_ID_EP(pid_bits, match_id) ((match_id) & ((1U << (32 - (pid_bits))) - 1))
+
+/**
+ * struct cxi_rdzv_match_bits - Match bits used for Rendezvous Get.
+ * @match_bits: Match bits mirrored from the Rendezvous Put operation
+ * @transaction_type: Rendezvous transaction type, must match device
+ * configuration
+ * @rendezvous_id: Rendezvous ID used for Rendezvous Put operation
+ *
+ * The 64-bit rendezvous match bits value has two uses.
+ * 1. Rendezvous Put Initiator: Match bits used in a source buffer LE linked to
+ * the rendezvous source PtlTE.
+ * 2. Rendezvous Put Target: Match bits used in a SW issued Get.
+ */
+struct cxi_rdzv_match_bits {
+ union {
+ struct {
+ u64 rendezvous_id : 8;
+ u64 transaction_type : 4;
+ u64 unused : 36;
+ u64 match_bits : 16;
+ };
+ u64 raw;
+ };
+};
+
+/**
+ * struct cxi_rdzv_user_ptr - User pointer format for Rendezvous Get events.
+ * @src_nid: Source fabric address NID of the Rendezvous Put
+ * @src_pid: Source fabric address PID of the Rendezvous Put
+ * @ptlte_index: PltTE index the target LE was appended on
+ * @rendezvous_id: Rendezvous ID from the Rendezvous Put
+ * @buffer_id: Buffer ID of the target LE from the Rendezvous Put
+ *
+ * The user_ptr field in a Reply event for a Hardware issued Rendezvous Get is
+ * formatted using this structure.
+ */
+struct cxi_rdzv_user_ptr {
+ union {
+ struct {
+ u64 src_nid : 20;
+ u64 src_pid : 9;
+ u64 ptlte_index : 11;
+ u64 rendezvous_id : 8;
+ u64 buffer_id : 16;
+ };
+ u64 raw;
+ };
+};
+
+#define CT_INC_SUCCESS_OFFSET 0
+#define CT_INC_FAILURE_OFFSET 64
+#define CT_RESET_SUCCESS_OFFSET 128
+#define CT_RESET_FAILURE_OFFSET 192
+#define CT_SUCCESS_MASK ((1ULL << C_CT_SUCCESS_BITS) - 1)
+#define CT_FAILURE_MASK ((1ULL << C_CT_FAILURE_BITS) - 1)
+
+/* User counter */
+struct cxi_ct {
+ /* Memory mapped doorbell. */
+ u64 *doorbell;
+
+ /* The allocated CT number, which will be used in commands. */
+ u32 ctn;
+
+ /* Writeback buffer backpoint for CT owner. */
+ struct c_ct_writeback *wb;
+};
+
+/* Hardware reserves two event slots: one for detecting EQ overrun and the first
+ * slot for providing EQ status writeback.
+ */
+#define C_EQ_RESERVED_EVENT_SLOTS 2U
+
+/* User event queue */
+struct cxi_eq {
+ /* Event queue byte size */
+ u32 byte_size;
+
+ /* EQ software state, which includes the read pointer. Keep a
+ * local copy and update the fields as needed before copying
+ * it to the adapter.
+ */
+ union c_ee_cfg_eq_sw_state sw_state;
+ u64 *sw_state_addr;
+
+ /* Cached status write-back timestamp. */
+ u64 last_ts_sec;
+ u64 last_ts_ns;
+
+ /* Current read offset */
+ u32 rd_offset;
+
+ /* Previous read offset - before last call to
+ * cxi_eq_ack_events()
+ */
+ u32 prev_rd_offset;
+
+ /* The allocated EQ number, which will be used in commands. */
+ u32 eqn;
+
+ /* Backpointer for the owner of the EQ. */
+ void *context;
+
+ union {
+ /* Ring buffer for events */
+ u8 *events;
+
+ /* EQ status write-back pointer. Updated when the number of free
+ * events crosses a configurable threshold, or when events are
+ * dropped.
+ */
+ struct c_eq_status *status;
+ };
+};
+
+/* Check to see if command queue is empty. */
+static inline bool cxi_cq_empty(struct cxi_cq *cq)
+{
+ u64 wp = cq->wp32 / 2;
+
+ return wp == cq->status->rd_ptr;
+}
+
+/*
+ * Advance the internal write pointer for the given command
+ * size. cmd_size is 0, 1, 2 or 3 (C_CMD_SIZE_XXX).
+ * If the write pointer wraps, set wp32 to the first valid offset for a command.
+ * The start of the queue is used by Cassini to return status.
+ */
+static inline void __cxi_cq_advance_wp(struct cxi_cq *cq, enum c_cmd_size cmd_size)
+{
+ cq->wp32 = (cq->wp32 + (1 << cmd_size));
+ if (cq->wp32 >= cq->size32)
+ cq->wp32 = C_CQ_FIRST_WR_PTR_32;
+}
+
+/*
+ * Return the number of usable slots in the queue using the cached read
+ * pointer. Remove 1 full 64-bytes slot to prevent queue overrun (wr_ptr ==
+ * rd_ptr). Remove 4 full slots because the start of the queue is used by
+ * Cassini to return rd_ptr and status.
+ */
+static inline s32 __cxi_cq_free_slots_check(const struct cxi_cq *cq)
+{
+ if (cq->wp32 >= cq->rp32)
+ return cq->size32 - cq->wp32 + cq->rp32 - 2 - C_CQ_FIRST_WR_PTR_32;
+ else
+ return cq->rp32 - cq->wp32 - 2;
+}
+
+/*
+ * Return the number of usable slots in the queue.
+ *
+ * Cassini regularly writes the read pointer to host memory. Avoid accessing
+ * the read pointer to reduce expensive loads from memory.
+ */
+static inline s32 __cxi_cq_free_slots(struct cxi_cq *cq)
+{
+ s32 slots = __cxi_cq_free_slots_check(cq);
+
+ if (slots < 16) {
+ cq->rp32 = cq->status->rd_ptr * 2;
+ slots = __cxi_cq_free_slots_check(cq);
+ }
+
+ return slots;
+}
+
+/**
+ * cxi_cq_update_wp() - Update the real write pointer.
+ *
+ * This lets the rest of the software manage the ring buffer as
+ * 64-bytes slots, while internally it's managed as 32 bytes slots.
+ *
+ * If the internal write pointer is odd, add a NoOp to pad to a 64
+ * bytes block.
+ *
+ * Users should not call this function. Instead, they should use
+ * cxi_cq_ll_ring() or cxi_cq_ring().
+ */
+static inline void cxi_cq_update_wp(struct cxi_cq *cq)
+{
+ if (cq->wp32 & 1) {
+ struct cxi_cmd32 *cmd = &cq->cmds32[cq->wp32];
+
+ /* Command opcode and DFA must be cleared */
+ memset(cmd->pad, 0, sizeof(u64));
+ __cxi_cq_advance_wp(cq, C_CMD_SIZE_32B);
+ }
+
+ /* Ensure commands are in memory. */
+ wp_fence();
+}
+
+/**
+ * cxi_memcpy_aligned() - Copy to 64-bit aligned buffer.
+ *
+ * dest and n must be 64-bit aligned.
+ */
+static inline void cxi_memcpy_aligned(void *dest, const void *src, size_t n)
+{
+ size_t i;
+
+ for (i = 0; i < n / 8; i++)
+ ((u64 *)dest)[i] = ((u64 *)src)[i];
+}
+
+/**
+ * __cxi_cq_inc_hw_wp32() - Increment software's mirror of the hardware write
+ * pointer by count amount of 32-byte chunks. Count must not exceed CQ size.
+ */
+static inline void __cxi_cq_inc_hw_wp32(struct cxi_cq *cq, u32 count)
+{
+ cq->hw_wp32 += count;
+ if (cq->hw_wp32 == cq->size32)
+ cq->hw_wp32 = C_CQ_FIRST_WR_PTR_32;
+}
+
+/**
+ * cxi_cq_ll_write64() - Write commands to 64-byte low-latency region.
+ *
+ * Note: Users should not call this function.
+ */
+static inline void cxi_cq_ll_write64(struct cxi_cq *cq)
+{
+ struct cxi_cmd64 *ll = (struct cxi_cmd64 *)(cq->ll_64 + LL_OFFSET(cq->hw_wp32));
+
+ cxi_memcpy_aligned(ll, &cq->cmds32[cq->hw_wp32], sizeof(struct cxi_cmd64));
+
+ __cxi_cq_inc_hw_wp32(cq, 2);
+}
+
+/**
+ * cxi_cq_ll_write128_aligned() - Write commands to 128-byte aligned
+ * low-latency region. The CQ hardware write pointer must be aligned to a
+ * 128-byte boundary (i.e. hw_wp32 % 8 == 0, 4).
+ *
+ * Note: Users should not call this function.
+ */
+static inline void cxi_cq_ll_write128_aligned(struct cxi_cq *cq)
+{
+ struct cxi_cmd64 *ll = (struct cxi_cmd64 *)(cq->ll_128a + LL_OFFSET(cq->hw_wp32));
+
+ cxi_memcpy_aligned(ll, &cq->cmds32[cq->hw_wp32], sizeof(struct cxi_cmd64) * 2);
+
+ __cxi_cq_inc_hw_wp32(cq, 4);
+}
+
+/**
+ * cxi_cq_ll_write128_unaligned() - Write commands to 128-byte unaligned
+ * low-latency region. The CQ hardware write pointer must be unaligned to a
+ * 128-byte boundary (i.e. hw_wp32 % 8 == 2, 6).
+ *
+ * Note: Users should not call this function.
+ */
+static inline void cxi_cq_ll_write128_unaligned(struct cxi_cq *cq)
+{
+ struct cxi_cmd64 *ll;
+
+ /*
+ * These two 32-byte slots MUST be NOOPs. Thus, skip over them in the
+ * command queue since hardware will skip the corresponding 64-byte
+ * slot.
+ */
+ __cxi_cq_inc_hw_wp32(cq, 2);
+
+ ll = (struct cxi_cmd64 *)(cq->ll_128u + LL_OFFSET(cq->hw_wp32));
+
+ cxi_memcpy_aligned(ll, &cq->cmds32[cq->hw_wp32], sizeof(struct cxi_cmd64) * 2);
+
+ __cxi_cq_inc_hw_wp32(cq, 4);
+}
+
+/**
+ * cxi_cq_ring() - Update the CQ write pointer and ring the CQ to
+ * execute the new posted commands.
+ *
+ * After posting one or more commands, the user would call this
+ * function to let the new work start.
+ *
+ * @cq: the command queue
+ */
+static inline void cxi_cq_ring(struct cxi_cq *cq)
+{
+ u64 wr_ptr;
+
+ if (cq->wp32 == cq->hw_wp32)
+ return;
+
+ cxi_cq_update_wp(cq);
+
+ cq->hw_wp32 = cq->wp32;
+ wr_ptr = cq->wp32 / 2;
+ *cq->wp_addr = wr_ptr;
+ wc_fence();
+}
+
+/**
+ * cxi_cq_ll_ring() - Commit outstanding commands to hardware using the
+ * low-latency write mechanism. This function will account for the alignment of
+ * the CQ hardware write pointer to ensure that the proper low-latency region
+ * is written to. This function guarantees that all commands are committed to
+ * HW. A standard doorbell ring may be used to accomplish that.
+ *
+ * Note: 256-byte commands cannot use the low-latency region. A standard
+ * doorbell ring is used to commit incompatible commands.
+ */
+static inline void cxi_cq_ll_ring(struct cxi_cq *cq)
+{
+ const struct c_cmd *cmd;
+ s32 cmd32_count;
+
+ if (cq->wp32 == cq->hw_wp32)
+ return;
+
+ cmd = (struct c_cmd *)&cq->cmds32[cq->hw_wp32];
+ if (cmd->cmd_size == C_CMD_SIZE_256B) {
+ cxi_cq_ring(cq);
+ return;
+ }
+
+ /* Align CQ to 64-byte boundary. */
+ cxi_cq_update_wp(cq);
+
+ cmd32_count = cq->wp32 - cq->hw_wp32;
+ if (cmd32_count < 0)
+ cmd32_count = cq->size32 - cq->hw_wp32;
+
+ /*
+ * Identify the low-latency region to be written based on the CQ
+ * hardware write pointer alignment.
+ */
+ if (cmd32_count == 2) {
+ cxi_cq_ll_write64(cq);
+ } else if (cq->hw_wp32 % 4) {
+ cmd = (struct c_cmd *)&cq->cmds32[cq->hw_wp32];
+
+ if (cmd->opcode == C_CMD_NOOP) {
+ cmd = (struct c_cmd *)&cq->cmds32[cq->hw_wp32 + 2];
+
+ if (cmd->cmd_size == C_CMD_SIZE_256B) {
+ cxi_cq_ring(cq);
+ return;
+ }
+
+ cxi_cq_ll_write128_unaligned(cq);
+ } else {
+ cxi_cq_ll_write64(cq);
+ }
+ } else {
+ cxi_cq_ll_write128_aligned(cq);
+ }
+
+ /* Flush WC buffers. */
+ wc_fence();
+
+ /* Perform a doorbell ring if there are more commands ready. */
+ if (cq->wp32 != cq->hw_wp32)
+ cxi_cq_ring(cq);
+}
+
+/**
+ * cxi_cq_align_for_cmd() - Prepare command queue for new command
+ *
+ * Check whether the command queue has enough space for cmd_size
+ * 32-bytes blocks. For the current implementation we must ensure that
+ * 1 64-bytes block (ie. 2 32 bytes blocks) is always free to avoid
+ * queue wrap around. If the command doesn't align with the current
+ * block, prepend one or more NoOp for padding.
+ */
+static inline s32 cxi_cq_align_for_cmd(struct cxi_cq *cq, enum c_cmd_size cmd_size)
+{
+ u32 pad_slots;
+ u32 cmd_slots;
+
+ if ((unsigned int)cmd_size >= ARRAY_SIZE(__cxi_cmd_slots) || !cq->status ||
+ cq->size32 < C_CQ_FIRST_WR_PTR_32 + 8 || cq->size32 % 8 ||
+ cq->wp32 < C_CQ_FIRST_WR_PTR_32 || cq->wp32 >= cq->size32)
+ return -EINVAL;
+ pad_slots = __cxi_pad_slots[cq->wp32 % 8][cmd_size];
+ cmd_slots = __cxi_cmd_slots[cmd_size];
+
+ /* Space available in the queue */
+ if (__cxi_cq_free_slots(cq) < (s32)(cmd_slots + pad_slots))
+ return -ENOSPC;
+
+ if (pad_slots) {
+ struct cxi_cmd32 *cmd = &cq->cmds32[cq->wp32];
+ u32 i;
+
+ for (i = 0; i < pad_slots; i++, cmd++) {
+ /* Command opcode and DFA must be cleared */
+ memset(cmd->pad, 0, 8);
+ }
+
+ cq->wp32 += pad_slots;
+ if (cq->wp32 >= cq->size32)
+ cq->wp32 = C_CQ_FIRST_WR_PTR_32;
+ }
+
+ return 0;
+}
+
+/**
+ * cxi_cq_get_cqn() - Return the CQ number
+ *
+ * From the allocated CQ index, return its number, which ranges from 0
+ * to 1023 for transmit CQs, and 0 to 511 for target CQs.
+ *
+ * @cq: the command queue
+ */
+static inline u32 cxi_cq_get_cqn(const struct cxi_cq *cq)
+{
+ if (cq->idx >= C_NUM_TRANSMIT_CQS)
+ return cq->idx - C_NUM_TRANSMIT_CQS;
+ else
+ return cq->idx;
+}
+
+/**
+ * cxi_cq_align_for_ct128_cmd() - Prepare command queue for new CT command
+ *
+ * For CT commands, the NoOp must be of type C_CMD_TYPE_CT. Commands
+ * on these queues are also only 64 or 128 bytes. Only called for 128
+ * bytes commands, as 64 bytes commands will never need padding.
+ */
+static inline s32 cxi_cq_align_for_ct128_cmd(struct cxi_cq *cq)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ const u32 pad_slots = __cxi_pad_slots[cq->wp32 % 8][cmd_size];
+ const s32 cmd_slots = __cxi_cmd_slots[cmd_size];
+
+ /* Space available in the queue */
+ if (__cxi_cq_free_slots(cq) < (s32)(cmd_slots + pad_slots))
+ return -ENOSPC;
+
+ /* A triggger TXQ only accepts 64-byte or 128-byte commands. If padding
+ * is required for a 128-byte command, it only needs to be padded with a
+ * single 64-byte command.
+ */
+ if (pad_slots) {
+ struct c_cmd *cmd = (struct c_cmd *)&cq->cmds32[cq->wp32];
+
+ /* Command opcode and DFA must be cleared */
+ memset(cmd, 0, 8);
+ cmd->cmd_type = C_CMD_TYPE_CT;
+ cmd->cmd_size = C_CMD_SIZE_64B;
+ cmd->opcode = C_CMD_CT_NOOP;
+
+ cq->wp32 += pad_slots;
+ if (cq->wp32 >= cq->size32)
+ cq->wp32 = C_CQ_FIRST_WR_PTR_32;
+ }
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_cq_cmd() - Emit a NOOP or FENCE CQ command
+ *
+ * opcode is either C_CMD_CQ_NOOP or C_CMD_CQ_FENCE.
+ */
+static inline s32 __attribute__((warn_unused_result)) cxi_cq_emit_cq_cmd(struct cxi_cq *cq,
+ u32 opcode)
+{
+ struct c_cq_cmd *cmd;
+ s32 rc;
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_64B;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_cq_cmd *)&cq->cmds32[cq->wp32];
+
+ /* Command opcode and DFA must be cleared */
+ memset(cmd, 0, 8);
+ cmd->command.cmd_type = C_CMD_TYPE_CQ;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = opcode;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_cq_lcid() - Emit an LCID CQ command
+ *
+ * The LCID command must be prepared differently than the NOOP and
+ * FENCE commands; it must be 128-bytes aligned, and padded with a NOP
+ * command after it.
+ */
+static inline s32 __attribute__((warn_unused_result)) cxi_cq_emit_cq_lcid(struct cxi_cq *cq,
+ u8 lcid)
+{
+ struct c_cq_cmd *cmd;
+ s32 rc;
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_64B;
+
+ rc = cxi_cq_align_for_cmd(cq, C_CMD_SIZE_128B);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_cq_cmd *)&cq->cmds32[cq->wp32];
+
+ /* Command opcode and DFA must be cleared */
+ memset(cmd, 0, 8);
+ cmd->command.cmd_type = C_CMD_TYPE_CQ;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = C_CMD_CQ_LCID;
+ cmd->lcid = lcid;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ rc = cxi_cq_emit_cq_cmd(cq, C_CMD_CQ_NOOP);
+ if (rc)
+ return -ENOSPC; /* not possible */
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_cmd() - Emit the given command.
+ *
+ * The command may use 1 to 4 slots. Padding will be added if needed.
+ */
+static inline s32 cxi_cq_emit_cmd(struct cxi_cq *cq, const union c_cmdu *cmd_in, size_t cmd_length)
+{
+ struct c_cmd *cmd;
+ const enum c_cmd_size cmd_size = __cxi_cmd_size(cmd_length);
+ s32 rc;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_cmd *)&cq->cmds32[cq->wp32];
+ memcpy(cmd, cmd_in, cmd_length);
+ cmd->cmd_size = cmd_size;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_c_state() - Emit an IDC C_STATE command.
+ *
+ * the command uses 1 slot. Padding will be added if needed.
+ */
+static inline s32 cxi_cq_emit_c_state(struct cxi_cq *cq, const struct c_cstate_cmd *cmd_in)
+{
+ struct c_cstate_cmd *cmd;
+ s32 rc;
+
+ rc = cxi_cq_align_for_cmd(cq, C_CMD_SIZE_32B);
+ if (rc)
+ return -ENOSPC;
+
+ cmd = (struct c_cstate_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->command.cmd_size = C_CMD_SIZE_32B; /* Always 32 bytes */
+ cmd->command.opcode = C_CMD_CSTATE;
+ cmd->length = sizeof(struct c_cstate_cmd);
+
+ __cxi_cq_advance_wp(cq, C_CMD_SIZE_32B);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_idc_put() - Emit an IDC PUT command.
+ *
+ * May use 1 to 4 slots. Padding will be added if needed.
+ */
+static inline s32 cxi_cq_emit_idc_put(struct cxi_cq *cq, const struct c_idc_put_cmd *cmd_in,
+ const void *payload, size_t payload_length)
+{
+ struct c_idc_put_cmd *cmd;
+ const enum c_cmd_size cmd_size = __cxi_cmd_size(16 + payload_length);
+ s32 rc;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_idc_put_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->idc_header.command.cmd_size = cmd_size;
+ cmd->idc_header.command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->idc_header.command.opcode = C_CMD_PUT;
+
+ memcpy(cmd->data, payload, payload_length);
+
+ /* account for header */
+ cmd->idc_header.length = sizeof(cmd->idc_header) + payload_length;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_idc_msg() - Emit an IDC small message command.
+ *
+ * May use 1 to 4 slots. Padding will be added if needed.
+ *
+ * May return -EINVAL if payload_length is greater than
+ * C_MAX_IDC_PAYLOAD_UNR
+ */
+static inline s32 cxi_cq_emit_idc_msg(struct cxi_cq *cq, const struct c_idc_msg_hdr *cmd_in,
+ const void *payload, size_t payload_length)
+{
+ struct c_idc_msg_hdr *cmd;
+ enum c_cmd_size cmd_size = __cxi_cmd_size(sizeof(struct c_idc_msg_hdr) + payload_length);
+ s32 rc;
+
+ if (payload_length > C_MAX_IDC_PAYLOAD_UNR)
+ return -EINVAL;
+ if (cmd_size == C_CMD_SIZE_32B)
+ cmd_size = C_CMD_SIZE_64B; /* Minimum size is 64B */
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_idc_msg_hdr *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->command.opcode = C_CMD_SMALL_MESSAGE;
+
+ memcpy(cmd->data, payload, payload_length);
+
+ /* account for header */
+ cmd->length = sizeof(struct c_idc_msg_hdr) + payload_length;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_idc_eth() - Emit an IDC Ethernet command.
+ *
+ * May use 1 to 4 slots. Padding will be added if needed.
+ */
+static inline s32 cxi_cq_emit_idc_eth(struct cxi_cq *cq, const struct c_idc_eth_cmd *cmd_in,
+ const void *payload, size_t payload_length)
+{
+ struct c_idc_eth_cmd *cmd;
+ const u64 len = sizeof(struct c_idc_eth_cmd) + payload_length;
+ const enum c_cmd_size cmd_size = __cxi_cmd_size(len);
+ s32 rc;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_idc_eth_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->command.opcode = C_CMD_ETHERNET_TX;
+
+ memcpy(cmd->data, payload, payload_length);
+
+ cmd->length = len;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_idc_amo() - Emit an IDC AMO command.
+ *
+ * If possible, emit the AMO with a small_amo request.
+ */
+static inline s32 cxi_cq_emit_idc_amo(struct cxi_cq *cq, const struct c_idc_amo_cmd *cmd_in,
+ bool fetching)
+{
+ s32 rc;
+ enum c_cmd_size cmd_size;
+
+ if (cmd_in->atomic_type == C_AMO_TYPE_DOUBLE_COMPLEX_T ||
+ cmd_in->atomic_op == C_AMO_OP_CSWAP || cmd_in->atomic_op == C_AMO_OP_AXOR || fetching) {
+ struct c_idc_amo_cmd *cmd;
+
+ cmd_size = C_CMD_SIZE_64B;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_idc_amo_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->idc_header.command.cmd_size = cmd_size;
+ cmd->idc_header.command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->idc_header.command.opcode = fetching ? C_CMD_FETCHING_ATOMIC : C_CMD_ATOMIC;
+
+ /* Large AMOs always have a length of 64 bytes. */
+ cmd->idc_header.length = sizeof(*cmd);
+ } else {
+ struct c_idc_put_cmd *cmd;
+ struct c_small_amo_payload *payload;
+
+ cmd_size = C_CMD_SIZE_32B;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_idc_put_cmd *)&cq->cmds32[cq->wp32];
+ payload = (struct c_small_amo_payload *)cmd->data;
+
+ cmd->idc_header = cmd_in->idc_header;
+
+ cmd->idc_header.command.cmd_size = cmd_size;
+ cmd->idc_header.command.cmd_type = C_CMD_TYPE_IDC;
+ cmd->idc_header.command.opcode = C_CMD_ATOMIC;
+
+ /* Small AMOs always have a length of 32 bytes. */
+ cmd->idc_header.length = 32;
+
+ payload->amo_op = cmd_in->atomic_op;
+ payload->amo_type = cmd_in->atomic_type;
+ payload->op1_word1 = cmd_in->op1_word1;
+ }
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_dma_amo() - Emit a DMA AMO command.
+ *
+ * Uses 2 slots. Padding will be added if needed.
+ */
+static inline s32 cxi_cq_emit_dma_amo(struct cxi_cq *cq, struct c_dma_amo_cmd *cmd_in,
+ bool fetching)
+{
+ struct c_dma_amo_cmd *cmd;
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ s32 rc;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_dma_amo_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.cmd_type = C_CMD_TYPE_DMA;
+ cmd->command.opcode = fetching ? C_CMD_FETCHING_ATOMIC : C_CMD_ATOMIC;
+ cmd->request_len = amo_size[cmd->atomic_type];
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_dma_eth() - Emit a DMA ethernet command.
+ */
+static inline s32 cxi_cq_emit_dma_eth(struct cxi_cq *cq, const struct c_dma_eth_cmd *cmd_in)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ struct c_dma_eth_cmd *cmd;
+ u32 total_len = 0;
+ s32 rc;
+ s32 i;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_dma_eth_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_DMA;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = C_CMD_ETHERNET_TX;
+
+ for (i = 0; i < cmd_in->num_segments; i++)
+ total_len += cmd_in->len[i];
+ cmd->total_len = total_len;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_dma() - Emit a non restricted DMA command.
+ */
+static inline s32 cxi_cq_emit_dma(struct cxi_cq *cq, struct c_full_dma_cmd *cmd_in)
+{
+ struct c_full_dma_cmd *cmd;
+ s32 rc;
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_64B;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_full_dma_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_DMA;
+ cmd->command.cmd_size = cmd_size;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_nomatch_dma() - Emit a non-matching DMA command.
+ *
+ * This command is used to target a non-matching PtlTE where remote target
+ * events are not needed (restricted send option bit is always set). Valid
+ * command operations are CMD_NOMATCH_GET and CMD_NOMATCH_PUT.
+ *
+ * Note: With this command, only errors will be generated on the EQ. Use
+ * cxi_cq_emit_dma() with the restricted bit set if per transaction success
+ * events are needed.
+ */
+static inline s32 cxi_cq_emit_nomatch_dma(struct cxi_cq *cq, struct c_nomatch_dma_cmd *cmd_in)
+{
+ struct c_nomatch_dma_cmd *cmd;
+ s32 rc;
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_32B;
+
+ rc = cxi_cq_align_for_cmd(cq, cmd_size);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_nomatch_dma_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_DMA;
+ cmd->command.cmd_size = cmd_size;
+ cmd->restricted = 1;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_target() - Emit a target command.
+ *
+ * All the target commands (c_target_cmd and c_set_state) are 64
+ * bytes.
+ */
+static inline s32 cxi_cq_emit_target(struct cxi_cq *cq, const void *cmd_in)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_64B;
+ struct c_target_cmd *cmd;
+
+ /* Space available in the queue */
+ if (__cxi_cq_free_slots(cq) < (int)__cxi_cmd_slots[cmd_size])
+ return -ENOSPC;
+
+ cmd = (struct c_target_cmd *)&cq->cmds32[cq->wp32];
+
+ memcpy(cmd, cmd_in, sizeof(*cmd));
+
+ cmd->command.cmd_type = C_CMD_TYPE_CQ;
+ cmd->command.cmd_size = cmd_size;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_ct() - Emit a counting event (CT) command without embedded data.
+ *
+ * This function can also be used for trigger event, trigger inc, and trigger
+ * set.
+ */
+static inline s32 cxi_cq_emit_ct(struct cxi_cq *cq, u32 opcode, const struct c_ct_cmd *cmd_in)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_64B;
+ struct c_ct_cmd *cmd;
+
+ /* Space available in the queue */
+ if (__cxi_cq_free_slots(cq) < (int)__cxi_cmd_slots[cmd_size])
+ return -ENOSPC;
+
+ cmd = (struct c_ct_cmd *)&cq->cmds32[cq->wp32];
+
+ *cmd = *cmd_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_CT;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = opcode;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_trig_full_dma() - Emit a triggered full DMA command.
+ *
+ * Trigger command with embedded data is always 128 bytes.
+ */
+static inline s32 cxi_cq_emit_trig_full_dma(struct cxi_cq *cq, const struct c_ct_cmd *cmd_in,
+ const struct c_full_dma_cmd *dma_in)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ struct c_ct_cmd *cmd;
+ struct c_full_dma_cmd *dma;
+ s32 rc;
+
+ rc = cxi_cq_align_for_ct128_cmd(cq);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_ct_cmd *)&cq->cmds32[cq->wp32];
+ dma = (struct c_full_dma_cmd *)cmd->embedded_dma;
+
+ *cmd = *cmd_in;
+ *dma = *dma_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_CT;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = C_CMD_CT_TRIG_DMA;
+
+ dma->command.cmd_type = C_CMD_TYPE_DMA;
+ dma->command.cmd_size = C_CMD_SIZE_64B;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_trig_nomatch_dma() - Emit a triggered nomatch DMA command.
+ *
+ * Trigger command with embedded data is always 128 bytes.
+ */
+static inline s32 cxi_cq_emit_trig_nomatch_dma(struct cxi_cq *cq, const struct c_ct_cmd *cmd_in,
+ const struct c_nomatch_dma_cmd *dma_in)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ struct c_ct_cmd *cmd;
+ struct c_nomatch_dma_cmd *dma;
+ s32 rc;
+
+ rc = cxi_cq_align_for_ct128_cmd(cq);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_ct_cmd *)&cq->cmds32[cq->wp32];
+ dma = (struct c_nomatch_dma_cmd *)cmd->embedded_dma;
+
+ *cmd = *cmd_in;
+ *dma = *dma_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_CT;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = C_CMD_CT_TRIG_DMA;
+
+ dma->command.cmd_type = C_CMD_TYPE_DMA;
+ dma->command.cmd_size = C_CMD_SIZE_32B;
+ dma->restricted = 1;
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_emit_trig_dma_amo() Emit a triggered DMA AMO command.
+ *
+ * Trigger command with embedded data is always 128 bytes.
+ */
+static inline s32 cxi_cq_emit_trig_dma_amo(struct cxi_cq *cq, const struct c_ct_cmd *cmd_in,
+ const struct c_dma_amo_cmd *amo_in, bool fetching)
+{
+ const enum c_cmd_size cmd_size = C_CMD_SIZE_128B;
+ struct c_ct_cmd *cmd;
+ struct c_dma_amo_cmd *amo;
+ s32 rc;
+
+ rc = cxi_cq_align_for_ct128_cmd(cq);
+ if (rc)
+ return rc;
+
+ cmd = (struct c_ct_cmd *)&cq->cmds32[cq->wp32];
+ amo = (struct c_dma_amo_cmd *)cmd->embedded_dma;
+
+ *cmd = *cmd_in;
+ *amo = *amo_in;
+
+ cmd->command.cmd_type = C_CMD_TYPE_CT;
+ cmd->command.cmd_size = cmd_size;
+ cmd->command.opcode = C_CMD_CT_TRIG_DMA;
+
+ amo->command.cmd_type = C_CMD_TYPE_DMA;
+ amo->command.cmd_size = C_CMD_SIZE_128B;
+ amo->command.opcode = fetching ? C_CMD_FETCHING_ATOMIC : C_CMD_ATOMIC;
+ amo->request_len = amo_size[amo->atomic_type];
+
+ __cxi_cq_advance_wp(cq, cmd_size);
+
+ return 0;
+}
+
+/**
+ * cxi_cq_init() - Initialize a command queue
+ * @cq: The command queue
+ * @cmds: The commands memory
+ * @count: Count (size) of command queue
+ * @launch_addr: The CQ launch address
+ * @cqn: Command queue number
+ */
+static inline void cxi_cq_init(struct cxi_cq *cq, struct cxi_cmd64 *cmds, u32 count,
+ void *launch_addr, u32 idx)
+{
+ struct c_cmdq *la = (struct c_cmdq *)launch_addr;
+
+ cq->size = count;
+ cq->size32 = 2 * count;
+ cq->wp32 = C_CQ_FIRST_WR_PTR_32;
+ cq->hw_wp32 = cq->wp32;
+ cq->rp32 = cq->wp32;
+
+ /* Setting status pointer sets the commands pointer. */
+ if (cmds) {
+ cq->status = (struct c_cq_status *)&cmds[0];
+ cq->status->rd_ptr = C_CQ_FIRST_WR_PTR;
+ cq->status->return_code = C_RC_OK;
+ }
+
+ if (launch_addr) {
+ cq->wp_addr = (u64 *)launch_addr;
+ cq->ll_64 = (u8 *)la->ll_wr64a0123;
+ cq->ll_128a = (u8 *)la->ll_wr128a02;
+ cq->ll_128u = (u8 *)la->ll_wr128a13;
+ }
+ cq->idx = idx;
+}
+
+/**
+ * cxi_eq_empty() - Check if event queue is empty
+ */
+static inline bool cxi_eq_empty(struct cxi_eq *eq)
+{
+ u32 rd_offset = eq->rd_offset;
+ const union c_event *event = (union c_event *)(eq->events + rd_offset);
+
+ if (event->hdr.event_size == C_EVENT_SIZE_NO_EVENT)
+ return true;
+ else
+ return false;
+}
+
+/**
+ * cxi_eq_peek_event() - Get the next event on an event queue without advancing
+ * the software read pointer.
+ *
+ * Returns a pointer in the event queue.
+ */
+static inline const union c_event *cxi_eq_peek_event(struct cxi_eq *eq)
+{
+ u32 rd_offset = eq->rd_offset;
+ const volatile union c_event *event;
+ s32 rc_offset;
+
+again:
+ event = (union c_event *)(eq->events + rd_offset);
+
+ /* No event */
+ if (event->hdr.event_size == C_EVENT_SIZE_NO_EVENT)
+ return NULL;
+
+ /* Ensure the event has fully arrived by checking the return
+ * code is not C_RC_NO_EVENT (0). The return_code is 6 bits in
+ * the last byte of the event (so either offset 15, 31 or
+ * 63).
+ */
+ rc_offset = (8 << event->hdr.event_size) - 1;
+ if (((((u8 *)event)[rc_offset]) & 0x3f) == C_RC_NO_EVENT)
+ return NULL;
+
+ if (event->hdr.event_type == C_EVENT_NULL_EVENT) {
+ /* Consume the event and move to the next one */
+ rd_offset += (8 << event->hdr.event_size);
+ if (rd_offset >= eq->byte_size)
+ rd_offset = C_EE_CFG_ECB_SIZE;
+ eq->rd_offset = rd_offset;
+
+ goto again;
+ }
+
+ return (const union c_event *)event;
+}
+
+/**
+ * cxi_eq_next_event() - Advance the event queue to the next event.
+ */
+static inline void cxi_eq_next_event(struct cxi_eq *eq)
+{
+ const union c_event *event;
+ u32 rd_offset = eq->rd_offset;
+
+ event = (union c_event *)(eq->events + rd_offset);
+ rd_offset = eq->rd_offset + (8 << event->hdr.event_size);
+ if (rd_offset >= eq->byte_size)
+ rd_offset = C_EE_CFG_ECB_SIZE;
+ eq->rd_offset = rd_offset;
+}
+
+/**
+ * cxi_eq_get_event() - Get the next event on an event queue.
+ *
+ * Returns a pointer in the event queue. The event must be processed
+ * before calling cxi_eq_ack_events().
+ */
+static inline const union c_event *cxi_eq_get_event(struct cxi_eq *eq)
+{
+ const union c_event *event;
+
+ event = cxi_eq_peek_event(eq);
+ if (!event)
+ return NULL;
+
+ cxi_eq_next_event(eq);
+
+ return event;
+}
+
+/**
+ * cxi_eq_move_rp() - Move the EQ read pointer
+ * @eq: The EQ to have read pointer moved.
+ *
+ * There should be no need to call this function. Use cxi_eq_ack_events().
+ *
+ * Return: Updated read pointer
+ */
+static inline u64 cxi_eq_move_rp(struct cxi_eq *eq)
+{
+ u32 rd_offset = eq->rd_offset;
+ u32 prev_rd_offset = eq->prev_rd_offset;
+ u64 rd_ptr = rd_offset / C_EE_CFG_ECB_SIZE;
+ u8 *p = &eq->events[prev_rd_offset];
+
+ if (prev_rd_offset < rd_offset) {
+ memset(p, 0, rd_offset - prev_rd_offset);
+ } else if (prev_rd_offset > rd_offset) {
+ memset(p, 0, eq->byte_size - prev_rd_offset);
+ memset(eq->events + C_EE_CFG_ECB_SIZE, 0, rd_offset - C_EE_CFG_ECB_SIZE);
+ }
+ eq->prev_rd_offset = rd_offset;
+
+ return rd_ptr;
+}
+
+/**
+ * cxi_eq_ack_events() - Acknowledge consumed events in the event queue
+ *
+ * All events returned through cxi_eq_get_event() are cleared and the
+ * producer read pointer is advanced. These events must therefore be
+ * processed before calling this function.
+ *
+ * An application doesn't need to call this function after each event;
+ * it may process several events before.
+ */
+static inline void cxi_eq_ack_events(struct cxi_eq *eq)
+{
+ eq->sw_state.rd_ptr = cxi_eq_move_rp(eq);
+
+ *eq->sw_state_addr = eq->sw_state.qw;
+}
+
+/**
+ * cxi_eq_get_status() - Query for an event queue status update.
+ *
+ * Cassini updates event queue status when:
+ *
+ * -The number of free 64-byte events slots remaining in the queue crosses a
+ * software configured threshold.
+ * -An event is dropped due to the event queue being full.
+ *
+ * Status fields of interest to providers are:
+ * -thld_sts: Asserted if the update was due to a fill threshold being crossed.
+ * -thld_id: Indicates the ID of the fill level threshold crossed (if thld_sts
+ * is asserted).
+ * -unackd_dropped_event: Indicates that one or more events have been dropped
+ * since the last status update.
+ * -event_slots_free: The number of 64-byte event slots that were unused in the
+ * event queue buffer when the event queue status was updated.
+ * -timestamp_ns: The nanoseconds field of the real-time when the event queue
+ * status was last updated.
+ * -timestamp_sec: The seconds field of the real-time when the event queue
+ * status was last updated.
+ *
+ * @eq: The event queue to query.
+ * @status: On success, contains a copy of the status update.
+ *
+ * Returns non-zero if a new event queue status update is available.
+ */
+static inline s32 cxi_eq_get_status(struct cxi_eq *eq, struct c_eq_status *status)
+{
+ struct c_eq_status status_cpy;
+ s32 tries = 100;
+
+ /* Fast path: return 0 if the last status looks old. */
+ if (eq->last_ts_ns == eq->status->timestamp_ns_cpy &&
+ eq->last_ts_sec == eq->status->timestamp_sec_cpy)
+ return 0;
+
+ /* Read the entire status update. A status update may not be written
+ * atomically on all architectures. Re-read the full status until a
+ * valid update is read.
+ */
+ do {
+ memcpy(&status_cpy, eq->status, sizeof(status_cpy));
+
+ if (status_cpy.timestamp_ns == status_cpy.timestamp_ns_cpy &&
+ status_cpy.timestamp_sec == status_cpy.timestamp_sec_cpy)
+ break;
+ } while (--tries);
+
+ /* Return 0 if a full status update was unavailable. */
+ if (!tries)
+ return 0;
+
+ /* Keep a record that we read this status update in software and return
+ * the update.
+ */
+ eq->last_ts_sec = status_cpy.timestamp_sec;
+ eq->last_ts_ns = status_cpy.timestamp_ns;
+
+ *status = status_cpy;
+ return 1;
+}
+
+/**
+ * cxi_eq_status_fill_level() - Return status update fill level.
+ *
+ * @eq: The EQ which generated the status update.
+ * @status: Pointer to a status update.
+ *
+ * Returns the fill level (as a percentage) reported by the provided status
+ * update. Valid only if status->thld_sts is set.
+ */
+static inline u32 cxi_eq_status_fill_level(struct cxi_eq *eq, struct c_eq_status *status)
+{
+ return 100 - status->event_slots_free * 100 / (eq->byte_size / C_EE_CFG_ECB_SIZE);
+}
+
+/**
+ * cxi_eq_get_drops() - Return non-zero if new events have been dropped.
+ *
+ * When there is insufficient space in the EQ for events to be delivered, new
+ * events are dropped. In this case the NIC performs an EQ status write-back
+ * indicating events were dropped. All subsequent status write-backs will
+ * indicate that events were dropped until drops are acknowledged.
+ *
+ * After observing that events were dropped, a user should recover space in the
+ * EQ and then acknowledge the dropped events using cxi_eq_ack_drops(). After
+ * this call, subsequent EQ status write-backs will not indicate that events
+ * were dropped until new events are dropped.
+ */
+static inline s32 cxi_eq_get_drops(struct cxi_eq *eq)
+{
+ return eq->status->unackd_dropped_event;
+}
+
+/**
+ * cxi_eq_ack_drops() - Acknowledge dropped events in the event queue
+ */
+static inline void cxi_eq_ack_drops(struct cxi_eq *eq)
+{
+ eq->status->unackd_dropped_event = 0;
+ eq->sw_state.event_drop_seq_no = eq->status->event_drop_seq_no;
+ cxi_eq_ack_events(eq);
+}
+
+/**
+ * cxi_eq_int_enable() - Unmask EQ event interrupts
+ */
+static inline void cxi_eq_int_enable(struct cxi_eq *eq)
+{
+ eq->sw_state.event_int_disable = 0;
+ cxi_eq_ack_events(eq);
+}
+
+/**
+ * cxi_eq_int_disable() - Mask EQ event interrupts
+ */
+static inline void cxi_eq_int_disable(struct cxi_eq *eq)
+{
+ eq->sw_state.event_int_disable = 1;
+ cxi_eq_ack_events(eq);
+}
+
+/**
+ * cxi_eq_sts_int_enable() - Unmask EQ status update interrupts
+ */
+static inline void cxi_eq_sts_int_enable(struct cxi_eq *eq)
+{
+ eq->sw_state.eq_sts_int_disable = 0;
+ cxi_eq_ack_events(eq);
+}
+
+/**
+ * cxi_eq_sts_int_disable() - Mask EQ status update interrupts
+ */
+static inline void cxi_eq_sts_int_disable(struct cxi_eq *eq)
+{
+ eq->sw_state.eq_sts_int_disable = 1;
+ cxi_eq_ack_events(eq);
+}
+
+/**
+ * cxi_eq_init() - Initialize an event queue
+ * @eq: The event queue to initialize
+ * @events: The events buffer
+ * @size: Size in bytes of the events buffer
+ * @eqn: The EQ number to use in commands
+ * @sw_state_addr: Software state CSR address
+ */
+static inline void cxi_eq_init(struct cxi_eq *eq, u8 *events, u32 size, u32 eqn, u64 *sw_state_addr)
+{
+ eq->events = events;
+ eq->rd_offset = C_EE_CFG_ECB_SIZE;
+ eq->prev_rd_offset = C_EE_CFG_ECB_SIZE;
+ eq->byte_size = size;
+ eq->sw_state_addr = sw_state_addr;
+ eq->eqn = eqn;
+}
+
+#define CXI_MASK(n) ((1 << (n)) - 1)
+
+#define CXI_MCAST_FA_FORMAT 0x1ff
+#define CXI_MCAST_FA_ACTION 0x7
+#define CXI_DFA_EP_WIDTH 12
+#define CXI_DFA_EXT_WIDTH 5
+#define CXI_EP_WIDTH (CXI_DFA_EP_WIDTH + CXI_DFA_EXT_WIDTH)
+#define CXI_DFA_EP_MASK CXI_MASK(CXI_DFA_EP_WIDTH)
+#define CXI_DFA_EXT_MASK CXI_MASK(CXI_DFA_EXT_WIDTH)
+
+/**
+ * cxi_build_dfa_ep() - Build 12 bit DFA EP Index.
+ * @pid: The DFA PID value.
+ * @pid_width: The DFA PID width.
+ * @idx: The DFA PTE index.
+ */
+static inline u32 cxi_build_dfa_ep(u32 pid, u32 pid_width, u32 idx)
+{
+ return ((idx >> CXI_DFA_EXT_WIDTH) << pid_width) + pid;
+}
+
+/**
+ * cxi_build_dfa_ext() - Return 5 bit DFA extension.
+ * @idx: The DFA PTE index.
+ */
+static inline u32 cxi_build_dfa_ext(u32 idx)
+{
+ return idx & CXI_DFA_EXT_MASK;
+}
+
+/**
+ * cxi_dfa_ep() - Return 12 bit DFA EP.
+ * @dfa: The DFA to parse.
+ */
+static inline u32 cxi_dfa_ep(u32 dfa)
+{
+ return dfa & CXI_DFA_EP_MASK;
+}
+
+/**
+ * cxi_dfa_pid() - Return variable width DFA PID.
+ * @dfa: The DFA to parse.
+ */
+static inline u32 cxi_dfa_pid(u32 dfa, u32 pid_width)
+{
+ return dfa & CXI_MASK(pid_width);
+}
+
+/**
+ * cxi_dfa_nid() - Return 20 bit DFA NID.
+ * @dfa: The DFA to parse.
+ */
+static inline u32 cxi_dfa_nid(u32 dfa)
+{
+ return dfa >> CXI_DFA_EP_WIDTH;
+}
+
+/**
+ * cxi_dfa_to_init() - Convert 32 bit DFA to initiator ID.
+ * @dfa: The DFA to convert.
+ * @pid_width: The DFA PID width.
+ */
+static inline u32 cxi_dfa_to_init(u32 dfa, u32 pid_width)
+{
+ return CXI_MATCH_ID(pid_width, cxi_dfa_pid(dfa, pid_width), cxi_dfa_nid(dfa));
+}
+
+/**
+ * cxi_build_dfa() - Build a destination fabric address
+ * @nic_addr: Destination NIC address
+ * @pid: VNI partition
+ * @pid_granule: VNI partition granule
+ * @idx: Index into the VNI partition
+ * @dfa: Destination fabric address to be set
+ * @dfa_ext: DFA extension to be set
+ */
+static inline void cxi_build_dfa(u32 nic_addr, u32 pid, u32 pid_width, u32 idx,
+ union c_fab_addr *dfa, u8 *dfa_ext)
+{
+ dfa->unicast.nid = nic_addr;
+ dfa->unicast.endpoint_defined = cxi_build_dfa_ep(pid, pid_width, idx);
+ *dfa_ext = cxi_build_dfa_ext(idx);
+}
+
+/**
+ * cxi_build_mcast_dfa() - Build a destination multicast fabric address
+ *
+ * @mcast_id: Destination multicast address
+ * @red_id: Reduction ID value
+ * @idx_ext: Multicast index extension
+ * @dfa: Destination fabric address to be set
+ * @dfa_ext: DFA extension to be set
+ */
+static inline void cxi_build_mcast_dfa(u32 mcast_id, u32 red_id, u32 idx_ext, union c_fab_addr *dfa,
+ u8 *dfa_ext)
+{
+ memset(dfa, 0, sizeof(*dfa));
+ dfa->multicast.format = CXI_MCAST_FA_FORMAT;
+ dfa->multicast.reduction_id = red_id;
+ dfa->multicast.multicast_id = mcast_id;
+ dfa->multicast.action = CXI_MCAST_FA_ACTION;
+
+ *dfa_ext = cxi_build_dfa_ext(idx_ext);
+}
+
+/**
+ * cxi_ct_init() - Initialize a counter
+ * @ct: Counter to initialize
+ * @wb: Writeback buffer
+ * @doorbell_addr: Doorbell address
+ */
+static inline void cxi_ct_init(struct cxi_ct *ct, struct c_ct_writeback *wb, u32 ctn,
+ u64 *doorbell_addr)
+{
+ ct->wb = wb;
+ ct->ctn = ctn;
+ ct->doorbell = doorbell_addr;
+}
+
+/**
+ * cxi_ct_inc_success() - Increment counter success value
+ * @ct: Counter
+ * @value: Value
+ *
+ * Note: Value is constrained to 48 bits.
+ */
+static inline void cxi_ct_inc_success(struct cxi_ct *ct, u64 value)
+{
+ ct->doorbell[CT_INC_SUCCESS_OFFSET / sizeof(u64)] = value & CT_SUCCESS_MASK;
+}
+
+/**
+ * cxi_ct_inc_failure() - Increment counter failure value
+ * @ct: Counter
+ * @value: Value
+ *
+ * Note: Value is constrained to 7 bits.
+ */
+static inline void cxi_ct_inc_failure(struct cxi_ct *ct, u8 value)
+{
+ ct->doorbell[CT_INC_FAILURE_OFFSET / sizeof(u64)] = value & CT_FAILURE_MASK;
+}
+
+/**
+ * cxi_ct_reset_success() - Reset success counter to zero.
+ * @ct: Counting event to be reset.
+ */
+static inline void cxi_ct_reset_success(struct cxi_ct *ct)
+{
+ ct->doorbell[CT_RESET_SUCCESS_OFFSET / sizeof(u64)] = 0;
+}
+
+/**
+ * cxi_ct_reset_failure() - Reset failure counter to zero.
+ * @ct: Counting event to be reset.
+ */
+static inline void cxi_ct_reset_failure(struct cxi_ct *ct)
+{
+ ct->doorbell[CT_RESET_FAILURE_OFFSET / sizeof(u64)] = 0;
+}
+
+#endif /* __CXI_PROV_HW */
diff --git a/providers/cxi/cxi_verbs.h b/providers/cxi/cxi_verbs.h
new file mode 100644
index 000000000000..e180ab88bab7
--- /dev/null
+++ b/providers/cxi/cxi_verbs.h
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+#ifndef __CXI_VERBS_H__
+#define __CXI_VERBS_H__
+#include <infiniband/driver.h>
+#include <infiniband/verbs.h>
+
+/* Function prototypes from verbs.c */
+int cxi_query_device(struct ibv_context *context, const struct ibv_query_device_ex_input *input,
+ struct ibv_device_attr_ex *attr, size_t attr_size);
+int cxi_query_port(struct ibv_context *context, uint8_t port, struct ibv_port_attr *attr);
+struct ibv_pd *cxi_alloc_pd(struct ibv_context *context);
+int cxi_dealloc_pd(struct ibv_pd *pd);
+struct ibv_job *cxi_alloc_job(struct ibv_context *context, struct ibv_job_attr *attr,
+ void *user_context);
+int cxi_dealloc_job(struct ibv_job *job);
+int cxi_query_job(struct ibv_job *job, struct ibv_job_attr *attr);
+int cxi_insert_addr(struct ibv_job *job, struct ibv_ah_attr_ex *ah_attr, unsigned int addr_idx);
+int cxi_remove_addr(struct ibv_job *job, unsigned int addr_idx);
+int cxi_query_addr(struct ibv_job *job, unsigned int addr_idx, struct ibv_ah_attr_ex *ah_attr);
+int cxi_export_job(struct ibv_job *job, int *fd);
+int cxi_import_job(struct ibv_context *context, int fd, struct ibv_job **job_out);
+struct ibv_job_key *cxi_create_jkey(struct ibv_pd *pd, struct ibv_job *job);
+int cxi_destroy_jkey(struct ibv_job_key *job_key);
+struct ibv_mr *cxi_reg_mr(struct ibv_pd *pd, void *addr, size_t size, uint64_t hca_va,
+ int access);
+struct ibv_mr *cxi_reg_mr_ex(struct ibv_pd *pd, struct ibv_mr_init_attr *attr);
+int cxi_dereg_mr(struct verbs_mr *vmr);
+struct ibv_cq *cxi_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel,
+ int comp_vector);
+struct ibv_cq_ex *cxi_create_cq_ex(struct ibv_context *context, struct ibv_cq_init_attr_ex *attr);
+int cxi_destroy_cq(struct ibv_cq *cq);
+struct ibv_counters *cxi_create_counters(struct ibv_context *context,
+ struct ibv_counters_init_attr *init_attr);
+int cxi_destroy_counters(struct ibv_counters *counters);
+int cxi_read_counters_ex(struct ibv_counters *counters, const uint64_t *items,
+ uint64_t *counters_value, uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags);
+int cxi_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc);
+int cxi_arm_cq(struct ibv_cq *cq, int solicited);
+struct ibv_qp *cxi_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr);
+struct ibv_qp *cxi_create_qp_ex(struct ibv_context *context, struct ibv_qp_init_attr_ex *attr);
+int cxi_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask);
+int cxi_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask,
+ struct ibv_qp_init_attr *init_attr);
+int cxi_destroy_qp(struct ibv_qp *qp);
+int cxi_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr, struct ibv_send_wr **bad_wr);
+int cxi_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr, struct ibv_recv_wr **bad_wr);
+int cxi_post_recv64(struct ibv_qp *qp, struct ibv_recv_wr64 *wr, struct ibv_recv_wr64 **bad_wr);
+int cxi_attach_mr(struct ibv_qp *qp, struct ibv_mr *ibmr);
+int cxi_detach_mr(struct ibv_qp *qp, struct ibv_mr *ibmr);
+struct ibv_ah *cxi_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr);
+struct ibv_ah *cxi_create_ah_ex(struct ibv_pd *pd, struct ibv_ah_attr_ex *attr);
+int cxi_destroy_ah(struct ibv_ah *ah);
+bool is_cxi_dev(struct ibv_device *device);
+void cxi_free_context(struct ibv_context *ibvctx);
+#endif
diff --git a/providers/cxi/cxiverbs-abi.h b/providers/cxi/cxiverbs-abi.h
new file mode 100644
index 000000000000..a85db49261dc
--- /dev/null
+++ b/providers/cxi/cxiverbs-abi.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/*
+ * Copyright 2025 HPE. All rights reserved.
+ */
+
+#ifndef __CXI_ABI_H__
+#define __CXI_ABI_H__
+
+#include <infiniband/kern-abi.h>
+#include <kernel-abi/cxiverbs-abi.h>
+#include <rdma/cxiverbs-abi.h>
+
+DECLARE_DRV_CMD(cxi_alloc_ucontext, IB_USER_VERBS_CMD_GET_CONTEXT, cxi_ibv_alloc_ucontext_cmd,
+ cxi_ibv_alloc_ucontext_resp);
+DECLARE_DRV_CMD(cxi_alloc_pd, IB_USER_VERBS_CMD_ALLOC_PD, cxi_ibv_alloc_pd_cmd,
+ cxi_ibv_alloc_pd_resp);
+DECLARE_DRV_CMD(cxi_create_cq, IB_USER_VERBS_CMD_CREATE_CQ, cxi_ibv_create_cq_cmd,
+ cxi_ibv_create_cq_resp);
+DECLARE_DRV_CMD(cxi_create_cq_ex, IB_USER_VERBS_EX_CMD_CREATE_CQ, cxi_ibv_create_cq_cmd,
+ cxi_ibv_create_cq_resp);
+DECLARE_DRV_CMD(cxi_create_qp, IB_USER_VERBS_CMD_CREATE_QP, cxi_ibv_create_qp_cmd,
+ cxi_ibv_create_qp_resp);
+DECLARE_DRV_CMD(cxi_create_qp_ex, IB_USER_VERBS_EX_CMD_CREATE_QP, cxi_ibv_create_qp_cmd,
+ cxi_ibv_create_qp_resp);
+DECLARE_DRV_CMD(cxi_modify_qp_ex, IB_USER_VERBS_EX_CMD_MODIFY_QP, empty, cxi_ibv_modify_qp_resp);
+DECLARE_DRV_CMD(cxi_reg_mr, IB_USER_VERBS_CMD_REG_MR, cxi_ibv_reg_mr, cxi_ibv_reg_mr_resp);
+DECLARE_DRV_CMD(cxi_query_device_ex, IB_USER_VERBS_EX_CMD_QUERY_DEVICE, empty,
+ cxi_ibv_query_device_resp);
+#endif /* __CXI_ABI_H__ */
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 05/12] cxiverbs: define the native direct-verbs resource interface
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (3 preceding siblings ...)
2026-10-31 19:25 ` [PATCH 04/12] cxiverbs: add the synchronized native hardware and verbs headers Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:25 ` [PATCH 06/12] cxiverbs: encode list entries and VNI-isolated remote keys Doug Ledford
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Add cxidv.h, the public direct verbs API of the provider. The CXI
hardware has resources that verbs has no object for (services, LNIs,
communication profiles, event queues, command queues, counting events,
wait objects, CSR mappings and PIDs), and a privileged consumer such
as a workload manager or the libcxi library needs to provision and
use them explicitly. This header defines those entry points and
their attribute structures.
The telemetry of the NIC is part of the interface. cxidv_telem.h names
every telemetry item and the predefined item sets, and cxi_telem.c maps
names to items and sets, so a monitor reads telemetry with
ibv_read_counters_ex() and needs no per-file sysfs interface.
Ownership is explicit throughout: nothing is created as a side effect
of opening the device or allocating a PD. An LNI is allocated against
a service, a PD is allocated from an LNI, and the device-wide PID is
bound to the PD. Every cxidv_alloc_*() has a matching
cxidv_destroy_*().
The additions for retry-handler style consumers are privileged:
cxidv_map_csrs() and the checked cxidv_read_csr()/cxidv_write_csr()
accessors, event queues registered with the PCT, pollable wait
descriptors, target and restricted trigger command queues, counting
events with a caller supplied write-back page, and the administrative
inbound wait. Each requires CAP_SYS_ADMIN in the kernel.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/cxi_telem.c | 3948 +++++++++++++++++++++++++++++++++++++++++++
providers/cxi/cxidv.h | 418 +++++
providers/cxi/cxidv_telem.h | 1984 ++++++++++++++++++++++
3 files changed, 6350 insertions(+)
diff --git a/providers/cxi/cxi_telem.c b/providers/cxi/cxi_telem.c
new file mode 100644
index 000000000000..62d73e132377
--- /dev/null
+++ b/providers/cxi/cxi_telem.c
@@ -0,0 +1,3948 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/* Copyright 2024-2026 Hewlett Packard Enterprise Development LP */
+
+#include <errno.h>
+#include <string.h>
+#include <ccan/array_size.h>
+
+#include <infiniband/cxidv_telem.h>
+
+static const char *const telem_names[CXIDV_TELEM_COUNT] = {
+ "UNDEFINED",
+ "atu_at_stall_ccp",
+ "atu_at_stall_no_ptid",
+ "atu_at_stall_np_cdts",
+ "atu_at_stall_tarb_arb",
+ "atu_ats_dynamic_state_change_cntr",
+ "atu_ats_inval_cntr",
+ "atu_ats_prs_odp_latency_0",
+ "atu_ats_prs_odp_latency_1",
+ "atu_ats_prs_odp_latency_2",
+ "atu_ats_prs_odp_latency_3",
+ "atu_ats_trans_err",
+ "atu_ats_trans_latency_0",
+ "atu_ats_trans_latency_1",
+ "atu_ats_trans_latency_2",
+ "atu_ats_trans_latency_3",
+ "atu_atucq_inval_cntr",
+ "atu_cache_evictions",
+ "atu_cache_hit_base_page_size_0",
+ "atu_cache_hit_base_page_size_1",
+ "atu_cache_hit_base_page_size_2",
+ "atu_cache_hit_base_page_size_3",
+ "atu_cache_hit_derivative1_page_size_0",
+ "atu_cache_hit_derivative1_page_size_1",
+ "atu_cache_hit_derivative1_page_size_2",
+ "atu_cache_hit_derivative1_page_size_3",
+ "atu_cache_hit_derivative2_page_size_0",
+ "atu_cache_hit_derivative2_page_size_1",
+ "atu_cache_hit_derivative2_page_size_2",
+ "atu_cache_hit_derivative2_page_size_3",
+ "atu_cache_miss_0",
+ "atu_cache_miss_1",
+ "atu_cache_miss_2",
+ "atu_cache_miss_3",
+ "atu_cache_miss_ee",
+ "atu_cache_miss_ixe",
+ "atu_cache_miss_oxe",
+ "atu_client_req_ee",
+ "atu_client_req_ixe",
+ "atu_client_req_oxe",
+ "atu_client_rsp_not_ok_0",
+ "atu_client_rsp_not_ok_1",
+ "atu_client_rsp_not_ok_2",
+ "atu_client_rsp_not_ok_3",
+ "atu_filtered_requests",
+ "atu_implicit_ats_en_inval_cntr",
+ "atu_implicit_flr_inval_cntr",
+ "atu_inval_stall_arb",
+ "atu_inval_stall_cmpl_wait",
+ "atu_mem_cor_err_cntr",
+ "atu_mem_ucor_err_cntr",
+ "atu_nic_pri_odp_latency_0",
+ "atu_nic_pri_odp_latency_1",
+ "atu_nic_pri_odp_latency_2",
+ "atu_nic_pri_odp_latency_3",
+ "atu_nta_trans_latency_0",
+ "atu_nta_trans_latency_1",
+ "atu_nta_trans_latency_2",
+ "atu_nta_trans_latency_3",
+ "atu_odp_requests_0",
+ "atu_odp_requests_1",
+ "atu_odp_requests_2",
+ "atu_odp_requests_3",
+ "atu_pcie_err_poisoned",
+ "atu_pcie_unsuccess_cmpl",
+ "cq_cfg_event_cnts_ovf_cnt",
+ "cq_cq_cmd_counts_0",
+ "cq_cq_cmd_counts_1",
+ "cq_cq_cmd_counts_2",
+ "cq_cq_cmd_counts_3",
+ "cq_cq_cmd_counts_4",
+ "cq_cq_cmd_counts_5",
+ "cq_cq_cmd_counts_6",
+ "cq_cq_cmd_counts_7",
+ "cq_cq_cmd_counts_8",
+ "cq_cq_cmd_counts_9",
+ "cq_cq_cmd_counts_10",
+ "cq_cq_cmd_counts_11",
+ "cq_cq_cmd_counts_12",
+ "cq_cq_cmd_counts_13",
+ "cq_cq_cmd_counts_14",
+ "cq_cq_cmd_counts_15",
+ "cq_cq_oxe_num_flits",
+ "cq_cq_oxe_num_idles",
+ "cq_cq_oxe_num_stalls",
+ "cq_cq_tou_num_flits",
+ "cq_cq_tou_num_idles",
+ "cq_cq_tou_num_stalls",
+ "cq_cycles_blocked_0",
+ "cq_cycles_blocked_1",
+ "cq_cycles_blocked_2",
+ "cq_cycles_blocked_3",
+ "cq_dma_cmd_counts_0",
+ "cq_dma_cmd_counts_1",
+ "cq_dma_cmd_counts_2",
+ "cq_dma_cmd_counts_3",
+ "cq_dma_cmd_counts_4",
+ "cq_dma_cmd_counts_5",
+ "cq_dma_cmd_counts_6",
+ "cq_dma_cmd_counts_7",
+ "cq_dma_cmd_counts_8",
+ "cq_dma_cmd_counts_9",
+ "cq_dma_cmd_counts_10",
+ "cq_dma_cmd_counts_11",
+ "cq_dma_cmd_counts_12",
+ "cq_dma_cmd_counts_13",
+ "cq_dma_cmd_counts_14",
+ "cq_dma_cmd_counts_15",
+ "cq_fail_tgt_cntr",
+ "cq_fail_tx_cntr",
+ "cq_mem_cor_err_cntr",
+ "cq_mem_ucor_err_cntr",
+ "cq_num_cq_cmds_0",
+ "cq_num_cq_cmds_1",
+ "cq_num_cq_cmds_2",
+ "cq_num_cq_cmds_3",
+ "cq_num_dma_cmds_0",
+ "cq_num_dma_cmds_1",
+ "cq_num_dma_cmds_2",
+ "cq_num_dma_cmds_3",
+ "cq_num_idc_cmds_0",
+ "cq_num_idc_cmds_1",
+ "cq_num_idc_cmds_2",
+ "cq_num_idc_cmds_3",
+ "cq_num_ll_cmds_0",
+ "cq_num_ll_cmds_1",
+ "cq_num_ll_cmds_2",
+ "cq_num_ll_cmds_3",
+ "cq_num_ll_ops_received_0",
+ "cq_num_ll_ops_received_1",
+ "cq_num_ll_ops_received_2",
+ "cq_num_ll_ops_received_3",
+ "cq_num_ll_ops_rejected_0",
+ "cq_num_ll_ops_rejected_1",
+ "cq_num_ll_ops_rejected_2",
+ "cq_num_ll_ops_rejected_3",
+ "cq_num_ll_ops_split_0",
+ "cq_num_ll_ops_split_1",
+ "cq_num_ll_ops_split_2",
+ "cq_num_ll_ops_split_3",
+ "cq_num_ll_ops_successful_0",
+ "cq_num_ll_ops_successful_1",
+ "cq_num_ll_ops_successful_2",
+ "cq_num_ll_ops_successful_3",
+ "cq_num_tgq_cmd_reads_0",
+ "cq_num_tgq_cmd_reads_1",
+ "cq_num_tgq_cmd_reads_2",
+ "cq_num_tgq_cmd_reads_3",
+ "cq_num_tgt_cmd_arg_errors",
+ "cq_num_tgt_cmd_perm_errors",
+ "cq_num_tgt_cmds_0",
+ "cq_num_tgt_cmds_1",
+ "cq_num_tgt_cmds_2",
+ "cq_num_tgt_cmds_3",
+ "cq_num_tou_cmd_reads_0",
+ "cq_num_tou_cmd_reads_1",
+ "cq_num_tou_cmd_reads_2",
+ "cq_num_tou_cmd_reads_3",
+ "cq_num_tx_cmd_align_errors",
+ "cq_num_tx_cmd_arg_errors",
+ "cq_num_tx_cmd_op_errors",
+ "cq_num_tx_cmd_perm_errors",
+ "cq_num_txq_cmd_reads_0",
+ "cq_num_txq_cmd_reads_1",
+ "cq_num_txq_cmd_reads_2",
+ "cq_num_txq_cmd_reads_3",
+ "cq_rarb_err_cntr",
+ "cq_rarb_ll_err_cntr",
+ "cq_sts_credits_in_use_ee_event_credits",
+ "cq_sts_credits_in_use_fq_sh_credits",
+ "cq_sts_credits_in_use_fq_tot_credits",
+ "cq_sts_credits_in_use_lpe_cmd_credits",
+ "cq_sts_credits_in_use_lpe_rcv_fifo_credits",
+ "cq_sts_credits_in_use_prefetch_tou_credits",
+ "cq_sts_credits_in_use_tarb_np_credits",
+ "cq_sts_credits_in_use_tarb_p_credits",
+ "cq_sts_credits_in_use_tgq_cmd_fail_event_credits",
+ "cq_sts_credits_in_use_tou_cmd_fail_event_credits",
+ "cq_sts_credits_in_use_tou_event_credits",
+ "cq_sts_credits_in_use_tou_fq_credits",
+ "cq_sts_credits_in_use_tou_wb_credits",
+ "cq_sts_credits_in_use_txq_cmd_fail_event_credits",
+ "cq_sts_dma_payload_data_0",
+ "cq_sts_dma_payload_data_1",
+ "cq_sts_dma_payload_data_2",
+ "cq_sts_dma_payload_data_3",
+ "cq_sts_fq_load_0",
+ "cq_sts_fq_load_1",
+ "cq_sts_fq_load_2",
+ "cq_sts_fq_load_3",
+ "cq_sts_fq_load_4",
+ "cq_sts_fq_load_5",
+ "cq_sts_fq_load_6",
+ "cq_sts_fq_load_7",
+ "cq_sts_fq_load_8",
+ "cq_sts_fq_load_9",
+ "cq_sts_fq_load_10",
+ "cq_sts_fq_load_11",
+ "cq_sts_fq_load_12",
+ "cq_sts_fq_load_13",
+ "cq_sts_fq_load_14",
+ "cq_sts_fq_load_15",
+ "cq_sts_fq_load_16",
+ "cq_sts_fq_load_17",
+ "cq_sts_fq_load_18",
+ "cq_sts_fq_load_19",
+ "cq_sts_fq_load_20",
+ "cq_sts_fq_load_21",
+ "cq_sts_fq_load_22",
+ "cq_sts_fq_load_23",
+ "cq_sts_fq_load_24",
+ "cq_sts_fq_load_25",
+ "cq_sts_fq_load_26",
+ "cq_sts_fq_load_27",
+ "cq_sts_fq_load_28",
+ "cq_sts_fq_load_29",
+ "cq_sts_fq_load_30",
+ "cq_sts_fq_load_31",
+ "cq_sts_fq_load_32",
+ "cq_sts_fq_load_33",
+ "cq_sts_fq_load_34",
+ "cq_sts_fq_load_35",
+ "cq_sts_fq_load_36",
+ "cq_sts_fq_load_37",
+ "cq_sts_fq_load_38",
+ "cq_sts_fq_load_39",
+ "cq_sts_fq_load_40",
+ "cq_sts_fq_load_41",
+ "cq_sts_fq_load_42",
+ "cq_sts_fq_load_43",
+ "cq_sts_fq_load_44",
+ "cq_sts_fq_load_45",
+ "cq_sts_fq_load_46",
+ "cq_sts_fq_load_47",
+ "cq_sts_idc_payload_data_0",
+ "cq_sts_idc_payload_data_1",
+ "cq_sts_idc_payload_data_2",
+ "cq_sts_idc_payload_data_3",
+ "cq_sts_ll_dma_payload_data_0",
+ "cq_sts_ll_dma_payload_data_1",
+ "cq_sts_ll_dma_payload_data_2",
+ "cq_sts_ll_dma_payload_data_3",
+ "cq_sts_ll_idc_payload_data_0",
+ "cq_sts_ll_idc_payload_data_1",
+ "cq_sts_ll_idc_payload_data_2",
+ "cq_sts_ll_idc_payload_data_3",
+ "cq_sts_tle_in_use_0",
+ "cq_sts_tle_in_use_1",
+ "cq_sts_tle_in_use_2",
+ "cq_sts_tle_in_use_3",
+ "cq_sts_tou_payload_data_0",
+ "cq_sts_tou_payload_data_1",
+ "cq_sts_tou_payload_data_2",
+ "cq_sts_tou_payload_data_3",
+ "cq_success_tgt_cntr",
+ "cq_success_tx_cntr",
+ "cq_tgt_waiting_on_read_0",
+ "cq_tgt_waiting_on_read_1",
+ "cq_tgt_waiting_on_read_2",
+ "cq_tgt_waiting_on_read_3",
+ "cq_tx_waiting_on_read_0",
+ "cq_tx_waiting_on_read_1",
+ "cq_tx_waiting_on_read_2",
+ "cq_tx_waiting_on_read_3",
+ "cq_wr_ptr_updt_err_cntr",
+ "ee_addr_trans_prefetch_cntr_0",
+ "ee_addr_trans_prefetch_cntr_1",
+ "ee_addr_trans_prefetch_cntr_2",
+ "ee_addr_trans_prefetch_cntr_3",
+ "ee_addr_trans_req_cntr",
+ "ee_cbs_written_cntr_0",
+ "ee_cbs_written_cntr_1",
+ "ee_cbs_written_cntr_2",
+ "ee_cbs_written_cntr_3",
+ "ee_ce_arb_out_event_cntr",
+ "ee_ce_arb_out_stall_cntr",
+ "ee_cq_event_req_cntr",
+ "ee_cq_fe_cntr",
+ "ee_cq_fe_stall_cntr",
+ "ee_deferred_eq_switch_cntr_0",
+ "ee_deferred_eq_switch_cntr_1",
+ "ee_deferred_eq_switch_cntr_2",
+ "ee_deferred_eq_switch_cntr_3",
+ "ee_eq_buffer_switch_cntr_0",
+ "ee_eq_buffer_switch_cntr_1",
+ "ee_eq_buffer_switch_cntr_2",
+ "ee_eq_buffer_switch_cntr_3",
+ "ee_eq_dsabld_event_err_cntr",
+ "ee_eq_dsabld_lpeq_err_cntr",
+ "ee_eq_dsabld_sws_err_cntr",
+ "ee_eq_rsrvn_uflw_err_cntr",
+ "ee_eq_state_ucor_err_cntr",
+ "ee_eq_status_update_cntr_0",
+ "ee_eq_status_update_cntr_1",
+ "ee_eq_status_update_cntr_2",
+ "ee_eq_status_update_cntr_3",
+ "ee_eq_sw_state_wr_cntr_0",
+ "ee_eq_sw_state_wr_cntr_1",
+ "ee_eq_sw_state_wr_cntr_2",
+ "ee_eq_sw_state_wr_cntr_3",
+ "ee_eqs_arb_out_req_cntr",
+ "ee_eqs_csr_req_cntr",
+ "ee_eqs_csr_stall_cntr",
+ "ee_eqs_event_req_cntr",
+ "ee_eqs_event_stall_cntr",
+ "ee_eqs_expired_cb_req_cntr",
+ "ee_eqs_expired_cb_stall_cntr",
+ "ee_eqs_free_cb_stall_cntr",
+ "ee_eqs_hws_init_req_cntr",
+ "ee_eqs_hws_init_stall_cntr",
+ "ee_eqs_lpe_query_req_cntr",
+ "ee_eqs_sts_updt_req_cntr",
+ "ee_eqs_sts_updt_stall_cntr",
+ "ee_eqs_sws_wr_req_cntr",
+ "ee_eqs_sws_wr_stall_cntr",
+ "ee_event_ack_cntr",
+ "ee_event_atomic_cntr",
+ "ee_event_atomic_overflow_cntr",
+ "ee_event_command_failure_cntr",
+ "ee_event_eq_switch_cntr",
+ "ee_event_error_cntr",
+ "ee_event_ethernet_cntr",
+ "ee_event_ethernet_fgfc_cntr",
+ "ee_event_fetch_atomic_cntr",
+ "ee_event_fetch_atomic_overflow_cntr",
+ "ee_event_get_cntr",
+ "ee_event_get_overflow_cntr",
+ "ee_event_link_cntr",
+ "ee_event_match_cntr",
+ "ee_event_null_event_cntr",
+ "ee_event_pct_cntr",
+ "ee_event_put_cntr",
+ "ee_event_put_overflow_cntr",
+ "ee_event_rendezvous_cntr",
+ "ee_event_reply_cntr",
+ "ee_event_search_cntr",
+ "ee_event_send_cntr",
+ "ee_event_state_change_cntr",
+ "ee_event_timestamp_cntr",
+ "ee_event_triggered_op_cntr",
+ "ee_event_unlink_cntr",
+ "ee_events_dropped_fc_sc_cntr_0",
+ "ee_events_dropped_fc_sc_cntr_1",
+ "ee_events_dropped_fc_sc_cntr_2",
+ "ee_events_dropped_fc_sc_cntr_3",
+ "ee_events_dropped_ordinary_cntr_0",
+ "ee_events_dropped_ordinary_cntr_1",
+ "ee_events_dropped_ordinary_cntr_2",
+ "ee_events_dropped_ordinary_cntr_3",
+ "ee_events_dropped_rsrvn_cntr_0",
+ "ee_events_dropped_rsrvn_cntr_1",
+ "ee_events_dropped_rsrvn_cntr_2",
+ "ee_events_dropped_rsrvn_cntr_3",
+ "ee_events_enqueued_cntr_0",
+ "ee_events_enqueued_cntr_1",
+ "ee_events_enqueued_cntr_2",
+ "ee_events_enqueued_cntr_3",
+ "ee_expired_cbs_written_cntr_0",
+ "ee_expired_cbs_written_cntr_1",
+ "ee_expired_cbs_written_cntr_2",
+ "ee_expired_cbs_written_cntr_3",
+ "ee_fe_arb_out_event_cntr",
+ "ee_fe_arb_out_stall_cntr",
+ "ee_hni_event_req_cntr",
+ "ee_hni_fe_cntr",
+ "ee_hni_fe_stall_cntr",
+ "ee_ixe_ce_cntr",
+ "ee_ixe_ce_stall_cntr",
+ "ee_ixe_dd_cntr",
+ "ee_ixe_event_req_cntr",
+ "ee_ixe_fe_cntr",
+ "ee_ixe_fe_stall_cntr",
+ "ee_lpe_ce_cntr",
+ "ee_lpe_ce_stall_cntr",
+ "ee_lpe_dd_cntr",
+ "ee_lpe_event_req_cntr",
+ "ee_lpe_fe_cntr",
+ "ee_lpe_fe_stall_cntr",
+ "ee_lpe_query_eq_none_cntr",
+ "ee_mem_cor_err_cntr",
+ "ee_mem_ucor_err_cntr",
+ "ee_mst_ce_cntr",
+ "ee_mst_ce_stall_cntr",
+ "ee_mst_dd_cntr",
+ "ee_mst_event_req_cntr",
+ "ee_mst_fe_cntr",
+ "ee_mst_fe_stall_cntr",
+ "ee_partial_cbs_written_cntr_0",
+ "ee_partial_cbs_written_cntr_1",
+ "ee_partial_cbs_written_cntr_2",
+ "ee_partial_cbs_written_cntr_3",
+ "ee_pct_ce_cntr",
+ "ee_pct_ce_stall_cntr",
+ "ee_pct_dd_cntr",
+ "ee_pct_event_req_cntr",
+ "ee_pct_fe_cntr",
+ "ee_pct_fe_stall_cntr",
+ "ee_rarb_hw_err_cntr",
+ "ee_rarb_sw_err_cntr",
+ "ee_sts_ecbs_in_use_ecbs_in_use",
+ "ee_sts_ecbs_in_use_max_ecbs_in_use",
+ "ee_tarb_err_cntr",
+ "ee_tarb_irq_req_cntr",
+ "ee_tarb_stall_cntr",
+ "ee_tarb_wr_req_cntr",
+ "ee_ts_fe_cntr",
+ "ee_ts_fe_stall_cntr",
+ "ee_unxpctd_trnsltn_rsp_err_cntr",
+ "hni_cfg_event_cnts_ovf_cnt",
+ "hni_cor_ecc_err_cntr",
+ "hni_discard_cntr_0",
+ "hni_discard_cntr_1",
+ "hni_discard_cntr_2",
+ "hni_discard_cntr_3",
+ "hni_discard_cntr_4",
+ "hni_discard_cntr_5",
+ "hni_discard_cntr_6",
+ "hni_discard_cntr_7",
+ "hni_fgfc_discard",
+ "hni_fgfc_event_xoff",
+ "hni_fgfc_event_xon",
+ "hni_fgfc_ipv4",
+ "hni_fgfc_ipv6",
+ "hni_fgfc_l2",
+ "hni_fgfc_match",
+ "hni_fgfc_port",
+ "hni_hrp_ack",
+ "hni_hrp_resp",
+ "hni_llr_rx_ack_ctl_os",
+ "hni_llr_rx_ack_nack_error",
+ "hni_llr_rx_ack_nack_seq_err",
+ "hni_llr_rx_bad_ctl_fr",
+ "hni_llr_rx_bad_lossless",
+ "hni_llr_rx_bad_lossy",
+ "hni_llr_rx_duplicate_seq",
+ "hni_llr_rx_expected_seq_bad",
+ "hni_llr_rx_expected_seq_good",
+ "hni_llr_rx_expected_seq_poisoned",
+ "hni_llr_rx_init_ctl_os",
+ "hni_llr_rx_init_echo_ctl_os",
+ "hni_llr_rx_loop_time_req_ctl_fr",
+ "hni_llr_rx_loop_time_rsp_ctl_fr",
+ "hni_llr_rx_nack_ctl_os",
+ "hni_llr_rx_ok_lossless",
+ "hni_llr_rx_ok_lossy",
+ "hni_llr_rx_poisoned_lossless",
+ "hni_llr_rx_poisoned_lossy",
+ "hni_llr_rx_replay_event",
+ "hni_llr_rx_unexpected_seq",
+ "hni_llr_tx_ack_ctl_os",
+ "hni_llr_tx_bad_lossless",
+ "hni_llr_tx_bad_lossless_rpt",
+ "hni_llr_tx_bad_lossy",
+ "hni_llr_tx_discard",
+ "hni_llr_tx_init_ctl_os",
+ "hni_llr_tx_init_echo_ctl_os",
+ "hni_llr_tx_llr_blocked",
+ "hni_llr_tx_llr_unblocked",
+ "hni_llr_tx_loop_time_req_ctl_fr",
+ "hni_llr_tx_loop_time_rsp_ctl_fr",
+ "hni_llr_tx_nack_ctl_os",
+ "hni_llr_tx_ok_bypass",
+ "hni_llr_tx_ok_lossless",
+ "hni_llr_tx_ok_lossless_rpt",
+ "hni_llr_tx_ok_lossy",
+ "hni_llr_tx_poisoned_lossless",
+ "hni_llr_tx_poisoned_lossless_rpt",
+ "hni_llr_tx_poisoned_lossy",
+ "hni_llr_tx_replay_event",
+ "hni_mac_rx_fragment",
+ "hni_mac_rx_illegal_size",
+ "hni_mac_rx_preamble_error",
+ "hni_mac_tx_ifg_adjustment_sync",
+ "hni_multicast_pkts_recv_by_tc_0",
+ "hni_multicast_pkts_recv_by_tc_1",
+ "hni_multicast_pkts_recv_by_tc_2",
+ "hni_multicast_pkts_recv_by_tc_3",
+ "hni_multicast_pkts_recv_by_tc_4",
+ "hni_multicast_pkts_recv_by_tc_5",
+ "hni_multicast_pkts_recv_by_tc_6",
+ "hni_multicast_pkts_recv_by_tc_7",
+ "hni_multicast_pkts_sent_by_tc_0",
+ "hni_multicast_pkts_sent_by_tc_1",
+ "hni_multicast_pkts_sent_by_tc_2",
+ "hni_multicast_pkts_sent_by_tc_3",
+ "hni_multicast_pkts_sent_by_tc_4",
+ "hni_multicast_pkts_sent_by_tc_5",
+ "hni_multicast_pkts_sent_by_tc_6",
+ "hni_multicast_pkts_sent_by_tc_7",
+ "hni_pause_recv_0",
+ "hni_pause_recv_1",
+ "hni_pause_recv_2",
+ "hni_pause_recv_3",
+ "hni_pause_recv_4",
+ "hni_pause_recv_5",
+ "hni_pause_recv_6",
+ "hni_pause_recv_7",
+ "hni_pause_refresh",
+ "hni_pause_sent",
+ "hni_pause_xoff_sent_0",
+ "hni_pause_xoff_sent_1",
+ "hni_pause_xoff_sent_2",
+ "hni_pause_xoff_sent_3",
+ "hni_pause_xoff_sent_4",
+ "hni_pause_xoff_sent_5",
+ "hni_pause_xoff_sent_6",
+ "hni_pause_xoff_sent_7",
+ "hni_pcs_corrected_cw",
+ "hni_pcs_corrected_cw_bin_0",
+ "hni_pcs_corrected_cw_bin_1",
+ "hni_pcs_corrected_cw_bin_2",
+ "hni_pcs_corrected_cw_bin_3",
+ "hni_pcs_corrected_cw_bin_4",
+ "hni_pcs_corrected_cw_bin_5",
+ "hni_pcs_corrected_cw_bin_6",
+ "hni_pcs_corrected_cw_bin_7",
+ "hni_pcs_corrected_cw_bin_8",
+ "hni_pcs_corrected_cw_bin_9",
+ "hni_pcs_corrected_cw_bin_10",
+ "hni_pcs_corrected_cw_bin_11",
+ "hni_pcs_corrected_cw_bin_12",
+ "hni_pcs_corrected_cw_bin_13",
+ "hni_pcs_corrected_cw_bin_14",
+ "hni_pcs_fecl_errors_0",
+ "hni_pcs_fecl_errors_1",
+ "hni_pcs_fecl_errors_2",
+ "hni_pcs_fecl_errors_3",
+ "hni_pcs_fecl_errors_4",
+ "hni_pcs_fecl_errors_5",
+ "hni_pcs_fecl_errors_6",
+ "hni_pcs_fecl_errors_7",
+ "hni_pcs_fecl_errors_8",
+ "hni_pcs_fecl_errors_9",
+ "hni_pcs_fecl_errors_10",
+ "hni_pcs_fecl_errors_11",
+ "hni_pcs_fecl_errors_12",
+ "hni_pcs_fecl_errors_13",
+ "hni_pcs_fecl_errors_14",
+ "hni_pcs_fecl_errors_15",
+ "hni_pcs_good_cw",
+ "hni_pcs_pml_mbe_error_cnt",
+ "hni_pcs_pml_sbe_error_cnt",
+ "hni_pcs_uncorrected_cw",
+ "hni_pfc_fifo_oflw_cntr_0",
+ "hni_pfc_fifo_oflw_cntr_1",
+ "hni_pfc_fifo_oflw_cntr_2",
+ "hni_pfc_fifo_oflw_cntr_3",
+ "hni_pfc_fifo_oflw_cntr_4",
+ "hni_pfc_fifo_oflw_cntr_5",
+ "hni_pfc_fifo_oflw_cntr_6",
+ "hni_pfc_fifo_oflw_cntr_7",
+ "hni_pkts_recv_by_tc_0",
+ "hni_pkts_recv_by_tc_1",
+ "hni_pkts_recv_by_tc_2",
+ "hni_pkts_recv_by_tc_3",
+ "hni_pkts_recv_by_tc_4",
+ "hni_pkts_recv_by_tc_5",
+ "hni_pkts_recv_by_tc_6",
+ "hni_pkts_recv_by_tc_7",
+ "hni_pkts_sent_by_tc_0",
+ "hni_pkts_sent_by_tc_1",
+ "hni_pkts_sent_by_tc_2",
+ "hni_pkts_sent_by_tc_3",
+ "hni_pkts_sent_by_tc_4",
+ "hni_pkts_sent_by_tc_5",
+ "hni_pkts_sent_by_tc_6",
+ "hni_pkts_sent_by_tc_7",
+ "hni_rx_bad_ieee",
+ "hni_rx_bad_opt",
+ "hni_rx_fragment",
+ "hni_rx_jabber",
+ "hni_rx_ok_27",
+ "hni_rx_ok_35",
+ "hni_rx_ok_36_to_63",
+ "hni_rx_ok_64",
+ "hni_rx_ok_65_to_127",
+ "hni_rx_ok_128_to_255",
+ "hni_rx_ok_256_to_511",
+ "hni_rx_ok_512_to_1023",
+ "hni_rx_ok_1024_to_2047",
+ "hni_rx_ok_2048_to_4095",
+ "hni_rx_ok_4096_to_8191",
+ "hni_rx_ok_8192_to_max",
+ "hni_rx_ok_bad_op_code",
+ "hni_rx_ok_broadcast",
+ "hni_rx_ok_flow_control",
+ "hni_rx_ok_ieee",
+ "hni_rx_ok_len_type_error",
+ "hni_rx_ok_mac_control",
+ "hni_rx_ok_multicast",
+ "hni_rx_ok_opt",
+ "hni_rx_ok_tagged",
+ "hni_rx_ok_too_long",
+ "hni_rx_ok_undersize",
+ "hni_rx_paused_0",
+ "hni_rx_paused_1",
+ "hni_rx_paused_2",
+ "hni_rx_paused_3",
+ "hni_rx_paused_4",
+ "hni_rx_paused_5",
+ "hni_rx_paused_6",
+ "hni_rx_paused_7",
+ "hni_rx_paused_std",
+ "hni_rx_stall_ixe_fifo",
+ "hni_rx_stall_ixe_pktbuf_0",
+ "hni_rx_stall_ixe_pktbuf_1",
+ "hni_rx_stall_ixe_pktbuf_2",
+ "hni_rx_stall_ixe_pktbuf_3",
+ "hni_rx_stall_ixe_pktbuf_4",
+ "hni_rx_stall_ixe_pktbuf_5",
+ "hni_rx_stall_ixe_pktbuf_6",
+ "hni_rx_stall_ixe_pktbuf_7",
+ "hni_sts_rx_bad_octets",
+ "hni_sts_rx_octets_bcast",
+ "hni_sts_rx_octets_ieee",
+ "hni_sts_rx_octets_multi",
+ "hni_sts_rx_octets_opt",
+ "hni_sts_rx_ok_octets",
+ "hni_sts_tx_bad_octets",
+ "hni_sts_tx_octets_bcast",
+ "hni_sts_tx_octets_ieee",
+ "hni_sts_tx_octets_multi",
+ "hni_sts_tx_octets_opt",
+ "hni_sts_tx_ok_octets",
+ "hni_tx_ok_27",
+ "hni_tx_ok_35",
+ "hni_tx_ok_36_to_63",
+ "hni_tx_ok_64",
+ "hni_tx_ok_65_to_127",
+ "hni_tx_ok_128_to_255",
+ "hni_tx_ok_256_to_511",
+ "hni_tx_ok_512_to_1023",
+ "hni_tx_ok_1024_to_2047",
+ "hni_tx_ok_2048_to_4095",
+ "hni_tx_ok_4096_to_8191",
+ "hni_tx_ok_8192_to_max",
+ "hni_tx_ok_broadcast",
+ "hni_tx_ok_ieee",
+ "hni_tx_ok_multicast",
+ "hni_tx_ok_opt",
+ "hni_tx_ok_tagged",
+ "hni_tx_opt_padded",
+ "hni_tx_opt_size_err",
+ "hni_tx_paused_0",
+ "hni_tx_paused_1",
+ "hni_tx_paused_2",
+ "hni_tx_paused_3",
+ "hni_tx_paused_4",
+ "hni_tx_paused_5",
+ "hni_tx_paused_6",
+ "hni_tx_paused_7",
+ "hni_tx_poisoned_ieee",
+ "hni_tx_poisoned_opt",
+ "hni_tx_stall_llr",
+ "hni_tx_std_padded",
+ "hni_tx_std_size_err",
+ "hni_ucor_ecc_err_cntr",
+ "ixe_disp_amo_conflicts",
+ "ixe_disp_amo_events",
+ "ixe_disp_atu_flush_reqs",
+ "ixe_disp_atu_reqs",
+ "ixe_disp_atu_resps",
+ "ixe_disp_atu_resps_ok",
+ "ixe_disp_dmawr_reqs",
+ "ixe_disp_dmawr_resps",
+ "ixe_disp_dmawr_resps_ok",
+ "ixe_disp_eth_events",
+ "ixe_disp_lpe_amos",
+ "ixe_disp_lpe_amos_ok",
+ "ixe_disp_lpe_gets",
+ "ixe_disp_lpe_gets_ok",
+ "ixe_disp_lpe_puts",
+ "ixe_disp_lpe_puts_ok",
+ "ixe_disp_mst_gets",
+ "ixe_disp_mst_gets_ok",
+ "ixe_disp_mst_puts",
+ "ixe_disp_mst_puts_ok",
+ "ixe_disp_oxe_resps",
+ "ixe_disp_pct_getcomp",
+ "ixe_disp_put_events",
+ "ixe_disp_rpu_err_reqs",
+ "ixe_disp_rpu_resps",
+ "ixe_disp_stall_atu_cdt",
+ "ixe_disp_stall_atu_fifo",
+ "ixe_disp_stall_conflict",
+ "ixe_disp_stall_err_fifo",
+ "ixe_disp_stall_gcomp_fifo",
+ "ixe_disp_stall_grr_id",
+ "ixe_disp_stall_mdid_cdts",
+ "ixe_disp_stall_mst_match_fifo",
+ "ixe_disp_stall_put_resp",
+ "ixe_disp_stall_resp_fifo",
+ "ixe_disp_wr_conflicts",
+ "ixe_dmawr_amo_ex_inexact",
+ "ixe_dmawr_amo_ex_invalid",
+ "ixe_dmawr_amo_ex_overflow",
+ "ixe_dmawr_amo_ex_underflow",
+ "ixe_dmawr_amo_invalid_op",
+ "ixe_dmawr_amo_len_err",
+ "ixe_dmawr_amo_misaligned",
+ "ixe_dmawr_cpu_amo_reqs",
+ "ixe_dmawr_cpu_ftch_amo_reqs",
+ "ixe_dmawr_flush_reqs",
+ "ixe_dmawr_nic_amo_reqs",
+ "ixe_dmawr_p_pass_np_cnt",
+ "ixe_dmawr_pcie_err_poisoned",
+ "ixe_dmawr_pcie_unsuccess_cmpl",
+ "ixe_dmawr_req_no_write_reqs",
+ "ixe_dmawr_stall_ftch_amo_cnt",
+ "ixe_dmawr_stall_np_cdt",
+ "ixe_dmawr_stall_np_req_cnt",
+ "ixe_dmawr_stall_p_cdt",
+ "ixe_dmawr_write_reqs",
+ "ixe_get_len_errors",
+ "ixe_hdr_checksum_errors",
+ "ixe_hdr_ecc_errors",
+ "ixe_hrp_req_errors",
+ "ixe_ip_options_errors",
+ "ixe_ipv4_checksum_errors",
+ "ixe_mem_cor_err_cntr",
+ "ixe_mem_ucor_err_cntr",
+ "ixe_parser_par_errors",
+ "ixe_pbuf_rd_errors",
+ "ixe_pool_ecn_pkts_0",
+ "ixe_pool_ecn_pkts_1",
+ "ixe_pool_ecn_pkts_2",
+ "ixe_pool_ecn_pkts_3",
+ "ixe_pool_no_ecn_pkts_0",
+ "ixe_pool_no_ecn_pkts_1",
+ "ixe_pool_no_ecn_pkts_2",
+ "ixe_pool_no_ecn_pkts_3",
+ "ixe_port_dfa_mismatch",
+ "ixe_roce_icrc_error",
+ "ixe_rx_eth_seg",
+ "ixe_rx_ipv4_pkt",
+ "ixe_rx_ipv6_pkt",
+ "ixe_rx_pkt_drop_ixe_parser",
+ "ixe_rx_pkt_drop_pct",
+ "ixe_rx_pkt_drop_rmu_norsp",
+ "ixe_rx_pkt_drop_rmu_wrsp",
+ "ixe_rx_pkt_ipv4_options",
+ "ixe_rx_pkt_ipv6_options",
+ "ixe_rx_ptl_connmgmt_pkt",
+ "ixe_rx_ptl_continuation_pkt",
+ "ixe_rx_ptl_gen_pkt",
+ "ixe_rx_ptl_mr_msgs",
+ "ixe_rx_ptl_msgs",
+ "ixe_rx_ptl_multi_msgs",
+ "ixe_rx_ptl_response_pkt",
+ "ixe_rx_ptl_restricted_pkt",
+ "ixe_rx_ptl_smallmsg_pkt",
+ "ixe_rx_ptl_sml_amo_pkt",
+ "ixe_rx_ptl_sml_pkt",
+ "ixe_rx_ptl_unrestricted_pkt",
+ "ixe_rx_roce_pkt",
+ "ixe_rx_roce_seg",
+ "ixe_rx_roce_spseg",
+ "ixe_rx_tcp_pkt",
+ "ixe_rx_udp_pkt",
+ "ixe_rx_unrecognized_pkt",
+ "ixe_tc_req_ecn_pkts_0",
+ "ixe_tc_req_ecn_pkts_1",
+ "ixe_tc_req_ecn_pkts_2",
+ "ixe_tc_req_ecn_pkts_3",
+ "ixe_tc_req_ecn_pkts_4",
+ "ixe_tc_req_ecn_pkts_5",
+ "ixe_tc_req_ecn_pkts_6",
+ "ixe_tc_req_ecn_pkts_7",
+ "ixe_tc_req_no_ecn_pkts_0",
+ "ixe_tc_req_no_ecn_pkts_1",
+ "ixe_tc_req_no_ecn_pkts_2",
+ "ixe_tc_req_no_ecn_pkts_3",
+ "ixe_tc_req_no_ecn_pkts_4",
+ "ixe_tc_req_no_ecn_pkts_5",
+ "ixe_tc_req_no_ecn_pkts_6",
+ "ixe_tc_req_no_ecn_pkts_7",
+ "ixe_tc_rsp_ecn_pkts_0",
+ "ixe_tc_rsp_ecn_pkts_1",
+ "ixe_tc_rsp_ecn_pkts_2",
+ "ixe_tc_rsp_ecn_pkts_3",
+ "ixe_tc_rsp_ecn_pkts_4",
+ "ixe_tc_rsp_ecn_pkts_5",
+ "ixe_tc_rsp_ecn_pkts_6",
+ "ixe_tc_rsp_ecn_pkts_7",
+ "ixe_tc_rsp_no_ecn_pkts_0",
+ "ixe_tc_rsp_no_ecn_pkts_1",
+ "ixe_tc_rsp_no_ecn_pkts_2",
+ "ixe_tc_rsp_no_ecn_pkts_3",
+ "ixe_tc_rsp_no_ecn_pkts_4",
+ "ixe_tc_rsp_no_ecn_pkts_5",
+ "ixe_tc_rsp_no_ecn_pkts_6",
+ "ixe_tc_rsp_no_ecn_pkts_7",
+ "lpe_amo_cmds",
+ "lpe_append_cmds_0",
+ "lpe_append_cmds_1",
+ "lpe_append_cmds_2",
+ "lpe_append_cmds_3",
+ "lpe_append_success_0",
+ "lpe_append_success_1",
+ "lpe_append_success_2",
+ "lpe_append_success_3",
+ "lpe_cfg_event_cnts_ovf_cnt",
+ "lpe_cfg_pe_le_shared_num_shared_0",
+ "lpe_cfg_pe_le_shared_num_shared_1",
+ "lpe_cfg_pe_le_shared_num_shared_2",
+ "lpe_cfg_pe_le_shared_num_shared_3",
+ "lpe_cfg_pe_le_shared_num_shared_allocated_0",
+ "lpe_cfg_pe_le_shared_num_shared_allocated_1",
+ "lpe_cfg_pe_le_shared_num_shared_allocated_2",
+ "lpe_cfg_pe_le_shared_num_shared_allocated_3",
+ "lpe_cfg_pe_le_shared_num_total_0",
+ "lpe_cfg_pe_le_shared_num_total_1",
+ "lpe_cfg_pe_le_shared_num_total_2",
+ "lpe_cfg_pe_le_shared_num_total_3",
+ "lpe_cfg_pe_le_shared_num_total_allocated_0",
+ "lpe_cfg_pe_le_shared_num_total_allocated_1",
+ "lpe_cfg_pe_le_shared_num_total_allocated_2",
+ "lpe_cfg_pe_le_shared_num_total_allocated_3",
+ "lpe_cyc_blocked_ixe_get",
+ "lpe_cyc_blocked_ixe_put",
+ "lpe_cyc_blocked_lossless",
+ "lpe_cyc_no_rdy_cdts",
+ "lpe_cyc_rrq_blocked_0",
+ "lpe_cyc_rrq_blocked_1",
+ "lpe_cyc_rrq_blocked_2",
+ "lpe_cyc_rrq_blocked_3",
+ "lpe_err_entry_not_found_cant_alloc_unexpected",
+ "lpe_err_entry_not_found_eq_full",
+ "lpe_err_entry_not_found_ethernet",
+ "lpe_err_entry_not_found_no_match_in_overflow",
+ "lpe_err_entry_not_found_req_empty",
+ "lpe_err_entry_not_found_unlink_failed",
+ "lpe_err_eq_disabled",
+ "lpe_err_illegal_op",
+ "lpe_err_invalid_endpoint",
+ "lpe_err_no_space_append",
+ "lpe_err_no_space_net",
+ "lpe_err_op_violation",
+ "lpe_err_pt_disabled_cant_alloc_unexpected",
+ "lpe_err_pt_disabled_eq_full",
+ "lpe_err_pt_disabled_no_match_in_overflow",
+ "lpe_err_pt_disabled_req_empty",
+ "lpe_err_ptlte_sw_managed",
+ "lpe_err_restricted_unicast",
+ "lpe_err_search_no_match",
+ "lpe_err_setstate_no_match",
+ "lpe_err_src_error",
+ "lpe_event_atomic_overflow",
+ "lpe_event_fetch_atomic_overflow",
+ "lpe_event_get_overflow",
+ "lpe_event_link",
+ "lpe_event_put_overflow",
+ "lpe_event_rendezvous",
+ "lpe_event_search",
+ "lpe_event_statechange",
+ "lpe_event_unlink",
+ "lpe_fail_cntr",
+ "lpe_famo_cmds",
+ "lpe_get_cmds",
+ "lpe_mem_cor_err_cntr",
+ "lpe_mem_ucor_err_cntr",
+ "lpe_net_match_local_0",
+ "lpe_net_match_local_1",
+ "lpe_net_match_local_2",
+ "lpe_net_match_local_3",
+ "lpe_net_match_overflow_0",
+ "lpe_net_match_overflow_1",
+ "lpe_net_match_overflow_2",
+ "lpe_net_match_overflow_3",
+ "lpe_net_match_priority_0",
+ "lpe_net_match_priority_1",
+ "lpe_net_match_priority_2",
+ "lpe_net_match_priority_3",
+ "lpe_net_match_request_0",
+ "lpe_net_match_request_1",
+ "lpe_net_match_request_2",
+ "lpe_net_match_request_3",
+ "lpe_net_match_requests_0",
+ "lpe_net_match_requests_1",
+ "lpe_net_match_requests_2",
+ "lpe_net_match_requests_3",
+ "lpe_net_match_success_0",
+ "lpe_net_match_success_1",
+ "lpe_net_match_success_2",
+ "lpe_net_match_success_3",
+ "lpe_net_match_useonce_0",
+ "lpe_net_match_useonce_1",
+ "lpe_net_match_useonce_2",
+ "lpe_net_match_useonce_3",
+ "lpe_num_truncated_0",
+ "lpe_num_truncated_1",
+ "lpe_num_truncated_2",
+ "lpe_num_truncated_3",
+ "lpe_plec_allocs",
+ "lpe_plec_frees",
+ "lpe_plec_frees_csr",
+ "lpe_plec_hits",
+ "lpe_put_cmds",
+ "lpe_rendezvous_put_cmds",
+ "lpe_rndzv_puts_0",
+ "lpe_rndzv_puts_1",
+ "lpe_rndzv_puts_2",
+ "lpe_rndzv_puts_3",
+ "lpe_rndzv_puts_offloaded_0",
+ "lpe_rndzv_puts_offloaded_1",
+ "lpe_rndzv_puts_offloaded_2",
+ "lpe_rndzv_puts_offloaded_3",
+ "lpe_search_cmds",
+ "lpe_search_delete_cmds",
+ "lpe_search_delete_fail",
+ "lpe_search_delete_success",
+ "lpe_search_fail",
+ "lpe_search_nid_any_0",
+ "lpe_search_nid_any_1",
+ "lpe_search_nid_any_2",
+ "lpe_search_nid_any_3",
+ "lpe_search_pid_any_0",
+ "lpe_search_pid_any_1",
+ "lpe_search_pid_any_2",
+ "lpe_search_pid_any_3",
+ "lpe_search_rank_any_0",
+ "lpe_search_rank_any_1",
+ "lpe_search_rank_any_2",
+ "lpe_search_rank_any_3",
+ "lpe_search_success",
+ "lpe_setstate_cmds_0",
+ "lpe_setstate_cmds_1",
+ "lpe_setstate_cmds_2",
+ "lpe_setstate_cmds_3",
+ "lpe_setstate_success_0",
+ "lpe_setstate_success_1",
+ "lpe_setstate_success_2",
+ "lpe_setstate_success_3",
+ "lpe_sts_app_match_attempts_0",
+ "lpe_sts_app_match_attempts_1",
+ "lpe_sts_app_match_attempts_2",
+ "lpe_sts_app_match_attempts_3",
+ "lpe_sts_app_max_attempts_max_0",
+ "lpe_sts_app_max_attempts_max_1",
+ "lpe_sts_app_max_attempts_max_2",
+ "lpe_sts_app_max_attempts_max_3",
+ "lpe_sts_app_max_attempts_num_pbuf_entries_0",
+ "lpe_sts_app_max_attempts_num_pbuf_entries_1",
+ "lpe_sts_app_max_attempts_num_pbuf_entries_2",
+ "lpe_sts_app_max_attempts_num_pbuf_entries_3",
+ "lpe_sts_load_stats_load_0",
+ "lpe_sts_load_stats_load_1",
+ "lpe_sts_load_stats_load_2",
+ "lpe_sts_load_stats_load_3",
+ "lpe_sts_load_stats_max_0",
+ "lpe_sts_load_stats_max_1",
+ "lpe_sts_load_stats_max_2",
+ "lpe_sts_load_stats_max_3",
+ "lpe_sts_load_stats_ptlte_load_0",
+ "lpe_sts_load_stats_ptlte_load_1",
+ "lpe_sts_load_stats_ptlte_load_2",
+ "lpe_sts_load_stats_ptlte_load_3",
+ "lpe_sts_load_stats_ptlte_max_0",
+ "lpe_sts_load_stats_ptlte_max_1",
+ "lpe_sts_load_stats_ptlte_max_2",
+ "lpe_sts_load_stats_ptlte_max_3",
+ "lpe_sts_net_match_attempts_0",
+ "lpe_sts_net_match_attempts_1",
+ "lpe_sts_net_match_attempts_2",
+ "lpe_sts_net_match_attempts_3",
+ "lpe_sts_net_max_attempts_max_0",
+ "lpe_sts_net_max_attempts_max_1",
+ "lpe_sts_net_max_attempts_max_2",
+ "lpe_sts_net_max_attempts_max_3",
+ "lpe_sts_net_max_attempts_num_pbuf_entries_0",
+ "lpe_sts_net_max_attempts_num_pbuf_entries_1",
+ "lpe_sts_net_max_attempts_num_pbuf_entries_2",
+ "lpe_sts_net_max_attempts_num_pbuf_entries_3",
+ "lpe_sts_pe_le_alloc_num_allocated_0",
+ "lpe_sts_pe_le_alloc_num_allocated_1",
+ "lpe_sts_pe_le_alloc_num_allocated_2",
+ "lpe_sts_pe_le_alloc_num_allocated_3",
+ "lpe_sts_pe_le_alloc_num_allocated_4",
+ "lpe_sts_pe_le_alloc_num_allocated_5",
+ "lpe_sts_pe_le_alloc_num_allocated_6",
+ "lpe_sts_pe_le_alloc_num_allocated_7",
+ "lpe_sts_pe_le_alloc_num_allocated_8",
+ "lpe_sts_pe_le_alloc_num_allocated_9",
+ "lpe_sts_pe_le_alloc_num_allocated_10",
+ "lpe_sts_pe_le_alloc_num_allocated_11",
+ "lpe_sts_pe_le_alloc_num_allocated_12",
+ "lpe_sts_pe_le_alloc_num_allocated_13",
+ "lpe_sts_pe_le_alloc_num_allocated_14",
+ "lpe_sts_pe_le_alloc_num_allocated_15",
+ "lpe_sts_pe_le_alloc_num_allocated_16",
+ "lpe_sts_pe_le_alloc_num_allocated_17",
+ "lpe_sts_pe_le_alloc_num_allocated_18",
+ "lpe_sts_pe_le_alloc_num_allocated_19",
+ "lpe_sts_pe_le_alloc_num_allocated_20",
+ "lpe_sts_pe_le_alloc_num_allocated_21",
+ "lpe_sts_pe_le_alloc_num_allocated_22",
+ "lpe_sts_pe_le_alloc_num_allocated_23",
+ "lpe_sts_pe_le_alloc_num_allocated_24",
+ "lpe_sts_pe_le_alloc_num_allocated_25",
+ "lpe_sts_pe_le_alloc_num_allocated_26",
+ "lpe_sts_pe_le_alloc_num_allocated_27",
+ "lpe_sts_pe_le_alloc_num_allocated_28",
+ "lpe_sts_pe_le_alloc_num_allocated_29",
+ "lpe_sts_pe_le_alloc_num_allocated_30",
+ "lpe_sts_pe_le_alloc_num_allocated_31",
+ "lpe_sts_pe_le_alloc_num_allocated_32",
+ "lpe_sts_pe_le_alloc_num_allocated_33",
+ "lpe_sts_pe_le_alloc_num_allocated_34",
+ "lpe_sts_pe_le_alloc_num_allocated_35",
+ "lpe_sts_pe_le_alloc_num_allocated_36",
+ "lpe_sts_pe_le_alloc_num_allocated_37",
+ "lpe_sts_pe_le_alloc_num_allocated_38",
+ "lpe_sts_pe_le_alloc_num_allocated_39",
+ "lpe_sts_pe_le_alloc_num_allocated_40",
+ "lpe_sts_pe_le_alloc_num_allocated_41",
+ "lpe_sts_pe_le_alloc_num_allocated_42",
+ "lpe_sts_pe_le_alloc_num_allocated_43",
+ "lpe_sts_pe_le_alloc_num_allocated_44",
+ "lpe_sts_pe_le_alloc_num_allocated_45",
+ "lpe_sts_pe_le_alloc_num_allocated_46",
+ "lpe_sts_pe_le_alloc_num_allocated_47",
+ "lpe_sts_pe_le_alloc_num_allocated_48",
+ "lpe_sts_pe_le_alloc_num_allocated_49",
+ "lpe_sts_pe_le_alloc_num_allocated_50",
+ "lpe_sts_pe_le_alloc_num_allocated_51",
+ "lpe_sts_pe_le_alloc_num_allocated_52",
+ "lpe_sts_pe_le_alloc_num_allocated_53",
+ "lpe_sts_pe_le_alloc_num_allocated_54",
+ "lpe_sts_pe_le_alloc_num_allocated_55",
+ "lpe_sts_pe_le_alloc_num_allocated_56",
+ "lpe_sts_pe_le_alloc_num_allocated_57",
+ "lpe_sts_pe_le_alloc_num_allocated_58",
+ "lpe_sts_pe_le_alloc_num_allocated_59",
+ "lpe_sts_pe_le_alloc_num_allocated_60",
+ "lpe_sts_pe_le_alloc_num_allocated_61",
+ "lpe_sts_pe_le_alloc_num_allocated_62",
+ "lpe_sts_pe_le_alloc_num_allocated_63",
+ "lpe_success_cntr",
+ "lpe_unexpected_get_amo_0",
+ "lpe_unexpected_get_amo_1",
+ "lpe_unexpected_get_amo_2",
+ "lpe_unexpected_get_amo_3",
+ "lpe_unlink_cmds",
+ "lpe_unlink_success",
+ "mb_cfg_event_cnts_ovf_cnt",
+ "mb_cmc_axi_rd_requests_0",
+ "mb_cmc_axi_rd_requests_1",
+ "mb_cmc_axi_rd_requests_2",
+ "mb_cmc_axi_rd_requests_3",
+ "mb_cmc_axi_wr_requests_0",
+ "mb_cmc_axi_wr_requests_1",
+ "mb_cmc_axi_wr_requests_2",
+ "mb_cmc_axi_wr_requests_3",
+ "mb_cq_lsa0_trigger_events_0",
+ "mb_cq_lsa0_trigger_events_1",
+ "mb_cq_lsa1_trigger_events_0",
+ "mb_cq_lsa1_trigger_events_1",
+ "mb_crmc_axi_rd_requests_0",
+ "mb_crmc_axi_rd_requests_1",
+ "mb_crmc_axi_rd_requests_2",
+ "mb_crmc_axi_wr_requests_0",
+ "mb_crmc_axi_wr_requests_1",
+ "mb_crmc_axi_wr_requests_2",
+ "mb_crmc_rd_error_0",
+ "mb_crmc_rd_error_1",
+ "mb_crmc_rd_error_2",
+ "mb_crmc_ring_mbe_0",
+ "mb_crmc_ring_mbe_1",
+ "mb_crmc_ring_mbe_2",
+ "mb_crmc_ring_rd_requests_0",
+ "mb_crmc_ring_rd_requests_1",
+ "mb_crmc_ring_rd_requests_2",
+ "mb_crmc_ring_sbe_0",
+ "mb_crmc_ring_sbe_1",
+ "mb_crmc_ring_sbe_2",
+ "mb_crmc_ring_wr_requests_0",
+ "mb_crmc_ring_wr_requests_1",
+ "mb_crmc_ring_wr_requests_2",
+ "mb_crmc_wr_error_0",
+ "mb_crmc_wr_error_1",
+ "mb_crmc_wr_error_2",
+ "mb_ee_lsa0_trigger_events_0",
+ "mb_ee_lsa0_trigger_events_1",
+ "mb_ee_lsa1_trigger_events_0",
+ "mb_ee_lsa1_trigger_events_1",
+ "mb_ixe_lsa0_trigger_events_0",
+ "mb_ixe_lsa0_trigger_events_1",
+ "mb_ixe_lsa1_trigger_events_0",
+ "mb_ixe_lsa1_trigger_events_1",
+ "mb_jai_axi_rd_requests",
+ "mb_jai_axi_wr_requests",
+ "mb_mb_lsa0_trigger_events_0",
+ "mb_mb_lsa0_trigger_events_1",
+ "mb_mb_lsa1_trigger_events_0",
+ "mb_mb_lsa1_trigger_events_1",
+ "mst_allocations",
+ "mst_err_cancelled",
+ "mst_mem_cor_err_cntr",
+ "mst_mem_ucor_err_cntr",
+ "mst_requests",
+ "mst_stalled_waiting_ee_crdts",
+ "mst_stalled_waiting_for_lpe",
+ "mst_stalled_waiting_get_crdts",
+ "mst_stalled_waiting_put_crdts",
+ "mst_sts_num_req",
+ "oxe_channel_idle",
+ "oxe_err_invalid_ac",
+ "oxe_err_no_translation",
+ "oxe_err_page_perm",
+ "oxe_err_page_req",
+ "oxe_err_pci_cmpl",
+ "oxe_err_pci_ep",
+ "oxe_err_ta_error",
+ "oxe_ignore_errs",
+ "oxe_ioi_dma",
+ "oxe_ioi_pkts_ordered",
+ "oxe_ioi_pkts_unordered",
+ "oxe_mcu_meas_0",
+ "oxe_mcu_meas_1",
+ "oxe_mcu_meas_2",
+ "oxe_mcu_meas_3",
+ "oxe_mcu_meas_4",
+ "oxe_mcu_meas_5",
+ "oxe_mcu_meas_6",
+ "oxe_mcu_meas_7",
+ "oxe_mcu_meas_8",
+ "oxe_mcu_meas_9",
+ "oxe_mcu_meas_10",
+ "oxe_mcu_meas_11",
+ "oxe_mcu_meas_12",
+ "oxe_mcu_meas_13",
+ "oxe_mcu_meas_14",
+ "oxe_mcu_meas_15",
+ "oxe_mcu_meas_16",
+ "oxe_mcu_meas_17",
+ "oxe_mcu_meas_18",
+ "oxe_mcu_meas_19",
+ "oxe_mcu_meas_20",
+ "oxe_mcu_meas_21",
+ "oxe_mcu_meas_22",
+ "oxe_mcu_meas_23",
+ "oxe_mcu_meas_24",
+ "oxe_mcu_meas_25",
+ "oxe_mcu_meas_26",
+ "oxe_mcu_meas_27",
+ "oxe_mcu_meas_28",
+ "oxe_mcu_meas_29",
+ "oxe_mcu_meas_30",
+ "oxe_mcu_meas_31",
+ "oxe_mcu_meas_32",
+ "oxe_mcu_meas_33",
+ "oxe_mcu_meas_34",
+ "oxe_mcu_meas_35",
+ "oxe_mcu_meas_36",
+ "oxe_mcu_meas_37",
+ "oxe_mcu_meas_38",
+ "oxe_mcu_meas_39",
+ "oxe_mcu_meas_40",
+ "oxe_mcu_meas_41",
+ "oxe_mcu_meas_42",
+ "oxe_mcu_meas_43",
+ "oxe_mcu_meas_44",
+ "oxe_mcu_meas_45",
+ "oxe_mcu_meas_46",
+ "oxe_mcu_meas_47",
+ "oxe_mcu_meas_48",
+ "oxe_mcu_meas_49",
+ "oxe_mcu_meas_50",
+ "oxe_mcu_meas_51",
+ "oxe_mcu_meas_52",
+ "oxe_mcu_meas_53",
+ "oxe_mcu_meas_54",
+ "oxe_mcu_meas_55",
+ "oxe_mcu_meas_56",
+ "oxe_mcu_meas_57",
+ "oxe_mcu_meas_58",
+ "oxe_mcu_meas_59",
+ "oxe_mcu_meas_60",
+ "oxe_mcu_meas_61",
+ "oxe_mcu_meas_62",
+ "oxe_mcu_meas_63",
+ "oxe_mcu_meas_64",
+ "oxe_mcu_meas_65",
+ "oxe_mcu_meas_66",
+ "oxe_mcu_meas_67",
+ "oxe_mcu_meas_68",
+ "oxe_mcu_meas_69",
+ "oxe_mcu_meas_70",
+ "oxe_mcu_meas_71",
+ "oxe_mcu_meas_72",
+ "oxe_mcu_meas_73",
+ "oxe_mcu_meas_74",
+ "oxe_mcu_meas_75",
+ "oxe_mcu_meas_76",
+ "oxe_mcu_meas_77",
+ "oxe_mcu_meas_78",
+ "oxe_mcu_meas_79",
+ "oxe_mcu_meas_80",
+ "oxe_mcu_meas_81",
+ "oxe_mcu_meas_82",
+ "oxe_mcu_meas_83",
+ "oxe_mcu_meas_84",
+ "oxe_mcu_meas_85",
+ "oxe_mcu_meas_86",
+ "oxe_mcu_meas_87",
+ "oxe_mcu_meas_88",
+ "oxe_mcu_meas_89",
+ "oxe_mcu_meas_90",
+ "oxe_mcu_meas_91",
+ "oxe_mcu_meas_92",
+ "oxe_mcu_meas_93",
+ "oxe_mcu_meas_94",
+ "oxe_mcu_meas_95",
+ "oxe_mem_cor_err_cntr",
+ "oxe_mem_ucor_err_cntr",
+ "oxe_num_hrp_cmds",
+ "oxe_prf_set0_occ_hist_bin0",
+ "oxe_prf_set0_occ_hist_bin1",
+ "oxe_prf_set0_occ_hist_bin2",
+ "oxe_prf_set0_occ_hist_bin3",
+ "oxe_prf_set0_pktbuf_na",
+ "oxe_prf_set0_smt_na",
+ "oxe_prf_set0_spt_na",
+ "oxe_prf_set0_srb_na",
+ "oxe_prf_set0_st_dma_mdr",
+ "oxe_prf_set0_st_dma_upd",
+ "oxe_prf_set0_st_header",
+ "oxe_prf_set0_st_pct_idx_wait",
+ "oxe_prf_set0_st_pktbuf_gnt",
+ "oxe_prf_set0_st_pktbuf_req",
+ "oxe_prf_set0_st_ready",
+ "oxe_prf_set0_ts_select",
+ "oxe_prf_set1_occ_hist_bin0",
+ "oxe_prf_set1_occ_hist_bin1",
+ "oxe_prf_set1_occ_hist_bin2",
+ "oxe_prf_set1_occ_hist_bin3",
+ "oxe_prf_set1_pktbuf_na",
+ "oxe_prf_set1_smt_na",
+ "oxe_prf_set1_spt_na",
+ "oxe_prf_set1_srb_na",
+ "oxe_prf_set1_st_dma_mdr",
+ "oxe_prf_set1_st_dma_upd",
+ "oxe_prf_set1_st_header",
+ "oxe_prf_set1_st_pct_idx_wait",
+ "oxe_prf_set1_st_pktbuf_gnt",
+ "oxe_prf_set1_st_pktbuf_req",
+ "oxe_prf_set1_st_ready",
+ "oxe_prf_set1_ts_select",
+ "oxe_ptl_tx_get_msgs_tsc_0",
+ "oxe_ptl_tx_get_msgs_tsc_1",
+ "oxe_ptl_tx_get_msgs_tsc_2",
+ "oxe_ptl_tx_get_msgs_tsc_3",
+ "oxe_ptl_tx_get_msgs_tsc_4",
+ "oxe_ptl_tx_get_msgs_tsc_5",
+ "oxe_ptl_tx_get_msgs_tsc_6",
+ "oxe_ptl_tx_get_msgs_tsc_7",
+ "oxe_ptl_tx_get_msgs_tsc_8",
+ "oxe_ptl_tx_get_msgs_tsc_9",
+ "oxe_ptl_tx_mr_msgs",
+ "oxe_ptl_tx_put_msgs_tsc_0",
+ "oxe_ptl_tx_put_msgs_tsc_1",
+ "oxe_ptl_tx_put_msgs_tsc_2",
+ "oxe_ptl_tx_put_msgs_tsc_3",
+ "oxe_ptl_tx_put_msgs_tsc_4",
+ "oxe_ptl_tx_put_msgs_tsc_5",
+ "oxe_ptl_tx_put_msgs_tsc_6",
+ "oxe_ptl_tx_put_msgs_tsc_7",
+ "oxe_ptl_tx_put_msgs_tsc_8",
+ "oxe_ptl_tx_put_msgs_tsc_9",
+ "oxe_ptl_tx_put_pkts_tsc_0",
+ "oxe_ptl_tx_put_pkts_tsc_1",
+ "oxe_ptl_tx_put_pkts_tsc_2",
+ "oxe_ptl_tx_put_pkts_tsc_3",
+ "oxe_ptl_tx_put_pkts_tsc_4",
+ "oxe_ptl_tx_put_pkts_tsc_5",
+ "oxe_ptl_tx_put_pkts_tsc_6",
+ "oxe_ptl_tx_put_pkts_tsc_7",
+ "oxe_ptl_tx_put_pkts_tsc_8",
+ "oxe_ptl_tx_put_pkts_tsc_9",
+ "oxe_smt_cdt_errs",
+ "oxe_spt_cdt_errs",
+ "oxe_stall_fgfc_blk_0",
+ "oxe_stall_fgfc_blk_1",
+ "oxe_stall_fgfc_blk_2",
+ "oxe_stall_fgfc_blk_3",
+ "oxe_stall_fgfc_cntrl_0",
+ "oxe_stall_fgfc_cntrl_1",
+ "oxe_stall_fgfc_cntrl_2",
+ "oxe_stall_fgfc_cntrl_3",
+ "oxe_stall_fgfc_end_0",
+ "oxe_stall_fgfc_end_1",
+ "oxe_stall_fgfc_end_2",
+ "oxe_stall_fgfc_end_3",
+ "oxe_stall_fgfc_start_0",
+ "oxe_stall_fgfc_start_1",
+ "oxe_stall_fgfc_start_2",
+ "oxe_stall_fgfc_start_3",
+ "oxe_stall_hdr_arb",
+ "oxe_stall_idc_cmd_no_deq",
+ "oxe_stall_idc_no_buff_bc_0",
+ "oxe_stall_idc_no_buff_bc_1",
+ "oxe_stall_idc_no_buff_bc_2",
+ "oxe_stall_idc_no_buff_bc_3",
+ "oxe_stall_idc_no_buff_bc_4",
+ "oxe_stall_idc_no_buff_bc_5",
+ "oxe_stall_idc_no_buff_bc_6",
+ "oxe_stall_idc_no_buff_bc_7",
+ "oxe_stall_idc_no_buff_bc_8",
+ "oxe_stall_idc_no_buff_bc_9",
+ "oxe_stall_ioi_last_ordered",
+ "oxe_stall_non_idc_cmd_no_deq",
+ "oxe_stall_pbuf_bc_0",
+ "oxe_stall_pbuf_bc_1",
+ "oxe_stall_pbuf_bc_2",
+ "oxe_stall_pbuf_bc_3",
+ "oxe_stall_pbuf_bc_4",
+ "oxe_stall_pbuf_bc_5",
+ "oxe_stall_pbuf_bc_6",
+ "oxe_stall_pbuf_bc_7",
+ "oxe_stall_pbuf_bc_8",
+ "oxe_stall_pbuf_bc_9",
+ "oxe_stall_pcie_scoreboard",
+ "oxe_stall_pct_bc_0",
+ "oxe_stall_pct_bc_1",
+ "oxe_stall_pct_bc_2",
+ "oxe_stall_pct_bc_3",
+ "oxe_stall_pct_bc_4",
+ "oxe_stall_pct_bc_5",
+ "oxe_stall_pct_bc_6",
+ "oxe_stall_pct_bc_7",
+ "oxe_stall_pct_bc_8",
+ "oxe_stall_pct_bc_9",
+ "oxe_stall_stfwd_eop",
+ "oxe_stall_ts_no_in_crd_tsc_0",
+ "oxe_stall_ts_no_in_crd_tsc_1",
+ "oxe_stall_ts_no_in_crd_tsc_2",
+ "oxe_stall_ts_no_in_crd_tsc_3",
+ "oxe_stall_ts_no_in_crd_tsc_4",
+ "oxe_stall_ts_no_in_crd_tsc_5",
+ "oxe_stall_ts_no_in_crd_tsc_6",
+ "oxe_stall_ts_no_in_crd_tsc_7",
+ "oxe_stall_ts_no_in_crd_tsc_8",
+ "oxe_stall_ts_no_in_crd_tsc_9",
+ "oxe_stall_ts_no_out_crd_tsc_0",
+ "oxe_stall_ts_no_out_crd_tsc_1",
+ "oxe_stall_ts_no_out_crd_tsc_2",
+ "oxe_stall_ts_no_out_crd_tsc_3",
+ "oxe_stall_ts_no_out_crd_tsc_4",
+ "oxe_stall_ts_no_out_crd_tsc_5",
+ "oxe_stall_ts_no_out_crd_tsc_6",
+ "oxe_stall_ts_no_out_crd_tsc_7",
+ "oxe_stall_ts_no_out_crd_tsc_8",
+ "oxe_stall_ts_no_out_crd_tsc_9",
+ "oxe_stall_with_no_atu_tag",
+ "oxe_stall_with_no_pci_tag",
+ "oxe_stall_wr_conflict_pkt_buff_bnk_0",
+ "oxe_stall_wr_conflict_pkt_buff_bnk_1",
+ "oxe_stall_wr_conflict_pkt_buff_bnk_2",
+ "oxe_stall_wr_conflict_pkt_buff_bnk_3",
+ "oxe_sts_bc_occ_bc_idc_shared_0",
+ "oxe_sts_bc_occ_bc_idc_shared_1",
+ "oxe_sts_bc_occ_bc_idc_shared_2",
+ "oxe_sts_bc_occ_bc_idc_shared_3",
+ "oxe_sts_bc_occ_bc_idc_shared_4",
+ "oxe_sts_bc_occ_bc_idc_shared_5",
+ "oxe_sts_bc_occ_bc_idc_shared_6",
+ "oxe_sts_bc_occ_bc_idc_shared_7",
+ "oxe_sts_bc_occ_bc_idc_shared_8",
+ "oxe_sts_bc_occ_bc_idc_shared_9",
+ "oxe_sts_bc_occ_bc_reserved_0",
+ "oxe_sts_bc_occ_bc_reserved_1",
+ "oxe_sts_bc_occ_bc_reserved_2",
+ "oxe_sts_bc_occ_bc_reserved_3",
+ "oxe_sts_bc_occ_bc_reserved_4",
+ "oxe_sts_bc_occ_bc_reserved_5",
+ "oxe_sts_bc_occ_bc_reserved_6",
+ "oxe_sts_bc_occ_bc_reserved_7",
+ "oxe_sts_bc_occ_bc_reserved_8",
+ "oxe_sts_bc_occ_bc_reserved_9",
+ "oxe_sts_bc_occ_bc_shared_0",
+ "oxe_sts_bc_occ_bc_shared_1",
+ "oxe_sts_bc_occ_bc_shared_2",
+ "oxe_sts_bc_occ_bc_shared_3",
+ "oxe_sts_bc_occ_bc_shared_4",
+ "oxe_sts_bc_occ_bc_shared_5",
+ "oxe_sts_bc_occ_bc_shared_6",
+ "oxe_sts_bc_occ_bc_shared_7",
+ "oxe_sts_bc_occ_bc_shared_8",
+ "oxe_sts_bc_occ_bc_shared_9",
+ "oxe_sts_mcu_occ_idc_cell_count_0",
+ "oxe_sts_mcu_occ_idc_cell_count_1",
+ "oxe_sts_mcu_occ_idc_cell_count_2",
+ "oxe_sts_mcu_occ_idc_cell_count_3",
+ "oxe_sts_mcu_occ_idc_cell_count_4",
+ "oxe_sts_mcu_occ_idc_cell_count_5",
+ "oxe_sts_mcu_occ_idc_cell_count_6",
+ "oxe_sts_mcu_occ_idc_cell_count_7",
+ "oxe_sts_mcu_occ_idc_cell_count_8",
+ "oxe_sts_mcu_occ_idc_cell_count_9",
+ "oxe_sts_mcu_occ_idc_cell_count_10",
+ "oxe_sts_mcu_occ_idc_cell_count_11",
+ "oxe_sts_mcu_occ_idc_cell_count_12",
+ "oxe_sts_mcu_occ_idc_cell_count_13",
+ "oxe_sts_mcu_occ_idc_cell_count_14",
+ "oxe_sts_mcu_occ_idc_cell_count_15",
+ "oxe_sts_mcu_occ_idc_cell_count_16",
+ "oxe_sts_mcu_occ_idc_cell_count_17",
+ "oxe_sts_mcu_occ_idc_cell_count_18",
+ "oxe_sts_mcu_occ_idc_cell_count_19",
+ "oxe_sts_mcu_occ_idc_cell_count_20",
+ "oxe_sts_mcu_occ_idc_cell_count_21",
+ "oxe_sts_mcu_occ_idc_cell_count_22",
+ "oxe_sts_mcu_occ_idc_cell_count_23",
+ "oxe_sts_mcu_occ_idc_cell_count_24",
+ "oxe_sts_mcu_occ_idc_cell_count_25",
+ "oxe_sts_mcu_occ_idc_cell_count_26",
+ "oxe_sts_mcu_occ_idc_cell_count_27",
+ "oxe_sts_mcu_occ_idc_cell_count_28",
+ "oxe_sts_mcu_occ_idc_cell_count_29",
+ "oxe_sts_mcu_occ_idc_cell_count_30",
+ "oxe_sts_mcu_occ_idc_cell_count_31",
+ "oxe_sts_mcu_occ_idc_cell_count_32",
+ "oxe_sts_mcu_occ_idc_cell_count_33",
+ "oxe_sts_mcu_occ_idc_cell_count_34",
+ "oxe_sts_mcu_occ_idc_cell_count_35",
+ "oxe_sts_mcu_occ_idc_cell_count_36",
+ "oxe_sts_mcu_occ_idc_cell_count_37",
+ "oxe_sts_mcu_occ_idc_cell_count_38",
+ "oxe_sts_mcu_occ_idc_cell_count_39",
+ "oxe_sts_mcu_occ_idc_cell_count_40",
+ "oxe_sts_mcu_occ_idc_cell_count_41",
+ "oxe_sts_mcu_occ_idc_cell_count_42",
+ "oxe_sts_mcu_occ_idc_cell_count_43",
+ "oxe_sts_mcu_occ_idc_cell_count_44",
+ "oxe_sts_mcu_occ_idc_cell_count_45",
+ "oxe_sts_mcu_occ_idc_cell_count_46",
+ "oxe_sts_mcu_occ_idc_cell_count_47",
+ "oxe_sts_mcu_occ_idc_cell_count_48",
+ "oxe_sts_mcu_occ_idc_cell_count_49",
+ "oxe_sts_mcu_occ_idc_cell_count_50",
+ "oxe_sts_mcu_occ_idc_cell_count_51",
+ "oxe_sts_mcu_occ_idc_cell_count_52",
+ "oxe_sts_mcu_occ_idc_cell_count_53",
+ "oxe_sts_mcu_occ_idc_cell_count_54",
+ "oxe_sts_mcu_occ_idc_cell_count_55",
+ "oxe_sts_mcu_occ_idc_cell_count_56",
+ "oxe_sts_mcu_occ_idc_cell_count_57",
+ "oxe_sts_mcu_occ_idc_cell_count_58",
+ "oxe_sts_mcu_occ_idc_cell_count_59",
+ "oxe_sts_mcu_occ_idc_cell_count_60",
+ "oxe_sts_mcu_occ_idc_cell_count_61",
+ "oxe_sts_mcu_occ_idc_cell_count_62",
+ "oxe_sts_mcu_occ_idc_cell_count_63",
+ "oxe_sts_mcu_occ_idc_cell_count_64",
+ "oxe_sts_mcu_occ_idc_cell_count_65",
+ "oxe_sts_mcu_occ_idc_cell_count_66",
+ "oxe_sts_mcu_occ_idc_cell_count_67",
+ "oxe_sts_mcu_occ_idc_cell_count_68",
+ "oxe_sts_mcu_occ_idc_cell_count_69",
+ "oxe_sts_mcu_occ_idc_cell_count_70",
+ "oxe_sts_mcu_occ_idc_cell_count_71",
+ "oxe_sts_mcu_occ_idc_cell_count_72",
+ "oxe_sts_mcu_occ_idc_cell_count_73",
+ "oxe_sts_mcu_occ_idc_cell_count_74",
+ "oxe_sts_mcu_occ_idc_cell_count_75",
+ "oxe_sts_mcu_occ_idc_cell_count_76",
+ "oxe_sts_mcu_occ_idc_cell_count_77",
+ "oxe_sts_mcu_occ_idc_cell_count_78",
+ "oxe_sts_mcu_occ_idc_cell_count_79",
+ "oxe_sts_mcu_occ_idc_cell_count_80",
+ "oxe_sts_mcu_occ_idc_cell_count_81",
+ "oxe_sts_mcu_occ_idc_cell_count_82",
+ "oxe_sts_mcu_occ_idc_cell_count_83",
+ "oxe_sts_mcu_occ_idc_cell_count_84",
+ "oxe_sts_mcu_occ_idc_cell_count_85",
+ "oxe_sts_mcu_occ_idc_cell_count_86",
+ "oxe_sts_mcu_occ_idc_cell_count_87",
+ "oxe_sts_mcu_occ_idc_cell_count_88",
+ "oxe_sts_mcu_occ_idc_cell_count_89",
+ "oxe_sts_mcu_occ_idc_cell_count_90",
+ "oxe_sts_mcu_occ_idc_cell_count_91",
+ "oxe_sts_mcu_occ_idc_cell_count_92",
+ "oxe_sts_mcu_occ_idc_cell_count_93",
+ "oxe_sts_mcu_occ_idc_cell_count_94",
+ "oxe_sts_mcu_occ_idc_cell_count_95",
+ "oxe_sts_mcu_occ_mcu_cell_count_0",
+ "oxe_sts_mcu_occ_mcu_cell_count_1",
+ "oxe_sts_mcu_occ_mcu_cell_count_2",
+ "oxe_sts_mcu_occ_mcu_cell_count_3",
+ "oxe_sts_mcu_occ_mcu_cell_count_4",
+ "oxe_sts_mcu_occ_mcu_cell_count_5",
+ "oxe_sts_mcu_occ_mcu_cell_count_6",
+ "oxe_sts_mcu_occ_mcu_cell_count_7",
+ "oxe_sts_mcu_occ_mcu_cell_count_8",
+ "oxe_sts_mcu_occ_mcu_cell_count_9",
+ "oxe_sts_mcu_occ_mcu_cell_count_10",
+ "oxe_sts_mcu_occ_mcu_cell_count_11",
+ "oxe_sts_mcu_occ_mcu_cell_count_12",
+ "oxe_sts_mcu_occ_mcu_cell_count_13",
+ "oxe_sts_mcu_occ_mcu_cell_count_14",
+ "oxe_sts_mcu_occ_mcu_cell_count_15",
+ "oxe_sts_mcu_occ_mcu_cell_count_16",
+ "oxe_sts_mcu_occ_mcu_cell_count_17",
+ "oxe_sts_mcu_occ_mcu_cell_count_18",
+ "oxe_sts_mcu_occ_mcu_cell_count_19",
+ "oxe_sts_mcu_occ_mcu_cell_count_20",
+ "oxe_sts_mcu_occ_mcu_cell_count_21",
+ "oxe_sts_mcu_occ_mcu_cell_count_22",
+ "oxe_sts_mcu_occ_mcu_cell_count_23",
+ "oxe_sts_mcu_occ_mcu_cell_count_24",
+ "oxe_sts_mcu_occ_mcu_cell_count_25",
+ "oxe_sts_mcu_occ_mcu_cell_count_26",
+ "oxe_sts_mcu_occ_mcu_cell_count_27",
+ "oxe_sts_mcu_occ_mcu_cell_count_28",
+ "oxe_sts_mcu_occ_mcu_cell_count_29",
+ "oxe_sts_mcu_occ_mcu_cell_count_30",
+ "oxe_sts_mcu_occ_mcu_cell_count_31",
+ "oxe_sts_mcu_occ_mcu_cell_count_32",
+ "oxe_sts_mcu_occ_mcu_cell_count_33",
+ "oxe_sts_mcu_occ_mcu_cell_count_34",
+ "oxe_sts_mcu_occ_mcu_cell_count_35",
+ "oxe_sts_mcu_occ_mcu_cell_count_36",
+ "oxe_sts_mcu_occ_mcu_cell_count_37",
+ "oxe_sts_mcu_occ_mcu_cell_count_38",
+ "oxe_sts_mcu_occ_mcu_cell_count_39",
+ "oxe_sts_mcu_occ_mcu_cell_count_40",
+ "oxe_sts_mcu_occ_mcu_cell_count_41",
+ "oxe_sts_mcu_occ_mcu_cell_count_42",
+ "oxe_sts_mcu_occ_mcu_cell_count_43",
+ "oxe_sts_mcu_occ_mcu_cell_count_44",
+ "oxe_sts_mcu_occ_mcu_cell_count_45",
+ "oxe_sts_mcu_occ_mcu_cell_count_46",
+ "oxe_sts_mcu_occ_mcu_cell_count_47",
+ "oxe_sts_mcu_occ_mcu_cell_count_48",
+ "oxe_sts_mcu_occ_mcu_cell_count_49",
+ "oxe_sts_mcu_occ_mcu_cell_count_50",
+ "oxe_sts_mcu_occ_mcu_cell_count_51",
+ "oxe_sts_mcu_occ_mcu_cell_count_52",
+ "oxe_sts_mcu_occ_mcu_cell_count_53",
+ "oxe_sts_mcu_occ_mcu_cell_count_54",
+ "oxe_sts_mcu_occ_mcu_cell_count_55",
+ "oxe_sts_mcu_occ_mcu_cell_count_56",
+ "oxe_sts_mcu_occ_mcu_cell_count_57",
+ "oxe_sts_mcu_occ_mcu_cell_count_58",
+ "oxe_sts_mcu_occ_mcu_cell_count_59",
+ "oxe_sts_mcu_occ_mcu_cell_count_60",
+ "oxe_sts_mcu_occ_mcu_cell_count_61",
+ "oxe_sts_mcu_occ_mcu_cell_count_62",
+ "oxe_sts_mcu_occ_mcu_cell_count_63",
+ "oxe_sts_mcu_occ_mcu_cell_count_64",
+ "oxe_sts_mcu_occ_mcu_cell_count_65",
+ "oxe_sts_mcu_occ_mcu_cell_count_66",
+ "oxe_sts_mcu_occ_mcu_cell_count_67",
+ "oxe_sts_mcu_occ_mcu_cell_count_68",
+ "oxe_sts_mcu_occ_mcu_cell_count_69",
+ "oxe_sts_mcu_occ_mcu_cell_count_70",
+ "oxe_sts_mcu_occ_mcu_cell_count_71",
+ "oxe_sts_mcu_occ_mcu_cell_count_72",
+ "oxe_sts_mcu_occ_mcu_cell_count_73",
+ "oxe_sts_mcu_occ_mcu_cell_count_74",
+ "oxe_sts_mcu_occ_mcu_cell_count_75",
+ "oxe_sts_mcu_occ_mcu_cell_count_76",
+ "oxe_sts_mcu_occ_mcu_cell_count_77",
+ "oxe_sts_mcu_occ_mcu_cell_count_78",
+ "oxe_sts_mcu_occ_mcu_cell_count_79",
+ "oxe_sts_mcu_occ_mcu_cell_count_80",
+ "oxe_sts_mcu_occ_mcu_cell_count_81",
+ "oxe_sts_mcu_occ_mcu_cell_count_82",
+ "oxe_sts_mcu_occ_mcu_cell_count_83",
+ "oxe_sts_mcu_occ_mcu_cell_count_84",
+ "oxe_sts_mcu_occ_mcu_cell_count_85",
+ "oxe_sts_mcu_occ_mcu_cell_count_86",
+ "oxe_sts_mcu_occ_mcu_cell_count_87",
+ "oxe_sts_mcu_occ_mcu_cell_count_88",
+ "oxe_sts_mcu_occ_mcu_cell_count_89",
+ "oxe_sts_mcu_occ_mcu_cell_count_90",
+ "oxe_sts_mcu_occ_mcu_cell_count_91",
+ "oxe_sts_mcu_occ_mcu_cell_count_92",
+ "oxe_sts_mcu_occ_mcu_cell_count_93",
+ "oxe_sts_mcu_occ_mcu_cell_count_94",
+ "oxe_sts_mcu_occ_mcu_cell_count_95",
+ "parbs_rarb_atu_completion_pkts",
+ "parbs_rarb_atu_posted_pkts",
+ "parbs_rarb_cq_completion_pkts",
+ "parbs_rarb_cq_posted_pkts",
+ "parbs_rarb_ee_posted_pkts",
+ "parbs_rarb_ixe_completion_pkts",
+ "parbs_rarb_ixe_posted_pkts",
+ "parbs_rarb_oxe_completion_pkts",
+ "parbs_rarb_pi_completion_pkts",
+ "parbs_rarb_pi_mbe_cnt",
+ "parbs_rarb_pi_posted_pkts",
+ "parbs_rarb_pi_sbe_cnt",
+ "parbs_sts_credits_in_use_tarb_pi_non_posted_credits",
+ "parbs_sts_credits_in_use_tarb_pi_posted_credits",
+ "parbs_tarb_atu_mbe_cnt",
+ "parbs_tarb_atu_non_posted_fifo_mbe",
+ "parbs_tarb_atu_non_posted_fifo_sbe",
+ "parbs_tarb_atu_non_posted_pkts",
+ "parbs_tarb_atu_posted_fifo_mbe",
+ "parbs_tarb_atu_posted_fifo_sbe",
+ "parbs_tarb_atu_posted_pkts",
+ "parbs_tarb_atu_sbe_cnt",
+ "parbs_tarb_cq_mbe_cnt",
+ "parbs_tarb_cq_non_posted_fifo_mbe",
+ "parbs_tarb_cq_non_posted_fifo_sbe",
+ "parbs_tarb_cq_non_posted_pkts",
+ "parbs_tarb_cq_posted_fifo_mbe",
+ "parbs_tarb_cq_posted_fifo_sbe",
+ "parbs_tarb_cq_posted_pkts",
+ "parbs_tarb_cq_sbe_cnt",
+ "parbs_tarb_ee_mbe_cnt",
+ "parbs_tarb_ee_posted_fifo_mbe",
+ "parbs_tarb_ee_posted_fifo_sbe",
+ "parbs_tarb_ee_posted_pkts",
+ "parbs_tarb_ee_sbe_cnt",
+ "parbs_tarb_ixe_mbe_cnt",
+ "parbs_tarb_ixe_non_posted_fifo_mbe",
+ "parbs_tarb_ixe_non_posted_fifo_sbe",
+ "parbs_tarb_ixe_non_posted_pkts",
+ "parbs_tarb_ixe_posted_fifo_mbe",
+ "parbs_tarb_ixe_posted_fifo_sbe",
+ "parbs_tarb_ixe_posted_pkts",
+ "parbs_tarb_ixe_sbe_cnt",
+ "parbs_tarb_oxe_mbe_cnt",
+ "parbs_tarb_oxe_non_posted_fifo_mbe",
+ "parbs_tarb_oxe_non_posted_fifo_sbe",
+ "parbs_tarb_oxe_non_posted_pkts",
+ "parbs_tarb_oxe_sbe_cnt",
+ "parbs_tarb_pi_non_posted_blocked_cnt",
+ "parbs_tarb_pi_non_posted_pkts",
+ "parbs_tarb_pi_posted_blocked_cnt",
+ "parbs_tarb_pi_posted_pkts",
+ "pct_accel_close",
+ "pct_bad_seq_nacks",
+ "pct_clear_close_drop",
+ "pct_clear_sent",
+ "pct_close_rsp_drops",
+ "pct_close_sent",
+ "pct_clr_cls_stalls",
+ "pct_cls_req_bad_seqno_drops",
+ "pct_cls_req_miss_tct",
+ "pct_conn_sct_open",
+ "pct_conn_tct_open",
+ "pct_err_no_matching_mst",
+ "pct_err_no_matching_trs",
+ "pct_eth_packets",
+ "pct_host_access_latency_0",
+ "pct_host_access_latency_1",
+ "pct_host_access_latency_2",
+ "pct_host_access_latency_3",
+ "pct_host_access_latency_4",
+ "pct_host_access_latency_5",
+ "pct_host_access_latency_6",
+ "pct_host_access_latency_7",
+ "pct_host_access_latency_8",
+ "pct_host_access_latency_9",
+ "pct_host_access_latency_10",
+ "pct_host_access_latency_11",
+ "pct_host_access_latency_12",
+ "pct_host_access_latency_13",
+ "pct_host_access_latency_14",
+ "pct_host_access_latency_15",
+ "pct_hrp_responses_received",
+ "pct_hrp_rsp_discard_received",
+ "pct_hrp_rsp_err_received",
+ "pct_mem_cor_err_cntr",
+ "pct_mem_ucor_err_cntr",
+ "pct_mst_hit_on_som",
+ "pct_no_matching_tct",
+ "pct_no_mst_nacks",
+ "pct_no_tct_nacks",
+ "pct_no_trs_nacks",
+ "pct_optip_packets",
+ "pct_pct_cq_notifications",
+ "pct_pct_cq_stalls",
+ "pct_pct_ee_events",
+ "pct_pct_ee_stalls",
+ "pct_pct_hni_flits",
+ "pct_pct_hni_stalls",
+ "pct_pct_mst_cmd0",
+ "pct_pct_mst_cmd1",
+ "pct_pct_mst_stalls0",
+ "pct_pct_mst_stalls1",
+ "pct_prf_mst_status_max_mst_in_use",
+ "pct_prf_mst_status_mst_in_use",
+ "pct_prf_sct_status_max_sct_in_use",
+ "pct_prf_sct_status_sct_in_use",
+ "pct_prf_smt_status_max_smt_in_use",
+ "pct_prf_smt_status_smt_in_use",
+ "pct_prf_spt_status_max_spt_in_use",
+ "pct_prf_spt_status_spt_in_use",
+ "pct_prf_srb_status_max_srb_in_use",
+ "pct_prf_srb_status_srb_in_use",
+ "pct_prf_tct_status_max_tct_in_use",
+ "pct_prf_tct_status_tct_in_use",
+ "pct_prf_trs_status_max_trs_in_use",
+ "pct_prf_trs_status_trs_in_use",
+ "pct_ptls_response",
+ "pct_req_blocked_clearing",
+ "pct_req_blocked_closing",
+ "pct_req_blocked_retry",
+ "pct_req_no_response",
+ "pct_req_ordered",
+ "pct_req_rsp_latency_0",
+ "pct_req_rsp_latency_1",
+ "pct_req_rsp_latency_2",
+ "pct_req_rsp_latency_3",
+ "pct_req_rsp_latency_4",
+ "pct_req_rsp_latency_5",
+ "pct_req_rsp_latency_6",
+ "pct_req_rsp_latency_7",
+ "pct_req_rsp_latency_8",
+ "pct_req_rsp_latency_9",
+ "pct_req_rsp_latency_10",
+ "pct_req_rsp_latency_11",
+ "pct_req_rsp_latency_12",
+ "pct_req_rsp_latency_13",
+ "pct_req_rsp_latency_14",
+ "pct_req_rsp_latency_15",
+ "pct_req_rsp_latency_16",
+ "pct_req_rsp_latency_17",
+ "pct_req_rsp_latency_18",
+ "pct_req_rsp_latency_19",
+ "pct_req_rsp_latency_20",
+ "pct_req_rsp_latency_21",
+ "pct_req_rsp_latency_22",
+ "pct_req_rsp_latency_23",
+ "pct_req_rsp_latency_24",
+ "pct_req_rsp_latency_25",
+ "pct_req_rsp_latency_26",
+ "pct_req_rsp_latency_27",
+ "pct_req_rsp_latency_28",
+ "pct_req_rsp_latency_29",
+ "pct_req_rsp_latency_30",
+ "pct_req_rsp_latency_31",
+ "pct_req_src_error",
+ "pct_req_tct_tmout_drops",
+ "pct_req_unordered",
+ "pct_resource_busy",
+ "pct_responses_received",
+ "pct_retry_mst_get",
+ "pct_retry_srb_requests",
+ "pct_retry_trs_put",
+ "pct_rsp_dropped_cls_try",
+ "pct_rsp_dropped_inactive",
+ "pct_rsp_dropped_timeout",
+ "pct_rsp_dropped_try",
+ "pct_rsp_err_rcvd",
+ "pct_sct_stall_state",
+ "pct_sct_timeouts",
+ "pct_spt_timeouts",
+ "pct_tct_timeouts",
+ "pct_tgt_cls_abort",
+ "pct_trs_hit_on_req",
+ "pct_trs_replay_pend_drops",
+ "pct_trs_rsp_nack_drops",
+ "pi_dmac_axi_rd_requests",
+ "pi_dmac_axi_rd_rsp_decerrs",
+ "pi_dmac_axi_rd_rsp_parerrs",
+ "pi_dmac_axi_rd_rsp_slverrs",
+ "pi_dmac_ce_mwr_tlps",
+ "pi_dmac_desc_cor_errors",
+ "pi_dmac_desc_ucor_errors",
+ "pi_dmac_irqs",
+ "pi_dmac_payload_mwr_tlps",
+ "pi_ipd_cfg_event_cnts_ovf_cnt",
+ "pi_ipd_dbic_dbi_acks",
+ "pi_ipd_dbic_dbi_requests",
+ "pi_ipd_dmac_p_fifo_cor_errors",
+ "pi_ipd_dmac_p_fifo_ucor_errors",
+ "pi_ipd_ipd_trigger_events_0",
+ "pi_ipd_ipd_trigger_events_1",
+ "pi_ipd_msixc_ib_irq_pbas",
+ "pi_ipd_msixc_ib_irqs_discarded",
+ "pi_ipd_msixc_ib_irqs_sent",
+ "pi_ipd_msixc_ib_legacy_irqs_sent",
+ "pi_ipd_msixc_oob_irq_pbas",
+ "pi_ipd_msixc_oob_irqs_discarded",
+ "pi_ipd_msixc_oob_irqs_sent",
+ "pi_ipd_msixc_oob_legacy_irqs_sent",
+ "pi_ipd_msixc_pba_cor_errors",
+ "pi_ipd_msixc_pba_ucor_errors",
+ "pi_ipd_msixc_pti_fifo_cor_errors",
+ "pi_ipd_msixc_pti_fifo_ucor_errors",
+ "pi_ipd_msixc_table_cor_errors",
+ "pi_ipd_msixc_table_ucor_errors",
+ "pi_ipd_pri_rbyp_data_parity_errors",
+ "pi_ipd_pri_rbyp_hdr_parity_errors",
+ "pi_ipd_pri_rbyp_tlps",
+ "pi_ipd_pri_rbyp_tlps_aborted",
+ "pi_ipd_pri_rtrgt_blocked_on_mb",
+ "pi_ipd_pri_rtrgt_blocked_on_rarb",
+ "pi_ipd_pri_rtrgt_data_parity_errors",
+ "pi_ipd_pri_rtrgt_hdr_parity_errors",
+ "pi_ipd_pri_rtrgt_mrd_tlps",
+ "pi_ipd_pri_rtrgt_msg_tlps",
+ "pi_ipd_pri_rtrgt_msgd_tlps",
+ "pi_ipd_pri_rtrgt_mwr_tlps",
+ "pi_ipd_pri_rtrgt_tlps",
+ "pi_ipd_pri_rtrgt_tlps_aborted",
+ "pi_ipd_pti_dbg_blocked_on_nph_crd",
+ "pi_ipd_pti_dbg_blocked_on_pd_crd",
+ "pi_ipd_pti_dbg_blocked_on_ph_crd",
+ "pi_ipd_pti_dbg_blocked_on_tag",
+ "pi_ipd_pti_dbg_xali_non_posted_tlps",
+ "pi_ipd_pti_dbg_xali_posted_tlps",
+ "pi_ipd_pti_dmac_blocked_on_pd_crd",
+ "pi_ipd_pti_dmac_blocked_on_ph_crd",
+ "pi_ipd_pti_dmac_xali_posted_tlps",
+ "pi_ipd_pti_msixc_blocked_on_pd_crd",
+ "pi_ipd_pti_msixc_blocked_on_ph_crd",
+ "pi_ipd_pti_msixc_fifo_cor_errors",
+ "pi_ipd_pti_msixc_fifo_ucor_errors",
+ "pi_ipd_pti_msixc_xali_posted_tlps",
+ "pi_ipd_pti_tarb_blocked_on_npd_crd",
+ "pi_ipd_pti_tarb_blocked_on_nph_crd",
+ "pi_ipd_pti_tarb_blocked_on_pd_crd",
+ "pi_ipd_pti_tarb_blocked_on_ph_crd",
+ "pi_ipd_pti_tarb_blocked_on_tag",
+ "pi_ipd_pti_tarb_cmpl_to",
+ "pi_ipd_pti_tarb_cmpl_to_fifo_cor_errors",
+ "pi_ipd_pti_tarb_cmpl_to_fifo_ucor_errors",
+ "pi_ipd_pti_tarb_np_fifo_cor_errors",
+ "pi_ipd_pti_tarb_np_fifo_ucor_errors",
+ "pi_ipd_pti_tarb_p_fifo_cor_errors",
+ "pi_ipd_pti_tarb_p_fifo_ucor_errors",
+ "pi_ipd_pti_tarb_xali_non_posted_tlps",
+ "pi_ipd_pti_tarb_xali_posted_tlps",
+ "pi_pri_mb_axi_rd_requests",
+ "pi_pri_mb_axi_rd_rsp_decerrs",
+ "pi_pri_mb_axi_rd_rsp_parerrs",
+ "pi_pri_mb_axi_rd_rsp_slverrs",
+ "pi_pri_mb_axi_wr_requests",
+ "pi_pri_mb_axi_wr_rsp_decerrs",
+ "pi_pri_mb_axi_wr_rsp_slverrs",
+ "pi_pri_mb_rtrgt_fifo_cor_errors",
+ "pi_pri_mb_rtrgt_fifo_ucor_errors",
+ "pi_pri_mb_rtrgt_mrd_tlps",
+ "pi_pri_mb_rtrgt_mwr_tlps",
+ "pi_pri_mb_rtrgt_non_posted_tlp_discards",
+ "pi_pri_mb_rtrgt_posted_tlp_discards",
+ "pi_pri_mb_rtrgt_posted_tlp_partial_discards",
+ "pi_pri_mb_rtrgt_tlp_discards",
+ "pi_pri_mb_rtrgt_tlps",
+ "pi_pri_mb_xali_cmpl_ca_tlps",
+ "pi_pri_mb_xali_cmpl_tlps",
+ "pi_pri_mb_xali_cmpl_ur_tlps",
+ "pi_pri_rarb_rbyp_fifo_cor_errors",
+ "pi_pri_rarb_rbyp_fifo_ucor_errors",
+ "pi_pri_rarb_rbyp_tlp_discards",
+ "pi_pri_rarb_rbyp_tlps",
+ "pi_pri_rarb_rtrgt_fifo_cor_errors",
+ "pi_pri_rarb_rtrgt_fifo_ucor_errors",
+ "pi_pri_rarb_rtrgt_msg_tlps",
+ "pi_pri_rarb_rtrgt_msgd_tlps",
+ "pi_pri_rarb_rtrgt_mwr_tlps",
+ "pi_pri_rarb_rtrgt_tlp_discards",
+ "pi_pri_rarb_rtrgt_tlps",
+ "pi_pri_rarb_sriovt_cor_errors",
+ "pi_pri_rarb_sriovt_ucor_errors",
+ "pi_pti_tarb_acxt_cor_errors",
+ "pi_pti_tarb_acxt_ucor_errors",
+ "pi_pti_tarb_amo_pkts",
+ "pi_pti_tarb_data_cor_errors",
+ "pi_pti_tarb_data_ucor_error",
+ "pi_pti_tarb_fetching_amo_pkts",
+ "pi_pti_tarb_flush_pkts",
+ "pi_pti_tarb_hdr_cor_errors",
+ "pi_pti_tarb_hdr_ucor_errors",
+ "pi_pti_tarb_inv_rsp_pkts",
+ "pi_pti_tarb_irq_pkts",
+ "pi_pti_tarb_mrd_pkts",
+ "pi_pti_tarb_mwr_pkts",
+ "pi_pti_tarb_pg_req_pkts",
+ "pi_pti_tarb_pkt_discards",
+ "pi_pti_tarb_pkts",
+ "pi_pti_tarb_rarb_ca_pkts",
+ "pi_pti_tarb_translation_pkts",
+ "rmu_enet_frame_rejected_cntr",
+ "rmu_enet_ptlte_set_ctrl_err_cntr",
+ "rmu_enet_success_cntr",
+ "rmu_mem_cor_err_cntr",
+ "rmu_mem_ucor_err_cntr",
+ "rmu_ptl_invld_dfa_cntr",
+ "rmu_ptl_invld_vni_cntr",
+ "rmu_ptl_no_ptlte_cntr",
+ "rmu_ptl_success_cntr",
+ "tou_cmd_fifo_full_cycles",
+ "tou_cq_tou_num_cmds",
+ "tou_cq_tou_num_stalls",
+ "tou_ct_cmd_counts_0",
+ "tou_ct_cmd_counts_1",
+ "tou_ct_cmd_counts_2",
+ "tou_ct_cmd_counts_3",
+ "tou_ct_cmd_counts_4",
+ "tou_ct_cmd_counts_5",
+ "tou_ct_cmd_counts_6",
+ "tou_ct_cmd_counts_7",
+ "tou_ct_cmd_counts_8",
+ "tou_ct_cmd_counts_9",
+ "tou_ct_cmd_counts_10",
+ "tou_ct_cmd_counts_11",
+ "tou_ct_cmd_counts_12",
+ "tou_ct_cmd_counts_13",
+ "tou_ct_cmd_counts_14",
+ "tou_ct_cmd_counts_15",
+ "tou_fail_cntr",
+ "tou_list_rebuild_cycles",
+ "tou_num_ct_updates",
+ "tou_num_doorbell_writes",
+ "tou_num_list_rebuilds_0",
+ "tou_num_list_rebuilds_1",
+ "tou_num_list_rebuilds_2",
+ "tou_num_list_rebuilds_3",
+ "tou_num_trig_cmds_0",
+ "tou_num_trig_cmds_1",
+ "tou_num_trig_cmds_2",
+ "tou_num_trig_cmds_3",
+ "tou_success_cntr",
+ "tou_tou_oxe_num_flits",
+ "tou_tou_oxe_num_idles",
+ "tou_tou_oxe_num_stalls",
+};
+
+static const uint64_t set_ethtool[] = {
+ CXIDV_TELEM_HNI_RX_OK_IEEE,
+ CXIDV_TELEM_HNI_RX_BAD_IEEE,
+ CXIDV_TELEM_HNI_TX_OK_IEEE,
+ CXIDV_TELEM_HNI_TX_POISONED_IEEE,
+ CXIDV_TELEM_HNI_RX_OK_OPT,
+ CXIDV_TELEM_HNI_RX_BAD_OPT,
+ CXIDV_TELEM_HNI_TX_OK_OPT,
+ CXIDV_TELEM_HNI_TX_POISONED_OPT,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW,
+ CXIDV_TELEM_HNI_PCS_UNCORRECTED_CW,
+ CXIDV_TELEM_HNI_PCS_GOOD_CW,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_0,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_1,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_2,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_3,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_4,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_5,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_6,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_7,
+ CXIDV_TELEM_IXE_RX_UDP_PKT,
+ CXIDV_TELEM_IXE_RX_TCP_PKT,
+ CXIDV_TELEM_IXE_RX_IPV4_PKT,
+ CXIDV_TELEM_IXE_RX_IPV6_PKT,
+ CXIDV_TELEM_IXE_RX_ROCE_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_GEN_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SML_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_UNRESTRICTED_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SMALLMSG_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_CONTINUATION_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_RESTRICTED_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_CONNMGMT_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_RESPONSE_PKT,
+ CXIDV_TELEM_IXE_RX_UNRECOGNIZED_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SML_AMO_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_MSGS,
+ CXIDV_TELEM_IXE_RX_PTL_MULTI_MSGS,
+ CXIDV_TELEM_IXE_RX_PTL_MR_MSGS,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_PCT,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_NORSP,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_WRSP,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_IXE_PARSER,
+ CXIDV_TELEM_IXE_RX_PKT_IPV4_OPTIONS,
+ CXIDV_TELEM_IXE_RX_PKT_IPV6_OPTIONS,
+ CXIDV_TELEM_IXE_RX_ETH_SEG,
+ CXIDV_TELEM_IXE_RX_ROCE_SEG,
+ CXIDV_TELEM_IXE_RX_ROCE_SPSEG,
+};
+
+static const uint64_t set_atu[] = {
+ CXIDV_TELEM_ATU_AT_STALL_CCP,
+ CXIDV_TELEM_ATU_AT_STALL_NO_PTID,
+ CXIDV_TELEM_ATU_AT_STALL_NP_CDTS,
+ CXIDV_TELEM_ATU_AT_STALL_TARB_ARB,
+ CXIDV_TELEM_ATU_ATS_DYNAMIC_STATE_CHANGE_CNTR,
+ CXIDV_TELEM_ATU_ATS_INVAL_CNTR,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_0,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_1,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_2,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_3,
+ CXIDV_TELEM_ATU_ATS_TRANS_ERR,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_0,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_1,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_2,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_3,
+ CXIDV_TELEM_ATU_ATUCQ_INVAL_CNTR,
+ CXIDV_TELEM_ATU_CACHE_EVICTIONS,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_0,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_1,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_2,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_3,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_0,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_1,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_2,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_3,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_0,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_1,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_2,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_3,
+ CXIDV_TELEM_ATU_CACHE_MISS_0,
+ CXIDV_TELEM_ATU_CACHE_MISS_1,
+ CXIDV_TELEM_ATU_CACHE_MISS_2,
+ CXIDV_TELEM_ATU_CACHE_MISS_3,
+ CXIDV_TELEM_ATU_CACHE_MISS_EE,
+ CXIDV_TELEM_ATU_CACHE_MISS_IXE,
+ CXIDV_TELEM_ATU_CACHE_MISS_OXE,
+ CXIDV_TELEM_ATU_CLIENT_REQ_EE,
+ CXIDV_TELEM_ATU_CLIENT_REQ_IXE,
+ CXIDV_TELEM_ATU_CLIENT_REQ_OXE,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_0,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_1,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_2,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_3,
+ CXIDV_TELEM_ATU_FILTERED_REQUESTS,
+ CXIDV_TELEM_ATU_IMPLICIT_ATS_EN_INVAL_CNTR,
+ CXIDV_TELEM_ATU_IMPLICIT_FLR_INVAL_CNTR,
+ CXIDV_TELEM_ATU_INVAL_STALL_ARB,
+ CXIDV_TELEM_ATU_INVAL_STALL_CMPL_WAIT,
+ CXIDV_TELEM_ATU_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_ATU_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_0,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_1,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_2,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_3,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_0,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_1,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_2,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_3,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_0,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_1,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_2,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_3,
+ CXIDV_TELEM_ATU_PCIE_ERR_POISONED,
+ CXIDV_TELEM_ATU_PCIE_UNSUCCESS_CMPL,
+};
+
+static const uint64_t set_cq[] = {
+ CXIDV_TELEM_CQ_CFG_EVENT_CNTS_OVF_CNT,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_0,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_1,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_2,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_3,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_4,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_5,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_6,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_7,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_8,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_9,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_10,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_11,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_12,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_13,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_14,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_15,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_FLITS,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_IDLES,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_STALLS,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_FLITS,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_IDLES,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_STALLS,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_0,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_1,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_2,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_3,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_0,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_1,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_2,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_3,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_4,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_5,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_6,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_7,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_8,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_9,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_10,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_11,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_12,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_13,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_14,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_15,
+ CXIDV_TELEM_CQ_FAIL_TGT_CNTR,
+ CXIDV_TELEM_CQ_FAIL_TX_CNTR,
+ CXIDV_TELEM_CQ_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_CQ_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_0,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_1,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_2,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_3,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_0,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_1,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_2,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_3,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_0,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_1,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_2,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_3,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_0,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_1,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_2,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_3,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_0,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_1,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_2,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_3,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_0,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_1,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_2,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_3,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_0,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_1,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_2,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_3,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_0,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_1,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_2,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_3,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_0,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_1,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_2,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_3,
+ CXIDV_TELEM_CQ_NUM_TGT_CMD_ARG_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TGT_CMD_PERM_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_0,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_1,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_2,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_3,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_0,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_1,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_2,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_3,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_ALIGN_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_ARG_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_OP_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_PERM_ERRORS,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_0,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_1,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_2,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_3,
+ CXIDV_TELEM_CQ_RARB_ERR_CNTR,
+ CXIDV_TELEM_CQ_RARB_LL_ERR_CNTR,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_EE_EVENT_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_FQ_SH_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_FQ_TOT_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_LPE_CMD_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_LPE_RCV_FIFO_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_PREFETCH_TOU_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TARB_NP_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TARB_P_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TGQ_CMD_FAIL_EVENT_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_CMD_FAIL_EVENT_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_EVENT_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_FQ_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_WB_CREDITS,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TXQ_CMD_FAIL_EVENT_CREDITS,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_0,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_1,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_2,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_3,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_0,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_1,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_2,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_3,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_4,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_5,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_6,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_7,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_8,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_9,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_10,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_11,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_12,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_13,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_14,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_15,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_16,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_17,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_18,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_19,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_20,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_21,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_22,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_23,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_24,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_25,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_26,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_27,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_28,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_29,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_30,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_31,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_32,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_33,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_34,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_35,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_36,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_37,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_38,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_39,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_40,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_41,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_42,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_43,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_44,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_45,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_46,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_47,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_0,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_1,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_2,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_3,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_0,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_1,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_2,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_3,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_0,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_1,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_2,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_3,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_0,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_1,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_2,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_3,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_0,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_1,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_2,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_3,
+ CXIDV_TELEM_CQ_SUCCESS_TGT_CNTR,
+ CXIDV_TELEM_CQ_SUCCESS_TX_CNTR,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_0,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_1,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_2,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_3,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_0,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_1,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_2,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_3,
+ CXIDV_TELEM_CQ_WR_PTR_UPDT_ERR_CNTR,
+};
+
+static const uint64_t set_ee[] = {
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_0,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_1,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_2,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_3,
+ CXIDV_TELEM_EE_ADDR_TRANS_REQ_CNTR,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_0,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_1,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_2,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_3,
+ CXIDV_TELEM_EE_CE_ARB_OUT_EVENT_CNTR,
+ CXIDV_TELEM_EE_CE_ARB_OUT_STALL_CNTR,
+ CXIDV_TELEM_EE_CQ_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_CQ_FE_CNTR,
+ CXIDV_TELEM_EE_CQ_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_0,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_1,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_2,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_3,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_0,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_1,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_2,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_3,
+ CXIDV_TELEM_EE_EQ_DSABLD_EVENT_ERR_CNTR,
+ CXIDV_TELEM_EE_EQ_DSABLD_LPEQ_ERR_CNTR,
+ CXIDV_TELEM_EE_EQ_DSABLD_SWS_ERR_CNTR,
+ CXIDV_TELEM_EE_EQ_RSRVN_UFLW_ERR_CNTR,
+ CXIDV_TELEM_EE_EQ_STATE_UCOR_ERR_CNTR,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_0,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_1,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_2,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_3,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_0,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_1,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_2,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_3,
+ CXIDV_TELEM_EE_EQS_ARB_OUT_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_CSR_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_CSR_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_EVENT_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_EXPIRED_CB_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_EXPIRED_CB_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_FREE_CB_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_HWS_INIT_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_HWS_INIT_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_LPE_QUERY_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_STS_UPDT_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_STS_UPDT_STALL_CNTR,
+ CXIDV_TELEM_EE_EQS_SWS_WR_REQ_CNTR,
+ CXIDV_TELEM_EE_EQS_SWS_WR_STALL_CNTR,
+ CXIDV_TELEM_EE_EVENT_ACK_CNTR,
+ CXIDV_TELEM_EE_EVENT_ATOMIC_CNTR,
+ CXIDV_TELEM_EE_EVENT_ATOMIC_OVERFLOW_CNTR,
+ CXIDV_TELEM_EE_EVENT_COMMAND_FAILURE_CNTR,
+ CXIDV_TELEM_EE_EVENT_EQ_SWITCH_CNTR,
+ CXIDV_TELEM_EE_EVENT_ERROR_CNTR,
+ CXIDV_TELEM_EE_EVENT_ETHERNET_CNTR,
+ CXIDV_TELEM_EE_EVENT_ETHERNET_FGFC_CNTR,
+ CXIDV_TELEM_EE_EVENT_FETCH_ATOMIC_CNTR,
+ CXIDV_TELEM_EE_EVENT_FETCH_ATOMIC_OVERFLOW_CNTR,
+ CXIDV_TELEM_EE_EVENT_GET_CNTR,
+ CXIDV_TELEM_EE_EVENT_GET_OVERFLOW_CNTR,
+ CXIDV_TELEM_EE_EVENT_LINK_CNTR,
+ CXIDV_TELEM_EE_EVENT_MATCH_CNTR,
+ CXIDV_TELEM_EE_EVENT_NULL_EVENT_CNTR,
+ CXIDV_TELEM_EE_EVENT_PCT_CNTR,
+ CXIDV_TELEM_EE_EVENT_PUT_CNTR,
+ CXIDV_TELEM_EE_EVENT_PUT_OVERFLOW_CNTR,
+ CXIDV_TELEM_EE_EVENT_RENDEZVOUS_CNTR,
+ CXIDV_TELEM_EE_EVENT_REPLY_CNTR,
+ CXIDV_TELEM_EE_EVENT_SEARCH_CNTR,
+ CXIDV_TELEM_EE_EVENT_SEND_CNTR,
+ CXIDV_TELEM_EE_EVENT_STATE_CHANGE_CNTR,
+ CXIDV_TELEM_EE_EVENT_TIMESTAMP_CNTR,
+ CXIDV_TELEM_EE_EVENT_TRIGGERED_OP_CNTR,
+ CXIDV_TELEM_EE_EVENT_UNLINK_CNTR,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_0,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_1,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_2,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_3,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_0,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_1,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_2,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_3,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_0,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_1,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_2,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_3,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_0,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_1,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_2,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_3,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_0,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_1,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_2,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_3,
+ CXIDV_TELEM_EE_FE_ARB_OUT_EVENT_CNTR,
+ CXIDV_TELEM_EE_FE_ARB_OUT_STALL_CNTR,
+ CXIDV_TELEM_EE_HNI_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_HNI_FE_CNTR,
+ CXIDV_TELEM_EE_HNI_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_IXE_CE_CNTR,
+ CXIDV_TELEM_EE_IXE_CE_STALL_CNTR,
+ CXIDV_TELEM_EE_IXE_DD_CNTR,
+ CXIDV_TELEM_EE_IXE_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_IXE_FE_CNTR,
+ CXIDV_TELEM_EE_IXE_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_LPE_CE_CNTR,
+ CXIDV_TELEM_EE_LPE_CE_STALL_CNTR,
+ CXIDV_TELEM_EE_LPE_DD_CNTR,
+ CXIDV_TELEM_EE_LPE_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_LPE_FE_CNTR,
+ CXIDV_TELEM_EE_LPE_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_LPE_QUERY_EQ_NONE_CNTR,
+ CXIDV_TELEM_EE_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_EE_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_EE_MST_CE_CNTR,
+ CXIDV_TELEM_EE_MST_CE_STALL_CNTR,
+ CXIDV_TELEM_EE_MST_DD_CNTR,
+ CXIDV_TELEM_EE_MST_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_MST_FE_CNTR,
+ CXIDV_TELEM_EE_MST_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_0,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_1,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_2,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_3,
+ CXIDV_TELEM_EE_PCT_CE_CNTR,
+ CXIDV_TELEM_EE_PCT_CE_STALL_CNTR,
+ CXIDV_TELEM_EE_PCT_DD_CNTR,
+ CXIDV_TELEM_EE_PCT_EVENT_REQ_CNTR,
+ CXIDV_TELEM_EE_PCT_FE_CNTR,
+ CXIDV_TELEM_EE_PCT_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_RARB_HW_ERR_CNTR,
+ CXIDV_TELEM_EE_RARB_SW_ERR_CNTR,
+ CXIDV_TELEM_EE_STS_ECBS_IN_USE_ECBS_IN_USE,
+ CXIDV_TELEM_EE_STS_ECBS_IN_USE_MAX_ECBS_IN_USE,
+ CXIDV_TELEM_EE_TARB_ERR_CNTR,
+ CXIDV_TELEM_EE_TARB_IRQ_REQ_CNTR,
+ CXIDV_TELEM_EE_TARB_STALL_CNTR,
+ CXIDV_TELEM_EE_TARB_WR_REQ_CNTR,
+ CXIDV_TELEM_EE_TS_FE_CNTR,
+ CXIDV_TELEM_EE_TS_FE_STALL_CNTR,
+ CXIDV_TELEM_EE_UNXPCTD_TRNSLTN_RSP_ERR_CNTR,
+};
+
+static const uint64_t set_hni[] = {
+ CXIDV_TELEM_HNI_CFG_EVENT_CNTS_OVF_CNT,
+ CXIDV_TELEM_HNI_COR_ECC_ERR_CNTR,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_0,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_1,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_2,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_3,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_4,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_5,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_6,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_7,
+ CXIDV_TELEM_HNI_FGFC_DISCARD,
+ CXIDV_TELEM_HNI_FGFC_EVENT_XOFF,
+ CXIDV_TELEM_HNI_FGFC_EVENT_XON,
+ CXIDV_TELEM_HNI_FGFC_IPV4,
+ CXIDV_TELEM_HNI_FGFC_IPV6,
+ CXIDV_TELEM_HNI_FGFC_L2,
+ CXIDV_TELEM_HNI_FGFC_MATCH,
+ CXIDV_TELEM_HNI_FGFC_PORT,
+ CXIDV_TELEM_HNI_HRP_ACK,
+ CXIDV_TELEM_HNI_HRP_RESP,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_NACK_ERROR,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_NACK_SEQ_ERR,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_CTL_FR,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_LOSSY,
+ CXIDV_TELEM_HNI_LLR_RX_DUPLICATE_SEQ,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_BAD,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_GOOD,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_POISONED,
+ CXIDV_TELEM_HNI_LLR_RX_INIT_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_RX_INIT_ECHO_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_RX_LOOP_TIME_REQ_CTL_FR,
+ CXIDV_TELEM_HNI_LLR_RX_LOOP_TIME_RSP_CTL_FR,
+ CXIDV_TELEM_HNI_LLR_RX_NACK_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_RX_OK_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_RX_OK_LOSSY,
+ CXIDV_TELEM_HNI_LLR_RX_POISONED_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_RX_POISONED_LOSSY,
+ CXIDV_TELEM_HNI_LLR_RX_REPLAY_EVENT,
+ CXIDV_TELEM_HNI_LLR_RX_UNEXPECTED_SEQ,
+ CXIDV_TELEM_HNI_LLR_TX_ACK_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSLESS_RPT,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSY,
+ CXIDV_TELEM_HNI_LLR_TX_DISCARD,
+ CXIDV_TELEM_HNI_LLR_TX_INIT_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_TX_INIT_ECHO_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_TX_LLR_BLOCKED,
+ CXIDV_TELEM_HNI_LLR_TX_LLR_UNBLOCKED,
+ CXIDV_TELEM_HNI_LLR_TX_LOOP_TIME_REQ_CTL_FR,
+ CXIDV_TELEM_HNI_LLR_TX_LOOP_TIME_RSP_CTL_FR,
+ CXIDV_TELEM_HNI_LLR_TX_NACK_CTL_OS,
+ CXIDV_TELEM_HNI_LLR_TX_OK_BYPASS,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSLESS_RPT,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSY,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSLESS,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSLESS_RPT,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSY,
+ CXIDV_TELEM_HNI_LLR_TX_REPLAY_EVENT,
+ CXIDV_TELEM_HNI_MAC_RX_FRAGMENT,
+ CXIDV_TELEM_HNI_MAC_RX_ILLEGAL_SIZE,
+ CXIDV_TELEM_HNI_MAC_RX_PREAMBLE_ERROR,
+ CXIDV_TELEM_HNI_MAC_TX_IFG_ADJUSTMENT_SYNC,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_0,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_1,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_2,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_3,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_4,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_5,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_6,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_7,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_0,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_1,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_2,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_3,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_4,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_5,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_6,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_7,
+ CXIDV_TELEM_HNI_PAUSE_RECV_0,
+ CXIDV_TELEM_HNI_PAUSE_RECV_1,
+ CXIDV_TELEM_HNI_PAUSE_RECV_2,
+ CXIDV_TELEM_HNI_PAUSE_RECV_3,
+ CXIDV_TELEM_HNI_PAUSE_RECV_4,
+ CXIDV_TELEM_HNI_PAUSE_RECV_5,
+ CXIDV_TELEM_HNI_PAUSE_RECV_6,
+ CXIDV_TELEM_HNI_PAUSE_RECV_7,
+ CXIDV_TELEM_HNI_PAUSE_REFRESH,
+ CXIDV_TELEM_HNI_PAUSE_SENT,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_0,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_1,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_2,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_3,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_4,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_5,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_6,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_7,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_0,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_1,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_2,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_3,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_4,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_5,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_6,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_7,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_8,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_9,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_10,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_11,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_12,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_13,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_14,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_0,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_1,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_2,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_3,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_4,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_5,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_6,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_7,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_8,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_9,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_10,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_11,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_12,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_13,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_14,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_15,
+ CXIDV_TELEM_HNI_PCS_GOOD_CW,
+ CXIDV_TELEM_HNI_PCS_PML_MBE_ERROR_CNT,
+ CXIDV_TELEM_HNI_PCS_PML_SBE_ERROR_CNT,
+ CXIDV_TELEM_HNI_PCS_UNCORRECTED_CW,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_0,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_1,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_2,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_3,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_4,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_5,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_6,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_7,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_0,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_1,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_2,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_3,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_4,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_5,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_6,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_7,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_0,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_1,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_2,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_3,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_4,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_5,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_6,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_7,
+ CXIDV_TELEM_HNI_RX_BAD_IEEE,
+ CXIDV_TELEM_HNI_RX_BAD_OPT,
+ CXIDV_TELEM_HNI_RX_FRAGMENT,
+ CXIDV_TELEM_HNI_RX_JABBER,
+ CXIDV_TELEM_HNI_RX_OK_27,
+ CXIDV_TELEM_HNI_RX_OK_35,
+ CXIDV_TELEM_HNI_RX_OK_36_TO_63,
+ CXIDV_TELEM_HNI_RX_OK_64,
+ CXIDV_TELEM_HNI_RX_OK_65_TO_127,
+ CXIDV_TELEM_HNI_RX_OK_128_TO_255,
+ CXIDV_TELEM_HNI_RX_OK_256_TO_511,
+ CXIDV_TELEM_HNI_RX_OK_512_TO_1023,
+ CXIDV_TELEM_HNI_RX_OK_1024_TO_2047,
+ CXIDV_TELEM_HNI_RX_OK_2048_TO_4095,
+ CXIDV_TELEM_HNI_RX_OK_4096_TO_8191,
+ CXIDV_TELEM_HNI_RX_OK_8192_TO_MAX,
+ CXIDV_TELEM_HNI_RX_OK_BAD_OP_CODE,
+ CXIDV_TELEM_HNI_RX_OK_BROADCAST,
+ CXIDV_TELEM_HNI_RX_OK_FLOW_CONTROL,
+ CXIDV_TELEM_HNI_RX_OK_IEEE,
+ CXIDV_TELEM_HNI_RX_OK_LEN_TYPE_ERROR,
+ CXIDV_TELEM_HNI_RX_OK_MAC_CONTROL,
+ CXIDV_TELEM_HNI_RX_OK_MULTICAST,
+ CXIDV_TELEM_HNI_RX_OK_OPT,
+ CXIDV_TELEM_HNI_RX_OK_TAGGED,
+ CXIDV_TELEM_HNI_RX_OK_TOO_LONG,
+ CXIDV_TELEM_HNI_RX_OK_UNDERSIZE,
+ CXIDV_TELEM_HNI_RX_PAUSED_0,
+ CXIDV_TELEM_HNI_RX_PAUSED_1,
+ CXIDV_TELEM_HNI_RX_PAUSED_2,
+ CXIDV_TELEM_HNI_RX_PAUSED_3,
+ CXIDV_TELEM_HNI_RX_PAUSED_4,
+ CXIDV_TELEM_HNI_RX_PAUSED_5,
+ CXIDV_TELEM_HNI_RX_PAUSED_6,
+ CXIDV_TELEM_HNI_RX_PAUSED_7,
+ CXIDV_TELEM_HNI_RX_PAUSED_STD,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_FIFO,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_0,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_1,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_2,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_3,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_4,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_5,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_6,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_7,
+ CXIDV_TELEM_HNI_STS_RX_BAD_OCTETS,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_BCAST,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_IEEE,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_MULTI,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_OPT,
+ CXIDV_TELEM_HNI_STS_RX_OK_OCTETS,
+ CXIDV_TELEM_HNI_STS_TX_BAD_OCTETS,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_BCAST,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_IEEE,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_MULTI,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_OPT,
+ CXIDV_TELEM_HNI_STS_TX_OK_OCTETS,
+ CXIDV_TELEM_HNI_TX_OK_27,
+ CXIDV_TELEM_HNI_TX_OK_35,
+ CXIDV_TELEM_HNI_TX_OK_36_TO_63,
+ CXIDV_TELEM_HNI_TX_OK_64,
+ CXIDV_TELEM_HNI_TX_OK_65_TO_127,
+ CXIDV_TELEM_HNI_TX_OK_128_TO_255,
+ CXIDV_TELEM_HNI_TX_OK_256_TO_511,
+ CXIDV_TELEM_HNI_TX_OK_512_TO_1023,
+ CXIDV_TELEM_HNI_TX_OK_1024_TO_2047,
+ CXIDV_TELEM_HNI_TX_OK_2048_TO_4095,
+ CXIDV_TELEM_HNI_TX_OK_4096_TO_8191,
+ CXIDV_TELEM_HNI_TX_OK_8192_TO_MAX,
+ CXIDV_TELEM_HNI_TX_OK_BROADCAST,
+ CXIDV_TELEM_HNI_TX_OK_IEEE,
+ CXIDV_TELEM_HNI_TX_OK_MULTICAST,
+ CXIDV_TELEM_HNI_TX_OK_OPT,
+ CXIDV_TELEM_HNI_TX_OK_TAGGED,
+ CXIDV_TELEM_HNI_TX_OPT_PADDED,
+ CXIDV_TELEM_HNI_TX_OPT_SIZE_ERR,
+ CXIDV_TELEM_HNI_TX_PAUSED_0,
+ CXIDV_TELEM_HNI_TX_PAUSED_1,
+ CXIDV_TELEM_HNI_TX_PAUSED_2,
+ CXIDV_TELEM_HNI_TX_PAUSED_3,
+ CXIDV_TELEM_HNI_TX_PAUSED_4,
+ CXIDV_TELEM_HNI_TX_PAUSED_5,
+ CXIDV_TELEM_HNI_TX_PAUSED_6,
+ CXIDV_TELEM_HNI_TX_PAUSED_7,
+ CXIDV_TELEM_HNI_TX_POISONED_IEEE,
+ CXIDV_TELEM_HNI_TX_POISONED_OPT,
+ CXIDV_TELEM_HNI_TX_STALL_LLR,
+ CXIDV_TELEM_HNI_TX_STD_PADDED,
+ CXIDV_TELEM_HNI_TX_STD_SIZE_ERR,
+ CXIDV_TELEM_HNI_UCOR_ECC_ERR_CNTR,
+};
+
+static const uint64_t set_ixe[] = {
+ CXIDV_TELEM_IXE_DISP_AMO_CONFLICTS,
+ CXIDV_TELEM_IXE_DISP_AMO_EVENTS,
+ CXIDV_TELEM_IXE_DISP_ATU_FLUSH_REQS,
+ CXIDV_TELEM_IXE_DISP_ATU_REQS,
+ CXIDV_TELEM_IXE_DISP_ATU_RESPS,
+ CXIDV_TELEM_IXE_DISP_ATU_RESPS_OK,
+ CXIDV_TELEM_IXE_DISP_DMAWR_REQS,
+ CXIDV_TELEM_IXE_DISP_DMAWR_RESPS,
+ CXIDV_TELEM_IXE_DISP_DMAWR_RESPS_OK,
+ CXIDV_TELEM_IXE_DISP_ETH_EVENTS,
+ CXIDV_TELEM_IXE_DISP_LPE_AMOS,
+ CXIDV_TELEM_IXE_DISP_LPE_AMOS_OK,
+ CXIDV_TELEM_IXE_DISP_LPE_GETS,
+ CXIDV_TELEM_IXE_DISP_LPE_GETS_OK,
+ CXIDV_TELEM_IXE_DISP_LPE_PUTS,
+ CXIDV_TELEM_IXE_DISP_LPE_PUTS_OK,
+ CXIDV_TELEM_IXE_DISP_MST_GETS,
+ CXIDV_TELEM_IXE_DISP_MST_GETS_OK,
+ CXIDV_TELEM_IXE_DISP_MST_PUTS,
+ CXIDV_TELEM_IXE_DISP_MST_PUTS_OK,
+ CXIDV_TELEM_IXE_DISP_OXE_RESPS,
+ CXIDV_TELEM_IXE_DISP_PCT_GETCOMP,
+ CXIDV_TELEM_IXE_DISP_PUT_EVENTS,
+ CXIDV_TELEM_IXE_DISP_RPU_ERR_REQS,
+ CXIDV_TELEM_IXE_DISP_RPU_RESPS,
+ CXIDV_TELEM_IXE_DISP_STALL_ATU_CDT,
+ CXIDV_TELEM_IXE_DISP_STALL_ATU_FIFO,
+ CXIDV_TELEM_IXE_DISP_STALL_CONFLICT,
+ CXIDV_TELEM_IXE_DISP_STALL_ERR_FIFO,
+ CXIDV_TELEM_IXE_DISP_STALL_GCOMP_FIFO,
+ CXIDV_TELEM_IXE_DISP_STALL_GRR_ID,
+ CXIDV_TELEM_IXE_DISP_STALL_MDID_CDTS,
+ CXIDV_TELEM_IXE_DISP_STALL_MST_MATCH_FIFO,
+ CXIDV_TELEM_IXE_DISP_STALL_PUT_RESP,
+ CXIDV_TELEM_IXE_DISP_STALL_RESP_FIFO,
+ CXIDV_TELEM_IXE_DISP_WR_CONFLICTS,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_INEXACT,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_INVALID,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_OVERFLOW,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_UNDERFLOW,
+ CXIDV_TELEM_IXE_DMAWR_AMO_INVALID_OP,
+ CXIDV_TELEM_IXE_DMAWR_AMO_LEN_ERR,
+ CXIDV_TELEM_IXE_DMAWR_AMO_MISALIGNED,
+ CXIDV_TELEM_IXE_DMAWR_CPU_AMO_REQS,
+ CXIDV_TELEM_IXE_DMAWR_CPU_FTCH_AMO_REQS,
+ CXIDV_TELEM_IXE_DMAWR_FLUSH_REQS,
+ CXIDV_TELEM_IXE_DMAWR_NIC_AMO_REQS,
+ CXIDV_TELEM_IXE_DMAWR_P_PASS_NP_CNT,
+ CXIDV_TELEM_IXE_DMAWR_PCIE_ERR_POISONED,
+ CXIDV_TELEM_IXE_DMAWR_PCIE_UNSUCCESS_CMPL,
+ CXIDV_TELEM_IXE_DMAWR_REQ_NO_WRITE_REQS,
+ CXIDV_TELEM_IXE_DMAWR_STALL_FTCH_AMO_CNT,
+ CXIDV_TELEM_IXE_DMAWR_STALL_NP_CDT,
+ CXIDV_TELEM_IXE_DMAWR_STALL_NP_REQ_CNT,
+ CXIDV_TELEM_IXE_DMAWR_STALL_P_CDT,
+ CXIDV_TELEM_IXE_DMAWR_WRITE_REQS,
+ CXIDV_TELEM_IXE_GET_LEN_ERRORS,
+ CXIDV_TELEM_IXE_HDR_CHECKSUM_ERRORS,
+ CXIDV_TELEM_IXE_HDR_ECC_ERRORS,
+ CXIDV_TELEM_IXE_HRP_REQ_ERRORS,
+ CXIDV_TELEM_IXE_IP_OPTIONS_ERRORS,
+ CXIDV_TELEM_IXE_IPV4_CHECKSUM_ERRORS,
+ CXIDV_TELEM_IXE_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_IXE_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_IXE_PARSER_PAR_ERRORS,
+ CXIDV_TELEM_IXE_PBUF_RD_ERRORS,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_PORT_DFA_MISMATCH,
+ CXIDV_TELEM_IXE_ROCE_ICRC_ERROR,
+ CXIDV_TELEM_IXE_RX_ETH_SEG,
+ CXIDV_TELEM_IXE_RX_IPV4_PKT,
+ CXIDV_TELEM_IXE_RX_IPV6_PKT,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_IXE_PARSER,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_PCT,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_NORSP,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_WRSP,
+ CXIDV_TELEM_IXE_RX_PKT_IPV4_OPTIONS,
+ CXIDV_TELEM_IXE_RX_PKT_IPV6_OPTIONS,
+ CXIDV_TELEM_IXE_RX_PTL_CONNMGMT_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_CONTINUATION_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_GEN_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_MR_MSGS,
+ CXIDV_TELEM_IXE_RX_PTL_MSGS,
+ CXIDV_TELEM_IXE_RX_PTL_MULTI_MSGS,
+ CXIDV_TELEM_IXE_RX_PTL_RESPONSE_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_RESTRICTED_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SMALLMSG_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SML_AMO_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_SML_PKT,
+ CXIDV_TELEM_IXE_RX_PTL_UNRESTRICTED_PKT,
+ CXIDV_TELEM_IXE_RX_ROCE_PKT,
+ CXIDV_TELEM_IXE_RX_ROCE_SEG,
+ CXIDV_TELEM_IXE_RX_ROCE_SPSEG,
+ CXIDV_TELEM_IXE_RX_TCP_PKT,
+ CXIDV_TELEM_IXE_RX_UDP_PKT,
+ CXIDV_TELEM_IXE_RX_UNRECOGNIZED_PKT,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_4,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_5,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_6,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_7,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_4,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_5,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_6,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_7,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_4,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_5,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_6,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_7,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_0,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_1,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_2,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_3,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_4,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_5,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_6,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_7,
+};
+
+static const uint64_t set_lpe[] = {
+ CXIDV_TELEM_LPE_AMO_CMDS,
+ CXIDV_TELEM_LPE_APPEND_CMDS_0,
+ CXIDV_TELEM_LPE_APPEND_CMDS_1,
+ CXIDV_TELEM_LPE_APPEND_CMDS_2,
+ CXIDV_TELEM_LPE_APPEND_CMDS_3,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_0,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_1,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_2,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_3,
+ CXIDV_TELEM_LPE_CFG_EVENT_CNTS_OVF_CNT,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_0,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_1,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_2,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_3,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_0,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_1,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_2,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_3,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_0,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_1,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_2,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_3,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_0,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_1,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_2,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_3,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_IXE_GET,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_IXE_PUT,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_LOSSLESS,
+ CXIDV_TELEM_LPE_CYC_NO_RDY_CDTS,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_0,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_1,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_2,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_3,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_CANT_ALLOC_UNEXPECTED,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_EQ_FULL,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_ETHERNET,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_NO_MATCH_IN_OVERFLOW,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_REQ_EMPTY,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_UNLINK_FAILED,
+ CXIDV_TELEM_LPE_ERR_EQ_DISABLED,
+ CXIDV_TELEM_LPE_ERR_ILLEGAL_OP,
+ CXIDV_TELEM_LPE_ERR_INVALID_ENDPOINT,
+ CXIDV_TELEM_LPE_ERR_NO_SPACE_APPEND,
+ CXIDV_TELEM_LPE_ERR_NO_SPACE_NET,
+ CXIDV_TELEM_LPE_ERR_OP_VIOLATION,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_CANT_ALLOC_UNEXPECTED,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_EQ_FULL,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_NO_MATCH_IN_OVERFLOW,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_REQ_EMPTY,
+ CXIDV_TELEM_LPE_ERR_PTLTE_SW_MANAGED,
+ CXIDV_TELEM_LPE_ERR_RESTRICTED_UNICAST,
+ CXIDV_TELEM_LPE_ERR_SEARCH_NO_MATCH,
+ CXIDV_TELEM_LPE_ERR_SETSTATE_NO_MATCH,
+ CXIDV_TELEM_LPE_ERR_SRC_ERROR,
+ CXIDV_TELEM_LPE_EVENT_ATOMIC_OVERFLOW,
+ CXIDV_TELEM_LPE_EVENT_FETCH_ATOMIC_OVERFLOW,
+ CXIDV_TELEM_LPE_EVENT_GET_OVERFLOW,
+ CXIDV_TELEM_LPE_EVENT_LINK,
+ CXIDV_TELEM_LPE_EVENT_PUT_OVERFLOW,
+ CXIDV_TELEM_LPE_EVENT_RENDEZVOUS,
+ CXIDV_TELEM_LPE_EVENT_SEARCH,
+ CXIDV_TELEM_LPE_EVENT_STATECHANGE,
+ CXIDV_TELEM_LPE_EVENT_UNLINK,
+ CXIDV_TELEM_LPE_FAIL_CNTR,
+ CXIDV_TELEM_LPE_FAMO_CMDS,
+ CXIDV_TELEM_LPE_GET_CMDS,
+ CXIDV_TELEM_LPE_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_LPE_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_0,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_1,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_2,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_3,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_0,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_1,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_2,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_3,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_0,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_1,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_2,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_3,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_0,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_1,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_2,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_3,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_0,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_1,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_2,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_3,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_0,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_1,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_2,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_3,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_0,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_1,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_2,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_3,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_0,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_1,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_2,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_3,
+ CXIDV_TELEM_LPE_PLEC_ALLOCS,
+ CXIDV_TELEM_LPE_PLEC_FREES,
+ CXIDV_TELEM_LPE_PLEC_FREES_CSR,
+ CXIDV_TELEM_LPE_PLEC_HITS,
+ CXIDV_TELEM_LPE_PUT_CMDS,
+ CXIDV_TELEM_LPE_RENDEZVOUS_PUT_CMDS,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_0,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_1,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_2,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_3,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_0,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_1,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_2,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_3,
+ CXIDV_TELEM_LPE_SEARCH_CMDS,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_CMDS,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_FAIL,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_SUCCESS,
+ CXIDV_TELEM_LPE_SEARCH_FAIL,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_0,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_1,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_2,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_3,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_0,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_1,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_2,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_3,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_0,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_1,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_2,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_3,
+ CXIDV_TELEM_LPE_SEARCH_SUCCESS,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_0,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_1,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_2,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_3,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_0,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_1,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_2,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_3,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_0,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_1,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_2,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_3,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_0,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_1,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_2,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_3,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_0,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_1,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_2,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_3,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_0,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_1,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_2,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_3,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_0,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_1,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_2,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_3,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_0,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_1,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_2,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_3,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_0,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_1,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_2,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_3,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_0,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_1,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_2,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_3,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_0,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_1,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_2,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_3,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_0,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_1,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_2,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_3,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_0,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_1,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_2,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_3,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_4,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_5,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_6,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_7,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_8,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_9,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_10,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_11,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_12,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_13,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_14,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_15,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_16,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_17,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_18,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_19,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_20,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_21,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_22,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_23,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_24,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_25,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_26,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_27,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_28,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_29,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_30,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_31,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_32,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_33,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_34,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_35,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_36,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_37,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_38,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_39,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_40,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_41,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_42,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_43,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_44,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_45,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_46,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_47,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_48,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_49,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_50,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_51,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_52,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_53,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_54,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_55,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_56,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_57,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_58,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_59,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_60,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_61,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_62,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_63,
+ CXIDV_TELEM_LPE_SUCCESS_CNTR,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_0,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_1,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_2,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_3,
+ CXIDV_TELEM_LPE_UNLINK_CMDS,
+ CXIDV_TELEM_LPE_UNLINK_SUCCESS,
+};
+
+static const uint64_t set_mb[] = {
+ CXIDV_TELEM_MB_CFG_EVENT_CNTS_OVF_CNT, CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_0,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_1, CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_2,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_3, CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_0,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_1, CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_2,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_3, CXIDV_TELEM_MB_CQ_LSA0_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_CQ_LSA0_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_CQ_LSA1_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_CQ_LSA1_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_0,
+ CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_1, CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_2,
+ CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_0, CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_1,
+ CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_2, CXIDV_TELEM_MB_CRMC_RD_ERROR_0,
+ CXIDV_TELEM_MB_CRMC_RD_ERROR_1, CXIDV_TELEM_MB_CRMC_RD_ERROR_2,
+ CXIDV_TELEM_MB_CRMC_RING_MBE_0, CXIDV_TELEM_MB_CRMC_RING_MBE_1,
+ CXIDV_TELEM_MB_CRMC_RING_MBE_2, CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_0,
+ CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_1, CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_2,
+ CXIDV_TELEM_MB_CRMC_RING_SBE_0, CXIDV_TELEM_MB_CRMC_RING_SBE_1,
+ CXIDV_TELEM_MB_CRMC_RING_SBE_2, CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_0,
+ CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_1, CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_2,
+ CXIDV_TELEM_MB_CRMC_WR_ERROR_0, CXIDV_TELEM_MB_CRMC_WR_ERROR_1,
+ CXIDV_TELEM_MB_CRMC_WR_ERROR_2, CXIDV_TELEM_MB_EE_LSA0_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_EE_LSA0_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_EE_LSA1_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_EE_LSA1_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_IXE_LSA0_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_IXE_LSA0_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_IXE_LSA1_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_IXE_LSA1_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_JAI_AXI_RD_REQUESTS,
+ CXIDV_TELEM_MB_JAI_AXI_WR_REQUESTS, CXIDV_TELEM_MB_MB_LSA0_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_MB_LSA0_TRIGGER_EVENTS_1, CXIDV_TELEM_MB_MB_LSA1_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_MB_MB_LSA1_TRIGGER_EVENTS_1,
+};
+
+static const uint64_t set_mst[] = {
+ CXIDV_TELEM_MST_ALLOCATIONS,
+ CXIDV_TELEM_MST_ERR_CANCELLED,
+ CXIDV_TELEM_MST_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_MST_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_MST_REQUESTS,
+ CXIDV_TELEM_MST_STALLED_WAITING_EE_CRDTS,
+ CXIDV_TELEM_MST_STALLED_WAITING_FOR_LPE,
+ CXIDV_TELEM_MST_STALLED_WAITING_GET_CRDTS,
+ CXIDV_TELEM_MST_STALLED_WAITING_PUT_CRDTS,
+ CXIDV_TELEM_MST_STS_NUM_REQ,
+};
+
+static const uint64_t set_oxe[] = {
+ CXIDV_TELEM_OXE_CHANNEL_IDLE,
+ CXIDV_TELEM_OXE_ERR_INVALID_AC,
+ CXIDV_TELEM_OXE_ERR_NO_TRANSLATION,
+ CXIDV_TELEM_OXE_ERR_PAGE_PERM,
+ CXIDV_TELEM_OXE_ERR_PAGE_REQ,
+ CXIDV_TELEM_OXE_ERR_PCI_CMPL,
+ CXIDV_TELEM_OXE_ERR_PCI_EP,
+ CXIDV_TELEM_OXE_ERR_TA_ERROR,
+ CXIDV_TELEM_OXE_IGNORE_ERRS,
+ CXIDV_TELEM_OXE_IOI_DMA,
+ CXIDV_TELEM_OXE_IOI_PKTS_ORDERED,
+ CXIDV_TELEM_OXE_IOI_PKTS_UNORDERED,
+ CXIDV_TELEM_OXE_MCU_MEAS_0,
+ CXIDV_TELEM_OXE_MCU_MEAS_1,
+ CXIDV_TELEM_OXE_MCU_MEAS_2,
+ CXIDV_TELEM_OXE_MCU_MEAS_3,
+ CXIDV_TELEM_OXE_MCU_MEAS_4,
+ CXIDV_TELEM_OXE_MCU_MEAS_5,
+ CXIDV_TELEM_OXE_MCU_MEAS_6,
+ CXIDV_TELEM_OXE_MCU_MEAS_7,
+ CXIDV_TELEM_OXE_MCU_MEAS_8,
+ CXIDV_TELEM_OXE_MCU_MEAS_9,
+ CXIDV_TELEM_OXE_MCU_MEAS_10,
+ CXIDV_TELEM_OXE_MCU_MEAS_11,
+ CXIDV_TELEM_OXE_MCU_MEAS_12,
+ CXIDV_TELEM_OXE_MCU_MEAS_13,
+ CXIDV_TELEM_OXE_MCU_MEAS_14,
+ CXIDV_TELEM_OXE_MCU_MEAS_15,
+ CXIDV_TELEM_OXE_MCU_MEAS_16,
+ CXIDV_TELEM_OXE_MCU_MEAS_17,
+ CXIDV_TELEM_OXE_MCU_MEAS_18,
+ CXIDV_TELEM_OXE_MCU_MEAS_19,
+ CXIDV_TELEM_OXE_MCU_MEAS_20,
+ CXIDV_TELEM_OXE_MCU_MEAS_21,
+ CXIDV_TELEM_OXE_MCU_MEAS_22,
+ CXIDV_TELEM_OXE_MCU_MEAS_23,
+ CXIDV_TELEM_OXE_MCU_MEAS_24,
+ CXIDV_TELEM_OXE_MCU_MEAS_25,
+ CXIDV_TELEM_OXE_MCU_MEAS_26,
+ CXIDV_TELEM_OXE_MCU_MEAS_27,
+ CXIDV_TELEM_OXE_MCU_MEAS_28,
+ CXIDV_TELEM_OXE_MCU_MEAS_29,
+ CXIDV_TELEM_OXE_MCU_MEAS_30,
+ CXIDV_TELEM_OXE_MCU_MEAS_31,
+ CXIDV_TELEM_OXE_MCU_MEAS_32,
+ CXIDV_TELEM_OXE_MCU_MEAS_33,
+ CXIDV_TELEM_OXE_MCU_MEAS_34,
+ CXIDV_TELEM_OXE_MCU_MEAS_35,
+ CXIDV_TELEM_OXE_MCU_MEAS_36,
+ CXIDV_TELEM_OXE_MCU_MEAS_37,
+ CXIDV_TELEM_OXE_MCU_MEAS_38,
+ CXIDV_TELEM_OXE_MCU_MEAS_39,
+ CXIDV_TELEM_OXE_MCU_MEAS_40,
+ CXIDV_TELEM_OXE_MCU_MEAS_41,
+ CXIDV_TELEM_OXE_MCU_MEAS_42,
+ CXIDV_TELEM_OXE_MCU_MEAS_43,
+ CXIDV_TELEM_OXE_MCU_MEAS_44,
+ CXIDV_TELEM_OXE_MCU_MEAS_45,
+ CXIDV_TELEM_OXE_MCU_MEAS_46,
+ CXIDV_TELEM_OXE_MCU_MEAS_47,
+ CXIDV_TELEM_OXE_MCU_MEAS_48,
+ CXIDV_TELEM_OXE_MCU_MEAS_49,
+ CXIDV_TELEM_OXE_MCU_MEAS_50,
+ CXIDV_TELEM_OXE_MCU_MEAS_51,
+ CXIDV_TELEM_OXE_MCU_MEAS_52,
+ CXIDV_TELEM_OXE_MCU_MEAS_53,
+ CXIDV_TELEM_OXE_MCU_MEAS_54,
+ CXIDV_TELEM_OXE_MCU_MEAS_55,
+ CXIDV_TELEM_OXE_MCU_MEAS_56,
+ CXIDV_TELEM_OXE_MCU_MEAS_57,
+ CXIDV_TELEM_OXE_MCU_MEAS_58,
+ CXIDV_TELEM_OXE_MCU_MEAS_59,
+ CXIDV_TELEM_OXE_MCU_MEAS_60,
+ CXIDV_TELEM_OXE_MCU_MEAS_61,
+ CXIDV_TELEM_OXE_MCU_MEAS_62,
+ CXIDV_TELEM_OXE_MCU_MEAS_63,
+ CXIDV_TELEM_OXE_MCU_MEAS_64,
+ CXIDV_TELEM_OXE_MCU_MEAS_65,
+ CXIDV_TELEM_OXE_MCU_MEAS_66,
+ CXIDV_TELEM_OXE_MCU_MEAS_67,
+ CXIDV_TELEM_OXE_MCU_MEAS_68,
+ CXIDV_TELEM_OXE_MCU_MEAS_69,
+ CXIDV_TELEM_OXE_MCU_MEAS_70,
+ CXIDV_TELEM_OXE_MCU_MEAS_71,
+ CXIDV_TELEM_OXE_MCU_MEAS_72,
+ CXIDV_TELEM_OXE_MCU_MEAS_73,
+ CXIDV_TELEM_OXE_MCU_MEAS_74,
+ CXIDV_TELEM_OXE_MCU_MEAS_75,
+ CXIDV_TELEM_OXE_MCU_MEAS_76,
+ CXIDV_TELEM_OXE_MCU_MEAS_77,
+ CXIDV_TELEM_OXE_MCU_MEAS_78,
+ CXIDV_TELEM_OXE_MCU_MEAS_79,
+ CXIDV_TELEM_OXE_MCU_MEAS_80,
+ CXIDV_TELEM_OXE_MCU_MEAS_81,
+ CXIDV_TELEM_OXE_MCU_MEAS_82,
+ CXIDV_TELEM_OXE_MCU_MEAS_83,
+ CXIDV_TELEM_OXE_MCU_MEAS_84,
+ CXIDV_TELEM_OXE_MCU_MEAS_85,
+ CXIDV_TELEM_OXE_MCU_MEAS_86,
+ CXIDV_TELEM_OXE_MCU_MEAS_87,
+ CXIDV_TELEM_OXE_MCU_MEAS_88,
+ CXIDV_TELEM_OXE_MCU_MEAS_89,
+ CXIDV_TELEM_OXE_MCU_MEAS_90,
+ CXIDV_TELEM_OXE_MCU_MEAS_91,
+ CXIDV_TELEM_OXE_MCU_MEAS_92,
+ CXIDV_TELEM_OXE_MCU_MEAS_93,
+ CXIDV_TELEM_OXE_MCU_MEAS_94,
+ CXIDV_TELEM_OXE_MCU_MEAS_95,
+ CXIDV_TELEM_OXE_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_OXE_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_OXE_NUM_HRP_CMDS,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN0,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN1,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN2,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN3,
+ CXIDV_TELEM_OXE_PRF_SET0_PKTBUF_NA,
+ CXIDV_TELEM_OXE_PRF_SET0_SMT_NA,
+ CXIDV_TELEM_OXE_PRF_SET0_SPT_NA,
+ CXIDV_TELEM_OXE_PRF_SET0_SRB_NA,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_DMA_MDR,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_DMA_UPD,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_HEADER,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PCT_IDX_WAIT,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PKTBUF_GNT,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PKTBUF_REQ,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_READY,
+ CXIDV_TELEM_OXE_PRF_SET0_TS_SELECT,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN0,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN1,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN2,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN3,
+ CXIDV_TELEM_OXE_PRF_SET1_PKTBUF_NA,
+ CXIDV_TELEM_OXE_PRF_SET1_SMT_NA,
+ CXIDV_TELEM_OXE_PRF_SET1_SPT_NA,
+ CXIDV_TELEM_OXE_PRF_SET1_SRB_NA,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_DMA_MDR,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_DMA_UPD,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_HEADER,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PCT_IDX_WAIT,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PKTBUF_GNT,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PKTBUF_REQ,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_READY,
+ CXIDV_TELEM_OXE_PRF_SET1_TS_SELECT,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_0,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_1,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_2,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_3,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_4,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_5,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_6,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_7,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_8,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_9,
+ CXIDV_TELEM_OXE_PTL_TX_MR_MSGS,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_0,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_1,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_2,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_3,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_4,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_5,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_6,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_7,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_8,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_9,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_0,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_1,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_2,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_3,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_4,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_5,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_6,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_7,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_8,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_9,
+ CXIDV_TELEM_OXE_SMT_CDT_ERRS,
+ CXIDV_TELEM_OXE_SPT_CDT_ERRS,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_0,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_1,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_2,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_3,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_0,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_1,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_2,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_3,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_0,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_1,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_2,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_3,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_0,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_1,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_2,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_3,
+ CXIDV_TELEM_OXE_STALL_HDR_ARB,
+ CXIDV_TELEM_OXE_STALL_IDC_CMD_NO_DEQ,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_0,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_1,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_2,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_3,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_4,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_5,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_6,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_7,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_8,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_9,
+ CXIDV_TELEM_OXE_STALL_IOI_LAST_ORDERED,
+ CXIDV_TELEM_OXE_STALL_NON_IDC_CMD_NO_DEQ,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_0,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_1,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_2,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_3,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_4,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_5,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_6,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_7,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_8,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_9,
+ CXIDV_TELEM_OXE_STALL_PCIE_SCOREBOARD,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_0,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_1,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_2,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_3,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_4,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_5,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_6,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_7,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_8,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_9,
+ CXIDV_TELEM_OXE_STALL_STFWD_EOP,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_0,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_1,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_2,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_3,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_4,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_5,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_6,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_7,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_8,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_9,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_0,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_1,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_2,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_3,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_4,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_5,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_6,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_7,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_8,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_9,
+ CXIDV_TELEM_OXE_STALL_WITH_NO_ATU_TAG,
+ CXIDV_TELEM_OXE_STALL_WITH_NO_PCI_TAG,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_0,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_1,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_2,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_3,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_0,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_1,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_2,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_3,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_4,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_5,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_6,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_7,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_8,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_9,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_0,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_1,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_2,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_3,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_4,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_5,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_6,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_7,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_8,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_9,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_0,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_1,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_2,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_3,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_4,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_5,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_6,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_7,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_8,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_9,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_0,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_1,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_2,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_3,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_4,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_5,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_6,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_7,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_8,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_9,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_10,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_11,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_12,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_13,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_14,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_15,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_16,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_17,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_18,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_19,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_20,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_21,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_22,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_23,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_24,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_25,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_26,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_27,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_28,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_29,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_30,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_31,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_32,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_33,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_34,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_35,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_36,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_37,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_38,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_39,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_40,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_41,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_42,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_43,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_44,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_45,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_46,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_47,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_48,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_49,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_50,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_51,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_52,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_53,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_54,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_55,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_56,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_57,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_58,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_59,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_60,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_61,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_62,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_63,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_64,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_65,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_66,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_67,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_68,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_69,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_70,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_71,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_72,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_73,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_74,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_75,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_76,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_77,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_78,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_79,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_80,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_81,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_82,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_83,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_84,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_85,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_86,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_87,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_88,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_89,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_90,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_91,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_92,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_93,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_94,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_95,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_0,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_1,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_2,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_3,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_4,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_5,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_6,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_7,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_8,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_9,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_10,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_11,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_12,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_13,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_14,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_15,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_16,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_17,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_18,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_19,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_20,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_21,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_22,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_23,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_24,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_25,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_26,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_27,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_28,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_29,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_30,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_31,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_32,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_33,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_34,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_35,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_36,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_37,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_38,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_39,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_40,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_41,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_42,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_43,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_44,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_45,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_46,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_47,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_48,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_49,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_50,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_51,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_52,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_53,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_54,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_55,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_56,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_57,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_58,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_59,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_60,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_61,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_62,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_63,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_64,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_65,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_66,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_67,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_68,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_69,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_70,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_71,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_72,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_73,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_74,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_75,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_76,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_77,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_78,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_79,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_80,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_81,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_82,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_83,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_84,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_85,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_86,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_87,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_88,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_89,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_90,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_91,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_92,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_93,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_94,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_95,
+};
+
+static const uint64_t set_parbs[] = {
+ CXIDV_TELEM_PARBS_RARB_ATU_COMPLETION_PKTS,
+ CXIDV_TELEM_PARBS_RARB_ATU_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_RARB_CQ_COMPLETION_PKTS,
+ CXIDV_TELEM_PARBS_RARB_CQ_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_RARB_EE_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_RARB_IXE_COMPLETION_PKTS,
+ CXIDV_TELEM_PARBS_RARB_IXE_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_RARB_OXE_COMPLETION_PKTS,
+ CXIDV_TELEM_PARBS_RARB_PI_COMPLETION_PKTS,
+ CXIDV_TELEM_PARBS_RARB_PI_MBE_CNT,
+ CXIDV_TELEM_PARBS_RARB_PI_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_RARB_PI_SBE_CNT,
+ CXIDV_TELEM_PARBS_STS_CREDITS_IN_USE_TARB_PI_NON_POSTED_CREDITS,
+ CXIDV_TELEM_PARBS_STS_CREDITS_IN_USE_TARB_PI_POSTED_CREDITS,
+ CXIDV_TELEM_PARBS_TARB_ATU_MBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_ATU_SBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_CQ_MBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_CQ_SBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_EE_MBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_EE_SBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_IXE_MBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_IXE_SBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_OXE_MBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_FIFO_MBE,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_FIFO_SBE,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_OXE_SBE_CNT,
+ CXIDV_TELEM_PARBS_TARB_PI_NON_POSTED_BLOCKED_CNT,
+ CXIDV_TELEM_PARBS_TARB_PI_NON_POSTED_PKTS,
+ CXIDV_TELEM_PARBS_TARB_PI_POSTED_BLOCKED_CNT,
+ CXIDV_TELEM_PARBS_TARB_PI_POSTED_PKTS,
+};
+
+static const uint64_t set_pct[] = {
+ CXIDV_TELEM_PCT_ACCEL_CLOSE,
+ CXIDV_TELEM_PCT_BAD_SEQ_NACKS,
+ CXIDV_TELEM_PCT_CLEAR_CLOSE_DROP,
+ CXIDV_TELEM_PCT_CLEAR_SENT,
+ CXIDV_TELEM_PCT_CLOSE_RSP_DROPS,
+ CXIDV_TELEM_PCT_CLOSE_SENT,
+ CXIDV_TELEM_PCT_CLR_CLS_STALLS,
+ CXIDV_TELEM_PCT_CLS_REQ_BAD_SEQNO_DROPS,
+ CXIDV_TELEM_PCT_CLS_REQ_MISS_TCT,
+ CXIDV_TELEM_PCT_CONN_SCT_OPEN,
+ CXIDV_TELEM_PCT_CONN_TCT_OPEN,
+ CXIDV_TELEM_PCT_ERR_NO_MATCHING_MST,
+ CXIDV_TELEM_PCT_ERR_NO_MATCHING_TRS,
+ CXIDV_TELEM_PCT_ETH_PACKETS,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_0,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_1,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_2,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_3,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_4,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_5,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_6,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_7,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_8,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_9,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_10,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_11,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_12,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_13,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_14,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_15,
+ CXIDV_TELEM_PCT_HRP_RESPONSES_RECEIVED,
+ CXIDV_TELEM_PCT_HRP_RSP_DISCARD_RECEIVED,
+ CXIDV_TELEM_PCT_HRP_RSP_ERR_RECEIVED,
+ CXIDV_TELEM_PCT_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_PCT_MEM_UCOR_ERR_CNTR,
+ CXIDV_TELEM_PCT_MST_HIT_ON_SOM,
+ CXIDV_TELEM_PCT_NO_MATCHING_TCT,
+ CXIDV_TELEM_PCT_NO_MST_NACKS,
+ CXIDV_TELEM_PCT_NO_TCT_NACKS,
+ CXIDV_TELEM_PCT_NO_TRS_NACKS,
+ CXIDV_TELEM_PCT_OPTIP_PACKETS,
+ CXIDV_TELEM_PCT_PCT_CQ_NOTIFICATIONS,
+ CXIDV_TELEM_PCT_PCT_CQ_STALLS,
+ CXIDV_TELEM_PCT_PCT_EE_EVENTS,
+ CXIDV_TELEM_PCT_PCT_EE_STALLS,
+ CXIDV_TELEM_PCT_PCT_HNI_FLITS,
+ CXIDV_TELEM_PCT_PCT_HNI_STALLS,
+ CXIDV_TELEM_PCT_PCT_MST_CMD0,
+ CXIDV_TELEM_PCT_PCT_MST_CMD1,
+ CXIDV_TELEM_PCT_PCT_MST_STALLS0,
+ CXIDV_TELEM_PCT_PCT_MST_STALLS1,
+ CXIDV_TELEM_PCT_PRF_MST_STATUS_MAX_MST_IN_USE,
+ CXIDV_TELEM_PCT_PRF_MST_STATUS_MST_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SCT_STATUS_MAX_SCT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SCT_STATUS_SCT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SMT_STATUS_MAX_SMT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SMT_STATUS_SMT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SPT_STATUS_MAX_SPT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SPT_STATUS_SPT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SRB_STATUS_MAX_SRB_IN_USE,
+ CXIDV_TELEM_PCT_PRF_SRB_STATUS_SRB_IN_USE,
+ CXIDV_TELEM_PCT_PRF_TCT_STATUS_MAX_TCT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_TCT_STATUS_TCT_IN_USE,
+ CXIDV_TELEM_PCT_PRF_TRS_STATUS_MAX_TRS_IN_USE,
+ CXIDV_TELEM_PCT_PRF_TRS_STATUS_TRS_IN_USE,
+ CXIDV_TELEM_PCT_PTLS_RESPONSE,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_CLEARING,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_CLOSING,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_RETRY,
+ CXIDV_TELEM_PCT_REQ_NO_RESPONSE,
+ CXIDV_TELEM_PCT_REQ_ORDERED,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_0,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_1,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_2,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_3,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_4,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_5,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_6,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_7,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_8,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_9,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_10,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_11,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_12,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_13,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_14,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_15,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_16,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_17,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_18,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_19,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_20,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_21,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_22,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_23,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_24,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_25,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_26,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_27,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_28,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_29,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_30,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_31,
+ CXIDV_TELEM_PCT_REQ_SRC_ERROR,
+ CXIDV_TELEM_PCT_REQ_TCT_TMOUT_DROPS,
+ CXIDV_TELEM_PCT_REQ_UNORDERED,
+ CXIDV_TELEM_PCT_RESOURCE_BUSY,
+ CXIDV_TELEM_PCT_RESPONSES_RECEIVED,
+ CXIDV_TELEM_PCT_RETRY_MST_GET,
+ CXIDV_TELEM_PCT_RETRY_SRB_REQUESTS,
+ CXIDV_TELEM_PCT_RETRY_TRS_PUT,
+ CXIDV_TELEM_PCT_RSP_DROPPED_CLS_TRY,
+ CXIDV_TELEM_PCT_RSP_DROPPED_INACTIVE,
+ CXIDV_TELEM_PCT_RSP_DROPPED_TIMEOUT,
+ CXIDV_TELEM_PCT_RSP_DROPPED_TRY,
+ CXIDV_TELEM_PCT_RSP_ERR_RCVD,
+ CXIDV_TELEM_PCT_SCT_STALL_STATE,
+ CXIDV_TELEM_PCT_SCT_TIMEOUTS,
+ CXIDV_TELEM_PCT_SPT_TIMEOUTS,
+ CXIDV_TELEM_PCT_TCT_TIMEOUTS,
+ CXIDV_TELEM_PCT_TGT_CLS_ABORT,
+ CXIDV_TELEM_PCT_TRS_HIT_ON_REQ,
+ CXIDV_TELEM_PCT_TRS_REPLAY_PEND_DROPS,
+ CXIDV_TELEM_PCT_TRS_RSP_NACK_DROPS,
+};
+
+static const uint64_t set_pi[] = {
+ CXIDV_TELEM_PI_DMAC_AXI_RD_REQUESTS,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_DECERRS,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_PARERRS,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_SLVERRS,
+ CXIDV_TELEM_PI_DMAC_CE_MWR_TLPS,
+ CXIDV_TELEM_PI_DMAC_DESC_COR_ERRORS,
+ CXIDV_TELEM_PI_DMAC_DESC_UCOR_ERRORS,
+ CXIDV_TELEM_PI_DMAC_IRQS,
+ CXIDV_TELEM_PI_DMAC_PAYLOAD_MWR_TLPS,
+ CXIDV_TELEM_PI_IPD_CFG_EVENT_CNTS_OVF_CNT,
+ CXIDV_TELEM_PI_IPD_DBIC_DBI_ACKS,
+ CXIDV_TELEM_PI_IPD_DBIC_DBI_REQUESTS,
+ CXIDV_TELEM_PI_IPD_DMAC_P_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_DMAC_P_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_IPD_TRIGGER_EVENTS_0,
+ CXIDV_TELEM_PI_IPD_IPD_TRIGGER_EVENTS_1,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQ_PBAS,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQS_DISCARDED,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQS_SENT,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_LEGACY_IRQS_SENT,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQ_PBAS,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQS_DISCARDED,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQS_SENT,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_LEGACY_IRQS_SENT,
+ CXIDV_TELEM_PI_IPD_MSIXC_PBA_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_MSIXC_PBA_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_MSIXC_PTI_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_MSIXC_PTI_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_MSIXC_TABLE_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_MSIXC_TABLE_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_DATA_PARITY_ERRORS,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_HDR_PARITY_ERRORS,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_TLPS_ABORTED,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_BLOCKED_ON_MB,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_BLOCKED_ON_RARB,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_DATA_PARITY_ERRORS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_HDR_PARITY_ERRORS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MRD_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MSG_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MSGD_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MWR_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_TLPS,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_TLPS_ABORTED,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_NPH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_PD_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_PH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_TAG,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_XALI_NON_POSTED_TLPS,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_XALI_POSTED_TLPS,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_BLOCKED_ON_PD_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_BLOCKED_ON_PH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_XALI_POSTED_TLPS,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_BLOCKED_ON_PD_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_BLOCKED_ON_PH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_XALI_POSTED_TLPS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_NPD_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_NPH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_PD_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_PH_CRD,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_TAG,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_NP_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_NP_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_P_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_P_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_XALI_NON_POSTED_TLPS,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_XALI_POSTED_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_REQUESTS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_DECERRS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_PARERRS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_SLVERRS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_REQUESTS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_RSP_DECERRS,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_RSP_SLVERRS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_MRD_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_MWR_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_NON_POSTED_TLP_DISCARDS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_POSTED_TLP_DISCARDS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_POSTED_TLP_PARTIAL_DISCARDS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_TLP_DISCARDS,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_CA_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_TLPS,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_UR_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_TLP_DISCARDS,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_FIFO_COR_ERRORS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_FIFO_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MSG_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MSGD_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MWR_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_TLP_DISCARDS,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_TLPS,
+ CXIDV_TELEM_PI_PRI_RARB_SRIOVT_COR_ERRORS,
+ CXIDV_TELEM_PI_PRI_RARB_SRIOVT_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_ACXT_COR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_ACXT_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_AMO_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_DATA_COR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_DATA_UCOR_ERROR,
+ CXIDV_TELEM_PI_PTI_TARB_FETCHING_AMO_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_FLUSH_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_HDR_COR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_HDR_UCOR_ERRORS,
+ CXIDV_TELEM_PI_PTI_TARB_INV_RSP_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_IRQ_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_MRD_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_MWR_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_PG_REQ_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_PKT_DISCARDS,
+ CXIDV_TELEM_PI_PTI_TARB_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_RARB_CA_PKTS,
+ CXIDV_TELEM_PI_PTI_TARB_TRANSLATION_PKTS,
+};
+
+static const uint64_t set_rmu[] = {
+ CXIDV_TELEM_RMU_ENET_FRAME_REJECTED_CNTR, CXIDV_TELEM_RMU_ENET_PTLTE_SET_CTRL_ERR_CNTR,
+ CXIDV_TELEM_RMU_ENET_SUCCESS_CNTR, CXIDV_TELEM_RMU_MEM_COR_ERR_CNTR,
+ CXIDV_TELEM_RMU_MEM_UCOR_ERR_CNTR, CXIDV_TELEM_RMU_PTL_INVLD_DFA_CNTR,
+ CXIDV_TELEM_RMU_PTL_INVLD_VNI_CNTR, CXIDV_TELEM_RMU_PTL_NO_PTLTE_CNTR,
+ CXIDV_TELEM_RMU_PTL_SUCCESS_CNTR,
+};
+
+static const uint64_t set_tou[] = {
+ CXIDV_TELEM_TOU_CMD_FIFO_FULL_CYCLES, CXIDV_TELEM_TOU_CQ_TOU_NUM_CMDS,
+ CXIDV_TELEM_TOU_CQ_TOU_NUM_STALLS, CXIDV_TELEM_TOU_CT_CMD_COUNTS_0,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_1, CXIDV_TELEM_TOU_CT_CMD_COUNTS_2,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_3, CXIDV_TELEM_TOU_CT_CMD_COUNTS_4,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_5, CXIDV_TELEM_TOU_CT_CMD_COUNTS_6,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_7, CXIDV_TELEM_TOU_CT_CMD_COUNTS_8,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_9, CXIDV_TELEM_TOU_CT_CMD_COUNTS_10,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_11, CXIDV_TELEM_TOU_CT_CMD_COUNTS_12,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_13, CXIDV_TELEM_TOU_CT_CMD_COUNTS_14,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_15, CXIDV_TELEM_TOU_FAIL_CNTR,
+ CXIDV_TELEM_TOU_LIST_REBUILD_CYCLES, CXIDV_TELEM_TOU_NUM_CT_UPDATES,
+ CXIDV_TELEM_TOU_NUM_DOORBELL_WRITES, CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_0,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_1, CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_2,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_3, CXIDV_TELEM_TOU_NUM_TRIG_CMDS_0,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_1, CXIDV_TELEM_TOU_NUM_TRIG_CMDS_2,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_3, CXIDV_TELEM_TOU_SUCCESS_CNTR,
+ CXIDV_TELEM_TOU_TOU_OXE_NUM_FLITS, CXIDV_TELEM_TOU_TOU_OXE_NUM_IDLES,
+ CXIDV_TELEM_TOU_TOU_OXE_NUM_STALLS,
+};
+
+static const struct {
+ const uint64_t *items;
+ uint32_t count;
+} telem_sets[CXIDV_TELEM_SET_COUNT] = {
+ [CXIDV_TELEM_SET_ETHTOOL] = { set_ethtool, ARRAY_SIZE(set_ethtool) },
+ [CXIDV_TELEM_SET_ATU] = { set_atu, ARRAY_SIZE(set_atu) },
+ [CXIDV_TELEM_SET_CQ] = { set_cq, ARRAY_SIZE(set_cq) },
+ [CXIDV_TELEM_SET_EE] = { set_ee, ARRAY_SIZE(set_ee) },
+ [CXIDV_TELEM_SET_HNI] = { set_hni, ARRAY_SIZE(set_hni) },
+ [CXIDV_TELEM_SET_IXE] = { set_ixe, ARRAY_SIZE(set_ixe) },
+ [CXIDV_TELEM_SET_LPE] = { set_lpe, ARRAY_SIZE(set_lpe) },
+ [CXIDV_TELEM_SET_MB] = { set_mb, ARRAY_SIZE(set_mb) },
+ [CXIDV_TELEM_SET_MST] = { set_mst, ARRAY_SIZE(set_mst) },
+ [CXIDV_TELEM_SET_OXE] = { set_oxe, ARRAY_SIZE(set_oxe) },
+ [CXIDV_TELEM_SET_PARBS] = { set_parbs, ARRAY_SIZE(set_parbs) },
+ [CXIDV_TELEM_SET_PCT] = { set_pct, ARRAY_SIZE(set_pct) },
+ [CXIDV_TELEM_SET_PI] = { set_pi, ARRAY_SIZE(set_pi) },
+ [CXIDV_TELEM_SET_RMU] = { set_rmu, ARRAY_SIZE(set_rmu) },
+ [CXIDV_TELEM_SET_TOU] = { set_tou, ARRAY_SIZE(set_tou) },
+};
+
+const char *cxidv_telem_name(uint32_t item)
+{
+ return item < CXIDV_TELEM_COUNT ? telem_names[item] : NULL;
+}
+
+int cxidv_telem_lookup(const char *name)
+{
+ uint32_t i;
+
+ if (!name)
+ return -1;
+ for (i = 0; i < CXIDV_TELEM_COUNT; i++)
+ if (!strcmp(telem_names[i], name))
+ return i;
+ return -1;
+}
+
+int cxidv_telem_get_set(enum cxidv_telem_set set, const uint64_t **items, uint32_t *count)
+{
+ if ((unsigned int)set >= CXIDV_TELEM_SET_COUNT || !items || !count)
+ return EINVAL;
+ *items = telem_sets[set].items;
+ *count = telem_sets[set].count;
+ return 0;
+}
diff --git a/providers/cxi/cxidv.h b/providers/cxi/cxidv.h
new file mode 100644
index 000000000000..1d9bb428e257
--- /dev/null
+++ b/providers/cxi/cxidv.h
@@ -0,0 +1,418 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/*
+ * Copyright 2026 Hewlett Packard Enterprise Development LP
+ */
+
+/*
+ * Direct-verbs extension for the CXI provider.
+ *
+ * Standard ibv_query_device()/ibv_query_device_ex() cover the generic
+ * device attributes (max_qp, max_cq, vendor_id, ...). CXI has additional
+ * device-wide HW properties (NIC address, PID space geometry, resource
+ * counts, ...) with no standard ibverbs equivalent; this header exposes
+ * those, mirroring the mlx5dv.h / efadv.h pattern used by other rdma-core
+ * providers for vendor-specific data.
+ */
+
+#ifndef __CXIDV_H__
+#define __CXIDV_H__
+
+#include <stdint.h>
+#include <infiniband/verbs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct cxidv_lni {
+ struct ibv_context *context;
+ uint32_t handle;
+ uint32_t id;
+ uint32_t svc_id;
+};
+
+enum cxidv_pid_flags {
+ CXIDV_PID_ABSOLUTE = 1U << 0,
+};
+
+enum cxidv_svc_flags {
+ CXIDV_SVC_LIMITS = 1U << 0,
+ CXIDV_SVC_CREATE_TC = 1U << 1,
+ CXIDV_SVC_ENABLED = 1U << 2,
+};
+
+enum cxidv_svc_resource {
+ CXIDV_SVC_PTES,
+ CXIDV_SVC_TXQS,
+ CXIDV_SVC_TGQS,
+ CXIDV_SVC_EQS,
+ CXIDV_SVC_CTS,
+ CXIDV_SVC_ACS,
+ CXIDV_SVC_TLES,
+ CXIDV_SVC_LES,
+ CXIDV_SVC_RSRC_COUNT,
+};
+
+#define CXIDV_SVC_MAX_VNIS 4
+
+struct cxidv_svc_attr {
+ uint32_t svc_id;
+ /* Reserved; must be zero. */
+ uint16_t vni_min;
+ uint16_t vni_max;
+ /* Exact-list length; zero means system-empty or is_range. */
+ uint32_t vni_count;
+ /* System service requires CAP_SYS_ADMIN; allocation svc_id is zero. */
+ uint32_t is_system_svc;
+ /* Inclusive range endpoints are carried in vnis[0] and vnis[1]. */
+ uint32_t is_range;
+ uint16_t vnis[CXIDV_SVC_MAX_VNIS];
+ uint32_t tc_mask;
+ uint32_t uid;
+ uint32_t flags;
+ uint16_t maximum[CXIDV_SVC_RSRC_COUNT];
+ uint16_t reserved[CXIDV_SVC_RSRC_COUNT];
+};
+
+int cxidv_alloc_svc(struct ibv_context *context, const struct cxidv_svc_attr *attr,
+ uint32_t *svc_id);
+int cxidv_query_svc(struct ibv_context *context, uint32_t svc_id, struct cxidv_svc_attr *attr);
+
+struct cxidv_svc_rsrc_use {
+ uint32_t svc_id;
+ uint32_t tle_pool_id;
+ uint16_t in_use[CXIDV_SVC_RSRC_COUNT];
+};
+
+int cxidv_get_svc_rsrc_use(struct ibv_context *context, uint32_t svc_id,
+ struct cxidv_svc_rsrc_use *usage);
+int cxidv_get_svc_lpr(struct ibv_context *context, uint32_t svc_id, uint32_t *lpr);
+int cxidv_destroy_svc(struct ibv_context *context, uint32_t svc_id);
+int cxidv_enable_svc(struct ibv_context *context, uint32_t svc_id, int enable);
+int cxidv_svc_is_enabled(struct ibv_context *context, uint32_t svc_id, int *enable);
+
+enum cxidv_traffic_class {
+ CXIDV_TC_DEDICATED_ACCESS,
+ CXIDV_TC_LOW_LATENCY,
+ CXIDV_TC_BULK_DATA,
+ CXIDV_TC_BEST_EFFORT,
+ CXIDV_TC_ETH,
+};
+
+int cxidv_alloc_lni(struct ibv_context *context, uint32_t svc_id, struct cxidv_lni **lni);
+int cxidv_destroy_lni(struct cxidv_lni *lni);
+struct ibv_pd *cxidv_alloc_pd(struct cxidv_lni *lni);
+
+struct cxidv_cp {
+ struct cxidv_lni *lni;
+ uint32_t handle;
+ uint32_t vni;
+ uint32_t tc;
+ uint32_t type;
+ uint32_t lcid;
+};
+
+int cxidv_alloc_cp(struct cxidv_lni *lni, uint32_t vni, uint32_t tc, uint32_t type,
+ struct cxidv_cp **out);
+int cxidv_destroy_cp(struct cxidv_cp *cp);
+
+struct cxidv_ct {
+ struct cxidv_lni *lni;
+ uint32_t handle;
+ uint32_t ctn;
+ void *writeback;
+ size_t writeback_size;
+ uint64_t writeback_offset;
+ void *doorbell;
+ size_t doorbell_size;
+};
+
+int cxidv_alloc_ct(struct cxidv_lni *lni, struct cxidv_ct **out);
+int cxidv_inbound_wait(struct ibv_context *context);
+int cxidv_alloc_ct_writeback(struct cxidv_lni *lni, void *writeback, struct cxidv_ct **out);
+int cxidv_destroy_ct(struct cxidv_ct *ct);
+
+struct cxidv_cmdq {
+ struct cxidv_lni *lni;
+ uint32_t handle;
+ uint32_t count;
+ uint32_t index;
+ void *commands;
+ size_t commands_size;
+ uint64_t commands_offset;
+ void *doorbell;
+ size_t doorbell_size;
+};
+
+int cxidv_alloc_cmdq(struct cxidv_lni *lni, uint32_t count, struct cxidv_cmdq **out);
+int cxidv_alloc_trigger_cmdq(struct cxidv_lni *lni, uint32_t count, struct cxidv_cmdq **out);
+int cxidv_destroy_cmdq(struct cxidv_cmdq *cmdq);
+
+struct cxidv_wait {
+ struct cxidv_lni *lni;
+ int fd;
+ /* Library-managed usage count; applications must treat this as read-only. */
+ unsigned int users;
+};
+
+/*
+ * A wait object remains valid until cxidv_destroy_wait() succeeds.
+ *
+ * If another object still references the wait, or another thread is creating
+ * such a reference, cxidv_destroy_wait() returns EBUSY and does not close/free
+ * the wait object. Callers may retry destroy after dependent objects are
+ * destroyed.
+ *
+ * Callers must prevent new operations using this pointer from starting while
+ * final destruction is in progress; a raw pointer cannot protect an operation
+ * that has not yet acquired its library-managed reference.
+ */
+int cxidv_alloc_wait(struct cxidv_lni *lni, struct cxidv_wait **out);
+int cxidv_destroy_wait(struct cxidv_wait *wait);
+
+enum cxidv_eq_flags {
+ CXIDV_EQ_REGISTER_PCT = 1U << 0,
+ CXIDV_EQ_PASSTHROUGH = 1U << 1,
+};
+
+struct cxidv_eq_attr {
+ void *queue;
+ size_t length;
+ uint32_t threshold_base;
+ uint32_t threshold_delta;
+ uint32_t threshold_count;
+ uint32_t ec_delay;
+ uint32_t cpu;
+ uint32_t reserved_slots;
+ uint32_t flags;
+ struct cxidv_wait *event_wait;
+ struct cxidv_wait *status_wait;
+};
+
+struct cxidv_eq {
+ struct cxidv_lni *lni;
+ struct cxidv_wait *event_wait;
+ struct cxidv_wait *status_wait;
+ uint32_t handle;
+ uint32_t eqn;
+ void *doorbell;
+ size_t doorbell_size;
+};
+
+int cxidv_alloc_eq(struct cxidv_lni *lni, struct ibv_mr *mr, const struct cxidv_eq_attr *attr,
+ struct cxidv_eq **out);
+int cxidv_destroy_eq(struct cxidv_eq *eq);
+
+struct cxidv_csr {
+ struct ibv_context *context;
+ uint32_t handle;
+ void *address;
+ size_t length;
+ uint64_t mmap_offset;
+};
+
+int cxidv_map_csrs(struct ibv_context *context, struct cxidv_csr **out);
+int cxidv_unmap_csrs(struct cxidv_csr *csr);
+int cxidv_read_csr(const struct cxidv_csr *csr, uint64_t offset, void *value, size_t length);
+int cxidv_write_csr(const struct cxidv_csr *csr, uint64_t offset, const void *value, size_t length);
+int cxidv_write8_csr(const struct cxidv_csr *csr, uint64_t offset, uint8_t value);
+
+int cxidv_alloc_pid(struct ibv_pd *pd, uint32_t flags, uint32_t *pid);
+int cxidv_query_pid(struct ibv_pd *pd, uint32_t *pid);
+
+enum cxidv_cassini_version {
+ CXIDV_CASSINI_1_0 = 1,
+ CXIDV_CASSINI_1_1 = 2,
+ CXIDV_CASSINI_2_0 = 4,
+};
+
+enum cxidv_system_type_identifier {
+ CXIDV_SYSTEM_TYPE_CASSINI_1_ONLY = 0,
+ CXIDV_SYSTEM_TYPE_CASSINI_2_ONLY = 1,
+ CXIDV_SYSTEM_TYPE_MIXED = 2,
+};
+
+/*
+ * Device-wide HW properties. Field layout is this header's own stable ABI,
+ * not a copy of the kernel's internal cxi_ibv_devinfo layout, so the two can
+ * evolve independently.
+ */
+struct cxidv_devinfo {
+ uint32_t nid; /* 20-bit NIC address (NID) of this port */
+ uint32_t pid_bits; /* width of the PID field (6-9 bits) */
+ uint32_t pid_count; /* number of PIDs per VNI */
+ uint32_t pid_granule; /* PID space granularity */
+ uint32_t min_free_shift;
+ uint32_t rdzv_get_idx;
+ uint32_t vendor_id;
+ uint32_t device_id;
+ uint32_t device_rev;
+ uint32_t device_proto;
+ uint32_t device_platform;
+ uint32_t pct_eq;
+ int32_t uc_nic;
+ uint64_t link_mtu;
+ uint64_t link_speed;
+ uint8_t link_state;
+ uint16_t num_ptes;
+ uint16_t num_txqs;
+ uint16_t num_tgqs;
+ uint16_t num_eqs;
+ uint16_t num_cts;
+ uint16_t num_acs;
+ uint16_t num_tles;
+ uint16_t num_les;
+ uint32_t cassini_version; /* enum cxidv_cassini_version */
+ uint32_t system_type_identifier; /* enum cxidv_system_type_identifier */
+ char fru_description[16];
+};
+
+/*
+ * Returns 0 and fills @attr on success. Returns EOPNOTSUPP if @ibvctx is not
+ * a CXI device, or if the driver couldn't fetch this data at context-open
+ * time (see cxi_alloc_context() in cxi.c).
+ */
+int cxidv_query_device(struct ibv_context *ibvctx, struct cxidv_devinfo *attr);
+
+struct cxidv_mr_info {
+ uint64_t va;
+ uint64_t iova;
+ uint64_t length;
+ int32_t page_shift;
+ int32_t huge_shift;
+ uint32_t id;
+ uint32_t lac;
+};
+
+int cxidv_mr_from_ibv_mr(struct ibv_mr *mr, struct cxidv_mr_info *info);
+struct ibv_mr *cxidv_reg_native_mr(struct ibv_pd *pd, void *address, size_t length, uint32_t flags);
+
+/*
+ * Direct access to the CXI EQ backing an ibv_cq, for a consumer (libcxi)
+ * that needs to poll the hardware ring directly rather than through
+ * ibv_poll_cq(). ibv_create_cq()/ibv_destroy_cq() still own the CQ's
+ * lifetime; this just exposes what the provider already mmap'd for its own
+ * internal use (mirrors the mlx5dv_init_obj()/efadv_create_cq() pattern).
+ */
+struct cxidv_cq {
+ uint64_t comp_mask;
+ void *eq_buf; /* mmap'd event-ring buffer */
+ uint64_t eq_buf_size;
+ void *eq_db; /* mmap'd EQ doorbell/CSR */
+ uint64_t eq_db_size;
+ uint32_t eqn; /* hardware EQ index */
+};
+
+/*
+ * Returns 0 and fills @attr on success. Returns EOPNOTSUPP if @ibvcq was not
+ * created against a CXI device.
+ */
+int cxidv_cq_from_ibv_cq(struct ibv_cq *ibvcq, struct cxidv_cq *attr);
+
+/*
+ * Direct access to the TXQ/TGQ/PTE state backing an ibv_qp, for a consumer
+ * (libcxi) that needs to post commands directly onto the hardware rings
+ * rather than through ibv_post_send()/ibv_post_recv(). ibv_create_qp_ex()/
+ * ibv_destroy_qp() still own the QP's lifetime; this just exposes what the
+ * provider already mmap'd for its own internal use.
+ *
+ * pte_index is only valid once the QP has reached RTR (modify_qp); -1
+ * otherwise, mirroring struct cxi_qp's own convention.
+ */
+struct cxidv_qp {
+ uint64_t comp_mask;
+ void *txq_cmds;
+ uint64_t txq_cmds_size;
+ void *txq_db;
+ uint64_t txq_db_size;
+ uint32_t txq_idx;
+ uint32_t lcid;
+ void *tgq_cmds;
+ uint64_t tgq_cmds_size;
+ void *tgq_db;
+ uint64_t tgq_db_size;
+ uint32_t tgq_idx;
+ int32_t pte_index;
+};
+
+/*
+ * Returns 0 and fills @attr on success. Returns EOPNOTSUPP if @ibvqp was not
+ * created against a CXI device.
+ */
+int cxidv_qp_from_ibv_qp(struct ibv_qp *ibvqp, struct cxidv_qp *attr);
+
+/*
+ * Change the src_id (see IBV_RU_ATTR_SRC_ID) @ibvqp reports to its peers.
+ * Takes effect on the next work request posted; anything already built
+ * (posted or staged via the ibv_qp_ex builder but not yet flushed) keeps
+ * whatever value was in effect when it was built. Returns EOPNOTSUPP if
+ * @ibvqp was not created against a CXI device.
+ */
+int cxidv_modify_qp_src_id(struct ibv_qp *ibvqp, uint32_t src_id);
+
+enum cxidv_job_tc_flags {
+ CXIDV_JOB_TC_F_CREATE = 1U << 0,
+};
+
+struct cxidv_limits {
+ uint16_t max;
+ uint16_t res;
+};
+
+struct cxidv_job_tc_attr {
+ uint32_t flags;
+ uint32_t job_id;
+ uint32_t svc_id; /* existing service to bind, 0 = allocate one */
+ uint32_t tc;
+ uint32_t tc_type;
+ struct cxidv_limits ptes;
+ struct cxidv_limits txqs;
+ struct cxidv_limits tgqs;
+ struct cxidv_limits eqs;
+ struct cxidv_limits cts;
+ struct cxidv_limits les;
+ struct cxidv_limits tles;
+ struct cxidv_limits acs;
+ uint32_t bound_svc_id;
+};
+
+int cxidv_bind_job_tc(struct ibv_context *ibvctx, struct cxidv_job_tc_attr *attr);
+int cxidv_clear_job_tc(struct ibv_context *ibvctx, uint32_t tc, uint32_t tc_type);
+
+/*
+ * Select the traffic class subsequent QPs on @ibvctx are created with, without
+ * provisioning anything. Use this to run on an already-configured TC;
+ * cxidv_bind_job_tc() is only needed to create a TC or a JobID service.
+ *
+ * Cached updates from this function and cxidv_bind_job_tc() are synchronized
+ * with concurrent QP creation. Each QP uses the cached traffic class observed
+ * when the provider snapshots it during creation; a concurrent update may
+ * therefore affect that QP or a later one.
+ */
+int cxidv_set_default_tc(struct ibv_context *ibvctx, uint32_t tc);
+
+struct cxidv_tc_entry {
+ uint32_t tc;
+ uint32_t tc_type;
+ uint32_t res_req_dscp;
+ uint32_t unres_req_dscp;
+ uint32_t res_rsp_dscp;
+ uint32_t unres_rsp_dscp;
+ uint32_t req_pcp;
+ uint32_t rsp_pcp;
+ uint32_t ocuset;
+ uint32_t cq_tc;
+ uint32_t req_bc;
+ uint32_t flags;
+};
+
+#define CXIDV_TC_ENTRY_F_CREATED_BY_RDMA (1U << 0)
+
+int cxidv_query_tcs(struct ibv_context *ibvctx, struct cxidv_tc_entry *entries,
+ uint32_t max_entries, uint32_t *count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CXIDV_H__ */
diff --git a/providers/cxi/cxidv_telem.h b/providers/cxi/cxidv_telem.h
new file mode 100644
index 000000000000..6f8ff76d134b
--- /dev/null
+++ b/providers/cxi/cxidv_telem.h
@@ -0,0 +1,1984 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/* Copyright 2024-2026 Hewlett Packard Enterprise Development LP */
+
+/*
+ * Cassini telemetry items. The kernel knows items only by number;
+ * everything here is the user space naming of them.
+ *
+ * Read items through an ibv_counters object created with
+ * ibv_create_counters() and read with ibv_read_counters_ex(), which
+ * returns one value and one CLOCK_REALTIME timestamp in nanoseconds
+ * for each requested item. Items that do not exist on the device
+ * read as zero with a zero timestamp.
+ */
+
+#ifndef CXIDV_TELEM_H
+#define CXIDV_TELEM_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum cxidv_telem_item {
+ CXIDV_TELEM_UNDEFINED = 0,
+ CXIDV_TELEM_ATU_AT_STALL_CCP = 1,
+ CXIDV_TELEM_ATU_AT_STALL_NO_PTID = 2,
+ CXIDV_TELEM_ATU_AT_STALL_NP_CDTS = 3,
+ CXIDV_TELEM_ATU_AT_STALL_TARB_ARB = 4,
+ CXIDV_TELEM_ATU_ATS_DYNAMIC_STATE_CHANGE_CNTR = 5,
+ CXIDV_TELEM_ATU_ATS_INVAL_CNTR = 6,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_0 = 7,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_1 = 8,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_2 = 9,
+ CXIDV_TELEM_ATU_ATS_PRS_ODP_LATENCY_3 = 10,
+ CXIDV_TELEM_ATU_ATS_TRANS_ERR = 11,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_0 = 12,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_1 = 13,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_2 = 14,
+ CXIDV_TELEM_ATU_ATS_TRANS_LATENCY_3 = 15,
+ CXIDV_TELEM_ATU_ATUCQ_INVAL_CNTR = 16,
+ CXIDV_TELEM_ATU_CACHE_EVICTIONS = 17,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_0 = 18,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_1 = 19,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_2 = 20,
+ CXIDV_TELEM_ATU_CACHE_HIT_BASE_PAGE_SIZE_3 = 21,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_0 = 22,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_1 = 23,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_2 = 24,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE1_PAGE_SIZE_3 = 25,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_0 = 26,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_1 = 27,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_2 = 28,
+ CXIDV_TELEM_ATU_CACHE_HIT_DERIVATIVE2_PAGE_SIZE_3 = 29,
+ CXIDV_TELEM_ATU_CACHE_MISS_0 = 30,
+ CXIDV_TELEM_ATU_CACHE_MISS_1 = 31,
+ CXIDV_TELEM_ATU_CACHE_MISS_2 = 32,
+ CXIDV_TELEM_ATU_CACHE_MISS_3 = 33,
+ CXIDV_TELEM_ATU_CACHE_MISS_EE = 34,
+ CXIDV_TELEM_ATU_CACHE_MISS_IXE = 35,
+ CXIDV_TELEM_ATU_CACHE_MISS_OXE = 36,
+ CXIDV_TELEM_ATU_CLIENT_REQ_EE = 37,
+ CXIDV_TELEM_ATU_CLIENT_REQ_IXE = 38,
+ CXIDV_TELEM_ATU_CLIENT_REQ_OXE = 39,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_0 = 40,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_1 = 41,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_2 = 42,
+ CXIDV_TELEM_ATU_CLIENT_RSP_NOT_OK_3 = 43,
+ CXIDV_TELEM_ATU_FILTERED_REQUESTS = 44,
+ CXIDV_TELEM_ATU_IMPLICIT_ATS_EN_INVAL_CNTR = 45,
+ CXIDV_TELEM_ATU_IMPLICIT_FLR_INVAL_CNTR = 46,
+ CXIDV_TELEM_ATU_INVAL_STALL_ARB = 47,
+ CXIDV_TELEM_ATU_INVAL_STALL_CMPL_WAIT = 48,
+ CXIDV_TELEM_ATU_MEM_COR_ERR_CNTR = 49,
+ CXIDV_TELEM_ATU_MEM_UCOR_ERR_CNTR = 50,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_0 = 51,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_1 = 52,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_2 = 53,
+ CXIDV_TELEM_ATU_NIC_PRI_ODP_LATENCY_3 = 54,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_0 = 55,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_1 = 56,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_2 = 57,
+ CXIDV_TELEM_ATU_NTA_TRANS_LATENCY_3 = 58,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_0 = 59,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_1 = 60,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_2 = 61,
+ CXIDV_TELEM_ATU_ODP_REQUESTS_3 = 62,
+ CXIDV_TELEM_ATU_PCIE_ERR_POISONED = 63,
+ CXIDV_TELEM_ATU_PCIE_UNSUCCESS_CMPL = 64,
+ CXIDV_TELEM_CQ_CFG_EVENT_CNTS_OVF_CNT = 65,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_0 = 66,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_1 = 67,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_2 = 68,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_3 = 69,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_4 = 70,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_5 = 71,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_6 = 72,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_7 = 73,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_8 = 74,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_9 = 75,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_10 = 76,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_11 = 77,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_12 = 78,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_13 = 79,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_14 = 80,
+ CXIDV_TELEM_CQ_CQ_CMD_COUNTS_15 = 81,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_FLITS = 82,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_IDLES = 83,
+ CXIDV_TELEM_CQ_CQ_OXE_NUM_STALLS = 84,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_FLITS = 85,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_IDLES = 86,
+ CXIDV_TELEM_CQ_CQ_TOU_NUM_STALLS = 87,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_0 = 88,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_1 = 89,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_2 = 90,
+ CXIDV_TELEM_CQ_CYCLES_BLOCKED_3 = 91,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_0 = 92,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_1 = 93,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_2 = 94,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_3 = 95,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_4 = 96,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_5 = 97,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_6 = 98,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_7 = 99,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_8 = 100,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_9 = 101,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_10 = 102,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_11 = 103,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_12 = 104,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_13 = 105,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_14 = 106,
+ CXIDV_TELEM_CQ_DMA_CMD_COUNTS_15 = 107,
+ CXIDV_TELEM_CQ_FAIL_TGT_CNTR = 108,
+ CXIDV_TELEM_CQ_FAIL_TX_CNTR = 109,
+ CXIDV_TELEM_CQ_MEM_COR_ERR_CNTR = 110,
+ CXIDV_TELEM_CQ_MEM_UCOR_ERR_CNTR = 111,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_0 = 112,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_1 = 113,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_2 = 114,
+ CXIDV_TELEM_CQ_NUM_CQ_CMDS_3 = 115,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_0 = 116,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_1 = 117,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_2 = 118,
+ CXIDV_TELEM_CQ_NUM_DMA_CMDS_3 = 119,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_0 = 120,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_1 = 121,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_2 = 122,
+ CXIDV_TELEM_CQ_NUM_IDC_CMDS_3 = 123,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_0 = 124,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_1 = 125,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_2 = 126,
+ CXIDV_TELEM_CQ_NUM_LL_CMDS_3 = 127,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_0 = 128,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_1 = 129,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_2 = 130,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_RECEIVED_3 = 131,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_0 = 132,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_1 = 133,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_2 = 134,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_REJECTED_3 = 135,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_0 = 136,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_1 = 137,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_2 = 138,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SPLIT_3 = 139,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_0 = 140,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_1 = 141,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_2 = 142,
+ CXIDV_TELEM_CQ_NUM_LL_OPS_SUCCESSFUL_3 = 143,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_0 = 144,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_1 = 145,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_2 = 146,
+ CXIDV_TELEM_CQ_NUM_TGQ_CMD_READS_3 = 147,
+ CXIDV_TELEM_CQ_NUM_TGT_CMD_ARG_ERRORS = 148,
+ CXIDV_TELEM_CQ_NUM_TGT_CMD_PERM_ERRORS = 149,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_0 = 150,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_1 = 151,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_2 = 152,
+ CXIDV_TELEM_CQ_NUM_TGT_CMDS_3 = 153,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_0 = 154,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_1 = 155,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_2 = 156,
+ CXIDV_TELEM_CQ_NUM_TOU_CMD_READS_3 = 157,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_ALIGN_ERRORS = 158,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_ARG_ERRORS = 159,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_OP_ERRORS = 160,
+ CXIDV_TELEM_CQ_NUM_TX_CMD_PERM_ERRORS = 161,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_0 = 162,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_1 = 163,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_2 = 164,
+ CXIDV_TELEM_CQ_NUM_TXQ_CMD_READS_3 = 165,
+ CXIDV_TELEM_CQ_RARB_ERR_CNTR = 166,
+ CXIDV_TELEM_CQ_RARB_LL_ERR_CNTR = 167,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_EE_EVENT_CREDITS = 168,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_FQ_SH_CREDITS = 169,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_FQ_TOT_CREDITS = 170,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_LPE_CMD_CREDITS = 171,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_LPE_RCV_FIFO_CREDITS = 172,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_PREFETCH_TOU_CREDITS = 173,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TARB_NP_CREDITS = 174,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TARB_P_CREDITS = 175,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TGQ_CMD_FAIL_EVENT_CREDITS = 176,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_CMD_FAIL_EVENT_CREDITS = 177,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_EVENT_CREDITS = 178,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_FQ_CREDITS = 179,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TOU_WB_CREDITS = 180,
+ CXIDV_TELEM_CQ_STS_CREDITS_IN_USE_TXQ_CMD_FAIL_EVENT_CREDITS = 181,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_0 = 182,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_1 = 183,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_2 = 184,
+ CXIDV_TELEM_CQ_STS_DMA_PAYLOAD_DATA_3 = 185,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_0 = 186,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_1 = 187,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_2 = 188,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_3 = 189,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_4 = 190,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_5 = 191,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_6 = 192,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_7 = 193,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_8 = 194,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_9 = 195,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_10 = 196,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_11 = 197,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_12 = 198,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_13 = 199,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_14 = 200,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_15 = 201,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_16 = 202,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_17 = 203,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_18 = 204,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_19 = 205,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_20 = 206,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_21 = 207,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_22 = 208,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_23 = 209,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_24 = 210,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_25 = 211,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_26 = 212,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_27 = 213,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_28 = 214,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_29 = 215,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_30 = 216,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_31 = 217,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_32 = 218,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_33 = 219,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_34 = 220,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_35 = 221,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_36 = 222,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_37 = 223,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_38 = 224,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_39 = 225,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_40 = 226,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_41 = 227,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_42 = 228,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_43 = 229,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_44 = 230,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_45 = 231,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_46 = 232,
+ CXIDV_TELEM_CQ_STS_FQ_LOAD_47 = 233,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_0 = 234,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_1 = 235,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_2 = 236,
+ CXIDV_TELEM_CQ_STS_IDC_PAYLOAD_DATA_3 = 237,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_0 = 238,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_1 = 239,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_2 = 240,
+ CXIDV_TELEM_CQ_STS_LL_DMA_PAYLOAD_DATA_3 = 241,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_0 = 242,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_1 = 243,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_2 = 244,
+ CXIDV_TELEM_CQ_STS_LL_IDC_PAYLOAD_DATA_3 = 245,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_0 = 246,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_1 = 247,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_2 = 248,
+ CXIDV_TELEM_CQ_STS_TLE_IN_USE_3 = 249,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_0 = 250,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_1 = 251,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_2 = 252,
+ CXIDV_TELEM_CQ_STS_TOU_PAYLOAD_DATA_3 = 253,
+ CXIDV_TELEM_CQ_SUCCESS_TGT_CNTR = 254,
+ CXIDV_TELEM_CQ_SUCCESS_TX_CNTR = 255,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_0 = 256,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_1 = 257,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_2 = 258,
+ CXIDV_TELEM_CQ_TGT_WAITING_ON_READ_3 = 259,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_0 = 260,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_1 = 261,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_2 = 262,
+ CXIDV_TELEM_CQ_TX_WAITING_ON_READ_3 = 263,
+ CXIDV_TELEM_CQ_WR_PTR_UPDT_ERR_CNTR = 264,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_0 = 265,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_1 = 266,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_2 = 267,
+ CXIDV_TELEM_EE_ADDR_TRANS_PREFETCH_CNTR_3 = 268,
+ CXIDV_TELEM_EE_ADDR_TRANS_REQ_CNTR = 269,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_0 = 270,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_1 = 271,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_2 = 272,
+ CXIDV_TELEM_EE_CBS_WRITTEN_CNTR_3 = 273,
+ CXIDV_TELEM_EE_CE_ARB_OUT_EVENT_CNTR = 274,
+ CXIDV_TELEM_EE_CE_ARB_OUT_STALL_CNTR = 275,
+ CXIDV_TELEM_EE_CQ_EVENT_REQ_CNTR = 276,
+ CXIDV_TELEM_EE_CQ_FE_CNTR = 277,
+ CXIDV_TELEM_EE_CQ_FE_STALL_CNTR = 278,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_0 = 279,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_1 = 280,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_2 = 281,
+ CXIDV_TELEM_EE_DEFERRED_EQ_SWITCH_CNTR_3 = 282,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_0 = 283,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_1 = 284,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_2 = 285,
+ CXIDV_TELEM_EE_EQ_BUFFER_SWITCH_CNTR_3 = 286,
+ CXIDV_TELEM_EE_EQ_DSABLD_EVENT_ERR_CNTR = 287,
+ CXIDV_TELEM_EE_EQ_DSABLD_LPEQ_ERR_CNTR = 288,
+ CXIDV_TELEM_EE_EQ_DSABLD_SWS_ERR_CNTR = 289,
+ CXIDV_TELEM_EE_EQ_RSRVN_UFLW_ERR_CNTR = 290,
+ CXIDV_TELEM_EE_EQ_STATE_UCOR_ERR_CNTR = 291,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_0 = 292,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_1 = 293,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_2 = 294,
+ CXIDV_TELEM_EE_EQ_STATUS_UPDATE_CNTR_3 = 295,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_0 = 296,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_1 = 297,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_2 = 298,
+ CXIDV_TELEM_EE_EQ_SW_STATE_WR_CNTR_3 = 299,
+ CXIDV_TELEM_EE_EQS_ARB_OUT_REQ_CNTR = 300,
+ CXIDV_TELEM_EE_EQS_CSR_REQ_CNTR = 301,
+ CXIDV_TELEM_EE_EQS_CSR_STALL_CNTR = 302,
+ CXIDV_TELEM_EE_EQS_EVENT_REQ_CNTR = 303,
+ CXIDV_TELEM_EE_EQS_EVENT_STALL_CNTR = 304,
+ CXIDV_TELEM_EE_EQS_EXPIRED_CB_REQ_CNTR = 305,
+ CXIDV_TELEM_EE_EQS_EXPIRED_CB_STALL_CNTR = 306,
+ CXIDV_TELEM_EE_EQS_FREE_CB_STALL_CNTR = 307,
+ CXIDV_TELEM_EE_EQS_HWS_INIT_REQ_CNTR = 308,
+ CXIDV_TELEM_EE_EQS_HWS_INIT_STALL_CNTR = 309,
+ CXIDV_TELEM_EE_EQS_LPE_QUERY_REQ_CNTR = 310,
+ CXIDV_TELEM_EE_EQS_STS_UPDT_REQ_CNTR = 311,
+ CXIDV_TELEM_EE_EQS_STS_UPDT_STALL_CNTR = 312,
+ CXIDV_TELEM_EE_EQS_SWS_WR_REQ_CNTR = 313,
+ CXIDV_TELEM_EE_EQS_SWS_WR_STALL_CNTR = 314,
+ CXIDV_TELEM_EE_EVENT_ACK_CNTR = 315,
+ CXIDV_TELEM_EE_EVENT_ATOMIC_CNTR = 316,
+ CXIDV_TELEM_EE_EVENT_ATOMIC_OVERFLOW_CNTR = 317,
+ CXIDV_TELEM_EE_EVENT_COMMAND_FAILURE_CNTR = 318,
+ CXIDV_TELEM_EE_EVENT_EQ_SWITCH_CNTR = 319,
+ CXIDV_TELEM_EE_EVENT_ERROR_CNTR = 320,
+ CXIDV_TELEM_EE_EVENT_ETHERNET_CNTR = 321,
+ CXIDV_TELEM_EE_EVENT_ETHERNET_FGFC_CNTR = 322,
+ CXIDV_TELEM_EE_EVENT_FETCH_ATOMIC_CNTR = 323,
+ CXIDV_TELEM_EE_EVENT_FETCH_ATOMIC_OVERFLOW_CNTR = 324,
+ CXIDV_TELEM_EE_EVENT_GET_CNTR = 325,
+ CXIDV_TELEM_EE_EVENT_GET_OVERFLOW_CNTR = 326,
+ CXIDV_TELEM_EE_EVENT_LINK_CNTR = 327,
+ CXIDV_TELEM_EE_EVENT_MATCH_CNTR = 328,
+ CXIDV_TELEM_EE_EVENT_NULL_EVENT_CNTR = 329,
+ CXIDV_TELEM_EE_EVENT_PCT_CNTR = 330,
+ CXIDV_TELEM_EE_EVENT_PUT_CNTR = 331,
+ CXIDV_TELEM_EE_EVENT_PUT_OVERFLOW_CNTR = 332,
+ CXIDV_TELEM_EE_EVENT_RENDEZVOUS_CNTR = 333,
+ CXIDV_TELEM_EE_EVENT_REPLY_CNTR = 334,
+ CXIDV_TELEM_EE_EVENT_SEARCH_CNTR = 335,
+ CXIDV_TELEM_EE_EVENT_SEND_CNTR = 336,
+ CXIDV_TELEM_EE_EVENT_STATE_CHANGE_CNTR = 337,
+ CXIDV_TELEM_EE_EVENT_TIMESTAMP_CNTR = 338,
+ CXIDV_TELEM_EE_EVENT_TRIGGERED_OP_CNTR = 339,
+ CXIDV_TELEM_EE_EVENT_UNLINK_CNTR = 340,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_0 = 341,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_1 = 342,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_2 = 343,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_FC_SC_CNTR_3 = 344,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_0 = 345,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_1 = 346,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_2 = 347,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_ORDINARY_CNTR_3 = 348,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_0 = 349,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_1 = 350,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_2 = 351,
+ CXIDV_TELEM_EE_EVENTS_DROPPED_RSRVN_CNTR_3 = 352,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_0 = 353,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_1 = 354,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_2 = 355,
+ CXIDV_TELEM_EE_EVENTS_ENQUEUED_CNTR_3 = 356,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_0 = 357,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_1 = 358,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_2 = 359,
+ CXIDV_TELEM_EE_EXPIRED_CBS_WRITTEN_CNTR_3 = 360,
+ CXIDV_TELEM_EE_FE_ARB_OUT_EVENT_CNTR = 361,
+ CXIDV_TELEM_EE_FE_ARB_OUT_STALL_CNTR = 362,
+ CXIDV_TELEM_EE_HNI_EVENT_REQ_CNTR = 363,
+ CXIDV_TELEM_EE_HNI_FE_CNTR = 364,
+ CXIDV_TELEM_EE_HNI_FE_STALL_CNTR = 365,
+ CXIDV_TELEM_EE_IXE_CE_CNTR = 366,
+ CXIDV_TELEM_EE_IXE_CE_STALL_CNTR = 367,
+ CXIDV_TELEM_EE_IXE_DD_CNTR = 368,
+ CXIDV_TELEM_EE_IXE_EVENT_REQ_CNTR = 369,
+ CXIDV_TELEM_EE_IXE_FE_CNTR = 370,
+ CXIDV_TELEM_EE_IXE_FE_STALL_CNTR = 371,
+ CXIDV_TELEM_EE_LPE_CE_CNTR = 372,
+ CXIDV_TELEM_EE_LPE_CE_STALL_CNTR = 373,
+ CXIDV_TELEM_EE_LPE_DD_CNTR = 374,
+ CXIDV_TELEM_EE_LPE_EVENT_REQ_CNTR = 375,
+ CXIDV_TELEM_EE_LPE_FE_CNTR = 376,
+ CXIDV_TELEM_EE_LPE_FE_STALL_CNTR = 377,
+ CXIDV_TELEM_EE_LPE_QUERY_EQ_NONE_CNTR = 378,
+ CXIDV_TELEM_EE_MEM_COR_ERR_CNTR = 379,
+ CXIDV_TELEM_EE_MEM_UCOR_ERR_CNTR = 380,
+ CXIDV_TELEM_EE_MST_CE_CNTR = 381,
+ CXIDV_TELEM_EE_MST_CE_STALL_CNTR = 382,
+ CXIDV_TELEM_EE_MST_DD_CNTR = 383,
+ CXIDV_TELEM_EE_MST_EVENT_REQ_CNTR = 384,
+ CXIDV_TELEM_EE_MST_FE_CNTR = 385,
+ CXIDV_TELEM_EE_MST_FE_STALL_CNTR = 386,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_0 = 387,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_1 = 388,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_2 = 389,
+ CXIDV_TELEM_EE_PARTIAL_CBS_WRITTEN_CNTR_3 = 390,
+ CXIDV_TELEM_EE_PCT_CE_CNTR = 391,
+ CXIDV_TELEM_EE_PCT_CE_STALL_CNTR = 392,
+ CXIDV_TELEM_EE_PCT_DD_CNTR = 393,
+ CXIDV_TELEM_EE_PCT_EVENT_REQ_CNTR = 394,
+ CXIDV_TELEM_EE_PCT_FE_CNTR = 395,
+ CXIDV_TELEM_EE_PCT_FE_STALL_CNTR = 396,
+ CXIDV_TELEM_EE_RARB_HW_ERR_CNTR = 397,
+ CXIDV_TELEM_EE_RARB_SW_ERR_CNTR = 398,
+ CXIDV_TELEM_EE_STS_ECBS_IN_USE_ECBS_IN_USE = 399,
+ CXIDV_TELEM_EE_STS_ECBS_IN_USE_MAX_ECBS_IN_USE = 400,
+ CXIDV_TELEM_EE_TARB_ERR_CNTR = 401,
+ CXIDV_TELEM_EE_TARB_IRQ_REQ_CNTR = 402,
+ CXIDV_TELEM_EE_TARB_STALL_CNTR = 403,
+ CXIDV_TELEM_EE_TARB_WR_REQ_CNTR = 404,
+ CXIDV_TELEM_EE_TS_FE_CNTR = 405,
+ CXIDV_TELEM_EE_TS_FE_STALL_CNTR = 406,
+ CXIDV_TELEM_EE_UNXPCTD_TRNSLTN_RSP_ERR_CNTR = 407,
+ CXIDV_TELEM_HNI_CFG_EVENT_CNTS_OVF_CNT = 408,
+ CXIDV_TELEM_HNI_COR_ECC_ERR_CNTR = 409,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_0 = 410,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_1 = 411,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_2 = 412,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_3 = 413,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_4 = 414,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_5 = 415,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_6 = 416,
+ CXIDV_TELEM_HNI_DISCARD_CNTR_7 = 417,
+ CXIDV_TELEM_HNI_FGFC_DISCARD = 418,
+ CXIDV_TELEM_HNI_FGFC_EVENT_XOFF = 419,
+ CXIDV_TELEM_HNI_FGFC_EVENT_XON = 420,
+ CXIDV_TELEM_HNI_FGFC_IPV4 = 421,
+ CXIDV_TELEM_HNI_FGFC_IPV6 = 422,
+ CXIDV_TELEM_HNI_FGFC_L2 = 423,
+ CXIDV_TELEM_HNI_FGFC_MATCH = 424,
+ CXIDV_TELEM_HNI_FGFC_PORT = 425,
+ CXIDV_TELEM_HNI_HRP_ACK = 426,
+ CXIDV_TELEM_HNI_HRP_RESP = 427,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_CTL_OS = 428,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_NACK_ERROR = 429,
+ CXIDV_TELEM_HNI_LLR_RX_ACK_NACK_SEQ_ERR = 430,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_CTL_FR = 431,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_LOSSLESS = 432,
+ CXIDV_TELEM_HNI_LLR_RX_BAD_LOSSY = 433,
+ CXIDV_TELEM_HNI_LLR_RX_DUPLICATE_SEQ = 434,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_BAD = 435,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_GOOD = 436,
+ CXIDV_TELEM_HNI_LLR_RX_EXPECTED_SEQ_POISONED = 437,
+ CXIDV_TELEM_HNI_LLR_RX_INIT_CTL_OS = 438,
+ CXIDV_TELEM_HNI_LLR_RX_INIT_ECHO_CTL_OS = 439,
+ CXIDV_TELEM_HNI_LLR_RX_LOOP_TIME_REQ_CTL_FR = 440,
+ CXIDV_TELEM_HNI_LLR_RX_LOOP_TIME_RSP_CTL_FR = 441,
+ CXIDV_TELEM_HNI_LLR_RX_NACK_CTL_OS = 442,
+ CXIDV_TELEM_HNI_LLR_RX_OK_LOSSLESS = 443,
+ CXIDV_TELEM_HNI_LLR_RX_OK_LOSSY = 444,
+ CXIDV_TELEM_HNI_LLR_RX_POISONED_LOSSLESS = 445,
+ CXIDV_TELEM_HNI_LLR_RX_POISONED_LOSSY = 446,
+ CXIDV_TELEM_HNI_LLR_RX_REPLAY_EVENT = 447,
+ CXIDV_TELEM_HNI_LLR_RX_UNEXPECTED_SEQ = 448,
+ CXIDV_TELEM_HNI_LLR_TX_ACK_CTL_OS = 449,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSLESS = 450,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSLESS_RPT = 451,
+ CXIDV_TELEM_HNI_LLR_TX_BAD_LOSSY = 452,
+ CXIDV_TELEM_HNI_LLR_TX_DISCARD = 453,
+ CXIDV_TELEM_HNI_LLR_TX_INIT_CTL_OS = 454,
+ CXIDV_TELEM_HNI_LLR_TX_INIT_ECHO_CTL_OS = 455,
+ CXIDV_TELEM_HNI_LLR_TX_LLR_BLOCKED = 456,
+ CXIDV_TELEM_HNI_LLR_TX_LLR_UNBLOCKED = 457,
+ CXIDV_TELEM_HNI_LLR_TX_LOOP_TIME_REQ_CTL_FR = 458,
+ CXIDV_TELEM_HNI_LLR_TX_LOOP_TIME_RSP_CTL_FR = 459,
+ CXIDV_TELEM_HNI_LLR_TX_NACK_CTL_OS = 460,
+ CXIDV_TELEM_HNI_LLR_TX_OK_BYPASS = 461,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSLESS = 462,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSLESS_RPT = 463,
+ CXIDV_TELEM_HNI_LLR_TX_OK_LOSSY = 464,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSLESS = 465,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSLESS_RPT = 466,
+ CXIDV_TELEM_HNI_LLR_TX_POISONED_LOSSY = 467,
+ CXIDV_TELEM_HNI_LLR_TX_REPLAY_EVENT = 468,
+ CXIDV_TELEM_HNI_MAC_RX_FRAGMENT = 469,
+ CXIDV_TELEM_HNI_MAC_RX_ILLEGAL_SIZE = 470,
+ CXIDV_TELEM_HNI_MAC_RX_PREAMBLE_ERROR = 471,
+ CXIDV_TELEM_HNI_MAC_TX_IFG_ADJUSTMENT_SYNC = 472,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_0 = 473,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_1 = 474,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_2 = 475,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_3 = 476,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_4 = 477,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_5 = 478,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_6 = 479,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_RECV_BY_TC_7 = 480,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_0 = 481,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_1 = 482,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_2 = 483,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_3 = 484,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_4 = 485,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_5 = 486,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_6 = 487,
+ CXIDV_TELEM_HNI_MULTICAST_PKTS_SENT_BY_TC_7 = 488,
+ CXIDV_TELEM_HNI_PAUSE_RECV_0 = 489,
+ CXIDV_TELEM_HNI_PAUSE_RECV_1 = 490,
+ CXIDV_TELEM_HNI_PAUSE_RECV_2 = 491,
+ CXIDV_TELEM_HNI_PAUSE_RECV_3 = 492,
+ CXIDV_TELEM_HNI_PAUSE_RECV_4 = 493,
+ CXIDV_TELEM_HNI_PAUSE_RECV_5 = 494,
+ CXIDV_TELEM_HNI_PAUSE_RECV_6 = 495,
+ CXIDV_TELEM_HNI_PAUSE_RECV_7 = 496,
+ CXIDV_TELEM_HNI_PAUSE_REFRESH = 497,
+ CXIDV_TELEM_HNI_PAUSE_SENT = 498,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_0 = 499,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_1 = 500,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_2 = 501,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_3 = 502,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_4 = 503,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_5 = 504,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_6 = 505,
+ CXIDV_TELEM_HNI_PAUSE_XOFF_SENT_7 = 506,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW = 507,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_0 = 508,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_1 = 509,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_2 = 510,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_3 = 511,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_4 = 512,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_5 = 513,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_6 = 514,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_7 = 515,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_8 = 516,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_9 = 517,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_10 = 518,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_11 = 519,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_12 = 520,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_13 = 521,
+ CXIDV_TELEM_HNI_PCS_CORRECTED_CW_BIN_14 = 522,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_0 = 523,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_1 = 524,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_2 = 525,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_3 = 526,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_4 = 527,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_5 = 528,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_6 = 529,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_7 = 530,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_8 = 531,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_9 = 532,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_10 = 533,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_11 = 534,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_12 = 535,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_13 = 536,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_14 = 537,
+ CXIDV_TELEM_HNI_PCS_FECL_ERRORS_15 = 538,
+ CXIDV_TELEM_HNI_PCS_GOOD_CW = 539,
+ CXIDV_TELEM_HNI_PCS_PML_MBE_ERROR_CNT = 540,
+ CXIDV_TELEM_HNI_PCS_PML_SBE_ERROR_CNT = 541,
+ CXIDV_TELEM_HNI_PCS_UNCORRECTED_CW = 542,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_0 = 543,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_1 = 544,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_2 = 545,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_3 = 546,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_4 = 547,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_5 = 548,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_6 = 549,
+ CXIDV_TELEM_HNI_PFC_FIFO_OFLW_CNTR_7 = 550,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_0 = 551,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_1 = 552,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_2 = 553,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_3 = 554,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_4 = 555,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_5 = 556,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_6 = 557,
+ CXIDV_TELEM_HNI_PKTS_RECV_BY_TC_7 = 558,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_0 = 559,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_1 = 560,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_2 = 561,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_3 = 562,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_4 = 563,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_5 = 564,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_6 = 565,
+ CXIDV_TELEM_HNI_PKTS_SENT_BY_TC_7 = 566,
+ CXIDV_TELEM_HNI_RX_BAD_IEEE = 567,
+ CXIDV_TELEM_HNI_RX_BAD_OPT = 568,
+ CXIDV_TELEM_HNI_RX_FRAGMENT = 569,
+ CXIDV_TELEM_HNI_RX_JABBER = 570,
+ CXIDV_TELEM_HNI_RX_OK_27 = 571,
+ CXIDV_TELEM_HNI_RX_OK_35 = 572,
+ CXIDV_TELEM_HNI_RX_OK_36_TO_63 = 573,
+ CXIDV_TELEM_HNI_RX_OK_64 = 574,
+ CXIDV_TELEM_HNI_RX_OK_65_TO_127 = 575,
+ CXIDV_TELEM_HNI_RX_OK_128_TO_255 = 576,
+ CXIDV_TELEM_HNI_RX_OK_256_TO_511 = 577,
+ CXIDV_TELEM_HNI_RX_OK_512_TO_1023 = 578,
+ CXIDV_TELEM_HNI_RX_OK_1024_TO_2047 = 579,
+ CXIDV_TELEM_HNI_RX_OK_2048_TO_4095 = 580,
+ CXIDV_TELEM_HNI_RX_OK_4096_TO_8191 = 581,
+ CXIDV_TELEM_HNI_RX_OK_8192_TO_MAX = 582,
+ CXIDV_TELEM_HNI_RX_OK_BAD_OP_CODE = 583,
+ CXIDV_TELEM_HNI_RX_OK_BROADCAST = 584,
+ CXIDV_TELEM_HNI_RX_OK_FLOW_CONTROL = 585,
+ CXIDV_TELEM_HNI_RX_OK_IEEE = 586,
+ CXIDV_TELEM_HNI_RX_OK_LEN_TYPE_ERROR = 587,
+ CXIDV_TELEM_HNI_RX_OK_MAC_CONTROL = 588,
+ CXIDV_TELEM_HNI_RX_OK_MULTICAST = 589,
+ CXIDV_TELEM_HNI_RX_OK_OPT = 590,
+ CXIDV_TELEM_HNI_RX_OK_TAGGED = 591,
+ CXIDV_TELEM_HNI_RX_OK_TOO_LONG = 592,
+ CXIDV_TELEM_HNI_RX_OK_UNDERSIZE = 593,
+ CXIDV_TELEM_HNI_RX_PAUSED_0 = 594,
+ CXIDV_TELEM_HNI_RX_PAUSED_1 = 595,
+ CXIDV_TELEM_HNI_RX_PAUSED_2 = 596,
+ CXIDV_TELEM_HNI_RX_PAUSED_3 = 597,
+ CXIDV_TELEM_HNI_RX_PAUSED_4 = 598,
+ CXIDV_TELEM_HNI_RX_PAUSED_5 = 599,
+ CXIDV_TELEM_HNI_RX_PAUSED_6 = 600,
+ CXIDV_TELEM_HNI_RX_PAUSED_7 = 601,
+ CXIDV_TELEM_HNI_RX_PAUSED_STD = 602,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_FIFO = 603,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_0 = 604,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_1 = 605,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_2 = 606,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_3 = 607,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_4 = 608,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_5 = 609,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_6 = 610,
+ CXIDV_TELEM_HNI_RX_STALL_IXE_PKTBUF_7 = 611,
+ CXIDV_TELEM_HNI_STS_RX_BAD_OCTETS = 612,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_BCAST = 613,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_IEEE = 614,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_MULTI = 615,
+ CXIDV_TELEM_HNI_STS_RX_OCTETS_OPT = 616,
+ CXIDV_TELEM_HNI_STS_RX_OK_OCTETS = 617,
+ CXIDV_TELEM_HNI_STS_TX_BAD_OCTETS = 618,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_BCAST = 619,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_IEEE = 620,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_MULTI = 621,
+ CXIDV_TELEM_HNI_STS_TX_OCTETS_OPT = 622,
+ CXIDV_TELEM_HNI_STS_TX_OK_OCTETS = 623,
+ CXIDV_TELEM_HNI_TX_OK_27 = 624,
+ CXIDV_TELEM_HNI_TX_OK_35 = 625,
+ CXIDV_TELEM_HNI_TX_OK_36_TO_63 = 626,
+ CXIDV_TELEM_HNI_TX_OK_64 = 627,
+ CXIDV_TELEM_HNI_TX_OK_65_TO_127 = 628,
+ CXIDV_TELEM_HNI_TX_OK_128_TO_255 = 629,
+ CXIDV_TELEM_HNI_TX_OK_256_TO_511 = 630,
+ CXIDV_TELEM_HNI_TX_OK_512_TO_1023 = 631,
+ CXIDV_TELEM_HNI_TX_OK_1024_TO_2047 = 632,
+ CXIDV_TELEM_HNI_TX_OK_2048_TO_4095 = 633,
+ CXIDV_TELEM_HNI_TX_OK_4096_TO_8191 = 634,
+ CXIDV_TELEM_HNI_TX_OK_8192_TO_MAX = 635,
+ CXIDV_TELEM_HNI_TX_OK_BROADCAST = 636,
+ CXIDV_TELEM_HNI_TX_OK_IEEE = 637,
+ CXIDV_TELEM_HNI_TX_OK_MULTICAST = 638,
+ CXIDV_TELEM_HNI_TX_OK_OPT = 639,
+ CXIDV_TELEM_HNI_TX_OK_TAGGED = 640,
+ CXIDV_TELEM_HNI_TX_OPT_PADDED = 641,
+ CXIDV_TELEM_HNI_TX_OPT_SIZE_ERR = 642,
+ CXIDV_TELEM_HNI_TX_PAUSED_0 = 643,
+ CXIDV_TELEM_HNI_TX_PAUSED_1 = 644,
+ CXIDV_TELEM_HNI_TX_PAUSED_2 = 645,
+ CXIDV_TELEM_HNI_TX_PAUSED_3 = 646,
+ CXIDV_TELEM_HNI_TX_PAUSED_4 = 647,
+ CXIDV_TELEM_HNI_TX_PAUSED_5 = 648,
+ CXIDV_TELEM_HNI_TX_PAUSED_6 = 649,
+ CXIDV_TELEM_HNI_TX_PAUSED_7 = 650,
+ CXIDV_TELEM_HNI_TX_POISONED_IEEE = 651,
+ CXIDV_TELEM_HNI_TX_POISONED_OPT = 652,
+ CXIDV_TELEM_HNI_TX_STALL_LLR = 653,
+ CXIDV_TELEM_HNI_TX_STD_PADDED = 654,
+ CXIDV_TELEM_HNI_TX_STD_SIZE_ERR = 655,
+ CXIDV_TELEM_HNI_UCOR_ECC_ERR_CNTR = 656,
+ CXIDV_TELEM_IXE_DISP_AMO_CONFLICTS = 657,
+ CXIDV_TELEM_IXE_DISP_AMO_EVENTS = 658,
+ CXIDV_TELEM_IXE_DISP_ATU_FLUSH_REQS = 659,
+ CXIDV_TELEM_IXE_DISP_ATU_REQS = 660,
+ CXIDV_TELEM_IXE_DISP_ATU_RESPS = 661,
+ CXIDV_TELEM_IXE_DISP_ATU_RESPS_OK = 662,
+ CXIDV_TELEM_IXE_DISP_DMAWR_REQS = 663,
+ CXIDV_TELEM_IXE_DISP_DMAWR_RESPS = 664,
+ CXIDV_TELEM_IXE_DISP_DMAWR_RESPS_OK = 665,
+ CXIDV_TELEM_IXE_DISP_ETH_EVENTS = 666,
+ CXIDV_TELEM_IXE_DISP_LPE_AMOS = 667,
+ CXIDV_TELEM_IXE_DISP_LPE_AMOS_OK = 668,
+ CXIDV_TELEM_IXE_DISP_LPE_GETS = 669,
+ CXIDV_TELEM_IXE_DISP_LPE_GETS_OK = 670,
+ CXIDV_TELEM_IXE_DISP_LPE_PUTS = 671,
+ CXIDV_TELEM_IXE_DISP_LPE_PUTS_OK = 672,
+ CXIDV_TELEM_IXE_DISP_MST_GETS = 673,
+ CXIDV_TELEM_IXE_DISP_MST_GETS_OK = 674,
+ CXIDV_TELEM_IXE_DISP_MST_PUTS = 675,
+ CXIDV_TELEM_IXE_DISP_MST_PUTS_OK = 676,
+ CXIDV_TELEM_IXE_DISP_OXE_RESPS = 677,
+ CXIDV_TELEM_IXE_DISP_PCT_GETCOMP = 678,
+ CXIDV_TELEM_IXE_DISP_PUT_EVENTS = 679,
+ CXIDV_TELEM_IXE_DISP_RPU_ERR_REQS = 680,
+ CXIDV_TELEM_IXE_DISP_RPU_RESPS = 681,
+ CXIDV_TELEM_IXE_DISP_STALL_ATU_CDT = 682,
+ CXIDV_TELEM_IXE_DISP_STALL_ATU_FIFO = 683,
+ CXIDV_TELEM_IXE_DISP_STALL_CONFLICT = 684,
+ CXIDV_TELEM_IXE_DISP_STALL_ERR_FIFO = 685,
+ CXIDV_TELEM_IXE_DISP_STALL_GCOMP_FIFO = 686,
+ CXIDV_TELEM_IXE_DISP_STALL_GRR_ID = 687,
+ CXIDV_TELEM_IXE_DISP_STALL_MDID_CDTS = 688,
+ CXIDV_TELEM_IXE_DISP_STALL_MST_MATCH_FIFO = 689,
+ CXIDV_TELEM_IXE_DISP_STALL_PUT_RESP = 690,
+ CXIDV_TELEM_IXE_DISP_STALL_RESP_FIFO = 691,
+ CXIDV_TELEM_IXE_DISP_WR_CONFLICTS = 692,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_INEXACT = 693,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_INVALID = 694,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_OVERFLOW = 695,
+ CXIDV_TELEM_IXE_DMAWR_AMO_EX_UNDERFLOW = 696,
+ CXIDV_TELEM_IXE_DMAWR_AMO_INVALID_OP = 697,
+ CXIDV_TELEM_IXE_DMAWR_AMO_LEN_ERR = 698,
+ CXIDV_TELEM_IXE_DMAWR_AMO_MISALIGNED = 699,
+ CXIDV_TELEM_IXE_DMAWR_CPU_AMO_REQS = 700,
+ CXIDV_TELEM_IXE_DMAWR_CPU_FTCH_AMO_REQS = 701,
+ CXIDV_TELEM_IXE_DMAWR_FLUSH_REQS = 702,
+ CXIDV_TELEM_IXE_DMAWR_NIC_AMO_REQS = 703,
+ CXIDV_TELEM_IXE_DMAWR_P_PASS_NP_CNT = 704,
+ CXIDV_TELEM_IXE_DMAWR_PCIE_ERR_POISONED = 705,
+ CXIDV_TELEM_IXE_DMAWR_PCIE_UNSUCCESS_CMPL = 706,
+ CXIDV_TELEM_IXE_DMAWR_REQ_NO_WRITE_REQS = 707,
+ CXIDV_TELEM_IXE_DMAWR_STALL_FTCH_AMO_CNT = 708,
+ CXIDV_TELEM_IXE_DMAWR_STALL_NP_CDT = 709,
+ CXIDV_TELEM_IXE_DMAWR_STALL_NP_REQ_CNT = 710,
+ CXIDV_TELEM_IXE_DMAWR_STALL_P_CDT = 711,
+ CXIDV_TELEM_IXE_DMAWR_WRITE_REQS = 712,
+ CXIDV_TELEM_IXE_GET_LEN_ERRORS = 713,
+ CXIDV_TELEM_IXE_HDR_CHECKSUM_ERRORS = 714,
+ CXIDV_TELEM_IXE_HDR_ECC_ERRORS = 715,
+ CXIDV_TELEM_IXE_HRP_REQ_ERRORS = 716,
+ CXIDV_TELEM_IXE_IP_OPTIONS_ERRORS = 717,
+ CXIDV_TELEM_IXE_IPV4_CHECKSUM_ERRORS = 718,
+ CXIDV_TELEM_IXE_MEM_COR_ERR_CNTR = 719,
+ CXIDV_TELEM_IXE_MEM_UCOR_ERR_CNTR = 720,
+ CXIDV_TELEM_IXE_PARSER_PAR_ERRORS = 721,
+ CXIDV_TELEM_IXE_PBUF_RD_ERRORS = 722,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_0 = 723,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_1 = 724,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_2 = 725,
+ CXIDV_TELEM_IXE_POOL_ECN_PKTS_3 = 726,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_0 = 727,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_1 = 728,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_2 = 729,
+ CXIDV_TELEM_IXE_POOL_NO_ECN_PKTS_3 = 730,
+ CXIDV_TELEM_IXE_PORT_DFA_MISMATCH = 731,
+ CXIDV_TELEM_IXE_ROCE_ICRC_ERROR = 732,
+ CXIDV_TELEM_IXE_RX_ETH_SEG = 733,
+ CXIDV_TELEM_IXE_RX_IPV4_PKT = 734,
+ CXIDV_TELEM_IXE_RX_IPV6_PKT = 735,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_IXE_PARSER = 736,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_PCT = 737,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_NORSP = 738,
+ CXIDV_TELEM_IXE_RX_PKT_DROP_RMU_WRSP = 739,
+ CXIDV_TELEM_IXE_RX_PKT_IPV4_OPTIONS = 740,
+ CXIDV_TELEM_IXE_RX_PKT_IPV6_OPTIONS = 741,
+ CXIDV_TELEM_IXE_RX_PTL_CONNMGMT_PKT = 742,
+ CXIDV_TELEM_IXE_RX_PTL_CONTINUATION_PKT = 743,
+ CXIDV_TELEM_IXE_RX_PTL_GEN_PKT = 744,
+ CXIDV_TELEM_IXE_RX_PTL_MR_MSGS = 745,
+ CXIDV_TELEM_IXE_RX_PTL_MSGS = 746,
+ CXIDV_TELEM_IXE_RX_PTL_MULTI_MSGS = 747,
+ CXIDV_TELEM_IXE_RX_PTL_RESPONSE_PKT = 748,
+ CXIDV_TELEM_IXE_RX_PTL_RESTRICTED_PKT = 749,
+ CXIDV_TELEM_IXE_RX_PTL_SMALLMSG_PKT = 750,
+ CXIDV_TELEM_IXE_RX_PTL_SML_AMO_PKT = 751,
+ CXIDV_TELEM_IXE_RX_PTL_SML_PKT = 752,
+ CXIDV_TELEM_IXE_RX_PTL_UNRESTRICTED_PKT = 753,
+ CXIDV_TELEM_IXE_RX_ROCE_PKT = 754,
+ CXIDV_TELEM_IXE_RX_ROCE_SEG = 755,
+ CXIDV_TELEM_IXE_RX_ROCE_SPSEG = 756,
+ CXIDV_TELEM_IXE_RX_TCP_PKT = 757,
+ CXIDV_TELEM_IXE_RX_UDP_PKT = 758,
+ CXIDV_TELEM_IXE_RX_UNRECOGNIZED_PKT = 759,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_0 = 760,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_1 = 761,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_2 = 762,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_3 = 763,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_4 = 764,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_5 = 765,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_6 = 766,
+ CXIDV_TELEM_IXE_TC_REQ_ECN_PKTS_7 = 767,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_0 = 768,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_1 = 769,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_2 = 770,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_3 = 771,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_4 = 772,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_5 = 773,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_6 = 774,
+ CXIDV_TELEM_IXE_TC_REQ_NO_ECN_PKTS_7 = 775,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_0 = 776,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_1 = 777,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_2 = 778,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_3 = 779,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_4 = 780,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_5 = 781,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_6 = 782,
+ CXIDV_TELEM_IXE_TC_RSP_ECN_PKTS_7 = 783,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_0 = 784,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_1 = 785,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_2 = 786,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_3 = 787,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_4 = 788,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_5 = 789,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_6 = 790,
+ CXIDV_TELEM_IXE_TC_RSP_NO_ECN_PKTS_7 = 791,
+ CXIDV_TELEM_LPE_AMO_CMDS = 792,
+ CXIDV_TELEM_LPE_APPEND_CMDS_0 = 793,
+ CXIDV_TELEM_LPE_APPEND_CMDS_1 = 794,
+ CXIDV_TELEM_LPE_APPEND_CMDS_2 = 795,
+ CXIDV_TELEM_LPE_APPEND_CMDS_3 = 796,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_0 = 797,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_1 = 798,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_2 = 799,
+ CXIDV_TELEM_LPE_APPEND_SUCCESS_3 = 800,
+ CXIDV_TELEM_LPE_CFG_EVENT_CNTS_OVF_CNT = 801,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_0 = 802,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_1 = 803,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_2 = 804,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_3 = 805,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_0 = 806,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_1 = 807,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_2 = 808,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_SHARED_ALLOCATED_3 = 809,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_0 = 810,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_1 = 811,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_2 = 812,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_3 = 813,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_0 = 814,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_1 = 815,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_2 = 816,
+ CXIDV_TELEM_LPE_CFG_PE_LE_SHARED_NUM_TOTAL_ALLOCATED_3 = 817,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_IXE_GET = 818,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_IXE_PUT = 819,
+ CXIDV_TELEM_LPE_CYC_BLOCKED_LOSSLESS = 820,
+ CXIDV_TELEM_LPE_CYC_NO_RDY_CDTS = 821,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_0 = 822,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_1 = 823,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_2 = 824,
+ CXIDV_TELEM_LPE_CYC_RRQ_BLOCKED_3 = 825,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_CANT_ALLOC_UNEXPECTED = 826,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_EQ_FULL = 827,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_ETHERNET = 828,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_NO_MATCH_IN_OVERFLOW = 829,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_REQ_EMPTY = 830,
+ CXIDV_TELEM_LPE_ERR_ENTRY_NOT_FOUND_UNLINK_FAILED = 831,
+ CXIDV_TELEM_LPE_ERR_EQ_DISABLED = 832,
+ CXIDV_TELEM_LPE_ERR_ILLEGAL_OP = 833,
+ CXIDV_TELEM_LPE_ERR_INVALID_ENDPOINT = 834,
+ CXIDV_TELEM_LPE_ERR_NO_SPACE_APPEND = 835,
+ CXIDV_TELEM_LPE_ERR_NO_SPACE_NET = 836,
+ CXIDV_TELEM_LPE_ERR_OP_VIOLATION = 837,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_CANT_ALLOC_UNEXPECTED = 838,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_EQ_FULL = 839,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_NO_MATCH_IN_OVERFLOW = 840,
+ CXIDV_TELEM_LPE_ERR_PT_DISABLED_REQ_EMPTY = 841,
+ CXIDV_TELEM_LPE_ERR_PTLTE_SW_MANAGED = 842,
+ CXIDV_TELEM_LPE_ERR_RESTRICTED_UNICAST = 843,
+ CXIDV_TELEM_LPE_ERR_SEARCH_NO_MATCH = 844,
+ CXIDV_TELEM_LPE_ERR_SETSTATE_NO_MATCH = 845,
+ CXIDV_TELEM_LPE_ERR_SRC_ERROR = 846,
+ CXIDV_TELEM_LPE_EVENT_ATOMIC_OVERFLOW = 847,
+ CXIDV_TELEM_LPE_EVENT_FETCH_ATOMIC_OVERFLOW = 848,
+ CXIDV_TELEM_LPE_EVENT_GET_OVERFLOW = 849,
+ CXIDV_TELEM_LPE_EVENT_LINK = 850,
+ CXIDV_TELEM_LPE_EVENT_PUT_OVERFLOW = 851,
+ CXIDV_TELEM_LPE_EVENT_RENDEZVOUS = 852,
+ CXIDV_TELEM_LPE_EVENT_SEARCH = 853,
+ CXIDV_TELEM_LPE_EVENT_STATECHANGE = 854,
+ CXIDV_TELEM_LPE_EVENT_UNLINK = 855,
+ CXIDV_TELEM_LPE_FAIL_CNTR = 856,
+ CXIDV_TELEM_LPE_FAMO_CMDS = 857,
+ CXIDV_TELEM_LPE_GET_CMDS = 858,
+ CXIDV_TELEM_LPE_MEM_COR_ERR_CNTR = 859,
+ CXIDV_TELEM_LPE_MEM_UCOR_ERR_CNTR = 860,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_0 = 861,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_1 = 862,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_2 = 863,
+ CXIDV_TELEM_LPE_NET_MATCH_LOCAL_3 = 864,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_0 = 865,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_1 = 866,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_2 = 867,
+ CXIDV_TELEM_LPE_NET_MATCH_OVERFLOW_3 = 868,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_0 = 869,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_1 = 870,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_2 = 871,
+ CXIDV_TELEM_LPE_NET_MATCH_PRIORITY_3 = 872,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_0 = 873,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_1 = 874,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_2 = 875,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUEST_3 = 876,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_0 = 877,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_1 = 878,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_2 = 879,
+ CXIDV_TELEM_LPE_NET_MATCH_REQUESTS_3 = 880,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_0 = 881,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_1 = 882,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_2 = 883,
+ CXIDV_TELEM_LPE_NET_MATCH_SUCCESS_3 = 884,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_0 = 885,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_1 = 886,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_2 = 887,
+ CXIDV_TELEM_LPE_NET_MATCH_USEONCE_3 = 888,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_0 = 889,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_1 = 890,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_2 = 891,
+ CXIDV_TELEM_LPE_NUM_TRUNCATED_3 = 892,
+ CXIDV_TELEM_LPE_PLEC_ALLOCS = 893,
+ CXIDV_TELEM_LPE_PLEC_FREES = 894,
+ CXIDV_TELEM_LPE_PLEC_FREES_CSR = 895,
+ CXIDV_TELEM_LPE_PLEC_HITS = 896,
+ CXIDV_TELEM_LPE_PUT_CMDS = 897,
+ CXIDV_TELEM_LPE_RENDEZVOUS_PUT_CMDS = 898,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_0 = 899,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_1 = 900,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_2 = 901,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_3 = 902,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_0 = 903,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_1 = 904,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_2 = 905,
+ CXIDV_TELEM_LPE_RNDZV_PUTS_OFFLOADED_3 = 906,
+ CXIDV_TELEM_LPE_SEARCH_CMDS = 907,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_CMDS = 908,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_FAIL = 909,
+ CXIDV_TELEM_LPE_SEARCH_DELETE_SUCCESS = 910,
+ CXIDV_TELEM_LPE_SEARCH_FAIL = 911,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_0 = 912,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_1 = 913,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_2 = 914,
+ CXIDV_TELEM_LPE_SEARCH_NID_ANY_3 = 915,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_0 = 916,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_1 = 917,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_2 = 918,
+ CXIDV_TELEM_LPE_SEARCH_PID_ANY_3 = 919,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_0 = 920,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_1 = 921,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_2 = 922,
+ CXIDV_TELEM_LPE_SEARCH_RANK_ANY_3 = 923,
+ CXIDV_TELEM_LPE_SEARCH_SUCCESS = 924,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_0 = 925,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_1 = 926,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_2 = 927,
+ CXIDV_TELEM_LPE_SETSTATE_CMDS_3 = 928,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_0 = 929,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_1 = 930,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_2 = 931,
+ CXIDV_TELEM_LPE_SETSTATE_SUCCESS_3 = 932,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_0 = 933,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_1 = 934,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_2 = 935,
+ CXIDV_TELEM_LPE_STS_APP_MATCH_ATTEMPTS_3 = 936,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_0 = 937,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_1 = 938,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_2 = 939,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_MAX_3 = 940,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_0 = 941,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_1 = 942,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_2 = 943,
+ CXIDV_TELEM_LPE_STS_APP_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_3 = 944,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_0 = 945,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_1 = 946,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_2 = 947,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_LOAD_3 = 948,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_0 = 949,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_1 = 950,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_2 = 951,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_MAX_3 = 952,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_0 = 953,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_1 = 954,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_2 = 955,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_LOAD_3 = 956,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_0 = 957,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_1 = 958,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_2 = 959,
+ CXIDV_TELEM_LPE_STS_LOAD_STATS_PTLTE_MAX_3 = 960,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_0 = 961,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_1 = 962,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_2 = 963,
+ CXIDV_TELEM_LPE_STS_NET_MATCH_ATTEMPTS_3 = 964,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_0 = 965,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_1 = 966,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_2 = 967,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_MAX_3 = 968,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_0 = 969,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_1 = 970,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_2 = 971,
+ CXIDV_TELEM_LPE_STS_NET_MAX_ATTEMPTS_NUM_PBUF_ENTRIES_3 = 972,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_0 = 973,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_1 = 974,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_2 = 975,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_3 = 976,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_4 = 977,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_5 = 978,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_6 = 979,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_7 = 980,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_8 = 981,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_9 = 982,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_10 = 983,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_11 = 984,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_12 = 985,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_13 = 986,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_14 = 987,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_15 = 988,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_16 = 989,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_17 = 990,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_18 = 991,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_19 = 992,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_20 = 993,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_21 = 994,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_22 = 995,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_23 = 996,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_24 = 997,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_25 = 998,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_26 = 999,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_27 = 1000,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_28 = 1001,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_29 = 1002,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_30 = 1003,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_31 = 1004,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_32 = 1005,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_33 = 1006,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_34 = 1007,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_35 = 1008,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_36 = 1009,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_37 = 1010,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_38 = 1011,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_39 = 1012,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_40 = 1013,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_41 = 1014,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_42 = 1015,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_43 = 1016,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_44 = 1017,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_45 = 1018,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_46 = 1019,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_47 = 1020,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_48 = 1021,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_49 = 1022,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_50 = 1023,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_51 = 1024,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_52 = 1025,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_53 = 1026,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_54 = 1027,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_55 = 1028,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_56 = 1029,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_57 = 1030,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_58 = 1031,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_59 = 1032,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_60 = 1033,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_61 = 1034,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_62 = 1035,
+ CXIDV_TELEM_LPE_STS_PE_LE_ALLOC_NUM_ALLOCATED_63 = 1036,
+ CXIDV_TELEM_LPE_SUCCESS_CNTR = 1037,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_0 = 1038,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_1 = 1039,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_2 = 1040,
+ CXIDV_TELEM_LPE_UNEXPECTED_GET_AMO_3 = 1041,
+ CXIDV_TELEM_LPE_UNLINK_CMDS = 1042,
+ CXIDV_TELEM_LPE_UNLINK_SUCCESS = 1043,
+ CXIDV_TELEM_MB_CFG_EVENT_CNTS_OVF_CNT = 1044,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_0 = 1045,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_1 = 1046,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_2 = 1047,
+ CXIDV_TELEM_MB_CMC_AXI_RD_REQUESTS_3 = 1048,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_0 = 1049,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_1 = 1050,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_2 = 1051,
+ CXIDV_TELEM_MB_CMC_AXI_WR_REQUESTS_3 = 1052,
+ CXIDV_TELEM_MB_CQ_LSA0_TRIGGER_EVENTS_0 = 1053,
+ CXIDV_TELEM_MB_CQ_LSA0_TRIGGER_EVENTS_1 = 1054,
+ CXIDV_TELEM_MB_CQ_LSA1_TRIGGER_EVENTS_0 = 1055,
+ CXIDV_TELEM_MB_CQ_LSA1_TRIGGER_EVENTS_1 = 1056,
+ CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_0 = 1057,
+ CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_1 = 1058,
+ CXIDV_TELEM_MB_CRMC_AXI_RD_REQUESTS_2 = 1059,
+ CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_0 = 1060,
+ CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_1 = 1061,
+ CXIDV_TELEM_MB_CRMC_AXI_WR_REQUESTS_2 = 1062,
+ CXIDV_TELEM_MB_CRMC_RD_ERROR_0 = 1063,
+ CXIDV_TELEM_MB_CRMC_RD_ERROR_1 = 1064,
+ CXIDV_TELEM_MB_CRMC_RD_ERROR_2 = 1065,
+ CXIDV_TELEM_MB_CRMC_RING_MBE_0 = 1066,
+ CXIDV_TELEM_MB_CRMC_RING_MBE_1 = 1067,
+ CXIDV_TELEM_MB_CRMC_RING_MBE_2 = 1068,
+ CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_0 = 1069,
+ CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_1 = 1070,
+ CXIDV_TELEM_MB_CRMC_RING_RD_REQUESTS_2 = 1071,
+ CXIDV_TELEM_MB_CRMC_RING_SBE_0 = 1072,
+ CXIDV_TELEM_MB_CRMC_RING_SBE_1 = 1073,
+ CXIDV_TELEM_MB_CRMC_RING_SBE_2 = 1074,
+ CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_0 = 1075,
+ CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_1 = 1076,
+ CXIDV_TELEM_MB_CRMC_RING_WR_REQUESTS_2 = 1077,
+ CXIDV_TELEM_MB_CRMC_WR_ERROR_0 = 1078,
+ CXIDV_TELEM_MB_CRMC_WR_ERROR_1 = 1079,
+ CXIDV_TELEM_MB_CRMC_WR_ERROR_2 = 1080,
+ CXIDV_TELEM_MB_EE_LSA0_TRIGGER_EVENTS_0 = 1081,
+ CXIDV_TELEM_MB_EE_LSA0_TRIGGER_EVENTS_1 = 1082,
+ CXIDV_TELEM_MB_EE_LSA1_TRIGGER_EVENTS_0 = 1083,
+ CXIDV_TELEM_MB_EE_LSA1_TRIGGER_EVENTS_1 = 1084,
+ CXIDV_TELEM_MB_IXE_LSA0_TRIGGER_EVENTS_0 = 1085,
+ CXIDV_TELEM_MB_IXE_LSA0_TRIGGER_EVENTS_1 = 1086,
+ CXIDV_TELEM_MB_IXE_LSA1_TRIGGER_EVENTS_0 = 1087,
+ CXIDV_TELEM_MB_IXE_LSA1_TRIGGER_EVENTS_1 = 1088,
+ CXIDV_TELEM_MB_JAI_AXI_RD_REQUESTS = 1089,
+ CXIDV_TELEM_MB_JAI_AXI_WR_REQUESTS = 1090,
+ CXIDV_TELEM_MB_MB_LSA0_TRIGGER_EVENTS_0 = 1091,
+ CXIDV_TELEM_MB_MB_LSA0_TRIGGER_EVENTS_1 = 1092,
+ CXIDV_TELEM_MB_MB_LSA1_TRIGGER_EVENTS_0 = 1093,
+ CXIDV_TELEM_MB_MB_LSA1_TRIGGER_EVENTS_1 = 1094,
+ CXIDV_TELEM_MST_ALLOCATIONS = 1095,
+ CXIDV_TELEM_MST_ERR_CANCELLED = 1096,
+ CXIDV_TELEM_MST_MEM_COR_ERR_CNTR = 1097,
+ CXIDV_TELEM_MST_MEM_UCOR_ERR_CNTR = 1098,
+ CXIDV_TELEM_MST_REQUESTS = 1099,
+ CXIDV_TELEM_MST_STALLED_WAITING_EE_CRDTS = 1100,
+ CXIDV_TELEM_MST_STALLED_WAITING_FOR_LPE = 1101,
+ CXIDV_TELEM_MST_STALLED_WAITING_GET_CRDTS = 1102,
+ CXIDV_TELEM_MST_STALLED_WAITING_PUT_CRDTS = 1103,
+ CXIDV_TELEM_MST_STS_NUM_REQ = 1104,
+ CXIDV_TELEM_OXE_CHANNEL_IDLE = 1105,
+ CXIDV_TELEM_OXE_ERR_INVALID_AC = 1106,
+ CXIDV_TELEM_OXE_ERR_NO_TRANSLATION = 1107,
+ CXIDV_TELEM_OXE_ERR_PAGE_PERM = 1108,
+ CXIDV_TELEM_OXE_ERR_PAGE_REQ = 1109,
+ CXIDV_TELEM_OXE_ERR_PCI_CMPL = 1110,
+ CXIDV_TELEM_OXE_ERR_PCI_EP = 1111,
+ CXIDV_TELEM_OXE_ERR_TA_ERROR = 1112,
+ CXIDV_TELEM_OXE_IGNORE_ERRS = 1113,
+ CXIDV_TELEM_OXE_IOI_DMA = 1114,
+ CXIDV_TELEM_OXE_IOI_PKTS_ORDERED = 1115,
+ CXIDV_TELEM_OXE_IOI_PKTS_UNORDERED = 1116,
+ CXIDV_TELEM_OXE_MCU_MEAS_0 = 1117,
+ CXIDV_TELEM_OXE_MCU_MEAS_1 = 1118,
+ CXIDV_TELEM_OXE_MCU_MEAS_2 = 1119,
+ CXIDV_TELEM_OXE_MCU_MEAS_3 = 1120,
+ CXIDV_TELEM_OXE_MCU_MEAS_4 = 1121,
+ CXIDV_TELEM_OXE_MCU_MEAS_5 = 1122,
+ CXIDV_TELEM_OXE_MCU_MEAS_6 = 1123,
+ CXIDV_TELEM_OXE_MCU_MEAS_7 = 1124,
+ CXIDV_TELEM_OXE_MCU_MEAS_8 = 1125,
+ CXIDV_TELEM_OXE_MCU_MEAS_9 = 1126,
+ CXIDV_TELEM_OXE_MCU_MEAS_10 = 1127,
+ CXIDV_TELEM_OXE_MCU_MEAS_11 = 1128,
+ CXIDV_TELEM_OXE_MCU_MEAS_12 = 1129,
+ CXIDV_TELEM_OXE_MCU_MEAS_13 = 1130,
+ CXIDV_TELEM_OXE_MCU_MEAS_14 = 1131,
+ CXIDV_TELEM_OXE_MCU_MEAS_15 = 1132,
+ CXIDV_TELEM_OXE_MCU_MEAS_16 = 1133,
+ CXIDV_TELEM_OXE_MCU_MEAS_17 = 1134,
+ CXIDV_TELEM_OXE_MCU_MEAS_18 = 1135,
+ CXIDV_TELEM_OXE_MCU_MEAS_19 = 1136,
+ CXIDV_TELEM_OXE_MCU_MEAS_20 = 1137,
+ CXIDV_TELEM_OXE_MCU_MEAS_21 = 1138,
+ CXIDV_TELEM_OXE_MCU_MEAS_22 = 1139,
+ CXIDV_TELEM_OXE_MCU_MEAS_23 = 1140,
+ CXIDV_TELEM_OXE_MCU_MEAS_24 = 1141,
+ CXIDV_TELEM_OXE_MCU_MEAS_25 = 1142,
+ CXIDV_TELEM_OXE_MCU_MEAS_26 = 1143,
+ CXIDV_TELEM_OXE_MCU_MEAS_27 = 1144,
+ CXIDV_TELEM_OXE_MCU_MEAS_28 = 1145,
+ CXIDV_TELEM_OXE_MCU_MEAS_29 = 1146,
+ CXIDV_TELEM_OXE_MCU_MEAS_30 = 1147,
+ CXIDV_TELEM_OXE_MCU_MEAS_31 = 1148,
+ CXIDV_TELEM_OXE_MCU_MEAS_32 = 1149,
+ CXIDV_TELEM_OXE_MCU_MEAS_33 = 1150,
+ CXIDV_TELEM_OXE_MCU_MEAS_34 = 1151,
+ CXIDV_TELEM_OXE_MCU_MEAS_35 = 1152,
+ CXIDV_TELEM_OXE_MCU_MEAS_36 = 1153,
+ CXIDV_TELEM_OXE_MCU_MEAS_37 = 1154,
+ CXIDV_TELEM_OXE_MCU_MEAS_38 = 1155,
+ CXIDV_TELEM_OXE_MCU_MEAS_39 = 1156,
+ CXIDV_TELEM_OXE_MCU_MEAS_40 = 1157,
+ CXIDV_TELEM_OXE_MCU_MEAS_41 = 1158,
+ CXIDV_TELEM_OXE_MCU_MEAS_42 = 1159,
+ CXIDV_TELEM_OXE_MCU_MEAS_43 = 1160,
+ CXIDV_TELEM_OXE_MCU_MEAS_44 = 1161,
+ CXIDV_TELEM_OXE_MCU_MEAS_45 = 1162,
+ CXIDV_TELEM_OXE_MCU_MEAS_46 = 1163,
+ CXIDV_TELEM_OXE_MCU_MEAS_47 = 1164,
+ CXIDV_TELEM_OXE_MCU_MEAS_48 = 1165,
+ CXIDV_TELEM_OXE_MCU_MEAS_49 = 1166,
+ CXIDV_TELEM_OXE_MCU_MEAS_50 = 1167,
+ CXIDV_TELEM_OXE_MCU_MEAS_51 = 1168,
+ CXIDV_TELEM_OXE_MCU_MEAS_52 = 1169,
+ CXIDV_TELEM_OXE_MCU_MEAS_53 = 1170,
+ CXIDV_TELEM_OXE_MCU_MEAS_54 = 1171,
+ CXIDV_TELEM_OXE_MCU_MEAS_55 = 1172,
+ CXIDV_TELEM_OXE_MCU_MEAS_56 = 1173,
+ CXIDV_TELEM_OXE_MCU_MEAS_57 = 1174,
+ CXIDV_TELEM_OXE_MCU_MEAS_58 = 1175,
+ CXIDV_TELEM_OXE_MCU_MEAS_59 = 1176,
+ CXIDV_TELEM_OXE_MCU_MEAS_60 = 1177,
+ CXIDV_TELEM_OXE_MCU_MEAS_61 = 1178,
+ CXIDV_TELEM_OXE_MCU_MEAS_62 = 1179,
+ CXIDV_TELEM_OXE_MCU_MEAS_63 = 1180,
+ CXIDV_TELEM_OXE_MCU_MEAS_64 = 1181,
+ CXIDV_TELEM_OXE_MCU_MEAS_65 = 1182,
+ CXIDV_TELEM_OXE_MCU_MEAS_66 = 1183,
+ CXIDV_TELEM_OXE_MCU_MEAS_67 = 1184,
+ CXIDV_TELEM_OXE_MCU_MEAS_68 = 1185,
+ CXIDV_TELEM_OXE_MCU_MEAS_69 = 1186,
+ CXIDV_TELEM_OXE_MCU_MEAS_70 = 1187,
+ CXIDV_TELEM_OXE_MCU_MEAS_71 = 1188,
+ CXIDV_TELEM_OXE_MCU_MEAS_72 = 1189,
+ CXIDV_TELEM_OXE_MCU_MEAS_73 = 1190,
+ CXIDV_TELEM_OXE_MCU_MEAS_74 = 1191,
+ CXIDV_TELEM_OXE_MCU_MEAS_75 = 1192,
+ CXIDV_TELEM_OXE_MCU_MEAS_76 = 1193,
+ CXIDV_TELEM_OXE_MCU_MEAS_77 = 1194,
+ CXIDV_TELEM_OXE_MCU_MEAS_78 = 1195,
+ CXIDV_TELEM_OXE_MCU_MEAS_79 = 1196,
+ CXIDV_TELEM_OXE_MCU_MEAS_80 = 1197,
+ CXIDV_TELEM_OXE_MCU_MEAS_81 = 1198,
+ CXIDV_TELEM_OXE_MCU_MEAS_82 = 1199,
+ CXIDV_TELEM_OXE_MCU_MEAS_83 = 1200,
+ CXIDV_TELEM_OXE_MCU_MEAS_84 = 1201,
+ CXIDV_TELEM_OXE_MCU_MEAS_85 = 1202,
+ CXIDV_TELEM_OXE_MCU_MEAS_86 = 1203,
+ CXIDV_TELEM_OXE_MCU_MEAS_87 = 1204,
+ CXIDV_TELEM_OXE_MCU_MEAS_88 = 1205,
+ CXIDV_TELEM_OXE_MCU_MEAS_89 = 1206,
+ CXIDV_TELEM_OXE_MCU_MEAS_90 = 1207,
+ CXIDV_TELEM_OXE_MCU_MEAS_91 = 1208,
+ CXIDV_TELEM_OXE_MCU_MEAS_92 = 1209,
+ CXIDV_TELEM_OXE_MCU_MEAS_93 = 1210,
+ CXIDV_TELEM_OXE_MCU_MEAS_94 = 1211,
+ CXIDV_TELEM_OXE_MCU_MEAS_95 = 1212,
+ CXIDV_TELEM_OXE_MEM_COR_ERR_CNTR = 1213,
+ CXIDV_TELEM_OXE_MEM_UCOR_ERR_CNTR = 1214,
+ CXIDV_TELEM_OXE_NUM_HRP_CMDS = 1215,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN0 = 1216,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN1 = 1217,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN2 = 1218,
+ CXIDV_TELEM_OXE_PRF_SET0_OCC_HIST_BIN3 = 1219,
+ CXIDV_TELEM_OXE_PRF_SET0_PKTBUF_NA = 1220,
+ CXIDV_TELEM_OXE_PRF_SET0_SMT_NA = 1221,
+ CXIDV_TELEM_OXE_PRF_SET0_SPT_NA = 1222,
+ CXIDV_TELEM_OXE_PRF_SET0_SRB_NA = 1223,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_DMA_MDR = 1224,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_DMA_UPD = 1225,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_HEADER = 1226,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PCT_IDX_WAIT = 1227,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PKTBUF_GNT = 1228,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_PKTBUF_REQ = 1229,
+ CXIDV_TELEM_OXE_PRF_SET0_ST_READY = 1230,
+ CXIDV_TELEM_OXE_PRF_SET0_TS_SELECT = 1231,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN0 = 1232,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN1 = 1233,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN2 = 1234,
+ CXIDV_TELEM_OXE_PRF_SET1_OCC_HIST_BIN3 = 1235,
+ CXIDV_TELEM_OXE_PRF_SET1_PKTBUF_NA = 1236,
+ CXIDV_TELEM_OXE_PRF_SET1_SMT_NA = 1237,
+ CXIDV_TELEM_OXE_PRF_SET1_SPT_NA = 1238,
+ CXIDV_TELEM_OXE_PRF_SET1_SRB_NA = 1239,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_DMA_MDR = 1240,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_DMA_UPD = 1241,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_HEADER = 1242,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PCT_IDX_WAIT = 1243,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PKTBUF_GNT = 1244,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_PKTBUF_REQ = 1245,
+ CXIDV_TELEM_OXE_PRF_SET1_ST_READY = 1246,
+ CXIDV_TELEM_OXE_PRF_SET1_TS_SELECT = 1247,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_0 = 1248,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_1 = 1249,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_2 = 1250,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_3 = 1251,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_4 = 1252,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_5 = 1253,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_6 = 1254,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_7 = 1255,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_8 = 1256,
+ CXIDV_TELEM_OXE_PTL_TX_GET_MSGS_TSC_9 = 1257,
+ CXIDV_TELEM_OXE_PTL_TX_MR_MSGS = 1258,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_0 = 1259,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_1 = 1260,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_2 = 1261,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_3 = 1262,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_4 = 1263,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_5 = 1264,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_6 = 1265,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_7 = 1266,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_8 = 1267,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_MSGS_TSC_9 = 1268,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_0 = 1269,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_1 = 1270,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_2 = 1271,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_3 = 1272,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_4 = 1273,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_5 = 1274,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_6 = 1275,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_7 = 1276,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_8 = 1277,
+ CXIDV_TELEM_OXE_PTL_TX_PUT_PKTS_TSC_9 = 1278,
+ CXIDV_TELEM_OXE_SMT_CDT_ERRS = 1279,
+ CXIDV_TELEM_OXE_SPT_CDT_ERRS = 1280,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_0 = 1281,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_1 = 1282,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_2 = 1283,
+ CXIDV_TELEM_OXE_STALL_FGFC_BLK_3 = 1284,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_0 = 1285,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_1 = 1286,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_2 = 1287,
+ CXIDV_TELEM_OXE_STALL_FGFC_CNTRL_3 = 1288,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_0 = 1289,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_1 = 1290,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_2 = 1291,
+ CXIDV_TELEM_OXE_STALL_FGFC_END_3 = 1292,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_0 = 1293,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_1 = 1294,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_2 = 1295,
+ CXIDV_TELEM_OXE_STALL_FGFC_START_3 = 1296,
+ CXIDV_TELEM_OXE_STALL_HDR_ARB = 1297,
+ CXIDV_TELEM_OXE_STALL_IDC_CMD_NO_DEQ = 1298,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_0 = 1299,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_1 = 1300,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_2 = 1301,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_3 = 1302,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_4 = 1303,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_5 = 1304,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_6 = 1305,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_7 = 1306,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_8 = 1307,
+ CXIDV_TELEM_OXE_STALL_IDC_NO_BUFF_BC_9 = 1308,
+ CXIDV_TELEM_OXE_STALL_IOI_LAST_ORDERED = 1309,
+ CXIDV_TELEM_OXE_STALL_NON_IDC_CMD_NO_DEQ = 1310,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_0 = 1311,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_1 = 1312,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_2 = 1313,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_3 = 1314,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_4 = 1315,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_5 = 1316,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_6 = 1317,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_7 = 1318,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_8 = 1319,
+ CXIDV_TELEM_OXE_STALL_PBUF_BC_9 = 1320,
+ CXIDV_TELEM_OXE_STALL_PCIE_SCOREBOARD = 1321,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_0 = 1322,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_1 = 1323,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_2 = 1324,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_3 = 1325,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_4 = 1326,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_5 = 1327,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_6 = 1328,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_7 = 1329,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_8 = 1330,
+ CXIDV_TELEM_OXE_STALL_PCT_BC_9 = 1331,
+ CXIDV_TELEM_OXE_STALL_STFWD_EOP = 1332,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_0 = 1333,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_1 = 1334,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_2 = 1335,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_3 = 1336,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_4 = 1337,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_5 = 1338,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_6 = 1339,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_7 = 1340,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_8 = 1341,
+ CXIDV_TELEM_OXE_STALL_TS_NO_IN_CRD_TSC_9 = 1342,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_0 = 1343,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_1 = 1344,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_2 = 1345,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_3 = 1346,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_4 = 1347,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_5 = 1348,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_6 = 1349,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_7 = 1350,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_8 = 1351,
+ CXIDV_TELEM_OXE_STALL_TS_NO_OUT_CRD_TSC_9 = 1352,
+ CXIDV_TELEM_OXE_STALL_WITH_NO_ATU_TAG = 1353,
+ CXIDV_TELEM_OXE_STALL_WITH_NO_PCI_TAG = 1354,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_0 = 1355,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_1 = 1356,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_2 = 1357,
+ CXIDV_TELEM_OXE_STALL_WR_CONFLICT_PKT_BUFF_BNK_3 = 1358,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_0 = 1359,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_1 = 1360,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_2 = 1361,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_3 = 1362,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_4 = 1363,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_5 = 1364,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_6 = 1365,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_7 = 1366,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_8 = 1367,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_IDC_SHARED_9 = 1368,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_0 = 1369,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_1 = 1370,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_2 = 1371,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_3 = 1372,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_4 = 1373,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_5 = 1374,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_6 = 1375,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_7 = 1376,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_8 = 1377,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_RESERVED_9 = 1378,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_0 = 1379,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_1 = 1380,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_2 = 1381,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_3 = 1382,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_4 = 1383,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_5 = 1384,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_6 = 1385,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_7 = 1386,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_8 = 1387,
+ CXIDV_TELEM_OXE_STS_BC_OCC_BC_SHARED_9 = 1388,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_0 = 1389,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_1 = 1390,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_2 = 1391,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_3 = 1392,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_4 = 1393,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_5 = 1394,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_6 = 1395,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_7 = 1396,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_8 = 1397,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_9 = 1398,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_10 = 1399,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_11 = 1400,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_12 = 1401,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_13 = 1402,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_14 = 1403,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_15 = 1404,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_16 = 1405,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_17 = 1406,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_18 = 1407,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_19 = 1408,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_20 = 1409,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_21 = 1410,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_22 = 1411,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_23 = 1412,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_24 = 1413,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_25 = 1414,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_26 = 1415,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_27 = 1416,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_28 = 1417,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_29 = 1418,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_30 = 1419,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_31 = 1420,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_32 = 1421,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_33 = 1422,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_34 = 1423,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_35 = 1424,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_36 = 1425,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_37 = 1426,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_38 = 1427,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_39 = 1428,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_40 = 1429,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_41 = 1430,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_42 = 1431,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_43 = 1432,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_44 = 1433,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_45 = 1434,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_46 = 1435,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_47 = 1436,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_48 = 1437,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_49 = 1438,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_50 = 1439,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_51 = 1440,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_52 = 1441,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_53 = 1442,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_54 = 1443,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_55 = 1444,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_56 = 1445,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_57 = 1446,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_58 = 1447,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_59 = 1448,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_60 = 1449,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_61 = 1450,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_62 = 1451,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_63 = 1452,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_64 = 1453,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_65 = 1454,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_66 = 1455,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_67 = 1456,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_68 = 1457,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_69 = 1458,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_70 = 1459,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_71 = 1460,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_72 = 1461,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_73 = 1462,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_74 = 1463,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_75 = 1464,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_76 = 1465,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_77 = 1466,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_78 = 1467,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_79 = 1468,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_80 = 1469,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_81 = 1470,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_82 = 1471,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_83 = 1472,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_84 = 1473,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_85 = 1474,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_86 = 1475,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_87 = 1476,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_88 = 1477,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_89 = 1478,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_90 = 1479,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_91 = 1480,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_92 = 1481,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_93 = 1482,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_94 = 1483,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_IDC_CELL_COUNT_95 = 1484,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_0 = 1485,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_1 = 1486,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_2 = 1487,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_3 = 1488,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_4 = 1489,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_5 = 1490,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_6 = 1491,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_7 = 1492,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_8 = 1493,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_9 = 1494,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_10 = 1495,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_11 = 1496,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_12 = 1497,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_13 = 1498,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_14 = 1499,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_15 = 1500,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_16 = 1501,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_17 = 1502,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_18 = 1503,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_19 = 1504,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_20 = 1505,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_21 = 1506,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_22 = 1507,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_23 = 1508,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_24 = 1509,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_25 = 1510,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_26 = 1511,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_27 = 1512,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_28 = 1513,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_29 = 1514,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_30 = 1515,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_31 = 1516,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_32 = 1517,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_33 = 1518,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_34 = 1519,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_35 = 1520,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_36 = 1521,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_37 = 1522,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_38 = 1523,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_39 = 1524,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_40 = 1525,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_41 = 1526,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_42 = 1527,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_43 = 1528,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_44 = 1529,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_45 = 1530,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_46 = 1531,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_47 = 1532,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_48 = 1533,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_49 = 1534,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_50 = 1535,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_51 = 1536,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_52 = 1537,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_53 = 1538,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_54 = 1539,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_55 = 1540,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_56 = 1541,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_57 = 1542,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_58 = 1543,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_59 = 1544,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_60 = 1545,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_61 = 1546,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_62 = 1547,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_63 = 1548,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_64 = 1549,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_65 = 1550,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_66 = 1551,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_67 = 1552,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_68 = 1553,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_69 = 1554,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_70 = 1555,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_71 = 1556,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_72 = 1557,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_73 = 1558,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_74 = 1559,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_75 = 1560,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_76 = 1561,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_77 = 1562,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_78 = 1563,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_79 = 1564,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_80 = 1565,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_81 = 1566,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_82 = 1567,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_83 = 1568,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_84 = 1569,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_85 = 1570,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_86 = 1571,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_87 = 1572,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_88 = 1573,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_89 = 1574,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_90 = 1575,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_91 = 1576,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_92 = 1577,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_93 = 1578,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_94 = 1579,
+ CXIDV_TELEM_OXE_STS_MCU_OCC_MCU_CELL_COUNT_95 = 1580,
+ CXIDV_TELEM_PARBS_RARB_ATU_COMPLETION_PKTS = 1581,
+ CXIDV_TELEM_PARBS_RARB_ATU_POSTED_PKTS = 1582,
+ CXIDV_TELEM_PARBS_RARB_CQ_COMPLETION_PKTS = 1583,
+ CXIDV_TELEM_PARBS_RARB_CQ_POSTED_PKTS = 1584,
+ CXIDV_TELEM_PARBS_RARB_EE_POSTED_PKTS = 1585,
+ CXIDV_TELEM_PARBS_RARB_IXE_COMPLETION_PKTS = 1586,
+ CXIDV_TELEM_PARBS_RARB_IXE_POSTED_PKTS = 1587,
+ CXIDV_TELEM_PARBS_RARB_OXE_COMPLETION_PKTS = 1588,
+ CXIDV_TELEM_PARBS_RARB_PI_COMPLETION_PKTS = 1589,
+ CXIDV_TELEM_PARBS_RARB_PI_MBE_CNT = 1590,
+ CXIDV_TELEM_PARBS_RARB_PI_POSTED_PKTS = 1591,
+ CXIDV_TELEM_PARBS_RARB_PI_SBE_CNT = 1592,
+ CXIDV_TELEM_PARBS_STS_CREDITS_IN_USE_TARB_PI_NON_POSTED_CREDITS = 1593,
+ CXIDV_TELEM_PARBS_STS_CREDITS_IN_USE_TARB_PI_POSTED_CREDITS = 1594,
+ CXIDV_TELEM_PARBS_TARB_ATU_MBE_CNT = 1595,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_FIFO_MBE = 1596,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_FIFO_SBE = 1597,
+ CXIDV_TELEM_PARBS_TARB_ATU_NON_POSTED_PKTS = 1598,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_FIFO_MBE = 1599,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_FIFO_SBE = 1600,
+ CXIDV_TELEM_PARBS_TARB_ATU_POSTED_PKTS = 1601,
+ CXIDV_TELEM_PARBS_TARB_ATU_SBE_CNT = 1602,
+ CXIDV_TELEM_PARBS_TARB_CQ_MBE_CNT = 1603,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_FIFO_MBE = 1604,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_FIFO_SBE = 1605,
+ CXIDV_TELEM_PARBS_TARB_CQ_NON_POSTED_PKTS = 1606,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_FIFO_MBE = 1607,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_FIFO_SBE = 1608,
+ CXIDV_TELEM_PARBS_TARB_CQ_POSTED_PKTS = 1609,
+ CXIDV_TELEM_PARBS_TARB_CQ_SBE_CNT = 1610,
+ CXIDV_TELEM_PARBS_TARB_EE_MBE_CNT = 1611,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_FIFO_MBE = 1612,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_FIFO_SBE = 1613,
+ CXIDV_TELEM_PARBS_TARB_EE_POSTED_PKTS = 1614,
+ CXIDV_TELEM_PARBS_TARB_EE_SBE_CNT = 1615,
+ CXIDV_TELEM_PARBS_TARB_IXE_MBE_CNT = 1616,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_FIFO_MBE = 1617,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_FIFO_SBE = 1618,
+ CXIDV_TELEM_PARBS_TARB_IXE_NON_POSTED_PKTS = 1619,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_FIFO_MBE = 1620,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_FIFO_SBE = 1621,
+ CXIDV_TELEM_PARBS_TARB_IXE_POSTED_PKTS = 1622,
+ CXIDV_TELEM_PARBS_TARB_IXE_SBE_CNT = 1623,
+ CXIDV_TELEM_PARBS_TARB_OXE_MBE_CNT = 1624,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_FIFO_MBE = 1625,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_FIFO_SBE = 1626,
+ CXIDV_TELEM_PARBS_TARB_OXE_NON_POSTED_PKTS = 1627,
+ CXIDV_TELEM_PARBS_TARB_OXE_SBE_CNT = 1628,
+ CXIDV_TELEM_PARBS_TARB_PI_NON_POSTED_BLOCKED_CNT = 1629,
+ CXIDV_TELEM_PARBS_TARB_PI_NON_POSTED_PKTS = 1630,
+ CXIDV_TELEM_PARBS_TARB_PI_POSTED_BLOCKED_CNT = 1631,
+ CXIDV_TELEM_PARBS_TARB_PI_POSTED_PKTS = 1632,
+ CXIDV_TELEM_PCT_ACCEL_CLOSE = 1633,
+ CXIDV_TELEM_PCT_BAD_SEQ_NACKS = 1634,
+ CXIDV_TELEM_PCT_CLEAR_CLOSE_DROP = 1635,
+ CXIDV_TELEM_PCT_CLEAR_SENT = 1636,
+ CXIDV_TELEM_PCT_CLOSE_RSP_DROPS = 1637,
+ CXIDV_TELEM_PCT_CLOSE_SENT = 1638,
+ CXIDV_TELEM_PCT_CLR_CLS_STALLS = 1639,
+ CXIDV_TELEM_PCT_CLS_REQ_BAD_SEQNO_DROPS = 1640,
+ CXIDV_TELEM_PCT_CLS_REQ_MISS_TCT = 1641,
+ CXIDV_TELEM_PCT_CONN_SCT_OPEN = 1642,
+ CXIDV_TELEM_PCT_CONN_TCT_OPEN = 1643,
+ CXIDV_TELEM_PCT_ERR_NO_MATCHING_MST = 1644,
+ CXIDV_TELEM_PCT_ERR_NO_MATCHING_TRS = 1645,
+ CXIDV_TELEM_PCT_ETH_PACKETS = 1646,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_0 = 1647,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_1 = 1648,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_2 = 1649,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_3 = 1650,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_4 = 1651,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_5 = 1652,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_6 = 1653,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_7 = 1654,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_8 = 1655,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_9 = 1656,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_10 = 1657,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_11 = 1658,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_12 = 1659,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_13 = 1660,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_14 = 1661,
+ CXIDV_TELEM_PCT_HOST_ACCESS_LATENCY_15 = 1662,
+ CXIDV_TELEM_PCT_HRP_RESPONSES_RECEIVED = 1663,
+ CXIDV_TELEM_PCT_HRP_RSP_DISCARD_RECEIVED = 1664,
+ CXIDV_TELEM_PCT_HRP_RSP_ERR_RECEIVED = 1665,
+ CXIDV_TELEM_PCT_MEM_COR_ERR_CNTR = 1666,
+ CXIDV_TELEM_PCT_MEM_UCOR_ERR_CNTR = 1667,
+ CXIDV_TELEM_PCT_MST_HIT_ON_SOM = 1668,
+ CXIDV_TELEM_PCT_NO_MATCHING_TCT = 1669,
+ CXIDV_TELEM_PCT_NO_MST_NACKS = 1670,
+ CXIDV_TELEM_PCT_NO_TCT_NACKS = 1671,
+ CXIDV_TELEM_PCT_NO_TRS_NACKS = 1672,
+ CXIDV_TELEM_PCT_OPTIP_PACKETS = 1673,
+ CXIDV_TELEM_PCT_PCT_CQ_NOTIFICATIONS = 1674,
+ CXIDV_TELEM_PCT_PCT_CQ_STALLS = 1675,
+ CXIDV_TELEM_PCT_PCT_EE_EVENTS = 1676,
+ CXIDV_TELEM_PCT_PCT_EE_STALLS = 1677,
+ CXIDV_TELEM_PCT_PCT_HNI_FLITS = 1678,
+ CXIDV_TELEM_PCT_PCT_HNI_STALLS = 1679,
+ CXIDV_TELEM_PCT_PCT_MST_CMD0 = 1680,
+ CXIDV_TELEM_PCT_PCT_MST_CMD1 = 1681,
+ CXIDV_TELEM_PCT_PCT_MST_STALLS0 = 1682,
+ CXIDV_TELEM_PCT_PCT_MST_STALLS1 = 1683,
+ CXIDV_TELEM_PCT_PRF_MST_STATUS_MAX_MST_IN_USE = 1684,
+ CXIDV_TELEM_PCT_PRF_MST_STATUS_MST_IN_USE = 1685,
+ CXIDV_TELEM_PCT_PRF_SCT_STATUS_MAX_SCT_IN_USE = 1686,
+ CXIDV_TELEM_PCT_PRF_SCT_STATUS_SCT_IN_USE = 1687,
+ CXIDV_TELEM_PCT_PRF_SMT_STATUS_MAX_SMT_IN_USE = 1688,
+ CXIDV_TELEM_PCT_PRF_SMT_STATUS_SMT_IN_USE = 1689,
+ CXIDV_TELEM_PCT_PRF_SPT_STATUS_MAX_SPT_IN_USE = 1690,
+ CXIDV_TELEM_PCT_PRF_SPT_STATUS_SPT_IN_USE = 1691,
+ CXIDV_TELEM_PCT_PRF_SRB_STATUS_MAX_SRB_IN_USE = 1692,
+ CXIDV_TELEM_PCT_PRF_SRB_STATUS_SRB_IN_USE = 1693,
+ CXIDV_TELEM_PCT_PRF_TCT_STATUS_MAX_TCT_IN_USE = 1694,
+ CXIDV_TELEM_PCT_PRF_TCT_STATUS_TCT_IN_USE = 1695,
+ CXIDV_TELEM_PCT_PRF_TRS_STATUS_MAX_TRS_IN_USE = 1696,
+ CXIDV_TELEM_PCT_PRF_TRS_STATUS_TRS_IN_USE = 1697,
+ CXIDV_TELEM_PCT_PTLS_RESPONSE = 1698,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_CLEARING = 1699,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_CLOSING = 1700,
+ CXIDV_TELEM_PCT_REQ_BLOCKED_RETRY = 1701,
+ CXIDV_TELEM_PCT_REQ_NO_RESPONSE = 1702,
+ CXIDV_TELEM_PCT_REQ_ORDERED = 1703,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_0 = 1704,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_1 = 1705,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_2 = 1706,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_3 = 1707,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_4 = 1708,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_5 = 1709,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_6 = 1710,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_7 = 1711,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_8 = 1712,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_9 = 1713,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_10 = 1714,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_11 = 1715,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_12 = 1716,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_13 = 1717,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_14 = 1718,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_15 = 1719,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_16 = 1720,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_17 = 1721,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_18 = 1722,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_19 = 1723,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_20 = 1724,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_21 = 1725,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_22 = 1726,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_23 = 1727,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_24 = 1728,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_25 = 1729,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_26 = 1730,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_27 = 1731,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_28 = 1732,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_29 = 1733,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_30 = 1734,
+ CXIDV_TELEM_PCT_REQ_RSP_LATENCY_31 = 1735,
+ CXIDV_TELEM_PCT_REQ_SRC_ERROR = 1736,
+ CXIDV_TELEM_PCT_REQ_TCT_TMOUT_DROPS = 1737,
+ CXIDV_TELEM_PCT_REQ_UNORDERED = 1738,
+ CXIDV_TELEM_PCT_RESOURCE_BUSY = 1739,
+ CXIDV_TELEM_PCT_RESPONSES_RECEIVED = 1740,
+ CXIDV_TELEM_PCT_RETRY_MST_GET = 1741,
+ CXIDV_TELEM_PCT_RETRY_SRB_REQUESTS = 1742,
+ CXIDV_TELEM_PCT_RETRY_TRS_PUT = 1743,
+ CXIDV_TELEM_PCT_RSP_DROPPED_CLS_TRY = 1744,
+ CXIDV_TELEM_PCT_RSP_DROPPED_INACTIVE = 1745,
+ CXIDV_TELEM_PCT_RSP_DROPPED_TIMEOUT = 1746,
+ CXIDV_TELEM_PCT_RSP_DROPPED_TRY = 1747,
+ CXIDV_TELEM_PCT_RSP_ERR_RCVD = 1748,
+ CXIDV_TELEM_PCT_SCT_STALL_STATE = 1749,
+ CXIDV_TELEM_PCT_SCT_TIMEOUTS = 1750,
+ CXIDV_TELEM_PCT_SPT_TIMEOUTS = 1751,
+ CXIDV_TELEM_PCT_TCT_TIMEOUTS = 1752,
+ CXIDV_TELEM_PCT_TGT_CLS_ABORT = 1753,
+ CXIDV_TELEM_PCT_TRS_HIT_ON_REQ = 1754,
+ CXIDV_TELEM_PCT_TRS_REPLAY_PEND_DROPS = 1755,
+ CXIDV_TELEM_PCT_TRS_RSP_NACK_DROPS = 1756,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_REQUESTS = 1757,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_DECERRS = 1758,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_PARERRS = 1759,
+ CXIDV_TELEM_PI_DMAC_AXI_RD_RSP_SLVERRS = 1760,
+ CXIDV_TELEM_PI_DMAC_CE_MWR_TLPS = 1761,
+ CXIDV_TELEM_PI_DMAC_DESC_COR_ERRORS = 1762,
+ CXIDV_TELEM_PI_DMAC_DESC_UCOR_ERRORS = 1763,
+ CXIDV_TELEM_PI_DMAC_IRQS = 1764,
+ CXIDV_TELEM_PI_DMAC_PAYLOAD_MWR_TLPS = 1765,
+ CXIDV_TELEM_PI_IPD_CFG_EVENT_CNTS_OVF_CNT = 1766,
+ CXIDV_TELEM_PI_IPD_DBIC_DBI_ACKS = 1767,
+ CXIDV_TELEM_PI_IPD_DBIC_DBI_REQUESTS = 1768,
+ CXIDV_TELEM_PI_IPD_DMAC_P_FIFO_COR_ERRORS = 1769,
+ CXIDV_TELEM_PI_IPD_DMAC_P_FIFO_UCOR_ERRORS = 1770,
+ CXIDV_TELEM_PI_IPD_IPD_TRIGGER_EVENTS_0 = 1771,
+ CXIDV_TELEM_PI_IPD_IPD_TRIGGER_EVENTS_1 = 1772,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQ_PBAS = 1773,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQS_DISCARDED = 1774,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_IRQS_SENT = 1775,
+ CXIDV_TELEM_PI_IPD_MSIXC_IB_LEGACY_IRQS_SENT = 1776,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQ_PBAS = 1777,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQS_DISCARDED = 1778,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_IRQS_SENT = 1779,
+ CXIDV_TELEM_PI_IPD_MSIXC_OOB_LEGACY_IRQS_SENT = 1780,
+ CXIDV_TELEM_PI_IPD_MSIXC_PBA_COR_ERRORS = 1781,
+ CXIDV_TELEM_PI_IPD_MSIXC_PBA_UCOR_ERRORS = 1782,
+ CXIDV_TELEM_PI_IPD_MSIXC_PTI_FIFO_COR_ERRORS = 1783,
+ CXIDV_TELEM_PI_IPD_MSIXC_PTI_FIFO_UCOR_ERRORS = 1784,
+ CXIDV_TELEM_PI_IPD_MSIXC_TABLE_COR_ERRORS = 1785,
+ CXIDV_TELEM_PI_IPD_MSIXC_TABLE_UCOR_ERRORS = 1786,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_DATA_PARITY_ERRORS = 1787,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_HDR_PARITY_ERRORS = 1788,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_TLPS = 1789,
+ CXIDV_TELEM_PI_IPD_PRI_RBYP_TLPS_ABORTED = 1790,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_BLOCKED_ON_MB = 1791,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_BLOCKED_ON_RARB = 1792,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_DATA_PARITY_ERRORS = 1793,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_HDR_PARITY_ERRORS = 1794,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MRD_TLPS = 1795,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MSG_TLPS = 1796,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MSGD_TLPS = 1797,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_MWR_TLPS = 1798,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_TLPS = 1799,
+ CXIDV_TELEM_PI_IPD_PRI_RTRGT_TLPS_ABORTED = 1800,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_NPH_CRD = 1801,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_PD_CRD = 1802,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_PH_CRD = 1803,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_BLOCKED_ON_TAG = 1804,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_XALI_NON_POSTED_TLPS = 1805,
+ CXIDV_TELEM_PI_IPD_PTI_DBG_XALI_POSTED_TLPS = 1806,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_BLOCKED_ON_PD_CRD = 1807,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_BLOCKED_ON_PH_CRD = 1808,
+ CXIDV_TELEM_PI_IPD_PTI_DMAC_XALI_POSTED_TLPS = 1809,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_BLOCKED_ON_PD_CRD = 1810,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_BLOCKED_ON_PH_CRD = 1811,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_FIFO_COR_ERRORS = 1812,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_FIFO_UCOR_ERRORS = 1813,
+ CXIDV_TELEM_PI_IPD_PTI_MSIXC_XALI_POSTED_TLPS = 1814,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_NPD_CRD = 1815,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_NPH_CRD = 1816,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_PD_CRD = 1817,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_PH_CRD = 1818,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_BLOCKED_ON_TAG = 1819,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO = 1820,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO_FIFO_COR_ERRORS = 1821,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_CMPL_TO_FIFO_UCOR_ERRORS = 1822,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_NP_FIFO_COR_ERRORS = 1823,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_NP_FIFO_UCOR_ERRORS = 1824,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_P_FIFO_COR_ERRORS = 1825,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_P_FIFO_UCOR_ERRORS = 1826,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_XALI_NON_POSTED_TLPS = 1827,
+ CXIDV_TELEM_PI_IPD_PTI_TARB_XALI_POSTED_TLPS = 1828,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_REQUESTS = 1829,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_DECERRS = 1830,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_PARERRS = 1831,
+ CXIDV_TELEM_PI_PRI_MB_AXI_RD_RSP_SLVERRS = 1832,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_REQUESTS = 1833,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_RSP_DECERRS = 1834,
+ CXIDV_TELEM_PI_PRI_MB_AXI_WR_RSP_SLVERRS = 1835,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_FIFO_COR_ERRORS = 1836,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_FIFO_UCOR_ERRORS = 1837,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_MRD_TLPS = 1838,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_MWR_TLPS = 1839,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_NON_POSTED_TLP_DISCARDS = 1840,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_POSTED_TLP_DISCARDS = 1841,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_POSTED_TLP_PARTIAL_DISCARDS = 1842,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_TLP_DISCARDS = 1843,
+ CXIDV_TELEM_PI_PRI_MB_RTRGT_TLPS = 1844,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_CA_TLPS = 1845,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_TLPS = 1846,
+ CXIDV_TELEM_PI_PRI_MB_XALI_CMPL_UR_TLPS = 1847,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_FIFO_COR_ERRORS = 1848,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_FIFO_UCOR_ERRORS = 1849,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_TLP_DISCARDS = 1850,
+ CXIDV_TELEM_PI_PRI_RARB_RBYP_TLPS = 1851,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_FIFO_COR_ERRORS = 1852,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_FIFO_UCOR_ERRORS = 1853,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MSG_TLPS = 1854,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MSGD_TLPS = 1855,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_MWR_TLPS = 1856,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_TLP_DISCARDS = 1857,
+ CXIDV_TELEM_PI_PRI_RARB_RTRGT_TLPS = 1858,
+ CXIDV_TELEM_PI_PRI_RARB_SRIOVT_COR_ERRORS = 1859,
+ CXIDV_TELEM_PI_PRI_RARB_SRIOVT_UCOR_ERRORS = 1860,
+ CXIDV_TELEM_PI_PTI_TARB_ACXT_COR_ERRORS = 1861,
+ CXIDV_TELEM_PI_PTI_TARB_ACXT_UCOR_ERRORS = 1862,
+ CXIDV_TELEM_PI_PTI_TARB_AMO_PKTS = 1863,
+ CXIDV_TELEM_PI_PTI_TARB_DATA_COR_ERRORS = 1864,
+ CXIDV_TELEM_PI_PTI_TARB_DATA_UCOR_ERROR = 1865,
+ CXIDV_TELEM_PI_PTI_TARB_FETCHING_AMO_PKTS = 1866,
+ CXIDV_TELEM_PI_PTI_TARB_FLUSH_PKTS = 1867,
+ CXIDV_TELEM_PI_PTI_TARB_HDR_COR_ERRORS = 1868,
+ CXIDV_TELEM_PI_PTI_TARB_HDR_UCOR_ERRORS = 1869,
+ CXIDV_TELEM_PI_PTI_TARB_INV_RSP_PKTS = 1870,
+ CXIDV_TELEM_PI_PTI_TARB_IRQ_PKTS = 1871,
+ CXIDV_TELEM_PI_PTI_TARB_MRD_PKTS = 1872,
+ CXIDV_TELEM_PI_PTI_TARB_MWR_PKTS = 1873,
+ CXIDV_TELEM_PI_PTI_TARB_PG_REQ_PKTS = 1874,
+ CXIDV_TELEM_PI_PTI_TARB_PKT_DISCARDS = 1875,
+ CXIDV_TELEM_PI_PTI_TARB_PKTS = 1876,
+ CXIDV_TELEM_PI_PTI_TARB_RARB_CA_PKTS = 1877,
+ CXIDV_TELEM_PI_PTI_TARB_TRANSLATION_PKTS = 1878,
+ CXIDV_TELEM_RMU_ENET_FRAME_REJECTED_CNTR = 1879,
+ CXIDV_TELEM_RMU_ENET_PTLTE_SET_CTRL_ERR_CNTR = 1880,
+ CXIDV_TELEM_RMU_ENET_SUCCESS_CNTR = 1881,
+ CXIDV_TELEM_RMU_MEM_COR_ERR_CNTR = 1882,
+ CXIDV_TELEM_RMU_MEM_UCOR_ERR_CNTR = 1883,
+ CXIDV_TELEM_RMU_PTL_INVLD_DFA_CNTR = 1884,
+ CXIDV_TELEM_RMU_PTL_INVLD_VNI_CNTR = 1885,
+ CXIDV_TELEM_RMU_PTL_NO_PTLTE_CNTR = 1886,
+ CXIDV_TELEM_RMU_PTL_SUCCESS_CNTR = 1887,
+ CXIDV_TELEM_TOU_CMD_FIFO_FULL_CYCLES = 1888,
+ CXIDV_TELEM_TOU_CQ_TOU_NUM_CMDS = 1889,
+ CXIDV_TELEM_TOU_CQ_TOU_NUM_STALLS = 1890,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_0 = 1891,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_1 = 1892,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_2 = 1893,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_3 = 1894,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_4 = 1895,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_5 = 1896,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_6 = 1897,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_7 = 1898,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_8 = 1899,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_9 = 1900,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_10 = 1901,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_11 = 1902,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_12 = 1903,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_13 = 1904,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_14 = 1905,
+ CXIDV_TELEM_TOU_CT_CMD_COUNTS_15 = 1906,
+ CXIDV_TELEM_TOU_FAIL_CNTR = 1907,
+ CXIDV_TELEM_TOU_LIST_REBUILD_CYCLES = 1908,
+ CXIDV_TELEM_TOU_NUM_CT_UPDATES = 1909,
+ CXIDV_TELEM_TOU_NUM_DOORBELL_WRITES = 1910,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_0 = 1911,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_1 = 1912,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_2 = 1913,
+ CXIDV_TELEM_TOU_NUM_LIST_REBUILDS_3 = 1914,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_0 = 1915,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_1 = 1916,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_2 = 1917,
+ CXIDV_TELEM_TOU_NUM_TRIG_CMDS_3 = 1918,
+ CXIDV_TELEM_TOU_SUCCESS_CNTR = 1919,
+ CXIDV_TELEM_TOU_TOU_OXE_NUM_FLITS = 1920,
+ CXIDV_TELEM_TOU_TOU_OXE_NUM_IDLES = 1921,
+ CXIDV_TELEM_TOU_TOU_OXE_NUM_STALLS = 1922,
+ CXIDV_TELEM_COUNT = 1923,
+};
+
+/* Predefined groups of items */
+enum cxidv_telem_set {
+ CXIDV_TELEM_SET_ETHTOOL,
+ CXIDV_TELEM_SET_ATU,
+ CXIDV_TELEM_SET_CQ,
+ CXIDV_TELEM_SET_EE,
+ CXIDV_TELEM_SET_HNI,
+ CXIDV_TELEM_SET_IXE,
+ CXIDV_TELEM_SET_LPE,
+ CXIDV_TELEM_SET_MB,
+ CXIDV_TELEM_SET_MST,
+ CXIDV_TELEM_SET_OXE,
+ CXIDV_TELEM_SET_PARBS,
+ CXIDV_TELEM_SET_PCT,
+ CXIDV_TELEM_SET_PI,
+ CXIDV_TELEM_SET_RMU,
+ CXIDV_TELEM_SET_TOU,
+ CXIDV_TELEM_SET_COUNT,
+};
+
+/* Name of an item as the sysfs telemetry files had it, or NULL */
+const char *cxidv_telem_name(uint32_t item);
+
+/* Item number for a name, or -1 if there is no such item */
+int cxidv_telem_lookup(const char *name);
+
+/* Items of a predefined set. Returns 0, or an errno value. */
+int cxidv_telem_get_set(enum cxidv_telem_set set, const uint64_t **items, uint32_t *count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 06/12] cxiverbs: encode list entries and VNI-isolated remote keys
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (4 preceding siblings ...)
2026-10-31 19:25 ` [PATCH 05/12] cxiverbs: define the native direct-verbs resource interface Doug Ledford
@ 2026-10-31 19:25 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 07/12] cxiverbs: add the provider and device discovery Doug Ledford
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:25 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Add cxi_le.h, which encodes receive list entries and remote keys.
A logical remote key is at most 48 bits. The wire key is the logical
key shifted left by 16 with the job's VNI in the low 16 bits, and the
list entry clears the ignore bits covering the VNI so it is always
compared. A logical key that does not fit is rejected with EOPNOTSUPP
rather than truncated, and a zero key is rejected with EINVAL, because
zero match bits are reserved for receives that do not use a key.
The helpers return negative errno values like the rest of the
hardware interface; the verbs entry points negate them before
setting errno.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/cxi_le.h | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/providers/cxi/cxi_le.h b/providers/cxi/cxi_le.h
new file mode 100644
index 000000000000..096b3933adee
--- /dev/null
+++ b/providers/cxi/cxi_le.h
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/*
+ * Copyright 2026 Hewlett Packard Enterprise Development LP
+ */
+
+/*
+ * List entries the provider appends to an RU QP's PTE. The PTE is a
+ * matching PTE, so an entry is selected by match_bits (under ignore_bits)
+ * and by the initiator's match_id; both must be right or nothing matches.
+ */
+
+#ifndef CXI_LE_H
+#define CXI_LE_H
+
+#include <stdint.h>
+#include <errno.h>
+#include <string.h>
+#include "cxi_prov_hw.h"
+#include <rdma/cxiverbs-abi.h>
+
+/* SEND carries no key, so a receive buffer matches exactly the zero no rkey is. */
+#define CXI_LE_RECV_MATCH_BITS 0ULL
+
+#define CXI_LE_VNI_MASK 0xffffULL
+#define CXI_LE_RKEY_MAX 0xffffffffffffULL
+
+static inline int cxi_le_wire_key(uint64_t rkey, uint64_t *wire_key)
+{
+ if (rkey > CXI_LE_RKEY_MAX)
+ return -EOPNOTSUPP;
+ *wire_key = rkey << 16;
+ return 0;
+}
+
+static inline int cxi_le_set_vni(union c_cmdu *cmd, uint64_t rkey, uint16_t vni)
+{
+ uint64_t wire_key;
+ int ret = cxi_le_wire_key(rkey, &wire_key);
+
+ if (ret)
+ return ret;
+ cmd->target.match_bits = wire_key | vni;
+ cmd->target.ignore_bits &= ~CXI_LE_VNI_MASK;
+ return 0;
+}
+
+static inline void cxi_le_recv(union c_cmdu *cmd, uint16_t ptlte_index, uint8_t lac, uint64_t iova,
+ uint64_t length)
+{
+ memset(cmd, 0, sizeof(*cmd));
+ cmd->command.opcode = C_CMD_TGT_APPEND;
+ cmd->target.ptlte_index = ptlte_index;
+ cmd->target.ptl_list = C_PTL_LIST_PRIORITY;
+ cmd->target.op_put = 1;
+ cmd->target.use_once = 1;
+ cmd->target.lac = lac;
+ cmd->target.start = iova;
+ cmd->target.length = length;
+ cmd->target.match_bits = CXI_LE_RECV_MATCH_BITS;
+ cmd->target.ignore_bits = 0;
+ cmd->target.match_id = CXI_MATCH_ID_ANY;
+}
+
+/*
+ * An attached region matches its rkey exactly: a region reachable by a
+ * narrow key is made that way at registration, so the key carries its own
+ * width. It persists until detached, and buffer_id names it for the unlink.
+ */
+static inline void cxi_le_region(union c_cmdu *cmd, uint16_t ptlte_index, uint64_t lkey64,
+ uint64_t rkey64, uint64_t iova, uint64_t length)
+{
+ memset(cmd, 0, sizeof(*cmd));
+ cmd->command.opcode = C_CMD_TGT_APPEND;
+ cmd->target.ptlte_index = ptlte_index;
+ cmd->target.ptl_list = C_PTL_LIST_PRIORITY;
+ cmd->target.op_put = 1;
+ cmd->target.op_get = 1;
+ cmd->target.lac = lkey64 & CXI_LKEY64_LAC_MASK;
+ cmd->target.start = iova;
+ cmd->target.length = length;
+ cmd->target.match_bits = rkey64;
+ cmd->target.ignore_bits = 0;
+ cmd->target.match_id = CXI_MATCH_ID_ANY;
+ cmd->target.use_once = 0;
+ cmd->target.buffer_id = (uint16_t)(rkey64 & 0xffff);
+}
+
+static inline void cxi_le_region_unlink(union c_cmdu *cmd, uint16_t ptlte_index, uint64_t rkey64)
+{
+ memset(cmd, 0, sizeof(*cmd));
+ cmd->command.opcode = C_CMD_TGT_UNLINK;
+ cmd->target.ptlte_index = ptlte_index;
+ cmd->target.ptl_list = C_PTL_LIST_PRIORITY;
+ cmd->target.buffer_id = (uint16_t)(rkey64 & 0xffff);
+}
+
+#endif /* CXI_LE_H */
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 07/12] cxiverbs: add the provider and device discovery
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (5 preceding siblings ...)
2026-10-31 19:25 ` [PATCH 06/12] cxiverbs: encode list entries and VNI-isolated remote keys Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 08/12] cxiverbs: implement UET verbs with explicit native ownership Doug Ledford
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team
Cc: linux-kernel, Doug Ledford, Mamila Santosh, Iraimani P
Add the provider skeleton: registration with libibverbs, device
matching, context allocation and the context operations.
Allocating the context takes the QP table and MR list locks; a failure
of either pthread_spin_init() is now handled, destroying the first
lock if the second fails. The context free callback is registered in
the context operations so ibv_close_device() releases the provider
context, the verbs private state, the file descriptors and the device
reference, instead of falling through to the default no-op.
Co-developed-by: Mamila Santosh <santosh-kumar.mamila@hpe.com>
Signed-off-by: Mamila Santosh <santosh-kumar.mamila@hpe.com>
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/cxi.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 196 insertions(+)
diff --git a/providers/cxi/cxi.c b/providers/cxi/cxi.c
new file mode 100644
index 000000000000..7a71740042e6
--- /dev/null
+++ b/providers/cxi/cxi.c
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/*
+ * Copyright 2025 HPE. All rights reserved.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <pthread.h>
+#include <sys/mman.h>
+
+#include <infiniband/driver.h>
+#include <kernel-abi/cxiverbs-abi.h>
+#include <rdma/cxiverbs-abi.h>
+#include "cxiverbs-abi.h"
+#include "cxi_verbs.h"
+#include "cxi.h"
+
+static const struct verbs_match_ent cxi_table[] = {
+ VERBS_DRIVER_ID(RDMA_DRIVER_CXI),
+ VERBS_PCI_MATCH(PCI_VENDOR_ID_CRAY, PCI_DEVICE_ID_CASSINI_1, NULL),
+ VERBS_PCI_MATCH(PCI_VENDOR_ID_HPE, PCI_DEVICE_ID_CASSINI_1, NULL),
+ VERBS_PCI_MATCH(PCI_VENDOR_ID_HPE, PCI_DEVICE_ID_CASSINI_2, NULL),
+ {}
+};
+
+static int cxi_query_qp_semantics(struct ibv_context *context, enum ibv_qp_type type, uint32_t port,
+ uint8_t sgid_index, struct ibv_qp_semantics *sem, size_t size)
+{
+ if (port != 1 || sgid_index)
+ return EINVAL;
+ return ibv_cmd_query_qp_semantics(context, type, sem, size);
+}
+
+static const struct verbs_context_ops cxi_ctx_ops = {
+ .query_qp_semantics = cxi_query_qp_semantics,
+ .query_device_ex = cxi_query_device,
+ .query_port = cxi_query_port,
+ .alloc_pd = cxi_alloc_pd,
+ .dealloc_pd = cxi_dealloc_pd,
+ .alloc_job = cxi_alloc_job,
+ .dealloc_job = cxi_dealloc_job,
+ .query_job = cxi_query_job,
+ .insert_addr = cxi_insert_addr,
+ .remove_addr = cxi_remove_addr,
+ .query_addr = cxi_query_addr,
+ .export_job = cxi_export_job,
+ .import_job = cxi_import_job,
+ .create_jkey = cxi_create_jkey,
+ .destroy_jkey = cxi_destroy_jkey,
+ .reg_mr = cxi_reg_mr,
+ .reg_mr_ex = cxi_reg_mr_ex,
+ .dereg_mr = cxi_dereg_mr,
+ .create_cq = cxi_create_cq,
+ .create_cq_ex = cxi_create_cq_ex,
+ .destroy_cq = cxi_destroy_cq,
+ .create_counters = cxi_create_counters,
+ .destroy_counters = cxi_destroy_counters,
+ .read_counters_ex = cxi_read_counters_ex,
+ .poll_cq = cxi_poll_cq,
+ .req_notify_cq = cxi_arm_cq,
+ .create_qp_ex = cxi_create_qp_ex,
+ .modify_qp = cxi_modify_qp,
+ .query_qp = cxi_query_qp,
+ .destroy_qp = cxi_destroy_qp,
+ .post_send = cxi_post_send,
+ .post_recv = cxi_post_recv,
+ .post_recv64 = cxi_post_recv64,
+ .attach_mr = cxi_attach_mr,
+ .detach_mr = cxi_detach_mr,
+ .create_ah = cxi_create_ah,
+ .create_ah_ex = cxi_create_ah_ex,
+ .destroy_ah = cxi_destroy_ah,
+ .free_context = cxi_free_context,
+};
+
+static struct verbs_context *cxi_alloc_context(struct ibv_device *vdev, int cmd_fd,
+ void *private_data)
+{
+ struct cxi_alloc_ucontext_resp resp = {};
+ struct cxi_alloc_ucontext cmd = {};
+ struct cxi_context *ctx;
+ int ret;
+
+ ctx = verbs_init_and_alloc_context(vdev, cmd_fd, ctx, verbs_ctx, RDMA_DRIVER_CXI);
+ if (!ctx)
+ return NULL;
+ atomic_init(&ctx->send_cookie_seq, 0);
+
+ ret = ibv_cmd_get_context(&ctx->verbs_ctx, &cmd.ibv_cmd, sizeof(cmd), NULL, &resp.ibv_resp,
+ sizeof(resp));
+ if (ret) {
+ verbs_err(&ctx->verbs_ctx, "ibv_cmd_get_context failed: %s\n", strerror(ret));
+ goto err_free_ctx;
+ }
+
+ ctx->nid = resp.nid;
+ ctx->pid_bits = resp.pid_bits;
+
+ {
+ struct cxi_query_device_ex_resp qresp = {};
+ struct ibv_device_attr_ex attr = {};
+ size_t qresp_size = sizeof(qresp);
+
+ /*
+ * Best-effort: fetch device-wide HW properties (nid,
+ * pid_bits, pid_count, pid_granule, ...) via the driver's
+ * query_device response. This is the only source for them
+ * on the RDMA path (no ioctl/sysfs channel exists there);
+ * see cxi_ibv_devinfo in kernel-headers/rdma/cxiverbs-abi.h.
+ * Failure here is not fatal to context alloc: it only means
+ * cxidv_query_device() will report EOPNOTSUPP later.
+ */
+ ret = ibv_cmd_query_device_any(&ctx->verbs_ctx.context, NULL, &attr, sizeof(attr),
+ &qresp.ibv_resp, &qresp_size);
+ if (!ret)
+ ctx->devinfo = qresp.devinfo;
+ }
+
+ ret = pthread_mutex_init(&ctx->tc_lock, NULL);
+ if (ret)
+ goto err_free_ctx;
+ ret = pthread_spin_init(&ctx->qp_table_lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret)
+ goto err_destroy_tc_lock;
+ ret = pthread_spin_init(&ctx->mr_list_lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret)
+ goto err_free_spinlock;
+
+ verbs_set_ops(&ctx->verbs_ctx, &cxi_ctx_ops);
+
+ return &ctx->verbs_ctx;
+
+err_free_spinlock:
+ pthread_spin_destroy(&ctx->qp_table_lock);
+err_destroy_tc_lock:
+ pthread_mutex_destroy(&ctx->tc_lock);
+err_free_ctx:
+ verbs_uninit_context(&ctx->verbs_ctx);
+ free(ctx);
+ errno = ret;
+ return NULL;
+}
+
+void cxi_free_context(struct ibv_context *ibvctx)
+{
+ struct cxi_context *ctx = to_cxi_ctx(ibvctx);
+
+ pthread_spin_destroy(&ctx->mr_list_lock);
+ pthread_spin_destroy(&ctx->qp_table_lock);
+ pthread_mutex_destroy(&ctx->tc_lock);
+ verbs_uninit_context(&ctx->verbs_ctx);
+ free(ctx);
+}
+
+static struct verbs_device *cxi_device_alloc(struct verbs_sysfs_dev *sysfs_dev)
+{
+ struct cxi_device *dev;
+
+ dev = calloc(1, sizeof(*dev));
+ if (!dev)
+ return NULL;
+
+ dev->page_size = sysconf(_SC_PAGESIZE);
+
+ return &dev->verbs_dev;
+}
+
+static void cxi_uninit_device(struct verbs_device *verbs_device)
+{
+ struct cxi_device *dev = to_cxi_dev(&verbs_device->device);
+
+ free(dev);
+}
+
+static const struct verbs_device_ops cxi_dev_ops = {
+ .name = "cxiverbs",
+ .match_min_abi_version = CXI_IB_UVERBS_ABI_VERSION,
+ .match_max_abi_version = CXI_IB_UVERBS_ABI_VERSION,
+ .match_table = cxi_table,
+ .alloc_device = cxi_device_alloc,
+ .uninit_device = cxi_uninit_device,
+ .alloc_context = cxi_alloc_context,
+};
+
+bool is_cxi_dev(struct ibv_device *device)
+{
+ struct verbs_device *verbs_device = verbs_get_device(device);
+
+ return verbs_device->ops == &cxi_dev_ops;
+}
+
+PROVIDER_DRIVER(cxiverbs, cxi_dev_ops);
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 08/12] cxiverbs: implement UET verbs with explicit native ownership
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (6 preceding siblings ...)
2026-10-31 19:26 ` [PATCH 07/12] cxiverbs: add the provider and device discovery Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 09/12] cxiverbs: cover identity isolation and polling and event traffic Doug Ledford
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team
Cc: linux-kernel, Doug Ledford, Mamila Santosh, Iraimani P
Implement the verbs for the UET reliable unconnected (RU) queue pair
type on top of the kernel driver: contexts, jobs and job keys, PDs,
MRs, CQs, QPs, address handles, work request posting and completion
polling, and the direct verbs declared in cxidv.h.
A few things in this file look odd and are intentional:
- Completions are produced from the CXI event queue by this
provider, not by the kernel, so poll and post run entirely in user
space. A shared CQ uses a stable per-slot cookie in the command
user pointer so the right send work request is matched when
several QPs post to it.
- A receive completion with C_RC_ENTRY_NOT_FOUND does not consume
the posted receive; the next valid message can still match it.
- The job key wrapper is allocated before the kernel call so an
allocation failure cannot leave a kernel handle without an owner.
- Failure unwind in the EQ, CT and CMDQ allocation paths frees the
user object and its mappings even when the kernel destroy fails;
the kernel object is then reclaimed when the context closes. The
public destroy functions still keep the object on failure so the
caller can retry.
- Errors from the native command emitters are negative errno values
and are negated before being stored in errno.
- The data path does no environment lookups or stdio.
Support optional indexed job addresses with pre-lock lookup and staged
extended submissions. Release local CT and CMDQ mappings on teardown
even when the kernel handle is invalid or disassociated.
Co-developed-by: Mamila Santosh <santosh-kumar.mamila@hpe.com>
Signed-off-by: Mamila Santosh <santosh-kumar.mamila@hpe.com>
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/verbs.c | 3718 ++++++++++++++++++++++++++++++++++++++++++
pyverbs/libibverbs_enums.pxd | 1 +
2 files changed, 3719 insertions(+)
diff --git a/providers/cxi/verbs.c b/providers/cxi/verbs.c
new file mode 100644
index 000000000000..a8d8cc8814f9
--- /dev/null
+++ b/providers/cxi/verbs.c
@@ -0,0 +1,3718 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/*
+ * Copyright 2025 HPE. All rights reserved.
+ */
+
+#include <config.h>
+#include <assert.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <pthread.h>
+#include <sys/mman.h>
+
+#include <infiniband/driver.h>
+#include <util/util.h>
+#include <infiniband/verbs.h>
+#include <infiniband/cmd_write.h>
+#include <util/util.h>
+#include <util/mmio.h>
+#include <util/udma_barrier.h>
+#include <kernel-abi/cxiverbs-abi.h>
+#include <rdma/cxiverbs-abi.h>
+
+#include "cxiverbs-abi.h"
+#include "cxi.h"
+#include "cxi_le.h"
+#include "cxi_verbs.h"
+#include "cxidv.h"
+
+static int cxi_resolve_addr(struct ibv_job *job, unsigned int addr_idx, struct cxi_ah *address);
+
+static int cxi_parse_env_u32(const char *name, uint32_t max, uint32_t *out, bool *present)
+{
+ const char *value = getenv(name);
+ char *end;
+ unsigned long parsed;
+
+ *present = false;
+ if (!value || !*value)
+ return 0;
+
+ errno = 0;
+ parsed = strtoul(value, &end, 0);
+ if (errno || *end || parsed > max)
+ return EINVAL;
+
+ *out = parsed;
+ *present = true;
+ return 0;
+}
+
+int cxi_query_device(struct ibv_context *context, const struct ibv_query_device_ex_input *input,
+ struct ibv_device_attr_ex *attr, size_t attr_size)
+{
+ struct ib_uverbs_ex_query_device_resp resp;
+ size_t resp_size = sizeof(resp);
+ uint64_t raw_fw_ver;
+ unsigned int major, minor, sub_minor;
+ int ret;
+
+ ret = ibv_cmd_query_device_any(context, input, attr, attr_size, &resp, &resp_size);
+ if (ret)
+ return ret;
+
+ raw_fw_ver = resp.base.fw_ver;
+ major = (raw_fw_ver >> 32) & 0xffff;
+ minor = (raw_fw_ver >> 16) & 0xffff;
+ sub_minor = raw_fw_ver & 0xffff;
+
+ snprintf(attr->orig_attr.fw_ver, sizeof(attr->orig_attr.fw_ver), "%d.%d.%d", major, minor,
+ sub_minor);
+
+ return 0;
+}
+
+int cxi_query_port(struct ibv_context *context, uint8_t port, struct ibv_port_attr *attr)
+{
+ struct ibv_query_port cmd;
+
+ return ibv_cmd_query_port(context, port, attr, &cmd, sizeof(cmd));
+}
+
+struct ibv_job *cxi_alloc_job(struct ibv_context *context, struct ibv_job_attr *attr,
+ void *user_context)
+{
+ struct ibv_job *job;
+ struct ib_uverbs_attr *handle;
+ int ret;
+
+ if (!attr || attr->comp_mask & ~(IBV_JOB_ATTR_ID | IBV_JOB_ATTR_MAX_ADDR_ENTRIES |
+ IBV_JOB_ATTR_PORT_NUM | IBV_JOB_ATTR_SGID_INDEX)) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_ALLOC, 7);
+
+ handle = fill_attr_out_obj(cmd, UVERBS_ATTR_ALLOC_JOB_HANDLE);
+ if (attr->comp_mask & IBV_JOB_ATTR_ID)
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_ALLOC_JOB_ID, attr->id);
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_ALLOC_JOB_MAX_ADDR_ENTRIES,
+ attr->comp_mask & IBV_JOB_ATTR_MAX_ADDR_ENTRIES ?
+ attr->max_addr_entries : 0);
+ if (attr->comp_mask & IBV_JOB_ATTR_PORT_NUM)
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_ALLOC_JOB_PORT_NUM, attr->port_num);
+ if (attr->comp_mask & IBV_JOB_ATTR_SGID_INDEX)
+ fill_attr_in_ptr(cmd, UVERBS_ATTR_ALLOC_JOB_SGID_INDEX, &attr->sgid_index);
+
+ job = calloc(1, sizeof(*job));
+ if (!job) {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ ret = execute_ioctl(context, cmd);
+ if (ret) {
+ free(job);
+ errno = ret;
+ return NULL;
+ }
+
+ job->handle = read_attr_obj(UVERBS_ATTR_ALLOC_JOB_HANDLE, handle);
+ job->context = context;
+ job->user_context = user_context;
+ return job;
+}
+
+int cxi_dealloc_job(struct ibv_job *job)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_DEALLOC, 1);
+ int ret;
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_DEALLOC_JOB_HANDLE, job->handle);
+ ret = execute_ioctl(job->context, cmd);
+ if (ret) {
+ errno = ret;
+ return -1;
+ }
+
+ free(job);
+ return 0;
+}
+
+int cxi_query_job(struct ibv_job *job, struct ibv_job_attr *attr)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_QUERY, 6);
+ struct ibv_job_attr result = {};
+ int ret;
+
+ if (!job || !attr)
+ return EINVAL;
+ fill_attr_in_obj(cmd, UVERBS_ATTR_QUERY_JOB_HANDLE, job->handle);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_QUERY_JOB_ID, &result.id);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_QUERY_JOB_MAX_ADDR_ENTRIES, &result.max_addr_entries);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_QUERY_JOB_PORT_NUM, &result.port_num);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_QUERY_JOB_SGID_INDEX, &result.sgid_index);
+ ret = execute_ioctl(job->context, cmd);
+ if (!ret) {
+ result.comp_mask = IBV_JOB_ATTR_ID | IBV_JOB_ATTR_MAX_ADDR_ENTRIES |
+ IBV_JOB_ATTR_PORT_NUM | IBV_JOB_ATTR_SGID_INDEX;
+ *attr = result;
+ }
+ return ret;
+}
+
+static void cxi_ah_attr_to_uverbs(struct ib_uverbs_ah_attr_ex *dst,
+ const struct ibv_ah_attr_ex *src)
+{
+ const struct ibv_ah_attr *attr = &src->ah_attr;
+
+ memcpy(dst->ah_attr.grh.dgid, attr->grh.dgid.raw, sizeof(dst->ah_attr.grh.dgid));
+ dst->ah_attr.grh.flow_label = attr->grh.flow_label;
+ dst->ah_attr.grh.sgid_index = attr->grh.sgid_index;
+ dst->ah_attr.grh.hop_limit = attr->grh.hop_limit;
+ dst->ah_attr.grh.traffic_class = attr->grh.traffic_class;
+ dst->ah_attr.dlid = attr->dlid;
+ dst->ah_attr.sl = attr->sl;
+ dst->ah_attr.src_path_bits = attr->src_path_bits;
+ dst->ah_attr.static_rate = attr->static_rate;
+ dst->ah_attr.is_global = attr->is_global;
+ dst->ah_attr.port_num = attr->port_num;
+ dst->remote_qpn = src->remote_qpn;
+}
+
+static void cxi_ah_attr_from_uverbs(struct ibv_ah_attr_ex *dst,
+ const struct ib_uverbs_ah_attr_ex *src)
+{
+ struct ibv_ah_attr *attr = &dst->ah_attr;
+
+ memcpy(attr->grh.dgid.raw, src->ah_attr.grh.dgid, sizeof(attr->grh.dgid.raw));
+ attr->grh.flow_label = src->ah_attr.grh.flow_label;
+ attr->grh.sgid_index = src->ah_attr.grh.sgid_index;
+ attr->grh.hop_limit = src->ah_attr.grh.hop_limit;
+ attr->grh.traffic_class = src->ah_attr.grh.traffic_class;
+ attr->dlid = src->ah_attr.dlid;
+ attr->sl = src->ah_attr.sl;
+ attr->src_path_bits = src->ah_attr.src_path_bits;
+ attr->static_rate = src->ah_attr.static_rate;
+ attr->is_global = src->ah_attr.is_global;
+ attr->port_num = src->ah_attr.port_num;
+ dst->remote_qpn = src->remote_qpn;
+}
+
+int cxi_insert_addr(struct ibv_job *job, struct ibv_ah_attr_ex *ah_attr, unsigned int addr_idx)
+{
+ struct ib_uverbs_ah_attr_ex uah = {};
+
+ if (!job || !ah_attr)
+ return EINVAL;
+ cxi_ah_attr_to_uverbs(&uah, ah_attr);
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_ADDR_INSERT, 3);
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_JOB_ADDR_INSERT_HANDLE, job->handle);
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_JOB_ADDR_INSERT_INDEX, addr_idx);
+ fill_attr_in(cmd, UVERBS_ATTR_JOB_ADDR_INSERT_AH_ATTR_EX, &uah, sizeof(uah));
+ return execute_ioctl(job->context, cmd);
+}
+
+int cxi_remove_addr(struct ibv_job *job, unsigned int addr_idx)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_ADDR_REMOVE, 2);
+
+ if (!job)
+ return EINVAL;
+ fill_attr_in_obj(cmd, UVERBS_ATTR_JOB_ADDR_REMOVE_HANDLE, job->handle);
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_JOB_ADDR_REMOVE_INDEX, addr_idx);
+ return execute_ioctl(job->context, cmd);
+}
+
+int cxi_query_addr(struct ibv_job *job, unsigned int addr_idx, struct ibv_ah_attr_ex *ah_attr)
+{
+ struct ib_uverbs_ah_attr_ex uah = {};
+ int ret;
+
+ if (!job || !ah_attr)
+ return EINVAL;
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_ADDR_QUERY, 3);
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_JOB_ADDR_QUERY_HANDLE, job->handle);
+ fill_attr_in_uint32(cmd, UVERBS_ATTR_JOB_ADDR_QUERY_INDEX, addr_idx);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_JOB_ADDR_QUERY_AH_ATTR_EX, &uah);
+ ret = execute_ioctl(job->context, cmd);
+ if (!ret)
+ cxi_ah_attr_from_uverbs(ah_attr, &uah);
+ return ret;
+}
+
+int cxi_export_job(struct ibv_job *job, int *fd)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_EXPORT, 2);
+ struct ib_uverbs_attr *handle;
+ int ret;
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_EXPORT_JOB_HANDLE, job->handle);
+ handle = fill_attr_out_fd(cmd, UVERBS_ATTR_EXPORT_JOB_FD, 0);
+
+ ret = execute_ioctl(job->context, cmd);
+ if (ret) {
+ errno = ret;
+ return -1;
+ }
+
+ *fd = read_attr_fd(UVERBS_ATTR_EXPORT_JOB_FD, handle);
+ return 0;
+}
+
+int cxi_import_job(struct ibv_context *context, int fd, struct ibv_job **job_out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JOB, UVERBS_METHOD_JOB_IMPORT, 2);
+ struct ib_uverbs_attr *handle;
+ struct ibv_job *job;
+ int ret;
+
+ handle = fill_attr_out_obj(cmd, UVERBS_ATTR_IMPORT_JOB_HANDLE);
+ fill_attr_in_fd(cmd, UVERBS_ATTR_IMPORT_JOB_FD, fd);
+
+ job = calloc(1, sizeof(*job));
+ if (!job) {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ ret = execute_ioctl(context, cmd);
+ if (ret) {
+ free(job);
+ errno = ret;
+ return -1;
+ }
+
+ job->handle = read_attr_obj(UVERBS_ATTR_IMPORT_JOB_HANDLE, handle);
+ job->context = context;
+ *job_out = job;
+ return 0;
+}
+
+struct ibv_job_key *cxi_create_jkey(struct ibv_pd *pd, struct ibv_job *job)
+{
+ struct ibv_job_key *job_key;
+ struct cxi_job_key *provider_key;
+ struct cxi_pd *provider_pd = to_cxi_pd(pd);
+ struct ibv_job_attr job_attr = {};
+ struct ib_uverbs_attr *handle;
+ uint32_t jkey;
+ struct cxi_ibv_create_jkey_cmd profile = {
+ .tc = CXIDV_TC_BEST_EFFORT,
+ };
+ const char *traffic_class = getenv("UET_TC");
+ int ret;
+
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JKEY, UVERBS_METHOD_JKEY_CREATE, 6);
+
+ if (traffic_class) {
+ char *end;
+ unsigned long value;
+
+ errno = 0;
+ value = strtoul(traffic_class, &end, 0);
+ if (errno || *end || value > CXIDV_TC_ETH) {
+ errno = EINVAL;
+ return NULL;
+ }
+ profile.tc = value;
+ }
+
+ handle = fill_attr_out_obj(cmd, UVERBS_ATTR_CREATE_JKEY_HANDLE);
+ fill_attr_in_obj(cmd, UVERBS_ATTR_CREATE_JKEY_PD_HANDLE, pd->handle);
+ fill_attr_in_obj(cmd, UVERBS_ATTR_CREATE_JKEY_JOB_HANDLE, job->handle);
+ fill_attr_out_ptr(cmd, UVERBS_ATTR_CREATE_JKEY_JKEY, &jkey);
+ fill_attr_in(cmd, UVERBS_ATTR_UHW_IN, &profile, sizeof(profile));
+
+ provider_key = calloc(1, sizeof(*provider_key));
+ if (!provider_key) {
+ errno = ENOMEM;
+ return NULL;
+ }
+ job_key = &provider_key->key;
+ provider_key->job = job;
+ if (ibv_query_job(job, &job_attr)) {
+ free(provider_key);
+ return NULL;
+ }
+ provider_key->job_id = job_attr.id;
+
+ ret = execute_ioctl(pd->context, cmd);
+ if (ret) {
+ free(provider_key);
+ errno = ret;
+ return NULL;
+ }
+
+ job_key->handle = read_attr_obj(UVERBS_ATTR_CREATE_JKEY_HANDLE, handle);
+ job_key->jkey = jkey;
+ job_key->pd = pd;
+ pthread_spin_lock(&provider_pd->jkey_lock);
+ provider_key->next = provider_pd->jkeys;
+ provider_pd->jkeys = provider_key;
+ pthread_spin_unlock(&provider_pd->jkey_lock);
+ return job_key;
+}
+
+int cxi_destroy_jkey(struct ibv_job_key *job_key)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_JKEY, UVERBS_METHOD_JKEY_DESTROY, 1);
+ struct cxi_pd *pd = to_cxi_pd(job_key->pd);
+ struct cxi_job_key **entry;
+ int ret;
+
+ fill_attr_in_obj(cmd, UVERBS_ATTR_DESTROY_JKEY_HANDLE, job_key->handle);
+ ret = execute_ioctl(job_key->pd->context, cmd);
+ if (ret) {
+ errno = ret;
+ return -1;
+ }
+
+ pthread_spin_lock(&pd->jkey_lock);
+ for (entry = &pd->jkeys; *entry; entry = &(*entry)->next) {
+ if (&(*entry)->key == job_key) {
+ *entry = (*entry)->next;
+ break;
+ }
+ }
+ pthread_spin_unlock(&pd->jkey_lock);
+ free(job_key);
+ return 0;
+}
+
+int cxidv_query_device(struct ibv_context *ibvctx, struct cxidv_devinfo *attr)
+{
+ struct cxi_context *ctx = to_cxi_ctx(ibvctx);
+ const struct cxi_ibv_devinfo *di = &ctx->devinfo;
+
+ if (!is_cxi_dev(ibvctx->device))
+ return EOPNOTSUPP;
+
+ /* di is all-zero if cxi_alloc_context()'s query_device call failed */
+ if (!di->pid_bits && !di->nid && !di->vendor_id)
+ return EOPNOTSUPP;
+
+ memset(attr, 0, sizeof(*attr));
+ attr->nid = di->nid;
+ attr->pid_bits = di->pid_bits;
+ attr->pid_count = di->pid_count;
+ attr->pid_granule = di->pid_granule;
+ attr->min_free_shift = di->min_free_shift;
+ attr->rdzv_get_idx = di->rdzv_get_idx;
+ attr->vendor_id = di->vendor_id;
+ attr->device_id = di->device_id;
+ attr->device_rev = di->device_rev;
+ attr->device_proto = di->device_proto;
+ attr->device_platform = di->device_platform;
+ attr->pct_eq = di->pct_eq;
+ attr->uc_nic = di->uc_nic;
+ attr->link_mtu = di->link_mtu;
+ attr->link_speed = di->link_speed;
+ attr->link_state = di->link_state;
+ attr->num_ptes = di->num_ptes;
+ attr->num_txqs = di->num_txqs;
+ attr->num_tgqs = di->num_tgqs;
+ attr->num_eqs = di->num_eqs;
+ attr->num_cts = di->num_cts;
+ attr->num_acs = di->num_acs;
+ attr->num_tles = di->num_tles;
+ attr->num_les = di->num_les;
+ attr->cassini_version = di->cassini_version;
+ attr->system_type_identifier = di->system_type_identifier;
+ memcpy(attr->fru_description, di->fru_description, sizeof(attr->fru_description));
+
+ return 0;
+}
+
+int cxidv_cq_from_ibv_cq(struct ibv_cq *ibvcq, struct cxidv_cq *attr)
+{
+ struct cxi_ibv_cq *cq = to_cxi_ibv_cq(ibvcq);
+
+ if (!is_cxi_dev(ibvcq->context->device))
+ return EOPNOTSUPP;
+
+ memset(attr, 0, sizeof(*attr));
+ attr->eq_buf = cq->eq_buf;
+ attr->eq_buf_size = cq->eq_buf_size;
+ attr->eq_db = cq->eq_db;
+ attr->eq_db_size = cq->eq_db_size;
+ attr->eqn = cq->eqn;
+
+ return 0;
+}
+
+int cxidv_qp_from_ibv_qp(struct ibv_qp *ibvqp, struct cxidv_qp *attr)
+{
+ struct cxi_qp *qp = to_cxi_qp(ibvqp);
+
+ if (!is_cxi_dev(ibvqp->context->device))
+ return EOPNOTSUPP;
+
+ memset(attr, 0, sizeof(*attr));
+ attr->txq_cmds = qp->txq_cmds;
+ attr->txq_cmds_size = qp->txq_cmds_size;
+ attr->txq_db = qp->txq_db;
+ attr->txq_db_size = qp->txq_db_size;
+ attr->txq_idx = qp->txq_idx;
+ attr->lcid = qp->lcid;
+ attr->tgq_cmds = qp->tgq_cmds;
+ attr->tgq_cmds_size = qp->tgq_cmds_size;
+ attr->tgq_db = qp->tgq_db;
+ attr->tgq_db_size = qp->tgq_db_size;
+ attr->tgq_idx = qp->tgq_idx;
+ attr->pte_index = qp->pte_index;
+
+ return 0;
+}
+
+/*
+ * Change the src_id (see IBV_RU_ATTR_SRC_ID) this QP reports to its peers.
+ * Purely a local relabeling: nothing about it is known to the kernel or the
+ * wire beyond the initiator field of each command this QP builds from here
+ * on, so there is no round trip. Serialized against post_send/wr_* via
+ * sq_lock so a send never mixes half of an old and half of a new value.
+ */
+int cxidv_modify_qp_src_id(struct ibv_qp *ibvqp, uint32_t src_id)
+{
+ struct cxi_qp *qp = to_cxi_qp(ibvqp);
+
+ if (!is_cxi_dev(ibvqp->context->device))
+ return EOPNOTSUPP;
+
+ pthread_spin_lock(&qp->sq_lock);
+ qp->src_id = src_id;
+ pthread_spin_unlock(&qp->sq_lock);
+
+ return 0;
+}
+
+static void cxi_tc_cache_update(struct cxi_context *ctx, uint32_t tc, uint32_t svc_id,
+ bool update_svc_id)
+{
+ pthread_mutex_lock(&ctx->tc_lock);
+ ctx->tc = tc;
+ ctx->tc_valid = true;
+ if (update_svc_id)
+ ctx->preferred_svc_id = svc_id;
+ pthread_mutex_unlock(&ctx->tc_lock);
+}
+
+static bool cxi_tc_cache_read(struct cxi_context *ctx, uint32_t *tc, uint32_t *svc_id)
+{
+ bool valid;
+
+ pthread_mutex_lock(&ctx->tc_lock);
+ valid = ctx->tc_valid;
+ if (valid) {
+ if (tc)
+ *tc = ctx->tc;
+ if (svc_id)
+ *svc_id = ctx->preferred_svc_id;
+ }
+ pthread_mutex_unlock(&ctx->tc_lock);
+
+ return valid;
+}
+
+static void cxi_fill_job_tc_limit(struct ibv_command_buffer *cmd, int max_attr, int res_attr,
+ const struct cxidv_limits *limit)
+{
+ fill_attr_in(cmd, max_attr, &limit->max, sizeof(limit->max));
+ fill_attr_in(cmd, res_attr, &limit->res, sizeof(limit->res));
+}
+
+int cxidv_bind_job_tc(struct ibv_context *ibvctx, struct cxidv_job_tc_attr *attr)
+{
+ struct cxi_context *ctx = to_cxi_ctx(ibvctx);
+ uint32_t bound_svc_id;
+ int ret;
+
+ if (!is_cxi_dev(ibvctx->device))
+ return EOPNOTSUPP;
+ if (!attr)
+ return EINVAL;
+ if (attr->flags & ~CXIDV_JOB_TC_F_CREATE)
+ return EINVAL;
+
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_JOB_TC, CXI_IB_METHOD_JOB_TC_BIND, 22);
+
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_BIND_FLAGS, attr->flags);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_BIND_JOB_ID, attr->job_id);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_BIND_TC, attr->tc);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_BIND_TC_TYPE, attr->tc_type);
+ if (attr->svc_id)
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_BIND_SVC_ID, attr->svc_id);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_PTES_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_PTES_RES, &attr->ptes);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_TXQS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TXQS_RES, &attr->txqs);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_TGQS_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TGQS_RES, &attr->tgqs);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_EQS_MAX, CXI_IB_ATTR_JOB_TC_BIND_EQS_RES,
+ &attr->eqs);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_CTS_MAX, CXI_IB_ATTR_JOB_TC_BIND_CTS_RES,
+ &attr->cts);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_LES_MAX, CXI_IB_ATTR_JOB_TC_BIND_LES_RES,
+ &attr->les);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_TLES_MAX,
+ CXI_IB_ATTR_JOB_TC_BIND_TLES_RES, &attr->tles);
+ cxi_fill_job_tc_limit(cmd, CXI_IB_ATTR_JOB_TC_BIND_ACS_MAX, CXI_IB_ATTR_JOB_TC_BIND_ACS_RES,
+ &attr->acs);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_JOB_TC_BIND_RESP_SVC_ID, &bound_svc_id);
+
+ ret = execute_ioctl(ibvctx, cmd);
+ if (ret)
+ return ret;
+
+ attr->bound_svc_id = bound_svc_id;
+ cxi_tc_cache_update(ctx, attr->tc, bound_svc_id, true);
+
+ return 0;
+}
+
+int cxidv_set_default_tc(struct ibv_context *ibvctx, uint32_t tc)
+{
+ struct cxi_context *ctx = to_cxi_ctx(ibvctx);
+
+ if (!is_cxi_dev(ibvctx->device))
+ return EOPNOTSUPP;
+ if (tc >= CXI_IBV_TC_MAX)
+ return EINVAL;
+
+ cxi_tc_cache_update(ctx, tc, 0, false);
+
+ return 0;
+}
+
+int cxidv_clear_job_tc(struct ibv_context *ibvctx, uint32_t tc, uint32_t tc_type)
+{
+ int ret;
+
+ if (!is_cxi_dev(ibvctx->device))
+ return EOPNOTSUPP;
+
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_JOB_TC, CXI_IB_METHOD_JOB_TC_CLEAR, 2);
+
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_CLEAR_TC, tc);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_CLEAR_TC_TYPE, tc_type);
+
+ ret = execute_ioctl(ibvctx, cmd);
+ return ret;
+}
+
+int cxidv_query_tcs(struct ibv_context *ibvctx, struct cxidv_tc_entry *entries,
+ uint32_t max_entries, uint32_t *count)
+{
+ struct cxi_ibv_tc_entry *kentries;
+ uint32_t kcount = 0;
+ uint32_t copied;
+ int ret;
+ uint32_t i;
+
+ if (!is_cxi_dev(ibvctx->device))
+ return EOPNOTSUPP;
+ if (!count || (max_entries && !entries))
+ return EINVAL;
+
+ kentries = calloc(max_entries ? max_entries : 1, sizeof(*kentries));
+ if (!kentries)
+ return ENOMEM;
+
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_JOB_TC, CXI_IB_METHOD_JOB_TC_QUERY, 3);
+
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_JOB_TC_QUERY_MAX_ENTRIES, max_entries);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_JOB_TC_QUERY_RESP_COUNT, &kcount);
+ fill_attr_out_ptr_array(cmd, CXI_IB_ATTR_JOB_TC_QUERY_RESP_ENTRIES, kentries, max_entries);
+
+ ret = execute_ioctl(ibvctx, cmd);
+ if (ret) {
+ free(kentries);
+ return ret;
+ }
+
+ *count = kcount;
+ copied = kcount < max_entries ? kcount : max_entries;
+ for (i = 0; i < copied; i++) {
+ entries[i].tc = kentries[i].tc;
+ entries[i].tc_type = kentries[i].tc_type;
+ entries[i].res_req_dscp = kentries[i].res_req_dscp;
+ entries[i].unres_req_dscp = kentries[i].unres_req_dscp;
+ entries[i].res_rsp_dscp = kentries[i].res_rsp_dscp;
+ entries[i].unres_rsp_dscp = kentries[i].unres_rsp_dscp;
+ entries[i].req_pcp = kentries[i].req_pcp;
+ entries[i].rsp_pcp = kentries[i].rsp_pcp;
+ entries[i].ocuset = kentries[i].ocuset;
+ entries[i].cq_tc = kentries[i].cq_tc;
+ entries[i].req_bc = kentries[i].req_bc;
+ entries[i].flags = kentries[i].flags;
+ }
+
+ free(kentries);
+ return 0;
+}
+
+static int validate_svc_vni_policy(const struct cxidv_svc_attr *attr)
+{
+ uint32_t index;
+ uint32_t previous;
+
+ if (attr->is_system_svc > 1 || attr->is_range > 1 || attr->vni_min || attr->vni_max ||
+ attr->flags & ~(CXIDV_SVC_LIMITS | CXIDV_SVC_CREATE_TC))
+ return EINVAL;
+ if (attr->is_range) {
+ if (attr->is_system_svc || attr->vni_count || !attr->vnis[0] ||
+ attr->vnis[0] > attr->vnis[1] || attr->vnis[2] || attr->vnis[3])
+ return EINVAL;
+ return 0;
+ }
+ if (attr->is_system_svc) {
+ if (attr->svc_id || attr->vni_count || attr->tc_mask ||
+ (attr->flags & CXIDV_SVC_CREATE_TC) || !(attr->flags & CXIDV_SVC_LIMITS))
+ return EINVAL;
+ for (index = 0; index < CXIDV_SVC_RSRC_COUNT; index++) {
+ uint16_t expected =
+ index == CXIDV_SVC_EQS || index == CXIDV_SVC_ACS ? 1 : 0;
+
+ if (attr->maximum[index] != expected || attr->reserved[index] != expected)
+ return EINVAL;
+ }
+ for (index = 0; index < CXIDV_SVC_MAX_VNIS; index++)
+ if (attr->vnis[index])
+ return EINVAL;
+ return 0;
+ }
+ if (!attr->vni_count || attr->vni_count > CXIDV_SVC_MAX_VNIS || !attr->tc_mask)
+ return EINVAL;
+ for (index = 0; index < CXIDV_SVC_MAX_VNIS; index++) {
+ if (index >= attr->vni_count) {
+ if (attr->vnis[index])
+ return EINVAL;
+ continue;
+ }
+ if (!attr->vnis[index])
+ return EINVAL;
+ for (previous = 0; previous < index; previous++)
+ if (attr->vnis[index] == attr->vnis[previous])
+ return EINVAL;
+ }
+ return 0;
+}
+
+int cxidv_alloc_svc(struct ibv_context *context, const struct cxidv_svc_attr *attr,
+ uint32_t *svc_id)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_ALLOC, 2);
+ struct cxi_ibv_svc_config config;
+
+ static_assert(CXIDV_SVC_MAX_VNIS == CXI_IB_SVC_MAX_VNIS, "service VNI limit");
+ static_assert(sizeof(config) == sizeof(*attr), "service ABI layout");
+ if (!context || !attr || !svc_id)
+ return EINVAL;
+ if (validate_svc_vni_policy(attr))
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ memcpy(&config, attr, sizeof(config));
+ fill_attr_in(cmd, CXI_IB_ATTR_SVC_CONFIG, &config, sizeof(config));
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ return execute_ioctl(context, cmd);
+}
+
+int cxidv_query_svc(struct ibv_context *context, uint32_t svc_id, struct cxidv_svc_attr *attr)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_QUERY, 2);
+ struct cxi_ibv_svc_config config = {};
+ int ret;
+
+ if (!context || !attr)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_SVC_CONFIG, &config);
+ ret = execute_ioctl(context, cmd);
+ if (!ret)
+ memcpy(attr, &config, sizeof(config));
+ return ret;
+}
+
+int cxidv_svc_is_enabled(struct ibv_context *context, uint32_t svc_id, int *enable)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_QUERY, 2);
+ uint32_t flags = 0;
+ int ret;
+
+ if (!context || !enable)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_SVC_FLAGS, &flags);
+ ret = execute_ioctl(context, cmd);
+ if (!ret)
+ *enable = !!(flags & CXI_IB_SVC_ENABLED);
+ return ret;
+}
+
+int cxidv_get_svc_rsrc_use(struct ibv_context *context, uint32_t svc_id,
+ struct cxidv_svc_rsrc_use *usage)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_QUERY, 2);
+ struct cxi_ibv_svc_rsrc_use response;
+ int ret;
+
+ if (!context || !usage)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ static_assert(sizeof(response) == sizeof(*usage), "service usage layout");
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_SVC_USAGE, &response);
+ ret = execute_ioctl(context, cmd);
+ if (!ret)
+ memcpy(usage, &response, sizeof(response));
+ return ret;
+}
+
+int cxidv_get_svc_lpr(struct ibv_context *context, uint32_t svc_id, uint32_t *lpr)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_QUERY, 2);
+
+ if (!context || !lpr)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_SVC_LPR, lpr);
+ return execute_ioctl(context, cmd);
+}
+
+int cxidv_destroy_svc(struct ibv_context *context, uint32_t svc_id)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_DESTROY, 1);
+
+ if (!context)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ return execute_ioctl(context, cmd);
+}
+
+int cxidv_enable_svc(struct ibv_context *context, uint32_t svc_id, int enable)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_SVC, CXI_IB_METHOD_SVC_ENABLE, 2);
+
+ if (!context || (enable != 0 && enable != 1))
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_ID, svc_id);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_SVC_FLAGS, enable);
+ return execute_ioctl(context, cmd);
+}
+
+int cxidv_alloc_lni(struct ibv_context *context, uint32_t svc_id, struct cxidv_lni **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_LNI, CXI_IB_METHOD_LNI_ALLOC, 3);
+ struct ib_uverbs_attr *handle;
+ struct cxidv_lni *lni;
+ int ret;
+
+ if (!context || !out || !svc_id)
+ return EINVAL;
+ if (!is_cxi_dev(context->device))
+ return EOPNOTSUPP;
+ *out = NULL;
+ lni = calloc(1, sizeof(*lni));
+ if (!lni)
+ return ENOMEM;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_LNI_ALLOC_HANDLE);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_LNI_ALLOC_SVC_ID, svc_id);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_LNI_ALLOC_ID, &lni->id);
+ ret = execute_ioctl(context, cmd);
+ if (ret) {
+ free(lni);
+ return ret;
+ }
+ lni->context = context;
+ lni->handle = read_attr_obj(CXI_IB_ATTR_LNI_ALLOC_HANDLE, handle);
+ lni->svc_id = svc_id;
+ *out = lni;
+ return 0;
+}
+
+int cxidv_alloc_cp(struct cxidv_lni *lni, uint32_t vni, uint32_t tc, uint32_t type,
+ struct cxidv_cp **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CP, CXI_IB_METHOD_CP_ALLOC, 6);
+ struct ib_uverbs_attr *handle;
+ struct cxi_ibv_cp_info info;
+ struct cxidv_cp *cp;
+ int ret;
+
+ if (!lni || !out)
+ return EINVAL;
+ cp = calloc(1, sizeof(*cp));
+ if (!cp)
+ return ENOMEM;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_CP_HANDLE);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CP_LNI, lni->handle);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CP_VNI, vni);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CP_TC, tc);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CP_TYPE, type);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CP_INFO, &info);
+ ret = execute_ioctl(lni->context, cmd);
+ if (ret) {
+ free(cp);
+ return ret;
+ }
+ cp->lni = lni;
+ cp->handle = read_attr_obj(CXI_IB_ATTR_CP_HANDLE, handle);
+ cp->vni = info.vni;
+ cp->tc = info.tc;
+ cp->type = info.type;
+ cp->lcid = info.lcid;
+ *out = cp;
+ return 0;
+}
+
+int cxidv_destroy_cp(struct cxidv_cp *cp)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CP, CXI_IB_METHOD_CP_DESTROY, 1);
+ int ret;
+
+ if (!cp)
+ return EINVAL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_CP_HANDLE, cp->handle);
+ ret = execute_ioctl(cp->lni->context, cmd);
+ if (!ret)
+ free(cp);
+ return ret;
+}
+
+int cxidv_destroy_cmdq(struct cxidv_cmdq *cmdq)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CMDQ, CXI_IB_METHOD_CMDQ_DESTROY, 1);
+ int ret;
+
+ if (!cmdq)
+ return EINVAL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_CMDQ_HANDLE, cmdq->handle);
+ /* Kernel CMDQ cleanup cannot fail, so there is nothing to retry. */
+ ret = execute_ioctl(cmdq->lni->context, cmd);
+ if (cmdq->doorbell && munmap(cmdq->doorbell, cmdq->doorbell_size) && !ret)
+ ret = errno;
+ if (cmdq->commands && munmap(cmdq->commands, cmdq->commands_size) && !ret)
+ ret = errno;
+ free(cmdq);
+ return ret;
+}
+
+static int cxidv_alloc_cmdq_flags(struct cxidv_lni *lni, uint32_t count, uint32_t flags,
+ struct cxidv_cmdq **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CMDQ, CXI_IB_METHOD_CMDQ_ALLOC, 5);
+ struct cxi_ibv_cmdq_info info = {};
+ struct ib_uverbs_attr *handle;
+ struct cxidv_cmdq *cmdq;
+ int ret;
+
+ if (!lni || !out)
+ return EINVAL;
+ *out = NULL;
+ if (!count)
+ return EINVAL;
+ cmdq = calloc(1, sizeof(*cmdq));
+ if (!cmdq)
+ return ENOMEM;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_CMDQ_HANDLE);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CMDQ_LNI, lni->handle);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CMDQ_COUNT, count);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CMDQ_FLAGS, flags);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CMDQ_INFO, &info);
+ ret = execute_ioctl(lni->context, cmd);
+ if (ret) {
+ free(cmdq);
+ return ret;
+ }
+ cmdq->lni = lni;
+ cmdq->handle = read_attr_obj(CXI_IB_ATTR_CMDQ_HANDLE, handle);
+ if (!info.commands_length || !info.doorbell_length || !info.count ||
+ info.commands_length > SIZE_MAX || info.doorbell_length > SIZE_MAX ||
+ (uint64_t)info.count * sizeof(struct cxi_cmd64) > info.commands_length) {
+ ret = EPROTO;
+ goto fail;
+ }
+ cmdq->count = info.count;
+ cmdq->index = info.index;
+ cmdq->commands_size = info.commands_length;
+ cmdq->commands_offset = info.commands_offset;
+ cmdq->doorbell_size = info.doorbell_length;
+ cmdq->commands = mmap(NULL, cmdq->commands_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ lni->context->cmd_fd, info.commands_offset);
+ if (cmdq->commands == MAP_FAILED) {
+ ret = errno;
+ cmdq->commands = NULL;
+ goto fail;
+ }
+ cmdq->doorbell = mmap(NULL, cmdq->doorbell_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ lni->context->cmd_fd, info.doorbell_offset);
+ if (cmdq->doorbell == MAP_FAILED) {
+ ret = errno;
+ cmdq->doorbell = NULL;
+ goto fail;
+ }
+ *out = cmdq;
+ return 0;
+fail:
+ cxidv_destroy_cmdq(cmdq);
+ return ret;
+}
+
+int cxidv_alloc_cmdq(struct cxidv_lni *lni, uint32_t count, struct cxidv_cmdq **out)
+{
+ return cxidv_alloc_cmdq_flags(lni, count, 0, out);
+}
+
+int cxidv_alloc_trigger_cmdq(struct cxidv_lni *lni, uint32_t count, struct cxidv_cmdq **out)
+{
+ return cxidv_alloc_cmdq_flags(lni, count, CXI_IB_CMDQ_TRIGGER, out);
+}
+
+int cxidv_inbound_wait(struct ibv_context *context)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CSR, CXI_IB_METHOD_CSR_INBOUND_WAIT, 0);
+
+ if (!context)
+ return EINVAL;
+ return execute_ioctl(context, cmd);
+}
+
+int cxidv_destroy_ct(struct cxidv_ct *ct)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CT, CXI_IB_METHOD_CT_DESTROY, 1);
+ int ret;
+
+ if (!ct)
+ return EINVAL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_CT_DESTROY_HANDLE, ct->handle);
+ /* Kernel CT cleanup cannot fail, so there is nothing to retry. */
+ ret = execute_ioctl(ct->lni->context, cmd);
+ if (ct->doorbell && munmap(ct->doorbell, ct->doorbell_size) && !ret)
+ ret = errno;
+ if (ct->writeback && munmap(ct->writeback, ct->writeback_size) && !ret)
+ ret = errno;
+ free(ct);
+ return ret;
+}
+
+static int cxidv_alloc_ct_address(struct cxidv_lni *lni, void *writeback, struct cxidv_ct **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CT, CXI_IB_METHOD_CT_ALLOC, 8);
+ struct ib_uverbs_attr *handle;
+ long page_size = sysconf(_SC_PAGESIZE);
+ void *source;
+ uint64_t source_address;
+ uint64_t writeback_size = 0;
+ uint64_t doorbell_size = 0;
+ uint64_t doorbell_offset = 0;
+ struct cxidv_ct *ct;
+ int ret;
+
+ if (!lni || !out || page_size <= 0)
+ return EINVAL;
+ *out = NULL;
+ if (writeback && (uintptr_t)writeback % page_size)
+ return EINVAL;
+ ct = calloc(1, sizeof(*ct));
+ if (!ct)
+ return ENOMEM;
+ source = writeback;
+ if (!source) {
+ source = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
+ -1, 0);
+ if (source == MAP_FAILED) {
+ ret = errno;
+ free(ct);
+ return ret;
+ }
+ }
+ source_address = (uint64_t)(uintptr_t)source;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_CT_ALLOC_HANDLE);
+ fill_attr_in(cmd, CXI_IB_ATTR_CT_ALLOC_WB_ADDRESS, &source_address, sizeof(source_address));
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_CT_ALLOC_LNI_HANDLE, lni->handle);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CT_ALLOC_CTN, &ct->ctn);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CT_ALLOC_WB_MMAP_OFFSET, &ct->writeback_offset);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CT_ALLOC_WB_MMAP_LENGTH, &writeback_size);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CT_ALLOC_DB_MMAP_OFFSET, &doorbell_offset);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CT_ALLOC_DB_MMAP_LENGTH, &doorbell_size);
+ ret = execute_ioctl(lni->context, cmd);
+ if (!writeback)
+ munmap(source, page_size);
+ if (ret) {
+ free(ct);
+ return ret;
+ }
+ ct->lni = lni;
+ ct->handle = read_attr_obj(CXI_IB_ATTR_CT_ALLOC_HANDLE, handle);
+ if (!writeback_size || !doorbell_size || writeback_size > SIZE_MAX ||
+ doorbell_size > SIZE_MAX) {
+ ret = EPROTO;
+ goto fail;
+ }
+ ct->writeback_size = writeback_size;
+ ct->doorbell_size = doorbell_size;
+ ct->writeback = mmap(NULL, ct->writeback_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ lni->context->cmd_fd, ct->writeback_offset);
+ if (ct->writeback == MAP_FAILED) {
+ ret = errno;
+ ct->writeback = NULL;
+ goto fail;
+ }
+ ct->doorbell = mmap(NULL, ct->doorbell_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ lni->context->cmd_fd, doorbell_offset);
+ if (ct->doorbell == MAP_FAILED) {
+ ret = errno;
+ ct->doorbell = NULL;
+ goto fail;
+ }
+ *out = ct;
+ return 0;
+fail:
+ cxidv_destroy_ct(ct);
+ return ret;
+}
+
+int cxidv_alloc_ct(struct cxidv_lni *lni, struct cxidv_ct **out)
+{
+ return cxidv_alloc_ct_address(lni, NULL, out);
+}
+
+int cxidv_alloc_ct_writeback(struct cxidv_lni *lni, void *writeback, struct cxidv_ct **out)
+{
+ if (!writeback) {
+ if (out)
+ *out = NULL;
+ return EINVAL;
+ }
+ return cxidv_alloc_ct_address(lni, writeback, out);
+}
+
+static bool cxi_csr_range(const struct cxidv_csr *csr, uint64_t offset, size_t length)
+{
+ return csr && csr->address && csr->address != MAP_FAILED && length &&
+ offset < csr->length && length <= csr->length - offset;
+}
+
+int cxidv_read_csr(const struct cxidv_csr *csr, uint64_t offset, void *value, size_t length)
+{
+ size_t index;
+ uint64_t word;
+
+ if (!value || !cxi_csr_range(csr, offset, length) || offset % sizeof(word) ||
+ length % sizeof(word) || (uintptr_t)csr->address % sizeof(word))
+ return EINVAL;
+#if SIZEOF_LONG == 8
+ mmio_flush_writes();
+ for (index = 0; index < length; index += sizeof(word)) {
+ word = le64toh(mmio_read64_le((char *)csr->address + offset + index));
+ udma_from_device_barrier();
+ memcpy((char *)value + index, &word, sizeof(word));
+ }
+ return 0;
+#else
+ return EOPNOTSUPP;
+#endif
+}
+
+int cxidv_write_csr(const struct cxidv_csr *csr, uint64_t offset, const void *value, size_t length)
+{
+ size_t index;
+ uint64_t word;
+
+ if (!value || !cxi_csr_range(csr, offset, length) || offset % sizeof(word) ||
+ length % sizeof(word) || (uintptr_t)csr->address % sizeof(word))
+ return EINVAL;
+#if SIZEOF_LONG == 8
+ udma_to_device_barrier();
+ for (index = 0; index < length; index += sizeof(word)) {
+ memcpy(&word, (const char *)value + index, sizeof(word));
+ mmio_write64_le((char *)csr->address + offset + index, htole64(word));
+ }
+ mmio_flush_writes();
+ return 0;
+#else
+ return EOPNOTSUPP;
+#endif
+}
+
+int cxidv_write8_csr(const struct cxidv_csr *csr, uint64_t offset, uint8_t value)
+{
+ if (!cxi_csr_range(csr, offset, sizeof(value)))
+ return EINVAL;
+ udma_to_device_barrier();
+ mmio_write8((char *)csr->address + offset, value);
+ mmio_flush_writes();
+ return 0;
+}
+
+int cxidv_unmap_csrs(struct cxidv_csr *csr)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CSR, CXI_IB_METHOD_CSR_UNMAP, 1);
+ int ret;
+
+ if (!csr)
+ return EINVAL;
+ if (csr->address && munmap(csr->address, csr->length))
+ return errno;
+ csr->address = NULL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_CSR_HANDLE, csr->handle);
+ ret = execute_ioctl(csr->context, cmd);
+ free(csr);
+ return ret;
+}
+
+int cxidv_map_csrs(struct ibv_context *context, struct cxidv_csr **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_CSR, CXI_IB_METHOD_CSR_MAP, 2);
+ struct cxi_ibv_csr_info info = {};
+ struct ib_uverbs_attr *handle;
+ struct cxidv_csr *csr;
+ int ret;
+
+ if (!context || !out || !is_cxi_dev(context->device))
+ return EINVAL;
+ csr = calloc(1, sizeof(*csr));
+ if (!csr)
+ return ENOMEM;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_CSR_HANDLE);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_CSR_INFO, &info);
+ ret = execute_ioctl(context, cmd);
+ if (ret) {
+ free(csr);
+ return ret;
+ }
+ csr->context = context;
+ csr->handle = read_attr_obj(CXI_IB_ATTR_CSR_HANDLE, handle);
+ csr->length = info.length;
+ csr->mmap_offset = info.offset;
+ csr->address = mmap(NULL, csr->length, PROT_READ | PROT_WRITE, MAP_SHARED, context->cmd_fd,
+ csr->mmap_offset);
+ if (csr->address == MAP_FAILED) {
+ ret = errno;
+ csr->address = NULL;
+ cxidv_unmap_csrs(csr);
+ return ret;
+ }
+ *out = csr;
+ return 0;
+}
+
+int cxidv_alloc_wait(struct cxidv_lni *lni, struct cxidv_wait **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_WAIT, CXI_IB_METHOD_WAIT_ALLOC, 2);
+ struct ib_uverbs_attr *handle;
+ struct cxidv_wait *wait;
+ int ret;
+
+ if (!lni || !out)
+ return EINVAL;
+ wait = calloc(1, sizeof(*wait));
+ if (!wait)
+ return ENOMEM;
+ handle = fill_attr_out_fd(cmd, CXI_IB_ATTR_WAIT_FD, 0);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_WAIT_LNI, lni->handle);
+ ret = execute_ioctl(lni->context, cmd);
+ if (ret) {
+ free(wait);
+ return ret;
+ }
+ wait->fd = read_attr_fd(CXI_IB_ATTR_WAIT_FD, handle);
+ wait->lni = lni;
+ *out = wait;
+ return 0;
+}
+
+#define CXI_WAIT_USERS_MASK (UINT_MAX >> 1)
+#define CXI_WAIT_DESTROYING_BIT (UINT_MAX & ~CXI_WAIT_USERS_MASK)
+
+static int cxi_wait_ref_get(struct cxidv_wait *wait)
+{
+ unsigned int users;
+
+ if (!wait)
+ return 0;
+
+ for (;;) {
+ users = __atomic_load_n(&wait->users, __ATOMIC_ACQUIRE);
+ if (users & CXI_WAIT_DESTROYING_BIT)
+ return EBUSY;
+ if ((users & CXI_WAIT_USERS_MASK) == CXI_WAIT_USERS_MASK)
+ return EOVERFLOW;
+ if (__atomic_compare_exchange_n(&wait->users, &users, users + 1, false,
+ __ATOMIC_ACQ_REL,
+ __ATOMIC_ACQUIRE))
+ return 0;
+ }
+}
+
+static void cxi_wait_ref_put(struct cxidv_wait *wait)
+{
+ unsigned int users;
+
+ if (!wait)
+ return;
+
+ users = __atomic_fetch_sub(&wait->users, 1, __ATOMIC_ACQ_REL);
+ assert((users & CXI_WAIT_USERS_MASK) > 0);
+ (void)users;
+}
+
+int cxidv_destroy_wait(struct cxidv_wait *wait)
+{
+ unsigned int users = 0;
+
+ if (!wait)
+ return EINVAL;
+ if (!__atomic_compare_exchange_n(&wait->users, &users,
+ CXI_WAIT_DESTROYING_BIT, false,
+ __ATOMIC_ACQ_REL,
+ __ATOMIC_ACQUIRE))
+ return EBUSY;
+ if (close(wait->fd)) {
+ __atomic_store_n(&wait->users, 0, __ATOMIC_RELEASE);
+ return errno;
+ }
+ free(wait);
+ return 0;
+}
+
+int cxidv_destroy_eq(struct cxidv_eq *eq)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_EQ, CXI_IB_METHOD_EQ_DESTROY, 1);
+ int ret;
+
+ if (!eq)
+ return EINVAL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_EQ_HANDLE, eq->handle);
+ ret = execute_ioctl(eq->lni->context, cmd);
+ if (ret)
+ return ret;
+ if (eq->doorbell && munmap(eq->doorbell, eq->doorbell_size))
+ ret = errno;
+ cxi_wait_ref_put(eq->event_wait);
+ cxi_wait_ref_put(eq->status_wait);
+ free(eq);
+ return ret;
+}
+
+int cxidv_alloc_eq(struct cxidv_lni *lni, struct ibv_mr *mr, const struct cxidv_eq_attr *attr,
+ struct cxidv_eq **out)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_EQ, CXI_IB_METHOD_EQ_ALLOC, 8);
+ struct cxi_ibv_eq_config config;
+ struct cxi_ibv_eq_info info;
+ struct ib_uverbs_attr *handle;
+ struct cxidv_eq *eq;
+ int ret;
+
+ static_assert((unsigned int)CXIDV_EQ_REGISTER_PCT == (unsigned int)CXI_IB_EQ_REGISTER_PCT,
+ "EQ flag ABI");
+ static_assert((unsigned int)CXIDV_EQ_PASSTHROUGH == (unsigned int)CXI_IB_EQ_PASSTHROUGH,
+ "EQ bypass ABI");
+ if (!lni || !attr || !out ||
+ (attr->flags & ~(CXIDV_EQ_REGISTER_PCT | CXIDV_EQ_PASSTHROUGH)) ||
+ ((attr->flags & CXIDV_EQ_PASSTHROUGH) ? (mr || !(attr->flags & CXIDV_EQ_REGISTER_PCT)) :
+ (!mr || mr->context != lni->context)) ||
+ (attr->event_wait && attr->event_wait->lni != lni) ||
+ (attr->status_wait && attr->status_wait->lni != lni))
+ return EINVAL;
+ eq = calloc(1, sizeof(*eq));
+ if (!eq)
+ return ENOMEM;
+ ret = cxi_wait_ref_get(attr->event_wait);
+ if (ret) {
+ free(eq);
+ return ret;
+ }
+ ret = cxi_wait_ref_get(attr->status_wait);
+ if (ret) {
+ cxi_wait_ref_put(attr->event_wait);
+ free(eq);
+ return ret;
+ }
+ config.address = (uint64_t)(uintptr_t)attr->queue;
+ config.length = attr->length;
+ config.threshold_base = attr->threshold_base;
+ config.threshold_delta = attr->threshold_delta;
+ config.threshold_count = attr->threshold_count;
+ config.ec_delay = attr->ec_delay;
+ config.cpu = attr->cpu;
+ config.reserved_slots = attr->reserved_slots;
+ handle = fill_attr_out_obj(cmd, CXI_IB_ATTR_EQ_HANDLE);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_EQ_LNI, lni->handle);
+ if (mr)
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_EQ_MR, mr->handle);
+ fill_attr_in(cmd, CXI_IB_ATTR_EQ_CONFIG, &config, sizeof(config));
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_EQ_INFO, &info);
+ if (attr->flags)
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_EQ_FLAGS, attr->flags);
+ if (attr->event_wait)
+ fill_attr_in_fd(cmd, CXI_IB_ATTR_EQ_EVENT_WAIT, attr->event_wait->fd);
+ if (attr->status_wait)
+ fill_attr_in_fd(cmd, CXI_IB_ATTR_EQ_STATUS_WAIT, attr->status_wait->fd);
+ ret = execute_ioctl(lni->context, cmd);
+ if (ret) {
+ cxi_wait_ref_put(attr->status_wait);
+ cxi_wait_ref_put(attr->event_wait);
+ free(eq);
+ return ret;
+ }
+ eq->lni = lni;
+ eq->event_wait = attr->event_wait;
+ eq->status_wait = attr->status_wait;
+ eq->handle = read_attr_obj(CXI_IB_ATTR_EQ_HANDLE, handle);
+ eq->eqn = info.eqn;
+ eq->doorbell_size = info.doorbell_size;
+ eq->doorbell = mmap(NULL, eq->doorbell_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ lni->context->cmd_fd, info.doorbell_offset);
+ if (eq->doorbell == MAP_FAILED) {
+ ret = errno;
+ eq->doorbell = NULL;
+ if (cxidv_destroy_eq(eq))
+ free(eq);
+ return ret;
+ }
+ *out = eq;
+ return 0;
+}
+
+int cxidv_destroy_lni(struct cxidv_lni *lni)
+{
+ DECLARE_COMMAND_BUFFER(cmd, CXI_IB_OBJECT_LNI, CXI_IB_METHOD_LNI_DESTROY, 1);
+ int ret;
+
+ if (!lni)
+ return EINVAL;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_LNI_DESTROY_HANDLE, lni->handle);
+ ret = execute_ioctl(lni->context, cmd);
+ if (!ret)
+ free(lni);
+ return ret;
+}
+
+int cxidv_alloc_pid(struct ibv_pd *ibpd, uint32_t flags, uint32_t *pid)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_PD, CXI_IB_METHOD_PD_PID_ALLOC, 3);
+ struct cxi_pd *pd;
+ int ret;
+
+ if (!ibpd || !pid)
+ return EINVAL;
+ if (!is_cxi_dev(ibpd->context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_PD_PID_HANDLE, ibpd->handle);
+ fill_attr_in_uint32(cmd, CXI_IB_ATTR_PD_PID_FLAGS, flags);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_PD_PID_VALUE, pid);
+ ret = execute_ioctl(ibpd->context, cmd);
+ if (!ret) {
+ pd = to_cxi_pd(ibpd);
+ pd->pidonfep = *pid;
+ pd->pid_valid = true;
+ }
+ return ret;
+}
+
+int cxidv_query_pid(struct ibv_pd *ibpd, uint32_t *pid)
+{
+ DECLARE_COMMAND_BUFFER(cmd, UVERBS_OBJECT_PD, CXI_IB_METHOD_PD_PID_QUERY, 2);
+
+ if (!ibpd || !pid)
+ return EINVAL;
+ if (!is_cxi_dev(ibpd->context->device))
+ return EOPNOTSUPP;
+ fill_attr_in_obj(cmd, CXI_IB_ATTR_PD_PID_HANDLE, ibpd->handle);
+ fill_attr_out_ptr(cmd, CXI_IB_ATTR_PD_PID_VALUE, pid);
+ return execute_ioctl(ibpd->context, cmd);
+}
+
+static struct ibv_pd *cxi_alloc_pd_for_lni(struct ibv_context *context, u32 lni_handle)
+{
+ struct cxi_alloc_pd_resp resp = {};
+ struct cxi_alloc_pd cmd = {};
+ struct cxi_pd *pd;
+ int ret;
+
+ pd = calloc(1, sizeof(*pd));
+ if (!pd)
+ return NULL;
+ ret = pthread_spin_init(&pd->jkey_lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret) {
+ free(pd);
+ errno = ret;
+ return NULL;
+ }
+
+ cmd.drv_payload.lni_handle = lni_handle;
+ cmd.drv_payload.comp_mask = CXI_IBV_ALLOC_PD_LNI;
+
+ ret = ibv_cmd_alloc_pd(context, &pd->ibv_pd, &cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
+ sizeof(resp));
+ if (ret) {
+ pthread_spin_destroy(&pd->jkey_lock);
+ free(pd);
+ return NULL;
+ }
+
+ pd->pd_id = resp.pd_id;
+
+ return &pd->ibv_pd;
+}
+
+struct ibv_pd *cxi_alloc_pd(struct ibv_context *context)
+{
+ return cxi_alloc_pd_for_lni(context, CXI_IBV_LNI_ANY);
+}
+
+struct ibv_pd *cxidv_alloc_pd(struct cxidv_lni *lni)
+{
+ if (!lni) {
+ errno = EINVAL;
+ return NULL;
+ }
+ return cxi_alloc_pd_for_lni(lni->context, lni->handle);
+}
+
+int cxi_dealloc_pd(struct ibv_pd *pd)
+{
+ struct cxi_pd *cxi_pd = to_cxi_pd(pd);
+ int ret;
+
+ ret = ibv_cmd_dealloc_pd(pd);
+ if (!ret) {
+ struct cxi_job_key *entry;
+
+ while ((entry = cxi_pd->jkeys)) {
+ cxi_pd->jkeys = entry->next;
+ free(entry);
+ }
+ pthread_spin_destroy(&cxi_pd->jkey_lock);
+ free(cxi_pd);
+ }
+
+ return ret;
+}
+
+/* Shared by the plain and extended registration paths. */
+static struct ibv_mr *cxi_do_reg_mr(struct ibv_pd *pd, void *addr, size_t length, uint64_t hca_va,
+ int access, uint64_t user_rkey, uint32_t native_flags)
+{
+ struct cxi_context *ctx = to_cxi_ctx(pd->context);
+ struct cxi_reg_mr_resp resp = {};
+ struct cxi_reg_mr cmd = {};
+ struct cxi_mr *mr;
+ int ret;
+
+ mr = calloc(1, sizeof(*mr));
+ if (!mr)
+ return NULL;
+
+ if (user_rkey) {
+ cmd.rkey64 = user_rkey;
+ cmd.flags = CXI_REG_MR_USER_RKEY;
+ }
+ if (native_flags) {
+ cmd.flags |= CXI_REG_MR_NATIVE_MAP;
+ cmd.native_flags = native_flags;
+ }
+
+ ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, &mr->vmr, &cmd.ibv_cmd, sizeof(cmd),
+ &resp.ibv_resp, sizeof(resp));
+ if (ret) {
+ free(mr);
+ return NULL;
+ }
+
+ mr->vmr.ibv_mr.lkey64 = resp.lkey64;
+ mr->vmr.ibv_mr.rkey64 = resp.rkey64;
+ mr->lkey64 = resp.lkey64;
+ mr->rkey64 = resp.rkey64;
+ mr->info = resp.info;
+ mr->va = (uint64_t)(uintptr_t)addr;
+ mr->iova = resp.iova;
+ mr->len = length;
+
+ pthread_spin_lock(&ctx->mr_list_lock);
+ mr->next = ctx->mr_list;
+ ctx->mr_list = mr;
+ pthread_spin_unlock(&ctx->mr_list_lock);
+
+ return &mr->vmr.ibv_mr;
+}
+
+struct ibv_mr *cxi_reg_mr(struct ibv_pd *pd, void *addr, size_t length, uint64_t hca_va, int access)
+{
+ return cxi_do_reg_mr(pd, addr, length, hca_va, access, 0, 0);
+}
+
+struct ibv_mr *cxidv_reg_native_mr(struct ibv_pd *pd, void *address, size_t length, uint32_t flags)
+{
+ if (!pd || !is_cxi_dev(pd->context->device) || !flags) {
+ errno = EINVAL;
+ return NULL;
+ }
+ return cxi_do_reg_mr(pd, address, length, (uintptr_t)address,
+ (flags & (1U << 2)) ? IBV_ACCESS_LOCAL_WRITE : 0, 0, flags);
+}
+
+struct ibv_mr *cxi_reg_mr_ex(struct ibv_pd *pd, struct ibv_mr_init_attr *attr)
+{
+ uint64_t comp_mask = attr->comp_mask;
+
+ /* Only the pieces the driver can honour today. */
+ if (comp_mask & ~(IBV_REG_MR_MASK_ADDR | IBV_REG_MR_MASK_IOVA | IBV_REG_MR_MASK_RKEY)) {
+ errno = EOPNOTSUPP;
+ return NULL;
+ }
+ if (!(comp_mask & IBV_REG_MR_MASK_ADDR)) {
+ errno = EINVAL;
+ return NULL;
+ }
+ if ((comp_mask & IBV_REG_MR_MASK_RKEY) && !attr->rkey) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return cxi_do_reg_mr(pd, attr->addr, attr->length,
+ (comp_mask & IBV_REG_MR_MASK_IOVA) ? attr->iova :
+ (uintptr_t)attr->addr,
+ attr->access, (comp_mask & IBV_REG_MR_MASK_RKEY) ? attr->rkey : 0, 0);
+}
+
+/*
+ * Resolve an SGE against its memory region: the ATU assigns each descriptor
+ * its own IOVA range, so a command cannot use the process virtual address an
+ * SGE carries, and the LAC lives in the key rather than the command. Returns
+ * 0 when the SGE does not fall inside a registered region.
+ *
+ * An SGE only carries the narrow key, which aliases the low word of the wide
+ * one, so it is enough to find the region; the full key comes from there.
+ */
+static int cxi_sge_resolve(struct cxi_context *ctx, const struct ibv_sge *sge, uint64_t *iova,
+ uint8_t *lac)
+{
+ struct cxi_mr *mr;
+ int found = 0;
+
+ pthread_spin_lock(&ctx->mr_list_lock);
+ for (mr = ctx->mr_list; mr; mr = mr->next) {
+ uint64_t offset;
+
+ if (mr->vmr.ibv_mr.lkey != sge->lkey)
+ continue;
+ if (sge->addr < mr->va || sge->length > mr->len ||
+ sge->addr - mr->va > mr->len - sge->length ||
+ sge->length > UINT64_MAX - sge->addr)
+ break;
+ offset = sge->addr - mr->va;
+ if (offset > UINT64_MAX - mr->iova)
+ break;
+ *iova = mr->iova + offset;
+ *lac = mr->lkey64 & CXI_LKEY64_LAC_MASK;
+ found = 1;
+ break;
+ }
+ pthread_spin_unlock(&ctx->mr_list_lock);
+
+ return found;
+}
+
+static int cxi_sge64_to_sge(struct cxi_context *ctx, struct ibv_pd *pd,
+ const struct ibv_sge64 *wide, struct ibv_sge *narrow)
+{
+ struct cxi_mr *mr;
+ int ret = EINVAL;
+
+ pthread_spin_lock(&ctx->mr_list_lock);
+ for (mr = ctx->mr_list; mr; mr = mr->next) {
+ if (mr->vmr.ibv_mr.pd != pd || mr->lkey64 != wide->lkey64)
+ continue;
+ if (wide->addr < mr->va || wide->length > mr->len ||
+ wide->addr - mr->va > mr->len - wide->length)
+ break;
+ *narrow = (struct ibv_sge){
+ .addr = wide->addr,
+ .length = wide->length,
+ .lkey = mr->vmr.ibv_mr.lkey,
+ };
+ ret = 0;
+ break;
+ }
+ pthread_spin_unlock(&ctx->mr_list_lock);
+ return ret;
+}
+
+int cxidv_mr_from_ibv_mr(struct ibv_mr *ibmr, struct cxidv_mr_info *info)
+{
+ struct cxi_mr *mr;
+
+ if (!ibmr || !info)
+ return EINVAL;
+ if (!is_cxi_dev(ibmr->context->device))
+ return EOPNOTSUPP;
+ mr = to_cxi_mr(ibmr);
+ info->va = mr->info.va;
+ info->iova = mr->info.iova;
+ info->length = mr->info.length;
+ info->page_shift = mr->info.page_shift;
+ info->huge_shift = mr->info.huge_shift;
+ info->id = mr->info.id;
+ info->lac = mr->info.lac;
+ return 0;
+}
+
+int cxi_dereg_mr(struct verbs_mr *vmr)
+{
+ struct cxi_context *ctx = to_cxi_ctx(vmr->ibv_mr.context);
+ struct cxi_mr *mr = to_cxi_mr(&vmr->ibv_mr);
+ struct cxi_mr **pp;
+ int ret;
+
+ ret = ibv_cmd_dereg_mr(vmr);
+ if (!ret) {
+ pthread_spin_lock(&ctx->mr_list_lock);
+ for (pp = &ctx->mr_list; *pp; pp = &(*pp)->next) {
+ if (*pp == mr) {
+ *pp = mr->next;
+ break;
+ }
+ }
+ pthread_spin_unlock(&ctx->mr_list_lock);
+ free(mr);
+ }
+
+ return ret;
+}
+
+/*
+ * Map the EQ ring and doorbell the kernel just allocated and prime the ring
+ * state. Shared by the classic and extended create paths.
+ */
+static int cxi_cq_map_eq(struct cxi_ibv_cq *cq, struct ibv_context *context, uint32_t eqn,
+ uint64_t buf_offset, size_t buf_size, uint64_t db_offset, size_t db_size)
+{
+ int ret;
+
+ cq->eqn = eqn;
+ cq->eq_buf_size = buf_size;
+ cq->eq_db_size = db_size;
+
+ cq->eq_buf = mmap(NULL, cq->eq_buf_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, buf_offset);
+ if (cq->eq_buf == MAP_FAILED) {
+ cq->eq_buf = NULL;
+ return errno;
+ }
+
+ cq->eq_db = mmap(NULL, cq->eq_db_size, PROT_READ | PROT_WRITE, MAP_SHARED, context->cmd_fd,
+ db_offset);
+ if (cq->eq_db == MAP_FAILED) {
+ munmap(cq->eq_buf, cq->eq_buf_size);
+ cq->eq_buf = NULL;
+ cq->eq_db = NULL;
+ return errno;
+ }
+
+ cxi_eq_init(&cq->hw_eq, cq->eq_buf, cq->eq_buf_size, cq->eqn, cq->eq_db);
+ ret = pthread_spin_init(&cq->lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret) {
+ munmap(cq->eq_db, cq->eq_db_size);
+ munmap(cq->eq_buf, cq->eq_buf_size);
+ cq->eq_db = NULL;
+ cq->eq_buf = NULL;
+ return ret;
+ }
+
+ return 0;
+}
+
+struct ibv_cq *cxi_create_cq(struct ibv_context *context, int cqe, struct ibv_comp_channel *channel,
+ int comp_vector)
+{
+ struct cxi_create_cq_resp resp = {};
+ struct cxi_create_cq cmd = {};
+ struct cxi_ibv_cq *cq;
+ int ret;
+
+ if (cqe > 65536) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ cq = calloc(1, sizeof(*cq));
+ if (!cq)
+ return NULL;
+
+ cmd.n_entries = cqe;
+ cmd.cpu_affinity = 0;
+ cmd.lni_handle = CXI_IBV_LNI_ANY;
+
+ ret = ibv_cmd_create_cq(context, cqe, channel, comp_vector, &cq->verbs_cq.cq, &cmd.ibv_cmd,
+ sizeof(cmd), &resp.ibv_resp, sizeof(resp));
+ if (ret) {
+ free(cq);
+ return NULL;
+ }
+
+ cq->cqe = cq->verbs_cq.cq.cqe;
+
+ ret = cxi_cq_map_eq(cq, context, resp.eqn, resp.eq_buf_offset, resp.eq_buf_size,
+ resp.eq_db_offset, resp.eq_db_size);
+ if (ret) {
+ ibv_cmd_destroy_cq(&cq->verbs_cq.cq);
+ free(cq);
+ errno = ret;
+ return NULL;
+ }
+
+ return &cq->verbs_cq.cq;
+}
+
+int cxi_destroy_cq(struct ibv_cq *cq)
+{
+ struct cxi_ibv_cq *cxi_cq = to_cxi_ibv_cq(cq);
+ int ret;
+
+ ret = ibv_cmd_destroy_cq(cq);
+ if (!ret) {
+ if (cxi_cq->eq_db)
+ munmap(cxi_cq->eq_db, cxi_cq->eq_db_size);
+ if (cxi_cq->eq_buf)
+ munmap(cxi_cq->eq_buf, cxi_cq->eq_buf_size);
+ pthread_spin_destroy(&cxi_cq->lock);
+ free(cxi_cq);
+ }
+
+ return ret;
+}
+
+/*
+ * Translate a CXI return code to an IB work completion status. Mirrors the
+ * kernel's cxi_rc_to_wc_status() in cxi_ib_main.c.
+ */
+static enum ibv_wc_status cxi_rc_to_wc_status(int rc)
+{
+ switch (rc) {
+ case C_RC_OK:
+ return IBV_WC_SUCCESS;
+ case C_RC_PERM_VIOLATION:
+ case C_RC_OP_VIOLATION:
+ return IBV_WC_REM_ACCESS_ERR;
+ case C_RC_NO_MATCH:
+ return IBV_WC_REM_OP_ERR;
+ case C_RC_NO_TRANSLATION:
+ case C_RC_PAGE_PERM_ERROR:
+ return IBV_WC_LOC_PROT_ERR;
+ case C_RC_DROPPED:
+ case C_RC_UNDELIVERABLE:
+ return IBV_WC_RETRY_EXC_ERR;
+ case C_RC_AMO_INVAL_OP_ERROR:
+ case C_RC_AMO_ALIGN_ERROR:
+ case C_RC_AMO_FP_INVALID:
+ return IBV_WC_LOC_QP_OP_ERR;
+ default:
+ return IBV_WC_GENERAL_ERR;
+ }
+}
+
+static bool cxi_sq_find_free_slot(struct cxi_qp *qp, uint32_t *slot)
+{
+ uint32_t candidate;
+
+ if (!qp->sq_size || qp->send_count >= qp->sq_size || !qp->send_slot_valid)
+ return false;
+
+ candidate = qp->send_tail < qp->sq_size ? qp->send_tail : 0;
+ for (uint32_t searched = 0; searched < qp->sq_size; searched++) {
+ if (!qp->send_slot_valid[candidate]) {
+ *slot = candidate;
+ return true;
+ }
+ candidate++;
+ if (candidate == qp->sq_size)
+ candidate = 0;
+ }
+
+ return false;
+}
+
+static int cxi_sq_make_cookie(struct cxi_qp *qp, uint32_t slot, uint64_t *cookie)
+{
+ struct cxi_context *ctx = to_cxi_ctx(qp->vqp.qp.context);
+ uint_fast64_t generation;
+
+ if (qp->qp_slot >= CXI_MAX_QPS || slot >= qp->sq_size ||
+ qp->sq_size > CXI_SEND_COOKIE_SLOT_MASK + 1)
+ return EINVAL;
+
+ generation = atomic_load_explicit(&ctx->send_cookie_seq, memory_order_relaxed);
+ for (;;) {
+ if (generation >= CXI_SEND_COOKIE_GENERATION_MAX)
+ return EOVERFLOW;
+ if (atomic_compare_exchange_weak_explicit(&ctx->send_cookie_seq, &generation,
+ generation + 1, memory_order_relaxed,
+ memory_order_relaxed))
+ break;
+ }
+ generation++;
+
+ *cookie = (generation << CXI_SEND_COOKIE_INDEX_BITS) |
+ (qp->qp_slot << CXI_SEND_COOKIE_SLOT_BITS) | slot;
+ return 0;
+}
+
+static struct cxi_qp *
+cxi_sq_cookie_qp(struct cxi_context *ctx, uint64_t cookie, uint32_t *slot)
+{
+ uint32_t qp_slot;
+
+ if (!(cookie >> CXI_SEND_COOKIE_INDEX_BITS))
+ return NULL;
+
+ qp_slot = (cookie >> CXI_SEND_COOKIE_SLOT_BITS) & CXI_QP_SLOT_MASK;
+ *slot = cookie & CXI_SEND_COOKIE_SLOT_MASK;
+ return ctx->qp_slots[qp_slot];
+}
+
+static int cxi_qp_insert_pte_locked(struct cxi_context *ctx, struct cxi_qp *qp)
+{
+ uint32_t position = 0;
+
+ if (qp->pte_index < 0 || ctx->qp_count >= CXI_MAX_QPS)
+ return EINVAL;
+ while (position < ctx->qp_count &&
+ ctx->qp_by_pte[position]->pte_index < qp->pte_index)
+ position++;
+ if (position < ctx->qp_count &&
+ ctx->qp_by_pte[position]->pte_index == qp->pte_index)
+ return EEXIST;
+ memmove(&ctx->qp_by_pte[position + 1], &ctx->qp_by_pte[position],
+ (ctx->qp_count - position) * sizeof(ctx->qp_by_pte[0]));
+ ctx->qp_by_pte[position] = qp;
+ ctx->qp_count++;
+ return 0;
+}
+
+static struct cxi_qp *cxi_qp_find_pte_locked(struct cxi_context *ctx, uint32_t pte_index)
+{
+ uint32_t low = 0;
+ uint32_t high = ctx->qp_count;
+
+ while (low < high) {
+ uint32_t middle = low + (high - low) / 2;
+ struct cxi_qp *qp = ctx->qp_by_pte[middle];
+
+ if ((uint32_t)qp->pte_index < pte_index)
+ low = middle + 1;
+ else if ((uint32_t)qp->pte_index > pte_index)
+ high = middle;
+ else
+ return qp;
+ }
+
+ return NULL;
+}
+
+static bool cxi_qp_remove_pte_locked(struct cxi_context *ctx, struct cxi_qp *qp)
+{
+ for (uint32_t position = 0; position < ctx->qp_count; position++) {
+ if (ctx->qp_by_pte[position] != qp)
+ continue;
+ memmove(&ctx->qp_by_pte[position], &ctx->qp_by_pte[position + 1],
+ (ctx->qp_count - position - 1) * sizeof(ctx->qp_by_pte[0]));
+ ctx->qp_count--;
+ return true;
+ }
+
+ return false;
+}
+
+static int cxi_qp_register_locked(struct cxi_context *ctx, struct cxi_qp *qp)
+{
+ uint32_t qp_slot;
+ int ret;
+
+ for (qp_slot = 0; qp_slot < CXI_MAX_QPS; qp_slot++)
+ if (!ctx->qp_slots[qp_slot])
+ break;
+ if (qp_slot == CXI_MAX_QPS)
+ return ENOSPC;
+
+ qp->qp_slot = qp_slot;
+ ret = cxi_qp_insert_pte_locked(ctx, qp);
+ if (ret) {
+ qp->qp_slot = UINT32_MAX;
+ return ret;
+ }
+ ctx->qp_slots[qp_slot] = qp;
+ return 0;
+}
+
+static void cxi_qp_unregister_locked(struct cxi_context *ctx, struct cxi_qp *qp)
+{
+ if (qp->qp_slot < CXI_MAX_QPS && ctx->qp_slots[qp->qp_slot] == qp)
+ ctx->qp_slots[qp->qp_slot] = NULL;
+ cxi_qp_remove_pte_locked(ctx, qp);
+ qp->qp_slot = UINT32_MAX;
+}
+
+static int cxi_qp_update_pte_locked(struct cxi_context *ctx, struct cxi_qp *qp,
+ int pte_index)
+{
+ int previous = qp->pte_index;
+ int ret;
+
+ if (previous == pte_index)
+ return 0;
+ if (!cxi_qp_remove_pte_locked(ctx, qp))
+ return ENOENT;
+ qp->pte_index = pte_index;
+ ret = cxi_qp_insert_pte_locked(ctx, qp);
+ if (!ret)
+ return 0;
+ qp->pte_index = previous;
+ cxi_qp_insert_pte_locked(ctx, qp);
+ return ret;
+}
+
+static void cxi_sq_record_send(struct cxi_qp *qp, uint32_t slot, uint64_t cookie,
+ uint64_t wr_id, uint8_t opcode, uint32_t job_id)
+{
+ qp->send_wrids[slot] = wr_id;
+ qp->send_opcodes[slot] = opcode;
+ qp->send_job_ids[slot] = job_id;
+ qp->send_cookies[slot] = cookie;
+ qp->send_slot_valid[slot] = true;
+ qp->send_tail = slot + 1 == qp->sq_size ? 0 : slot + 1;
+ qp->send_count++;
+}
+
+/*
+ * Decode one hardware event into a work completion. Returns 1 when @wc was
+ * filled, 0 when the event queue is empty. Caller holds cq->lock.
+ */
+static int cxi_poll_one(struct cxi_ibv_cq *cxi_cq, struct ibv_wc *wc)
+{
+ struct cxi_context *ctx = to_cxi_ctx(cxi_cq->verbs_cq.cq.context);
+
+ for (;;) {
+ const union c_event *ev = cxi_eq_get_event(&cxi_cq->hw_eq);
+
+ if (!ev)
+ return 0;
+
+ memset(wc, 0, sizeof(*wc));
+ cxi_cq->cur_job_id = 0;
+ cxi_cq->cur_src_id = 0;
+
+ switch (ev->hdr.event_type) {
+ case C_EVENT_SEND:
+ case C_EVENT_ACK:
+ case C_EVENT_REPLY: {
+ struct cxi_qp *qp;
+ uint32_t slot;
+ uint64_t user_ptr = ev->init_short.user_ptr;
+
+ pthread_spin_lock(&ctx->qp_table_lock);
+ qp = cxi_sq_cookie_qp(ctx, user_ptr, &slot);
+ if (qp && (qp->send_cq != cxi_cq || slot >= qp->sq_size))
+ qp = NULL;
+ if (qp) {
+ pthread_spin_lock(&qp->sq_lock);
+ if (!qp->send_slot_valid[slot] ||
+ qp->send_cookies[slot] != user_ptr) {
+ pthread_spin_unlock(&qp->sq_lock);
+ qp = NULL;
+ }
+ }
+
+ if (!qp) {
+ pthread_spin_unlock(&ctx->qp_table_lock);
+ continue;
+ }
+
+ wc->wr_id = qp->send_wrids[slot];
+ cxi_cq->cur_job_id = qp->send_job_ids[slot];
+ /* An ACK alone cannot say what was sent. */
+ switch (qp->send_opcodes[slot]) {
+ case IBV_WR_RDMA_WRITE:
+ case IBV_WR_RDMA_WRITE_WITH_IMM:
+ case CXI_WR_RDMA_WRITE_WITH_IMM64:
+ case CXI_WR_RDMA_WRITE64_WITH_IMM:
+ case CXI_WR_RDMA_WRITE64_WITH_IMM64:
+ wc->opcode = IBV_WC_RDMA_WRITE;
+ break;
+ case IBV_WR_RDMA_READ:
+ wc->opcode = IBV_WC_RDMA_READ;
+ break;
+ default:
+ wc->opcode = IBV_WC_SEND;
+ break;
+ }
+ qp->send_slot_valid[slot] = false;
+ qp->send_cookies[slot] = 0;
+ qp->send_count--;
+ wc->qp_num = qp->vqp.qp.qp_num;
+ pthread_spin_unlock(&qp->sq_lock);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+
+ wc->status = cxi_rc_to_wc_status(cxi_init_event_rc(ev));
+ if (wc->status == IBV_WC_SUCCESS &&
+ ev->hdr.event_size == C_EVENT_SIZE_16_BYTE)
+ wc->byte_len = ev->init_short.mlength;
+ return 1;
+ }
+
+ case C_EVENT_PUT:
+ case C_EVENT_GET: {
+ struct cxi_qp *qp = NULL;
+ uint64_t match_bits = 0;
+ uint64_t header_data = 0;
+
+ if (cxi_tgt_event_rc(ev) == C_RC_ENTRY_NOT_FOUND)
+ continue;
+
+ if (ev->hdr.event_size >= C_EVENT_SIZE_32_BYTE) {
+ match_bits = ev->tgt_short.match_bits;
+ header_data = ev->tgt_short.header_data;
+ /*
+ * The sender's src_id (echoed back in the
+ * initiator field) and JobID (the VNI its QP
+ * was created under).
+ */
+ cxi_cq->cur_src_id = ev->tgt_short.initiator;
+ cxi_cq->cur_job_id = ev->tgt_short.vni;
+ }
+
+ /*
+ * Non-zero match bits mean the operation landed on an
+ * attached region rather than a receive buffer. A plain
+ * write or a served read raises no completion here, so
+ * only an immediate turns one into a receive.
+ */
+ if ((match_bits & ~CXI_LE_VNI_MASK) && !header_data)
+ break;
+
+ pthread_spin_lock(&ctx->qp_table_lock);
+ qp = cxi_qp_find_pte_locked(ctx, ev->tgt_short.ptlte_index);
+
+ if (qp) {
+ pthread_spin_lock(&qp->rq_lock);
+ if (qp->recv_count) {
+ wc->wr_id = qp->recv_wrids[qp->recv_head];
+ qp->recv_head = (qp->recv_head + 1) % qp->rq_size;
+ qp->recv_count--;
+ }
+ pthread_spin_unlock(&qp->rq_lock);
+ wc->qp_num = qp->vqp.qp.qp_num;
+ }
+ pthread_spin_unlock(&ctx->qp_table_lock);
+
+ wc->status = cxi_rc_to_wc_status(cxi_tgt_event_rc(ev));
+ if (header_data) {
+ wc->opcode = IBV_WC_RECV_RDMA_WITH_IMM;
+ wc->imm_data = htobe32((uint32_t)header_data);
+ wc->wc_flags |= IBV_WC_WITH_IMM;
+ /*
+ * The classic struct ibv_wc has no room for a
+ * wide immediate; ibv_wc_read_imm64_data()
+ * reads it back out of here instead.
+ */
+ cxi_cq->cur_imm64 = htobe64(header_data);
+ } else {
+ wc->opcode = IBV_WC_RECV;
+ }
+ if (wc->status == IBV_WC_SUCCESS &&
+ ev->hdr.event_size >= C_EVENT_SIZE_32_BYTE)
+ wc->byte_len = ev->tgt_short.length;
+ return 1;
+ }
+
+ case C_EVENT_ATOMIC:
+ case C_EVENT_FETCH_ATOMIC:
+ wc->wr_id = ev->init_short.user_ptr;
+ wc->status = cxi_rc_to_wc_status(cxi_init_event_rc(ev));
+ wc->opcode = IBV_WC_FETCH_ADD;
+ return 1;
+
+ case C_EVENT_COMMAND_FAILURE:
+ wc->status = IBV_WC_LOC_QP_OP_ERR;
+ wc->vendor_err = ev->cmd_fail.return_code;
+ wc->opcode = IBV_WC_SEND;
+ return 1;
+
+ default:
+ /* Administrative/unknown event: already consumed, skip it */
+ break;
+ }
+ }
+}
+
+int cxi_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc)
+{
+ struct cxi_ibv_cq *cxi_cq = to_cxi_ibv_cq(cq);
+ int npolled = 0;
+
+ pthread_spin_lock(&cxi_cq->lock);
+
+ while (npolled < ne && cxi_poll_one(cxi_cq, &wc[npolled]))
+ npolled++;
+
+ /* Reclaim the slots of everything consumed above, errors included. */
+ cxi_eq_ack_events(&cxi_cq->hw_eq);
+
+ pthread_spin_unlock(&cxi_cq->lock);
+
+ return npolled;
+}
+
+int cxi_arm_cq(struct ibv_cq *cq, int solicited)
+{
+ (void)cq;
+ return solicited ? EOPNOTSUPP : 0;
+}
+
+/*
+ * Extended CQ polling. start_poll takes the CQ lock and end_poll drops it, so
+ * the cursor stays valid across the read_* accessors in between.
+ */
+static int cxi_cq_ex_advance(struct cxi_ibv_cq *cq)
+{
+ if (!cxi_poll_one(cq, &cq->cur_wc))
+ return ENOENT;
+
+ cq->verbs_cq.cq_ex.status = cq->cur_wc.status;
+ cq->verbs_cq.cq_ex.wr_id = cq->cur_wc.wr_id;
+
+ return 0;
+}
+
+static int cxi_start_poll(struct ibv_cq_ex *cq_ex, struct ibv_poll_cq_attr *attr)
+{
+ struct cxi_ibv_cq *cq = to_cxi_ibv_cq_ex(cq_ex);
+ int ret;
+
+ if (attr->comp_mask)
+ return EINVAL;
+
+ pthread_spin_lock(&cq->lock);
+
+ ret = cxi_cq_ex_advance(cq);
+ if (ret) {
+ cxi_eq_ack_events(&cq->hw_eq);
+ pthread_spin_unlock(&cq->lock);
+ }
+
+ return ret;
+}
+
+static int cxi_next_poll(struct ibv_cq_ex *cq_ex)
+{
+ return cxi_cq_ex_advance(to_cxi_ibv_cq_ex(cq_ex));
+}
+
+static void cxi_end_poll(struct ibv_cq_ex *cq_ex)
+{
+ struct cxi_ibv_cq *cq = to_cxi_ibv_cq_ex(cq_ex);
+
+ cxi_eq_ack_events(&cq->hw_eq);
+ pthread_spin_unlock(&cq->lock);
+}
+
+static enum ibv_wc_opcode cxi_wc_read_opcode(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.opcode;
+}
+
+static uint32_t cxi_wc_read_vendor_err(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.vendor_err;
+}
+
+static uint32_t cxi_wc_read_byte_len(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.byte_len;
+}
+
+static unsigned int cxi_wc_read_wc_flags(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.wc_flags;
+}
+
+static uint32_t cxi_wc_read_qp_num(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.qp_num;
+}
+
+static uint32_t cxi_wc_read_src_qp(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.src_qp;
+}
+
+static __be32 cxi_wc_read_imm_data(struct ibv_cq_ex *cq_ex)
+{
+ /* Already network order in the completion. */
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_wc.imm_data;
+}
+
+static __be64 cxi_wc_read_imm64_data(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_imm64;
+}
+
+static uint32_t cxi_wc_read_job_id(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_job_id;
+}
+
+static uint32_t cxi_wc_read_src_id(struct ibv_cq_ex *cq_ex)
+{
+ return to_cxi_ibv_cq_ex(cq_ex)->cur_src_id;
+}
+
+static void cxi_cq_fill_pfns(struct cxi_ibv_cq *cq, const struct ibv_cq_init_attr_ex *attr)
+{
+ struct ibv_cq_ex *cq_ex = &cq->verbs_cq.cq_ex;
+
+ cq_ex->start_poll = cxi_start_poll;
+ cq_ex->next_poll = cxi_next_poll;
+ cq_ex->end_poll = cxi_end_poll;
+ cq_ex->read_opcode = cxi_wc_read_opcode;
+ cq_ex->read_vendor_err = cxi_wc_read_vendor_err;
+ cq_ex->read_wc_flags = cxi_wc_read_wc_flags;
+
+ if (attr->wc_flags & IBV_WC_EX_WITH_BYTE_LEN)
+ cq_ex->read_byte_len = cxi_wc_read_byte_len;
+ if (attr->wc_flags & IBV_WC_EX_WITH_QP_NUM)
+ cq_ex->read_qp_num = cxi_wc_read_qp_num;
+ if (attr->wc_flags & IBV_WC_EX_WITH_SRC_QP)
+ cq_ex->read_src_qp = cxi_wc_read_src_qp;
+ if (attr->wc_flags & IBV_WC_EX_WITH_IMM)
+ cq_ex->read_imm_data = cxi_wc_read_imm_data;
+ if (attr->wc_flags & IBV_WC_EX_WITH_IMM64)
+ cq_ex->read_imm64_data = cxi_wc_read_imm64_data;
+ if (attr->wc_flags & IBV_WC_EX_WITH_JOB_ID)
+ cq_ex->read_job_id = cxi_wc_read_job_id;
+ if (attr->wc_flags & IBV_WC_EX_WITH_SRC_ID)
+ cq_ex->read_src_id = cxi_wc_read_src_id;
+}
+
+struct ibv_cq_ex *cxi_create_cq_ex(struct ibv_context *context, struct ibv_cq_init_attr_ex *attr)
+{
+ struct verbs_create_cq_prov_attr prov_attr = {};
+ struct cxi_create_cq_ex_resp resp = {};
+ struct cxi_create_cq_ex cmd = { .lni_handle = CXI_IBV_LNI_ANY };
+ struct cxi_ibv_cq *cq;
+ int ret;
+
+ if (attr->cqe > 65536) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ /* Timestamps and flow tags have no CXI event-queue equivalent. */
+ if (attr->wc_flags & ~(IBV_WC_EX_WITH_BYTE_LEN | IBV_WC_EX_WITH_IMM | IBV_WC_EX_WITH_IMM64 |
+ IBV_WC_EX_WITH_QP_NUM | IBV_WC_EX_WITH_SRC_QP |
+ IBV_WC_EX_WITH_JOB_ID | IBV_WC_EX_WITH_SRC_ID)) {
+ errno = EOPNOTSUPP;
+ return NULL;
+ }
+
+ cq = calloc(1, sizeof(*cq));
+ if (!cq)
+ return NULL;
+
+ cmd.drv_payload.n_entries = attr->cqe;
+
+ ret = ibv_cmd_create_cq_ex(context, attr, &prov_attr, &cq->verbs_cq, &cmd.ibv_cmd,
+ sizeof(cmd), &resp.ibv_resp, sizeof(resp), 0);
+ if (ret) {
+ free(cq);
+ errno = ret;
+ return NULL;
+ }
+
+ cq->cqe = cq->verbs_cq.cq.cqe;
+
+ ret = cxi_cq_map_eq(cq, context, resp.drv_payload.eqn, resp.drv_payload.eq_buf_offset,
+ resp.drv_payload.eq_buf_size, resp.drv_payload.eq_db_offset,
+ resp.drv_payload.eq_db_size);
+ if (ret) {
+ ibv_cmd_destroy_cq(&cq->verbs_cq.cq);
+ free(cq);
+ errno = ret;
+ return NULL;
+ }
+
+ cxi_cq_fill_pfns(cq, attr);
+
+ return &cq->verbs_cq.cq_ex;
+}
+
+static int cxi_qp_init_locks(struct cxi_qp *qp)
+{
+ int ret;
+
+ ret = pthread_spin_init(&qp->sq_lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret)
+ return ret;
+ ret = pthread_spin_init(&qp->rq_lock, PTHREAD_PROCESS_PRIVATE);
+ if (ret)
+ goto destroy_sq;
+ ret = pthread_mutex_init(&qp->builder_lock, NULL);
+ if (!ret)
+ return 0;
+ pthread_spin_destroy(&qp->rq_lock);
+destroy_sq:
+ pthread_spin_destroy(&qp->sq_lock);
+ return ret;
+}
+
+struct ibv_qp *cxi_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
+{
+ (void)pd;
+ (void)attr;
+ errno = EOPNOTSUPP;
+ return NULL;
+}
+
+/* Populates qp->vqp.qp_ex; defined below, alongside cxi_post_send(). */
+static void cxi_qp_fill_wr_pfns(struct cxi_qp *qp, struct ibv_qp_init_attr_ex *attr_ex);
+
+struct ibv_qp *cxi_create_qp_ex(struct ibv_context *context, struct ibv_qp_init_attr_ex *attr)
+{
+ struct cxi_create_qp_ex_resp resp = {};
+ struct cxi_create_qp_ex cmd = {};
+ struct cxi_context *ctx = to_cxi_ctx(context);
+ struct cxi_qp *qp;
+ uint32_t tc;
+ bool present;
+ int err = 0;
+ int ret;
+
+ if (attr->qp_type != IBV_QPT_RU) {
+ errno = EOPNOTSUPP;
+ return NULL;
+ }
+ if (!(attr->comp_mask & IBV_QP_INIT_ATTR_JKEY) || !attr->job_key) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ if (cxi_tc_cache_read(ctx, &tc, NULL)) {
+ cmd.drv_payload.tc = tc;
+ cmd.drv_payload.comp_mask |= CXI_IBV_CREATE_QP_TC;
+ } else {
+ ret = cxi_parse_env_u32("UET_TC", CXI_IBV_TC_MAX - 1, &tc, &present);
+ if (ret) {
+ errno = ret;
+ return NULL;
+ }
+ if (present) {
+ cmd.drv_payload.tc = tc;
+ cmd.drv_payload.comp_mask |= CXI_IBV_CREATE_QP_TC;
+ }
+ }
+
+ qp = calloc(1, sizeof(*qp));
+ if (!qp)
+ return NULL;
+ qp->qp_slot = UINT32_MAX;
+
+ ret = ibv_cmd_create_qp_ex2(context, &qp->vqp, attr, &cmd.ibv_cmd, sizeof(cmd),
+ &resp.ibv_resp, sizeof(resp), NULL);
+ if (ret) {
+ free(qp);
+ return NULL;
+ }
+
+ qp->vqp.comp_mask |= VERBS_QP_EX;
+ if (attr->comp_mask & IBV_QP_INIT_ATTR_SEND_OPS_FLAGS)
+ cxi_qp_fill_wr_pfns(qp, attr);
+ if (attr->comp_mask & IBV_QP_INIT_ATTR_SRC_ID)
+ qp->src_id = attr->src_id;
+ qp->job = container_of(attr->job_key, struct cxi_job_key, key)->job;
+ qp->sq_size = attr->cap.max_send_wr;
+ qp->rq_size = attr->cap.max_recv_wr;
+ qp->send_cq = to_cxi_ibv_cq(attr->send_cq);
+ qp->pte_index = resp.pte_index;
+ qp->send_wrids = calloc(qp->sq_size ? qp->sq_size : 1, sizeof(*qp->send_wrids));
+ if (!qp->send_wrids)
+ goto err_destroy_qp;
+ qp->send_opcodes = calloc(qp->sq_size ? qp->sq_size : 1, sizeof(*qp->send_opcodes));
+ if (!qp->send_opcodes)
+ goto err_destroy_qp;
+ qp->send_job_ids = calloc(qp->sq_size ? qp->sq_size : 1, sizeof(*qp->send_job_ids));
+ if (!qp->send_job_ids)
+ goto err_destroy_qp;
+ qp->send_cookies = calloc(qp->sq_size ? qp->sq_size : 1, sizeof(*qp->send_cookies));
+ if (!qp->send_cookies)
+ goto err_destroy_qp;
+ qp->send_slot_valid = calloc(qp->sq_size ? qp->sq_size : 1,
+ sizeof(*qp->send_slot_valid));
+ if (!qp->send_slot_valid)
+ goto err_destroy_qp;
+ qp->recv_wrids = calloc(qp->rq_size ? qp->rq_size : 1, sizeof(*qp->recv_wrids));
+ if (!qp->recv_wrids)
+ goto err_destroy_qp;
+ qp->txq_idx = resp.txq_idx;
+ qp->job_id = resp.job_id;
+ qp->lcid = resp.lcid;
+ qp->txq_cmds_size = resp.txq_cmds_size;
+ qp->txq_db_size = resp.txq_db_size;
+
+ qp->txq_cmds = mmap(NULL, qp->txq_cmds_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, resp.txq_cmds_offset);
+ if (qp->txq_cmds == MAP_FAILED)
+ goto err_destroy_qp;
+
+ qp->txq_db = mmap(NULL, qp->txq_db_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, resp.txq_db_offset);
+ if (qp->txq_db == MAP_FAILED)
+ goto err_unmap_cmds;
+
+ cxi_cq_init(&qp->hw_txq, qp->txq_cmds, qp->txq_cmds_size / sizeof(struct cxi_cmd64),
+ qp->txq_db, qp->txq_idx);
+
+ qp->tgq_idx = resp.tgq_idx;
+ qp->tgq_cmds_size = resp.tgq_cmds_size;
+ qp->tgq_db_size = resp.tgq_db_size;
+
+ qp->tgq_cmds = mmap(NULL, qp->tgq_cmds_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, resp.tgq_cmds_offset);
+ if (qp->tgq_cmds == MAP_FAILED)
+ goto err_unmap_txq_db;
+
+ qp->tgq_db = mmap(NULL, qp->tgq_db_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, resp.tgq_db_offset);
+ if (qp->tgq_db == MAP_FAILED)
+ goto err_unmap_tgq_cmds;
+
+ cxi_cq_init(&qp->hw_tgq, qp->tgq_cmds, qp->tgq_cmds_size / sizeof(struct cxi_cmd64),
+ qp->tgq_db, qp->tgq_idx);
+
+ err = cxi_qp_init_locks(qp);
+ if (err)
+ goto err_unmap_tgq_db;
+ pthread_spin_lock(&ctx->qp_table_lock);
+ err = cxi_qp_register_locked(ctx, qp);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+ if (err)
+ goto err_destroy_locks;
+
+ {
+ union c_cmdu target_cmd = {};
+
+ target_cmd.set_state.command.opcode = C_CMD_TGT_SETSTATE;
+ target_cmd.set_state.ptlte_index = qp->pte_index;
+ target_cmd.set_state.ptlte_state = C_PTLTE_ENABLED;
+ ret = cxi_cq_emit_target(&qp->hw_tgq, &target_cmd);
+ if (ret) {
+ err = -ret;
+ goto err_destroy_locks;
+ }
+ cxi_cq_ring(&qp->hw_tgq);
+ qp->vqp.qp.state = IBV_QPS_RTS;
+ }
+
+ return &qp->vqp.qp;
+
+err_destroy_locks:
+ pthread_spin_lock(&ctx->qp_table_lock);
+ if (qp->qp_slot < CXI_MAX_QPS)
+ cxi_qp_unregister_locked(ctx, qp);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+ pthread_mutex_destroy(&qp->builder_lock);
+ pthread_spin_destroy(&qp->rq_lock);
+ pthread_spin_destroy(&qp->sq_lock);
+err_unmap_tgq_db:
+ if (qp->tgq_db)
+ munmap(qp->tgq_db, qp->tgq_db_size);
+err_unmap_tgq_cmds:
+ munmap(qp->tgq_cmds, qp->tgq_cmds_size);
+err_unmap_txq_db:
+ munmap(qp->txq_db, qp->txq_db_size);
+err_unmap_cmds:
+ munmap(qp->txq_cmds, qp->txq_cmds_size);
+err_destroy_qp:
+ free(qp->recv_wrids);
+ free(qp->send_wrids);
+ free(qp->send_opcodes);
+ free(qp->send_job_ids);
+ free(qp->send_cookies);
+ free(qp->send_slot_valid);
+ ibv_cmd_destroy_qp(&qp->vqp.qp);
+ free(qp);
+ if (err)
+ errno = err;
+ return NULL;
+}
+
+int cxi_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ struct cxi_modify_qp_ex cmd = {};
+ struct cxi_modify_qp_ex_resp resp = {};
+ int ret;
+
+ ret = ibv_cmd_modify_qp_ex(qp, attr, attr_mask, &cmd.ibv_cmd, sizeof(cmd), &resp.ibv_resp,
+ sizeof(resp));
+ if (ret)
+ return ret;
+
+ if ((attr_mask & IBV_QP_STATE) && attr->qp_state == IBV_QPS_RTR) {
+ struct cxi_context *ctx = to_cxi_ctx(qp->context);
+ union c_cmdu tgt_cmd = {};
+ int update_ret;
+
+ pthread_spin_lock(&ctx->qp_table_lock);
+ pthread_spin_lock(&cxi_qp->rq_lock);
+ update_ret = cxi_qp_update_pte_locked(ctx, cxi_qp, resp.pte_index);
+ if (update_ret) {
+ pthread_spin_unlock(&cxi_qp->rq_lock);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+ return update_ret;
+ }
+
+ /*
+ * A freshly mapped PtlTE comes up disabled and drops every
+ * inbound packet. Userspace owns the TGQ ring, so the enable
+ * has to be emitted here rather than from the kernel.
+ */
+ tgt_cmd.set_state.command.opcode = C_CMD_TGT_SETSTATE;
+ tgt_cmd.set_state.ptlte_index = (uint16_t)cxi_qp->pte_index;
+ tgt_cmd.set_state.ptlte_state = C_PTLTE_ENABLED;
+
+ ret = cxi_cq_emit_target(&cxi_qp->hw_tgq, &tgt_cmd);
+ if (!ret)
+ cxi_cq_ring(&cxi_qp->hw_tgq);
+ pthread_spin_unlock(&cxi_qp->rq_lock);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+ if (ret)
+ return -ret;
+ }
+
+ return 0;
+}
+
+int cxi_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask,
+ struct ibv_qp_init_attr *init_attr)
+{
+ struct ibv_query_qp cmd;
+
+ return ibv_cmd_query_qp(qp, attr, attr_mask, init_attr, &cmd, sizeof(cmd));
+}
+
+int cxi_destroy_qp(struct ibv_qp *qp)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ struct cxi_context *ctx = to_cxi_ctx(qp->context);
+ int ret;
+
+ ret = ibv_cmd_destroy_qp(qp);
+ if (ret)
+ return ret;
+
+ pthread_spin_lock(&ctx->qp_table_lock);
+ cxi_qp_unregister_locked(ctx, cxi_qp);
+ pthread_spin_unlock(&ctx->qp_table_lock);
+
+ if (!ret) {
+ if (cxi_qp->tgq_db)
+ munmap(cxi_qp->tgq_db, cxi_qp->tgq_db_size);
+ if (cxi_qp->tgq_cmds)
+ munmap(cxi_qp->tgq_cmds, cxi_qp->tgq_cmds_size);
+ if (cxi_qp->txq_db)
+ munmap(cxi_qp->txq_db, cxi_qp->txq_db_size);
+ if (cxi_qp->txq_cmds)
+ munmap(cxi_qp->txq_cmds, cxi_qp->txq_cmds_size);
+ free(cxi_qp->recv_wrids);
+ free(cxi_qp->send_wrids);
+ free(cxi_qp->send_opcodes);
+ free(cxi_qp->send_job_ids);
+ free(cxi_qp->send_cookies);
+ free(cxi_qp->send_slot_valid);
+ pthread_mutex_destroy(&cxi_qp->builder_lock);
+ free(cxi_qp->pending_wrs);
+ pthread_spin_destroy(&cxi_qp->sq_lock);
+ pthread_spin_destroy(&cxi_qp->rq_lock);
+ free(cxi_qp);
+ }
+
+ return ret;
+}
+
+/*
+ * ibv_qp_ex work-request builder support.
+ *
+ * Each wr_* setter stages fields into cxi_qp->wr_build. Finished requests
+ * are retained until wr_complete() emits the batch under sq_lock, so address
+ * lookups and allocation never run under the SQ spinlock. This mirrors cxi_post_send()
+ * closely enough that the two are kept as separate implementations rather
+ * than factored together -- ibv_post_send() and the qp_ex builder have
+ * different error/locking conventions, and this way neither one has to bend
+ * to accommodate the other.
+ */
+
+static struct cxi_qp *to_cxi_qp_ex(struct ibv_qp_ex *ibvqpx)
+{
+ return container_of(ibvqpx, struct cxi_qp, vqp.qp_ex);
+}
+
+/* Emit the work request staged in cxi_qp->wr_build, if any. */
+static void cxi_wr_emit_pending(struct cxi_qp *cxi_qp)
+{
+ struct cxi_context *ctx = to_cxi_ctx(cxi_qp->vqp.qp.context);
+ struct cxi_ibv_cq *scq = to_cxi_ibv_cq(cxi_qp->vqp.qp.send_cq);
+ struct cxi_wr_build *b = &cxi_qp->wr_build;
+ struct c_full_dma_cmd cmd = {};
+ struct ibv_sge sge;
+ uint32_t send_slot;
+ uint64_t send_cookie;
+ union c_fab_addr dfa;
+ uint8_t dfa_ext = 0;
+ uint32_t remote_pid;
+ uint64_t iova;
+ uint64_t wire_rkey = 0;
+ uint8_t lac;
+ int ret;
+
+ if (!b->have_wr)
+ return;
+ b->have_wr = false;
+
+ if (b->err)
+ return;
+
+ if (!cxi_sq_find_free_slot(cxi_qp, &send_slot)) {
+ b->err = ENOSPC;
+ return;
+ }
+ ret = cxi_sq_make_cookie(cxi_qp, send_slot, &send_cookie);
+ if (ret) {
+ b->err = ret;
+ return;
+ }
+
+ if (!b->has_addr || !b->has_sge) {
+ b->err = EOPNOTSUPP;
+ return;
+ }
+
+ sge.addr = b->local_addr;
+ sge.length = b->length;
+ sge.lkey = (uint32_t)b->lkey;
+ if (b->sge64) {
+ struct ibv_sge64 wide = {
+ .addr = b->local_addr,
+ .length = b->length,
+ .lkey64 = b->lkey,
+ };
+
+ b->err = cxi_sge64_to_sge(ctx, cxi_qp->vqp.qp.pd, &wide, &sge);
+ if (b->err)
+ return;
+ }
+
+ if (!cxi_sge_resolve(ctx, &sge, &iova, &lac)) {
+ b->err = EINVAL;
+ return;
+ }
+
+ if (b->opcode != IBV_WR_SEND && b->opcode != IBV_WR_SEND_WITH_IMM &&
+ b->opcode != CXI_WR_SEND_WITH_IMM64) {
+ b->err = b->rkey64 ? -cxi_le_wire_key(b->rkey64, &wire_rkey) : EINVAL;
+ if (b->err)
+ return;
+ }
+ remote_pid = b->remote_qpn & CXI_QPN_PID_MASK;
+ cxi_build_dfa(b->remote_nid, remote_pid, ctx->pid_bits, CXI_QPN_RI(b->remote_qpn), &dfa,
+ &dfa_ext);
+
+ if (b->jkey != cxi_qp->lcid) {
+ ret = cxi_cq_emit_cq_lcid(&cxi_qp->hw_txq, b->jkey);
+ if (ret) {
+ b->err = ret < 0 ? -ret : ret;
+ return;
+ }
+ }
+
+ if (b->opcode == IBV_WR_SEND || b->opcode == IBV_WR_SEND_WITH_IMM ||
+ b->opcode == CXI_WR_SEND_WITH_IMM64) {
+ cmd.command.opcode = C_CMD_PUT;
+ cmd.remote_offset = 0;
+ } else {
+ cmd.command.opcode = (b->opcode == IBV_WR_RDMA_READ) ? C_CMD_GET : C_CMD_PUT;
+ cmd.remote_offset = b->remote_addr;
+ cmd.match_bits = wire_rkey;
+ }
+ cmd.lac = lac;
+ cmd.dfa = dfa;
+ cmd.index_ext = dfa_ext;
+ cmd.local_addr = iova;
+ cmd.request_len = b->length;
+ cmd.user_ptr = send_cookie;
+ cmd.eq = scq->eqn;
+ cmd.event_send_disable = 1;
+ cmd.initiator = cxi_qp->src_id;
+ if (b->has_imm)
+ cmd.header_data = b->imm_is64 ? be64toh(b->imm64) : be32toh(b->imm32);
+
+ ret = cxi_cq_emit_dma(&cxi_qp->hw_txq, &cmd);
+
+ if (!ret && b->jkey != cxi_qp->lcid)
+ ret = cxi_cq_emit_cq_lcid(&cxi_qp->hw_txq, cxi_qp->lcid);
+ if (ret) {
+ b->err = ret < 0 ? -ret : ret;
+ return;
+ }
+
+ cxi_sq_record_send(cxi_qp, send_slot, send_cookie, b->wr_id, b->opcode, b->job_id);
+ b->send_slot = send_slot;
+}
+
+static void cxi_wr_flush_pending(struct cxi_qp *qp)
+{
+ struct cxi_wr_build *build = &qp->wr_build;
+
+ if (!build->have_wr || build->err)
+ return;
+ if (qp->pending_count == qp->pending_capacity) {
+ size_t capacity = qp->pending_capacity ? qp->pending_capacity * 2 : 16;
+ struct cxi_wr_build *pending;
+
+ if (capacity < qp->pending_capacity || capacity > SIZE_MAX / sizeof(*pending)) {
+ build->err = ENOMEM;
+ return;
+ }
+ pending = realloc(qp->pending_wrs, capacity * sizeof(*pending));
+ if (!pending) {
+ build->err = ENOMEM;
+ return;
+ }
+ qp->pending_wrs = pending;
+ qp->pending_capacity = capacity;
+ }
+ qp->pending_wrs[qp->pending_count++] = *build;
+ build->have_wr = false;
+}
+
+static void cxi_wr_new(struct ibv_qp_ex *ibvqpx, unsigned int opcode)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp_ex(ibvqpx);
+ struct cxi_wr_build *b = &cxi_qp->wr_build;
+
+ cxi_wr_flush_pending(cxi_qp);
+
+ *b = (struct cxi_wr_build){
+ .err = b->err,
+ .have_wr = true,
+ .wr_id = ibvqpx->wr_id,
+ .opcode = opcode,
+ .jkey = cxi_qp->lcid,
+ .job_id = cxi_qp->job_id,
+ };
+}
+
+static void cxi_wr_send(struct ibv_qp_ex *ibvqpx)
+{
+ cxi_wr_new(ibvqpx, IBV_WR_SEND);
+}
+
+static void cxi_wr_send_imm(struct ibv_qp_ex *ibvqpx, __be32 imm_data)
+{
+ cxi_wr_new(ibvqpx, IBV_WR_SEND_WITH_IMM);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm32 = imm_data;
+}
+
+static void cxi_wr_send_imm64(struct ibv_qp_ex *ibvqpx, __be64 imm_data)
+{
+ cxi_wr_new(ibvqpx, CXI_WR_SEND_WITH_IMM64);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm_is64 = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm64 = imm_data;
+}
+
+static void cxi_wr_rdma_write_op(struct ibv_qp_ex *ibvqpx, unsigned int opcode, uint64_t rkey,
+ uint64_t remote_addr)
+{
+ cxi_wr_new(ibvqpx, opcode);
+ to_cxi_qp_ex(ibvqpx)->wr_build.remote_addr = remote_addr;
+ to_cxi_qp_ex(ibvqpx)->wr_build.rkey64 = rkey;
+}
+
+static void cxi_wr_rdma_write(struct ibv_qp_ex *ibvqpx, uint32_t rkey, uint64_t remote_addr)
+{
+ cxi_wr_rdma_write_op(ibvqpx, IBV_WR_RDMA_WRITE, rkey, remote_addr);
+}
+
+static void cxi_wr_rdma_write64(struct ibv_qp_ex *ibvqpx, uint64_t rkey, uint64_t remote_addr)
+{
+ cxi_wr_rdma_write_op(ibvqpx, IBV_WR_RDMA_WRITE, rkey, remote_addr);
+}
+
+static void cxi_wr_rdma_write_imm(struct ibv_qp_ex *ibvqpx, uint32_t rkey, uint64_t remote_addr,
+ __be32 imm_data)
+{
+ cxi_wr_rdma_write_op(ibvqpx, IBV_WR_RDMA_WRITE_WITH_IMM, rkey, remote_addr);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm32 = imm_data;
+}
+
+static void cxi_wr_rdma_write_imm64(struct ibv_qp_ex *ibvqpx, uint32_t rkey, uint64_t remote_addr,
+ __be64 imm_data)
+{
+ cxi_wr_rdma_write_op(ibvqpx, CXI_WR_RDMA_WRITE_WITH_IMM64, rkey, remote_addr);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm_is64 = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm64 = imm_data;
+}
+
+static void cxi_wr_rdma_write64_imm(struct ibv_qp_ex *ibvqpx, uint64_t rkey, uint64_t remote_addr,
+ __be32 imm_data)
+{
+ cxi_wr_rdma_write_op(ibvqpx, CXI_WR_RDMA_WRITE64_WITH_IMM, rkey, remote_addr);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm32 = imm_data;
+}
+
+static void cxi_wr_rdma_write64_imm64(struct ibv_qp_ex *ibvqpx, uint64_t rkey, uint64_t remote_addr,
+ __be64 imm_data)
+{
+ cxi_wr_rdma_write_op(ibvqpx, CXI_WR_RDMA_WRITE64_WITH_IMM64, rkey, remote_addr);
+ to_cxi_qp_ex(ibvqpx)->wr_build.has_imm = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm_is64 = true;
+ to_cxi_qp_ex(ibvqpx)->wr_build.imm64 = imm_data;
+}
+
+static void cxi_wr_rdma_read(struct ibv_qp_ex *ibvqpx, uint32_t rkey, uint64_t remote_addr)
+{
+ cxi_wr_new(ibvqpx, IBV_WR_RDMA_READ);
+ to_cxi_qp_ex(ibvqpx)->wr_build.remote_addr = remote_addr;
+ to_cxi_qp_ex(ibvqpx)->wr_build.rkey64 = rkey;
+}
+
+static void cxi_wr_rdma_read64(struct ibv_qp_ex *ibvqpx, uint64_t rkey, uint64_t remote_addr)
+{
+ cxi_wr_new(ibvqpx, IBV_WR_RDMA_READ);
+ to_cxi_qp_ex(ibvqpx)->wr_build.remote_addr = remote_addr;
+ to_cxi_qp_ex(ibvqpx)->wr_build.rkey64 = rkey;
+}
+
+static void cxi_wr_set_sge64(struct ibv_qp_ex *ibvqpx, uint64_t lkey, uint64_t addr,
+ uint32_t length)
+{
+ struct cxi_wr_build *b = &to_cxi_qp_ex(ibvqpx)->wr_build;
+
+ if (!b->have_wr) {
+ b->err = EINVAL;
+ return;
+ }
+
+ b->local_addr = addr;
+ b->lkey = lkey;
+ b->sge64 = true;
+ b->length = length;
+ b->has_sge = true;
+}
+
+static void cxi_wr_set_sge_list(struct ibv_qp_ex *ibvqpx, size_t num_sge,
+ const struct ibv_sge *sg_list)
+{
+ struct cxi_wr_build *b = &to_cxi_qp_ex(ibvqpx)->wr_build;
+
+ if (!b->have_wr)
+ return;
+
+ if (num_sge != 1) {
+ b->err = EINVAL;
+ return;
+ }
+
+ b->local_addr = sg_list[0].addr;
+ b->lkey = sg_list[0].lkey;
+ b->sge64 = false;
+ b->length = sg_list[0].length;
+ b->has_sge = true;
+}
+
+static void cxi_wr_set_sge32(struct ibv_qp_ex *ibvqpx, uint32_t lkey, uint64_t addr,
+ uint32_t length)
+{
+ struct ibv_sge sge = {
+ .addr = addr,
+ .length = length,
+ .lkey = lkey,
+ };
+
+ cxi_wr_set_sge_list(ibvqpx, 1, &sge);
+}
+
+static void cxi_wr_set_sge64_list(struct ibv_qp_ex *ibvqpx, size_t count,
+ const struct ibv_sge64 *list)
+{
+ if (count != 1 || !list) {
+ to_cxi_qp_ex(ibvqpx)->wr_build.err = EINVAL;
+ return;
+ }
+ cxi_wr_set_sge64(ibvqpx, list[0].lkey64, list[0].addr, list[0].length);
+}
+
+static void cxi_wr_set_ru_addr(struct ibv_qp_ex *ibvqpx, struct ibv_ah_ex *ah,
+ unsigned int addr_idx)
+{
+ struct cxi_qp *qp = to_cxi_qp_ex(ibvqpx);
+ struct cxi_wr_build *b = &qp->wr_build;
+ struct cxi_ah resolved = {};
+ int ret;
+
+ if (!b->have_wr)
+ return;
+
+ if (!ah) {
+ ret = cxi_resolve_addr(qp->job, addr_idx, &resolved);
+ if (ret) {
+ b->err = ret;
+ return;
+ }
+ b->remote_nid = resolved.nid;
+ b->remote_qpn = resolved.ah_ex.remote_qpn;
+ } else {
+ b->ah = to_cxi_ah_ex(ah);
+ b->remote_nid = b->ah->nid;
+ b->remote_qpn = ah->remote_qpn;
+ }
+ b->has_addr = true;
+}
+
+static void cxi_wr_set_job_key(struct ibv_qp_ex *ibvqpx, uint32_t jkey)
+{
+ struct cxi_qp *qp = to_cxi_qp_ex(ibvqpx);
+ struct cxi_wr_build *build = &qp->wr_build;
+ struct cxi_pd *pd = to_cxi_pd(qp->vqp.qp.pd);
+ struct cxi_job_key *entry;
+ bool found = false;
+
+ if (!build->have_wr) {
+ build->err = EINVAL;
+ return;
+ }
+ pthread_spin_lock(&pd->jkey_lock);
+ for (entry = pd->jkeys; entry; entry = entry->next) {
+ if (entry->key.jkey == jkey && jkey <= UINT8_MAX) {
+ build->job_id = entry->job_id;
+ found = true;
+ break;
+ }
+ }
+ pthread_spin_unlock(&pd->jkey_lock);
+ if (!found) {
+ build->err = EINVAL;
+ return;
+ }
+ build->jkey = jkey;
+}
+
+static void cxi_wr_start(struct ibv_qp_ex *ibvqpx)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp_ex(ibvqpx);
+
+ pthread_mutex_lock(&cxi_qp->builder_lock);
+ cxi_qp->pending_count = 0;
+ cxi_qp->wr_build = (struct cxi_wr_build){};
+}
+
+static int cxi_wr_complete(struct ibv_qp_ex *ibvqpx)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp_ex(ibvqpx);
+ struct cxi_wr_build *b = &cxi_qp->wr_build;
+ uint64_t saved_wp32;
+ uint32_t saved_send_tail, saved_send_count;
+ size_t emitted = 0;
+ int ret;
+
+ cxi_wr_flush_pending(cxi_qp);
+ ret = b->err;
+ if (ret) {
+ pthread_mutex_unlock(&cxi_qp->builder_lock);
+ return ret;
+ }
+ pthread_spin_lock(&cxi_qp->sq_lock);
+ saved_wp32 = cxi_qp->hw_txq.wp32;
+ saved_send_tail = cxi_qp->send_tail;
+ saved_send_count = cxi_qp->send_count;
+ for (size_t index = 0; index < cxi_qp->pending_count; index++) {
+ *b = cxi_qp->pending_wrs[index];
+ cxi_wr_emit_pending(cxi_qp);
+ ret = b->err;
+ if (ret)
+ break;
+ cxi_qp->pending_wrs[index].send_slot = b->send_slot;
+ emitted++;
+ }
+ if (ret) {
+ cxi_qp->hw_txq.wp32 = saved_wp32;
+ cxi_qp->send_tail = saved_send_tail;
+ cxi_qp->send_count = saved_send_count;
+ for (size_t index = 0; index < emitted; index++) {
+ cxi_qp->send_slot_valid[cxi_qp->pending_wrs[index].send_slot] = false;
+ cxi_qp->send_cookies[cxi_qp->pending_wrs[index].send_slot] = 0;
+ }
+ } else {
+ cxi_cq_ring(&cxi_qp->hw_txq);
+ }
+
+ pthread_spin_unlock(&cxi_qp->sq_lock);
+ pthread_mutex_unlock(&cxi_qp->builder_lock);
+
+ return ret;
+}
+
+static void cxi_wr_abort(struct ibv_qp_ex *ibvqpx)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp_ex(ibvqpx);
+
+ cxi_qp->pending_count = 0;
+ pthread_mutex_unlock(&cxi_qp->builder_lock);
+}
+
+/* Populate the ibv_qp_ex ops requested via IBV_QP_INIT_ATTR_SEND_OPS_FLAGS. */
+static void cxi_qp_fill_wr_pfns(struct cxi_qp *qp, struct ibv_qp_init_attr_ex *attr_ex)
+{
+ struct ibv_qp_ex *ibvqpx = &qp->vqp.qp_ex;
+ uint64_t flags = attr_ex->send_ops_flags;
+
+ ibvqpx->wr_start = cxi_wr_start;
+ ibvqpx->wr_complete = cxi_wr_complete;
+ ibvqpx->wr_abort = cxi_wr_abort;
+
+ if (flags & IBV_QP_EX_WITH_SEND)
+ ibvqpx->wr_send = cxi_wr_send;
+ if (flags & IBV_QP_EX_WITH_SEND_WITH_IMM)
+ ibvqpx->wr_send_imm = cxi_wr_send_imm;
+ if (flags & IBV_QP_EX_WITH_SEND_WITH_IMM64)
+ ibvqpx->wr_send_imm64 = cxi_wr_send_imm64;
+ if (flags & IBV_QP_EX_WITH_RDMA_WRITE) {
+ ibvqpx->wr_rdma_write = cxi_wr_rdma_write;
+ ibvqpx->wr_rdma_write64 = cxi_wr_rdma_write64;
+ }
+ if (flags & IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM)
+ ibvqpx->wr_rdma_write_imm = cxi_wr_rdma_write_imm;
+ if (flags & IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM64)
+ ibvqpx->wr_rdma_write_imm64 = cxi_wr_rdma_write_imm64;
+ if (flags & IBV_QP_EX_WITH_RDMA_WRITE64_WITH_IMM)
+ ibvqpx->wr_rdma_write64_imm = cxi_wr_rdma_write64_imm;
+ if (flags & IBV_QP_EX_WITH_RDMA_WRITE64_WITH_IMM64)
+ ibvqpx->wr_rdma_write64_imm64 = cxi_wr_rdma_write64_imm64;
+ if (flags & IBV_QP_EX_WITH_RDMA_READ) {
+ ibvqpx->wr_rdma_read = cxi_wr_rdma_read;
+ ibvqpx->wr_rdma_read64 = cxi_wr_rdma_read64;
+ }
+
+ ibvqpx->wr_set_sge64 = cxi_wr_set_sge64;
+ ibvqpx->wr_set_sge = cxi_wr_set_sge32;
+ ibvqpx->wr_set_sge64_list = cxi_wr_set_sge64_list;
+ ibvqpx->wr_set_sge_list = cxi_wr_set_sge_list;
+ ibvqpx->wr_set_ru_addr = cxi_wr_set_ru_addr;
+ ibvqpx->wr_set_job_key = cxi_wr_set_job_key;
+}
+
+static int cxi_post_send_resolved(struct ibv_qp *qp, struct ibv_send_wr *wr,
+ struct ibv_send_wr **bad_wr)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ struct cxi_context *ctx = to_cxi_ctx(qp->context);
+ struct cxi_ibv_cq *scq = to_cxi_ibv_cq(qp->send_cq);
+ struct ibv_send_wr *original = NULL;
+ struct ibv_send_wr converted;
+ struct ibv_sge narrow;
+ uint32_t send_slot;
+ uint64_t send_cookie;
+ int ret = 0;
+
+ pthread_spin_lock(&cxi_qp->sq_lock);
+
+ for (; wr; wr = wr->next) {
+ original = wr;
+ converted = *wr;
+ wr = &converted;
+ if (wr->send_flags & IBV_SEND_SGE64) {
+ if (wr->num_sge != 1 || !wr->sg64_list) {
+ ret = EINVAL;
+ break;
+ }
+ ret = cxi_sge64_to_sge(ctx, qp->pd, wr->sg64_list, &narrow);
+ if (ret)
+ break;
+ converted = *wr;
+ converted.sg_list = &narrow;
+ converted.send_flags &= ~IBV_SEND_SGE64;
+ wr = &converted;
+ }
+ if (wr->opcode == IBV_WR_SEND || wr->opcode == IBV_WR_SEND_WITH_IMM) {
+ struct ibv_ah_ex *address = original->wr.ru.ah;
+
+ if (!address) {
+ ret = EINVAL;
+ break;
+ }
+ converted.wr.ud.ah = &address->ah_base;
+ converted.wr.ud.remote_qpn = address->remote_qpn;
+ converted.wr.ud.remote_qkey = original->wr.ru.jkey;
+ }
+ union c_fab_addr dfa;
+ uint8_t dfa_ext = 0;
+ uint64_t iova;
+ uint8_t lac;
+
+ if (!cxi_sq_find_free_slot(cxi_qp, &send_slot)) {
+ ret = ENOSPC;
+ *bad_wr = wr;
+ break;
+ }
+ ret = cxi_sq_make_cookie(cxi_qp, send_slot, &send_cookie);
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+
+ /* No room in ibv_send_wr for a 64-bit immediate; see ibv_wr_post(3). */
+ if (wr->opcode > IBV_WR_ATOMIC_WRITE) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ if (wr->opcode == IBV_WR_SEND || wr->opcode == IBV_WR_SEND_WITH_IMM) {
+ struct c_full_dma_cmd cmd = {};
+ struct cxi_ah *ah;
+
+ if (!wr->num_sge || !wr->sg_list || !wr->wr.ud.ah) {
+ ret = EOPNOTSUPP;
+ *bad_wr = wr;
+ break;
+ }
+
+ /* No CXI command carries a gather list. */
+ if (wr->num_sge > 1) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ if (!cxi_sge_resolve(ctx, &wr->sg_list[0], &iova, &lac)) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ ah = to_cxi_ah(wr->wr.ud.ah);
+ cxi_build_dfa(ah->nid, wr->wr.ud.remote_qpn & CXI_QPN_PID_MASK,
+ ctx->pid_bits, CXI_QPN_RI(wr->wr.ud.remote_qpn), &dfa,
+ &dfa_ext);
+
+ /*
+ * cxi_cq_emit_nomatch_dma() forces restricted=1, which
+ * suppresses the target PUT event the receiver needs to
+ * complete its recv WR, and c_nomatch_dma_cmd has no
+ * user_ptr to carry wr_id. Use an unrestricted full DMA
+ * put instead; the destination PtlTE is non-matching, so
+ * match_bits are ignored.
+ */
+ cmd.command.opcode = C_CMD_PUT;
+ cmd.lac = lac;
+ cmd.dfa = dfa;
+ cmd.index_ext = dfa_ext;
+ cmd.remote_offset = 0;
+ cmd.local_addr = iova;
+ cmd.request_len = wr->sg_list[0].length;
+ cmd.user_ptr = send_cookie;
+ cmd.eq = scq->eqn;
+ /* One completion per WR: ACK only, not SEND. */
+ cmd.event_send_disable = 1;
+ cmd.initiator = cxi_qp->src_id;
+ if (wr->opcode == IBV_WR_SEND_WITH_IMM)
+ cmd.header_data = be32toh(wr->imm_data);
+
+ ret = cxi_cq_emit_dma(&cxi_qp->hw_txq, &cmd);
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+ } else if (wr->opcode == IBV_WR_RDMA_WRITE ||
+ wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM ||
+ wr->opcode == IBV_WR_RDMA_READ) {
+ struct c_full_dma_cmd cmd = {};
+ struct cxi_ah *ah;
+ struct ibv_ah_ex *address = original->wr.ru_rdma.ah;
+ uint32_t remote_pid;
+
+ if (!wr->num_sge || !wr->sg_list) {
+ ret = EOPNOTSUPP;
+ *bad_wr = wr;
+ break;
+ }
+ if (!address) {
+ ret = EINVAL;
+ break;
+ }
+
+ if (wr->num_sge > 1) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ if (!cxi_sge_resolve(ctx, &wr->sg_list[0], &iova, &lac)) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ ah = to_cxi_ah_ex(address);
+ remote_pid = address->remote_qpn & CXI_QPN_PID_MASK;
+
+ cxi_build_dfa(ah->nid, remote_pid, ctx->pid_bits,
+ CXI_QPN_RI(address->remote_qpn), &dfa, &dfa_ext);
+
+ cmd.command.opcode =
+ (wr->opcode == IBV_WR_RDMA_READ) ? C_CMD_GET : C_CMD_PUT;
+ cmd.lac = lac;
+ cmd.dfa = dfa;
+ cmd.index_ext = dfa_ext;
+ cmd.remote_offset = wr->wr.ru_rdma.remote_addr;
+ cmd.local_addr = iova;
+ cmd.request_len = wr->sg_list[0].length;
+ {
+ uint64_t wire_key;
+
+ ret = wr->wr.ru_rdma.rkey64 ?
+ -cxi_le_wire_key(wr->wr.ru_rdma.rkey64, &wire_key) :
+ EINVAL;
+ if (!ret)
+ cmd.match_bits = wire_key;
+ }
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+ cmd.user_ptr = send_cookie;
+ cmd.eq = scq->eqn;
+ cmd.initiator = cxi_qp->src_id;
+ /*
+ * One completion per WR: the ack for a put and the
+ * reply for a get already report it, so drop the send
+ * event that would otherwise arrive as well.
+ */
+ cmd.event_send_disable = 1;
+ /*
+ * Immediate data rides in the header, which the target
+ * reports in its PUT event.
+ */
+ if (wr->opcode == IBV_WR_RDMA_WRITE_WITH_IMM)
+ cmd.header_data = be32toh(wr->imm_data);
+
+ ret = cxi_cq_emit_dma(&cxi_qp->hw_txq, &cmd);
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+ } else {
+ ret = EOPNOTSUPP;
+ *bad_wr = wr;
+ break;
+ }
+
+ cxi_sq_record_send(cxi_qp, send_slot, send_cookie, wr->wr_id, wr->opcode,
+ cxi_qp->job_id);
+ }
+
+ if (!ret)
+ cxi_cq_ring(&cxi_qp->hw_txq);
+
+ if (ret && bad_wr)
+ *bad_wr = original;
+ pthread_spin_unlock(&cxi_qp->sq_lock);
+
+ return ret < 0 ? -ret : ret;
+}
+
+static bool cxi_wr_is_indexed(const struct ibv_send_wr *request)
+{
+ switch (request->opcode) {
+ case IBV_WR_SEND:
+ case IBV_WR_SEND_WITH_IMM:
+ return !request->wr.ru.ah;
+ case IBV_WR_RDMA_WRITE:
+ case IBV_WR_RDMA_WRITE_WITH_IMM:
+ case IBV_WR_RDMA_READ:
+ return !request->wr.ru_rdma.ah;
+ default:
+ return false;
+ }
+}
+
+int cxi_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr, struct ibv_send_wr **bad_wr)
+{
+ struct cxi_prepared_wr {
+ struct ibv_send_wr request;
+ struct cxi_ah address;
+ struct ibv_send_wr *original;
+ } *prepared;
+ struct ibv_send_wr *request, *failed = NULL, *lookup_failed = NULL;
+ size_t count = 0, ready = 0;
+ bool indexed = false;
+ int ret, lookup_error = 0;
+
+ for (request = wr; request; request = request->next) {
+ indexed |= cxi_wr_is_indexed(request);
+ count++;
+ }
+ if (!indexed)
+ return cxi_post_send_resolved(qp, wr, bad_wr);
+ prepared = calloc(count, sizeof(*prepared));
+ if (!prepared) {
+ if (bad_wr)
+ *bad_wr = wr;
+ return ENOMEM;
+ }
+ for (request = wr; request; request = request->next) {
+ struct ibv_send_wr *copy = &prepared[ready].request;
+
+ *copy = *request;
+ copy->next = NULL;
+ prepared[ready].original = request;
+ if (cxi_wr_is_indexed(request)) {
+ bool send = request->opcode == IBV_WR_SEND ||
+ request->opcode == IBV_WR_SEND_WITH_IMM;
+ unsigned int index =
+ send ? request->wr.ru.addr_idx : request->wr.ru_rdma.addr_idx;
+
+ lookup_error = cxi_resolve_addr(to_cxi_qp(qp)->job, index,
+ &prepared[ready].address);
+ if (lookup_error) {
+ lookup_failed = request;
+ break;
+ }
+ if (send)
+ copy->wr.ru.ah = &prepared[ready].address.ah_ex;
+ else
+ copy->wr.ru_rdma.ah = &prepared[ready].address.ah_ex;
+ }
+ if (ready)
+ prepared[ready - 1].request.next = copy;
+ ready++;
+ }
+ ret = ready ? cxi_post_send_resolved(qp, &prepared[0].request, &failed) : 0;
+ if (ret && bad_wr) {
+ for (size_t index = 0; index < ready; index++)
+ if (failed == &prepared[index].request) {
+ *bad_wr = prepared[index].original;
+ break;
+ }
+ } else if (!ret && lookup_error) {
+ ret = lookup_error;
+ if (bad_wr)
+ *bad_wr = lookup_failed;
+ }
+ free(prepared);
+ return ret;
+}
+
+int cxi_post_recv64(struct ibv_qp *qp, struct ibv_recv_wr64 *wr, struct ibv_recv_wr64 **bad_wr)
+{
+ struct cxi_context *ctx = to_cxi_ctx(qp->context);
+
+ for (; wr; wr = wr->next) {
+ struct ibv_recv_wr converted = {
+ .wr_id = wr->wr_id,
+ .num_sge = 1,
+ };
+ struct ibv_recv_wr *failed;
+ struct ibv_sge narrow;
+ int ret;
+
+ if (wr->num_sge != 1 || !wr->sg_list) {
+ *bad_wr = wr;
+ return EINVAL;
+ }
+ ret = cxi_sge64_to_sge(ctx, qp->pd, wr->sg_list, &narrow);
+ if (!ret) {
+ converted.sg_list = &narrow;
+ ret = cxi_post_recv(qp, &converted, &failed);
+ }
+ if (ret) {
+ *bad_wr = wr;
+ return ret;
+ }
+ }
+ return 0;
+}
+
+int cxi_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr, struct ibv_recv_wr **bad_wr)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ int ret = 0;
+
+ pthread_spin_lock(&cxi_qp->rq_lock);
+
+ for (; wr; wr = wr->next) {
+ union c_cmdu cmd = {};
+ uint64_t iova;
+ uint8_t lac;
+
+ if (!wr->num_sge || !wr->sg_list || cxi_qp->pte_index < 0 ||
+ cxi_qp->recv_count == cxi_qp->rq_size) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ /* A list entry describes one buffer. */
+ if (wr->num_sge > 1) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ if (!cxi_sge_resolve(to_cxi_ctx(qp->context), &wr->sg_list[0], &iova, &lac)) {
+ ret = EINVAL;
+ *bad_wr = wr;
+ break;
+ }
+
+ cxi_le_recv(&cmd, (uint16_t)cxi_qp->pte_index, lac, iova, wr->sg_list[0].length);
+ ret = -cxi_le_set_vni(&cmd, 0, cxi_qp->job_id);
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+
+ ret = cxi_cq_emit_target(&cxi_qp->hw_tgq, &cmd);
+ if (ret) {
+ *bad_wr = wr;
+ break;
+ }
+
+ cxi_qp->recv_wrids[cxi_qp->recv_tail] = wr->wr_id;
+ cxi_qp->recv_tail = (cxi_qp->recv_tail + 1) % cxi_qp->rq_size;
+ cxi_qp->recv_count++;
+ }
+
+ if (!ret)
+ cxi_cq_ring(&cxi_qp->hw_tgq);
+
+ pthread_spin_unlock(&cxi_qp->rq_lock);
+ return ret < 0 ? -ret : ret;
+}
+
+/*
+ * Expose a region to remote operations on this QP by giving it a list entry
+ * of its own, matched on the region's rkey. Nothing else makes a registered
+ * region reachable: registration only builds the ATU mapping.
+ */
+int cxi_attach_mr(struct ibv_qp *qp, struct ibv_mr *ibmr)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ struct cxi_mr *mr = to_cxi_mr(ibmr);
+ union c_cmdu cmd = {};
+ int ret;
+
+ if (qp->pd != ibmr->pd)
+ return EINVAL;
+ if (cxi_qp->pte_index < 0)
+ return EINVAL;
+
+ cxi_le_region(&cmd, (uint16_t)cxi_qp->pte_index, mr->lkey64, mr->rkey64, mr->iova, mr->len);
+ ret = -cxi_le_set_vni(&cmd, mr->rkey64, cxi_qp->job_id);
+ if (ret)
+ return ret;
+
+ pthread_spin_lock(&cxi_qp->rq_lock);
+ ret = cxi_cq_emit_target(&cxi_qp->hw_tgq, &cmd);
+ if (!ret)
+ cxi_cq_ring(&cxi_qp->hw_tgq);
+ pthread_spin_unlock(&cxi_qp->rq_lock);
+
+ return ret ? -ret : 0;
+}
+
+int cxi_detach_mr(struct ibv_qp *qp, struct ibv_mr *ibmr)
+{
+ struct cxi_qp *cxi_qp = to_cxi_qp(qp);
+ struct cxi_mr *mr = to_cxi_mr(ibmr);
+ union c_cmdu cmd = {};
+ int ret;
+
+ if (cxi_qp->pte_index < 0)
+ return EINVAL;
+
+ cxi_le_region_unlink(&cmd, (uint16_t)cxi_qp->pte_index, mr->rkey64);
+
+ pthread_spin_lock(&cxi_qp->rq_lock);
+ ret = cxi_cq_emit_target(&cxi_qp->hw_tgq, &cmd);
+ if (!ret)
+ cxi_cq_ring(&cxi_qp->hw_tgq);
+ pthread_spin_unlock(&cxi_qp->rq_lock);
+
+ return ret ? -ret : 0;
+}
+
+/*
+ * A Slingshot GID carries the 20-bit NID and nothing else, so a GID with any
+ * bit outside CXI_IBV_NID_MASK names a node this device cannot reach. Reject
+ * it here rather than truncating it into a different node's address.
+ */
+static int cxi_gid_to_nid(const union ibv_gid *gid, uint32_t *nid)
+{
+ uint64_t id = be64toh(gid->global.interface_id);
+
+ if (gid->global.subnet_prefix || (id & ~CXI_IBV_NID_MASK)) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ *nid = (uint32_t)id;
+ return 0;
+}
+
+static int cxi_resolve_addr(struct ibv_job *job, unsigned int addr_idx, struct cxi_ah *address)
+{
+ struct ibv_ah_attr_ex attr = {};
+ int ret;
+
+ if (!job)
+ return EINVAL;
+ ret = ibv_query_addr(job, addr_idx, &attr);
+ if (ret)
+ return ret;
+ if (cxi_gid_to_nid(&attr.ah_attr.grh.dgid, &address->nid))
+ return errno;
+ address->ah_ex.remote_qpn = attr.remote_qpn;
+ return 0;
+}
+
+struct ibv_ah *cxi_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)
+{
+ struct ib_uverbs_create_ah_resp resp;
+ struct cxi_ah *ah;
+
+ ah = calloc(1, sizeof(*ah));
+ if (!ah)
+ return NULL;
+
+ if (ibv_cmd_create_ah(pd, &ah->ah_ex.ah_base, attr, &resp, sizeof(resp))) {
+ free(ah);
+ return NULL;
+ }
+
+ if (cxi_gid_to_nid(&attr->grh.dgid, &ah->nid)) {
+ ibv_cmd_destroy_ah(&ah->ah_ex.ah_base);
+ free(ah);
+ return NULL;
+ }
+
+ return &ah->ah_ex.ah_base;
+}
+
+struct ibv_ah *cxi_create_ah_ex(struct ibv_pd *pd, struct ibv_ah_attr_ex *attr)
+{
+ struct ib_uverbs_create_ah_resp resp;
+ struct cxi_ah *ah;
+
+ ah = calloc(1, sizeof(*ah));
+ if (!ah)
+ return NULL;
+
+ if (ibv_cmd_create_ah(pd, &ah->ah_ex.ah_base, &attr->ah_attr, &resp, sizeof(resp))) {
+ free(ah);
+ return NULL;
+ }
+
+ if (cxi_gid_to_nid(&attr->ah_attr.grh.dgid, &ah->nid)) {
+ ibv_cmd_destroy_ah(&ah->ah_ex.ah_base);
+ free(ah);
+ return NULL;
+ }
+ ah->ah_ex.remote_qpn = attr->remote_qpn;
+
+ return &ah->ah_ex.ah_base;
+}
+
+int cxi_destroy_ah(struct ibv_ah *ah)
+{
+ struct cxi_ah *cxi_ah = to_cxi_ah(ah);
+ int ret;
+
+ ret = ibv_cmd_destroy_ah(ah);
+ if (!ret)
+ free(cxi_ah);
+
+ return ret;
+}
+
+struct ibv_counters *cxi_create_counters(struct ibv_context *context,
+ struct ibv_counters_init_attr *init_attr)
+{
+ struct verbs_counters *vcounters;
+ int ret;
+
+ vcounters = calloc(1, sizeof(*vcounters));
+ if (!vcounters) {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ ret = ibv_cmd_create_counters(context, init_attr, vcounters, NULL);
+ if (ret) {
+ free(vcounters);
+ errno = ret;
+ return NULL;
+ }
+
+ return &vcounters->counters;
+}
+
+int cxi_destroy_counters(struct ibv_counters *counters)
+{
+ struct verbs_counters *vcounters = container_of(counters, struct verbs_counters, counters);
+ int ret;
+
+ ret = ibv_cmd_destroy_counters(vcounters);
+ if (ret)
+ return ret;
+
+ free(vcounters);
+ return 0;
+}
+
+int cxi_read_counters_ex(struct ibv_counters *counters, const uint64_t *items,
+ uint64_t *counters_value, uint64_t *timestamps, uint32_t ncounters,
+ uint32_t flags)
+{
+ struct verbs_counters *vcounters = container_of(counters, struct verbs_counters, counters);
+
+ return ibv_cmd_read_counters_ex(vcounters, items, counters_value, timestamps, ncounters,
+ flags, NULL);
+}
diff --git a/pyverbs/libibverbs_enums.pxd b/pyverbs/libibverbs_enums.pxd
index c4f82a419399..b96c4aa283f1 100644
--- a/pyverbs/libibverbs_enums.pxd
+++ b/pyverbs/libibverbs_enums.pxd
@@ -472,6 +472,7 @@ cdef extern from '<infiniband/verbs.h>':
cpdef enum ibv_qp_create_send_ops_flags:
IBV_QP_EX_WITH_RDMA_WRITE
IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM
+ IBV_QP_EX_WITH_RDMA_WRITE64_WITH_IMM
IBV_QP_EX_WITH_SEND
IBV_QP_EX_WITH_SEND_WITH_IMM
IBV_QP_EX_WITH_RDMA_READ
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 09/12] cxiverbs: cover identity isolation and polling and event traffic
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (7 preceding siblings ...)
2026-10-31 19:26 ` [PATCH 08/12] cxiverbs: implement UET verbs with explicit native ownership Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 10/12] cxiverbs: launch Slurm-style exact VNI TC and resource grants Doug Ledford
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Add cxi_le_test, a test for the provider. Run with no arguments it
exercises the list entry and key model and needs no hardware. With
--resources DEVICE it drives a real device (service, LNI, PID, QP,
job and key lifecycle, VNI isolation, send/receive data and
completions) and with --csr DEVICE the privileged CSR mapping. The
hardware modes require root and an idle device.
Setting CXI_TEST_WRONG_VNI in the environment adds a negative pass
in which a receive posted under one job must not match traffic from
another.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/tests/cxi_le_test.c | 2014 +++++++++++++++++++++++++++++++++++++
tests/base.py | 47 +
tests/ru_base.py | 33 +-
tests/test_addr.py | 4 +-
tests/test_device.py | 12 +-
tests/test_dmah.py | 70 +-
tests/test_mr.py | 8 +-
tests/test_qp.py | 7 +-
tests/test_ru.py | 136 ++-
9 files changed, 2197 insertions(+), 134 deletions(-)
diff --git a/providers/cxi/tests/cxi_le_test.c b/providers/cxi/tests/cxi_le_test.c
new file mode 100644
index 000000000000..5903f18b50ba
--- /dev/null
+++ b/providers/cxi/tests/cxi_le_test.c
@@ -0,0 +1,2014 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/*
+ * Copyright 2026 Hewlett Packard Enterprise Development LP
+ *
+ * List-entry encoding for RU QPs. No hardware needed: entries are checked
+ * field by field and against a model of how a matching PTE selects them.
+ */
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <ccan/array_size.h>
+
+#include "../cxi.h"
+#include "../cxi_le.h"
+#include "../cxidv.h"
+#include "../cxidv_telem.h"
+
+static int test_destroy_qp_command(struct ibv_qp *qp);
+#define ibv_cmd_destroy_qp test_destroy_qp_command
+#include "../verbs.c"
+#undef ibv_cmd_destroy_qp
+
+bool is_cxi_dev(struct ibv_device *device)
+{
+ const struct verbs_device *provider = verbs_get_device(device);
+
+ return provider->ops->name && !strcmp(provider->ops->name, "cxiverbs");
+}
+
+static bool fail_destroy_qp_command;
+
+static int test_destroy_qp_command(struct ibv_qp *qp)
+{
+ return fail_destroy_qp_command ? EBUSY : ibv_cmd_destroy_qp(qp);
+}
+
+static int failed_tests;
+
+#define EXPECT_EQ(expected, actual) \
+ ({ \
+ unsigned long long _e = (unsigned long long)(expected); \
+ unsigned long long _a = (unsigned long long)(actual); \
+ if (_e != _a) { \
+ printf(" FAIL at line %d: %s != %s (0x%llx != 0x%llx)\n", __LINE__, \
+ #expected, #actual, _e, _a); \
+ failed_tests++; \
+ } \
+ })
+
+#define EXPECT_TRUE(actual) EXPECT_EQ(1, !!(actual))
+#define EXPECT_FALSE(actual) EXPECT_EQ(0, !!(actual))
+
+static void correctness_result(const char *name, int before)
+{
+ printf("%s correctness: %s\n", failed_tests == before ? "PASS" : "FAIL", name);
+}
+
+struct address_test {
+ struct cxi_context context;
+ struct cxi_qp qp;
+ struct cxi_ibv_cq cq;
+ struct ibv_job job;
+ pthread_mutex_t lock;
+ struct ibv_ah_attr_ex address;
+ unsigned int capacity;
+ unsigned int queries;
+ unsigned int failures;
+ unsigned int submitted;
+ bool present;
+ bool check_lock;
+};
+
+static struct ibv_job *mock_alloc_job(struct ibv_context *context, struct ibv_job_attr *attr,
+ void *user_context)
+{
+ struct address_test *test =
+ container_of(context, struct address_test, context.verbs_ctx.context);
+
+ (void)user_context;
+ test->capacity =
+ attr->comp_mask & IBV_JOB_ATTR_MAX_ADDR_ENTRIES ? attr->max_addr_entries : 0;
+ return &test->job;
+}
+
+static int mock_query_addr(struct ibv_job *job, unsigned int index, struct ibv_ah_attr_ex *address)
+{
+ struct address_test *test = container_of(job, struct address_test, job);
+ int ret = 0;
+
+ if (test->check_lock) {
+ ret = pthread_spin_trylock(&test->qp.sq_lock);
+ if (ret)
+ return EDEADLK;
+ pthread_spin_unlock(&test->qp.sq_lock);
+ }
+ pthread_mutex_lock(&test->lock);
+ test->queries++;
+ if (index >= test->capacity)
+ ret = EINVAL;
+ else if (!test->present)
+ ret = ENOENT;
+ else
+ *address = test->address;
+ pthread_mutex_unlock(&test->lock);
+ return ret;
+}
+
+static int mock_insert_addr(struct ibv_job *job, struct ibv_ah_attr_ex *address, unsigned int index)
+{
+ struct address_test *test = container_of(job, struct address_test, job);
+ int ret = 0;
+
+ pthread_mutex_lock(&test->lock);
+ if (index >= test->capacity) {
+ ret = EINVAL;
+ } else if (test->present) {
+ ret = EBUSY;
+ } else {
+ test->address = *address;
+ test->present = true;
+ }
+ pthread_mutex_unlock(&test->lock);
+ return ret;
+}
+
+static int mock_remove_addr(struct ibv_job *job, unsigned int index)
+{
+ struct address_test *test = container_of(job, struct address_test, job);
+ int ret = 0;
+
+ pthread_mutex_lock(&test->lock);
+ if (index >= test->capacity)
+ ret = EINVAL;
+ else if (!test->present)
+ ret = ENOENT;
+ else
+ test->present = false;
+ pthread_mutex_unlock(&test->lock);
+ return ret;
+}
+
+static void *mock_update_addresses(void *opaque)
+{
+ struct address_test *test = opaque;
+
+ for (unsigned int index = 0; index < 1000; index++) {
+ pthread_mutex_lock(&test->lock);
+ test->present = index & 1;
+ test->address.remote_qpn = index;
+ pthread_mutex_unlock(&test->lock);
+ }
+ return NULL;
+}
+
+static void *mock_submit_indexed(void *opaque)
+{
+ struct address_test *test = opaque;
+ unsigned int failures = 0;
+ unsigned int submitted = 0;
+
+ for (unsigned int index = 0; index < 1000; index++) {
+ struct ibv_send_wr request = {
+ .opcode = IBV_WR_SEND,
+ };
+ struct ibv_sge sge = { .addr = 0x1000, .length = 64, .lkey = 1 };
+ struct ibv_send_wr *bad = NULL;
+ int ret;
+
+ request.sg_list = &sge;
+ request.num_sge = 1;
+ if (index & 1) {
+ struct ibv_qp_ex *extended = &test->qp.vqp.qp_ex;
+
+ cxi_wr_start(extended);
+ cxi_wr_send(extended);
+ cxi_wr_set_ru_addr(extended, NULL, 0);
+ cxi_wr_set_sge32(extended, 1, 0x1000, 64);
+ ret = cxi_wr_complete(extended);
+ } else {
+ ret = cxi_post_send(&test->qp.vqp.qp, &request, &bad);
+ }
+ if (!ret)
+ submitted++;
+ else if ((ret != ENOENT && ret != ENOSPC) || (!(index & 1) && bad != &request))
+ failures++;
+ }
+ pthread_mutex_lock(&test->lock);
+ test->failures += failures;
+ test->submitted += submitted;
+ pthread_mutex_unlock(&test->lock);
+ return NULL;
+}
+
+static void cxi_test_clear_cookie(void *buffer, size_t bytes_size, uint64_t cookie)
+{
+ uint8_t *bytes = buffer;
+
+ for (size_t offset = 0; offset + sizeof(cookie) <= bytes_size; offset += sizeof(cookie)) {
+ uint64_t value;
+
+ memcpy(&value, bytes + offset, sizeof(value));
+ if (value == cookie) {
+ memset(bytes + offset, 0, sizeof(cookie));
+ return;
+ }
+ }
+
+ EXPECT_TRUE(false);
+}
+
+static void test_address_command_equivalence(struct address_test *test)
+{
+ struct cxi_cmd64 commands[32] = {}, explicit_commands[32];
+ uint64_t doorbell = 0, wrids[8], cookies[8];
+ uint32_t job_ids[8];
+ uint8_t opcodes[8];
+ bool slot_valid[8] = {};
+ struct cxi_mr mr = {
+ .va = 0x1000,
+ .iova = 0x1000,
+ .len = 64,
+ };
+ struct ibv_sge sge = { .addr = 0x1000, .length = 64, .lkey = 1 };
+ struct ibv_qp_ex *extended = &test->qp.vqp.qp_ex;
+ const enum ibv_wr_opcode operations[] = {
+ IBV_WR_SEND,
+ IBV_WR_RDMA_WRITE,
+ IBV_WR_RDMA_READ,
+ };
+ struct cxi_ah address = { .ah_ex.remote_qpn = 1 };
+
+ mr.vmr.ibv_mr.lkey = 1;
+ test->context.mr_list = &mr;
+ pthread_spin_init(&test->context.mr_list_lock, PTHREAD_PROCESS_PRIVATE);
+ test->qp.sq_size = ARRAY_SIZE(wrids);
+ test->qp.send_wrids = wrids;
+ test->qp.send_opcodes = opcodes;
+ test->qp.send_job_ids = job_ids;
+ test->qp.send_cookies = cookies;
+ test->qp.send_slot_valid = slot_valid;
+ test->context.pid_bits = C_DFA_PID_BITS_MAX;
+ test->address.remote_qpn = 1;
+
+ for (size_t operation = 0; operation < ARRAY_SIZE(operations); operation++) {
+ for (unsigned int api = 0; api < 2; api++) {
+ for (unsigned int indexed = 0; indexed < 2; indexed++) {
+ struct ibv_send_wr request = {
+ .opcode = operations[operation],
+ .sg_list = &sge,
+ .num_sge = 1,
+ };
+ struct ibv_send_wr *bad = NULL;
+
+ memset(commands, 0, sizeof(commands));
+ cxi_cq_init(&test->qp.hw_txq, commands, ARRAY_SIZE(commands),
+ &doorbell, 0);
+ test->qp.send_count = 0;
+ test->qp.send_tail = 0;
+ memset(cookies, 0, sizeof(cookies));
+ memset(slot_valid, 0, sizeof(slot_valid));
+ if (!api) {
+ if (operations[operation] == IBV_WR_SEND) {
+ request.wr.ru.ah = indexed ? NULL : &address.ah_ex;
+ request.wr.ru.addr_idx = 1;
+ } else {
+ request.wr.ru_rdma.ah =
+ indexed ? NULL : &address.ah_ex;
+ request.wr.ru_rdma.addr_idx = 1;
+ request.wr.ru_rdma.rkey64 = 1;
+ request.wr.ru_rdma.remote_addr = 0x2000;
+ }
+ EXPECT_EQ(0,
+ cxi_post_send(&test->qp.vqp.qp, &request, &bad));
+ } else {
+ cxi_wr_start(extended);
+ if (operations[operation] == IBV_WR_SEND)
+ cxi_wr_send(extended);
+ else if (operations[operation] == IBV_WR_RDMA_WRITE)
+ cxi_wr_rdma_write64(extended, 1, 0x2000);
+ else
+ cxi_wr_rdma_read64(extended, 1, 0x2000);
+ cxi_wr_set_ru_addr(extended,
+ indexed ? NULL : &address.ah_ex, 1);
+ cxi_wr_set_sge32(extended, 1, 0x1000, 64);
+ EXPECT_EQ(0, cxi_wr_complete(extended));
+ }
+ EXPECT_EQ(1, test->qp.send_count);
+ {
+ uint64_t cookie = test->qp.send_cookies[0];
+
+ cxi_test_clear_cookie(commands, sizeof(commands), cookie);
+ }
+ if (!indexed)
+ memcpy(explicit_commands, commands, sizeof(commands));
+ else
+ EXPECT_EQ(0, memcmp(explicit_commands, commands,
+ sizeof(commands)));
+ }
+ }
+ }
+ test->qp.sq_size = 0;
+ test->qp.send_count = 0;
+ test->qp.send_tail = 0;
+ test->context.mr_list = NULL;
+ pthread_spin_destroy(&test->context.mr_list_lock);
+}
+
+static void test_indexed_submission_locking(void)
+{
+ struct address_test test = {};
+ struct cxi_cmd64 *commands = calloc(4096, sizeof(*commands));
+ uint64_t doorbell = 0;
+ struct cxi_mr mr = { .va = 0x1000, .iova = 0x1000, .len = 64 };
+ uint64_t *wrids = calloc(2048, sizeof(*wrids));
+ uint64_t *cookies = calloc(2048, sizeof(*cookies));
+ uint32_t *job_ids = calloc(2048, sizeof(*job_ids));
+ uint8_t *opcodes = calloc(2048, sizeof(*opcodes));
+ bool *slot_valid = calloc(2048, sizeof(*slot_valid));
+ struct ibv_context *context = &test.context.verbs_ctx.context;
+ struct ibv_job_attr attr = {};
+ struct ibv_ah_attr_ex table_address = { .remote_qpn = 1 };
+ struct ibv_ah_attr_ex queried_address = {};
+ struct ibv_send_wr request = { .opcode = IBV_WR_SEND };
+ struct ibv_send_wr *bad = NULL;
+ struct ibv_qp_ex *extended = &test.qp.vqp.qp_ex;
+ struct cxi_ah explicit = {};
+ pthread_t updater, submitters[2];
+ unsigned int queries;
+ int before = failed_tests;
+ int ret;
+
+ EXPECT_TRUE(commands && wrids && cookies && job_ids && opcodes && slot_valid);
+ if (!commands || !wrids || !cookies || !job_ids || !opcodes || !slot_valid) {
+ free(commands);
+ free(wrids);
+ free(cookies);
+ free(job_ids);
+ free(opcodes);
+ free(slot_valid);
+ return;
+ }
+ test.context.verbs_ctx.sz = sizeof(test.context.verbs_ctx);
+ context->abi_compat = __VERBS_ABI_IS_EXTENDED;
+ test.context.verbs_ctx.alloc_job = mock_alloc_job;
+ test.context.verbs_ctx.insert_addr = mock_insert_addr;
+ test.context.verbs_ctx.remove_addr = mock_remove_addr;
+ test.context.verbs_ctx.query_addr = mock_query_addr;
+ test.qp.vqp.qp.context = context;
+ test.qp.vqp.qp.send_cq = &test.cq.verbs_cq.cq;
+ test.qp.job = &test.job;
+ test.qp.qp_slot = 0;
+ test.qp.send_cookies = cookies;
+ test.qp.send_slot_valid = slot_valid;
+ test.job.context = context;
+ atomic_init(&test.context.send_cookie_seq, 0);
+ test.check_lock = true;
+ pthread_mutex_init(&test.lock, NULL);
+ pthread_mutex_init(&test.qp.builder_lock, NULL);
+ pthread_spin_init(&test.qp.sq_lock, PTHREAD_PROCESS_PRIVATE);
+
+ EXPECT_TRUE(ibv_alloc_job(context, &attr, NULL) == &test.job);
+ EXPECT_EQ(0, test.capacity);
+ EXPECT_EQ(EINVAL, ibv_insert_addr(&test.job, &table_address, 0));
+ EXPECT_EQ(EINVAL, ibv_query_addr(&test.job, 0, &queried_address));
+ EXPECT_EQ(EINVAL, ibv_remove_addr(&test.job, 0));
+ attr.comp_mask = IBV_JOB_ATTR_MAX_ADDR_ENTRIES;
+ EXPECT_TRUE(ibv_alloc_job(context, &attr, NULL) == &test.job);
+ EXPECT_EQ(0, test.capacity);
+ attr.max_addr_entries = 2;
+ EXPECT_TRUE(ibv_alloc_job(context, &attr, NULL) == &test.job);
+ EXPECT_EQ(2, test.capacity);
+ EXPECT_EQ(ENOENT, ibv_query_addr(&test.job, 0, &queried_address));
+ EXPECT_EQ(ENOENT, ibv_remove_addr(&test.job, 0));
+ EXPECT_EQ(0, ibv_insert_addr(&test.job, &table_address, 0));
+ EXPECT_EQ(EBUSY, ibv_insert_addr(&test.job, &table_address, 0));
+ EXPECT_EQ(0, ibv_query_addr(&test.job, 0, &queried_address));
+ EXPECT_EQ(table_address.remote_qpn, queried_address.remote_qpn);
+ EXPECT_EQ(EINVAL, ibv_insert_addr(&test.job, &table_address, 2));
+ EXPECT_EQ(EINVAL, ibv_query_addr(&test.job, UINT_MAX, &queried_address));
+ EXPECT_EQ(EINVAL, ibv_remove_addr(&test.job, 2));
+ EXPECT_EQ(0, ibv_remove_addr(&test.job, 0));
+ EXPECT_EQ(ENOENT, ibv_query_addr(&test.job, 0, &queried_address));
+
+ EXPECT_EQ(ENOENT, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ EXPECT_TRUE(bad == &request);
+ test.present = true;
+ EXPECT_EQ(ENOSPC, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ request.wr.ru.addr_idx = 2;
+ EXPECT_EQ(EINVAL, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ request.wr.ru.addr_idx = 1;
+ request.opcode = IBV_WR_RDMA_WRITE;
+ EXPECT_EQ(ENOSPC, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ request.opcode = IBV_WR_RDMA_READ;
+ EXPECT_EQ(ENOSPC, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ queries = test.queries;
+ request.opcode = IBV_WR_SEND;
+ request.wr.ru.ah = &explicit.ah_ex;
+ EXPECT_EQ(ENOSPC, cxi_post_send(&test.qp.vqp.qp, &request, &bad));
+ EXPECT_EQ(queries, test.queries);
+
+ cxi_wr_start(extended);
+ cxi_wr_send(extended);
+ cxi_wr_set_ru_addr(extended, NULL, 1);
+ EXPECT_EQ(0, test.qp.wr_build.err);
+ EXPECT_EQ(0, pthread_spin_trylock(&test.qp.sq_lock));
+ pthread_spin_unlock(&test.qp.sq_lock);
+ cxi_wr_send(extended);
+ EXPECT_EQ(1, test.qp.pending_count);
+ cxi_wr_abort(extended);
+ EXPECT_EQ(0, test.qp.pending_count);
+ EXPECT_EQ(0, test.qp.send_count);
+ cxi_wr_start(extended);
+ cxi_wr_rdma_read64(extended, 1, 0);
+ cxi_wr_set_ru_addr(extended, NULL, 1);
+ EXPECT_EQ(0, test.qp.wr_build.err);
+ EXPECT_EQ(ENOSPC, cxi_wr_complete(extended));
+ EXPECT_EQ(0, test.qp.send_count);
+ cxi_wr_start(extended);
+ cxi_wr_send(extended);
+ cxi_wr_set_ru_addr(extended, NULL, 2);
+ EXPECT_EQ(EINVAL, cxi_wr_complete(extended));
+
+ test_address_command_equivalence(&test);
+ memset(slot_valid, 0, 2048 * sizeof(*slot_valid));
+ mr.vmr.ibv_mr.lkey = 1;
+ test.context.mr_list = &mr;
+ pthread_spin_init(&test.context.mr_list_lock, PTHREAD_PROCESS_PRIVATE);
+ test.qp.sq_size = 2048;
+ test.qp.send_wrids = wrids;
+ test.qp.send_job_ids = job_ids;
+ test.qp.send_opcodes = opcodes;
+ test.qp.send_cookies = cookies;
+ test.qp.send_slot_valid = slot_valid;
+ cxi_cq_init(&test.qp.hw_txq, commands, 4096, &doorbell, 0);
+ test.check_lock = false;
+ ret = pthread_create(&updater, NULL, mock_update_addresses, &test);
+ EXPECT_EQ(0, ret);
+ if (!ret) {
+ for (size_t index = 0; index < ARRAY_SIZE(submitters); index++) {
+ ret = pthread_create(&submitters[index], NULL, mock_submit_indexed, &test);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ for (size_t previous = 0; previous < index; previous++)
+ pthread_join(submitters[previous], NULL);
+ break;
+ }
+ if (index + 1 == ARRAY_SIZE(submitters))
+ for (size_t thread = 0; thread < ARRAY_SIZE(submitters); thread++)
+ pthread_join(submitters[thread], NULL);
+ }
+ pthread_join(updater, NULL);
+ }
+ EXPECT_EQ(0, test.failures);
+ EXPECT_EQ(test.submitted, test.qp.send_count);
+ pthread_spin_destroy(&test.context.mr_list_lock);
+ free(test.qp.pending_wrs);
+ free(commands);
+ free(wrids);
+ free(cookies);
+ free(job_ids);
+ free(opcodes);
+ free(slot_valid);
+ pthread_spin_destroy(&test.qp.sq_lock);
+ pthread_mutex_destroy(&test.qp.builder_lock);
+ pthread_mutex_destroy(&test.lock);
+ correctness_result("indexed-submission-locking", before);
+}
+
+static void set_test_initiator_event(struct cxi_eq *eq, unsigned int index,
+ uint8_t event_type, uint64_t user_ptr)
+{
+ struct c_event_initiator_short *event =
+ (void *)(eq->events + C_EE_CFG_ECB_SIZE + index * sizeof(*event));
+
+ *event = (struct c_event_initiator_short){
+ .user_ptr = user_ptr,
+ .mlength = 64,
+ .event_size = C_EVENT_SIZE_16_BYTE,
+ .event_type = event_type,
+ .return_code = C_RC_OK,
+ };
+}
+
+static void test_out_of_order_send_completions(void)
+{
+ struct cxi_context context = {};
+ struct cxi_qp qp = {};
+ struct cxi_qp *cookie_qp;
+ struct cxi_ibv_cq cq = {};
+ struct cxi_eq eq = {
+ .byte_size = 256,
+ .rd_offset = C_EE_CFG_ECB_SIZE,
+ .prev_rd_offset = C_EE_CFG_ECB_SIZE,
+ };
+ union {
+ uint64_t alignment;
+ uint8_t bytes[256];
+ } event_buffer = {};
+ uint64_t wrids[] = { 100, 101, 102 };
+ uint64_t cookies[ARRAY_SIZE(wrids)] = {};
+ uint32_t job_ids[] = { 10, 11, 12 };
+ uint8_t opcodes[] = { IBV_WR_SEND, IBV_WR_RDMA_WRITE, IBV_WR_RDMA_READ };
+ bool slot_valid[] = { true, true, true };
+ struct ibv_wc wc = {};
+ uint64_t eq_state = 0;
+ uint64_t stale_cookie = 0;
+ uint64_t replacement_cookie = 0;
+ uint32_t free_slot = 2;
+ uint32_t cookie_slot = UINT32_MAX;
+ int before = failed_tests;
+ int ret;
+
+ eq.events = event_buffer.bytes;
+ eq.sw_state_addr = &eq_state;
+ cq.hw_eq = eq;
+ context.qp_slots[0] = &qp;
+ context.qp_by_pte[0] = &qp;
+ context.qp_count = 1;
+ qp.qp_slot = 0;
+ qp.pte_index = 1;
+ qp.vqp.qp.context = &context.verbs_ctx.context;
+ qp.vqp.qp.qp_num = 0x1234;
+ qp.send_cq = &cq;
+ qp.send_wrids = wrids;
+ qp.send_opcodes = opcodes;
+ qp.send_job_ids = job_ids;
+ qp.send_cookies = cookies;
+ qp.send_slot_valid = slot_valid;
+ qp.sq_size = ARRAY_SIZE(wrids);
+ qp.send_count = ARRAY_SIZE(wrids);
+ qp.job_id = 10;
+ cq.verbs_cq.cq.context = &context.verbs_ctx.context;
+
+ EXPECT_EQ(0, pthread_spin_init(&context.qp_table_lock, PTHREAD_PROCESS_PRIVATE));
+ EXPECT_EQ(0, pthread_spin_init(&qp.sq_lock, PTHREAD_PROCESS_PRIVATE));
+ EXPECT_EQ(0, pthread_spin_init(&cq.lock, PTHREAD_PROCESS_PRIVATE));
+ atomic_init(&context.send_cookie_seq, 0);
+ for (uint32_t slot = 0; slot < ARRAY_SIZE(wrids); slot++)
+ EXPECT_EQ(0, cxi_sq_make_cookie(&qp, slot, &cookies[slot]));
+ stale_cookie = cookies[2];
+ cookie_qp = cxi_sq_cookie_qp(&context, cookies[2], &cookie_slot);
+ EXPECT_EQ((uintptr_t)&qp, (uintptr_t)cookie_qp);
+ EXPECT_EQ(2, cookie_slot);
+ set_test_initiator_event(&cq.hw_eq, 0, C_EVENT_ACK, 0);
+ set_test_initiator_event(&cq.hw_eq, 1, C_EVENT_ACK, cookies[2]);
+ set_test_initiator_event(&cq.hw_eq, 2, C_EVENT_SEND, cookies[0]);
+ set_test_initiator_event(&cq.hw_eq, 3, C_EVENT_REPLY, cookies[1]);
+
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(1, ret);
+ EXPECT_EQ(102, wc.wr_id);
+ EXPECT_EQ(IBV_WC_RDMA_READ, wc.opcode);
+ EXPECT_EQ(IBV_WC_SUCCESS, wc.status);
+ EXPECT_EQ(0x1234, wc.qp_num);
+ EXPECT_EQ(12, cq.cur_job_id);
+ EXPECT_EQ(2, qp.send_count);
+ EXPECT_FALSE(slot_valid[2]);
+ EXPECT_TRUE(cxi_sq_find_free_slot(&qp, &free_slot));
+ EXPECT_EQ(2, free_slot);
+
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(1, ret);
+ EXPECT_EQ(100, wc.wr_id);
+ EXPECT_EQ(IBV_WC_SEND, wc.opcode);
+ EXPECT_EQ(10, cq.cur_job_id);
+ EXPECT_EQ(1, qp.send_count);
+
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(1, ret);
+ EXPECT_EQ(101, wc.wr_id);
+ EXPECT_EQ(IBV_WC_RDMA_WRITE, wc.opcode);
+ EXPECT_EQ(11, cq.cur_job_id);
+ EXPECT_EQ(0, qp.send_count);
+ EXPECT_FALSE(slot_valid[0]);
+ EXPECT_FALSE(slot_valid[1]);
+
+ /* Reuse the out-of-order hole and verify its new completion metadata. */
+ EXPECT_EQ(0, cxi_sq_make_cookie(&qp, free_slot, &replacement_cookie));
+ cxi_sq_record_send(&qp, free_slot, replacement_cookie, 202, IBV_WR_SEND, 22);
+ set_test_initiator_event(&cq.hw_eq, 4, C_EVENT_ACK, stale_cookie);
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(0, ret);
+ EXPECT_EQ(1, qp.send_count);
+ EXPECT_TRUE(slot_valid[2]);
+
+ set_test_initiator_event(&cq.hw_eq, 5, C_EVENT_ACK, replacement_cookie);
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(1, ret);
+ EXPECT_EQ(202, wc.wr_id);
+ EXPECT_EQ(22, cq.cur_job_id);
+ EXPECT_EQ(0, qp.send_count);
+
+ /* A completion for a free slot is consumed, never returned as a WR ID. */
+ set_test_initiator_event(&cq.hw_eq, 6, C_EVENT_ACK, replacement_cookie);
+ ret = cxi_poll_cq(&cq.verbs_cq.cq, 1, &wc);
+ EXPECT_EQ(0, ret);
+ EXPECT_EQ(0, qp.send_count);
+
+ pthread_spin_destroy(&qp.sq_lock);
+ pthread_spin_destroy(&context.qp_table_lock);
+ pthread_spin_destroy(&cq.lock);
+ correctness_result("out-of-order-send-completions", before);
+}
+
+static void test_qp_lookup_indexes(void)
+{
+ struct cxi_context context = {};
+ struct cxi_qp qps[4] = {};
+ const int initial_ptes[] = { 20, 4, 11 };
+ int before = failed_tests;
+ int ret;
+
+ ret = pthread_spin_init(&context.qp_table_lock, PTHREAD_PROCESS_PRIVATE);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ return;
+
+ pthread_spin_lock(&context.qp_table_lock);
+ for (size_t index = 0; index < ARRAY_SIZE(initial_ptes); index++) {
+ qps[index].qp_slot = UINT32_MAX;
+ qps[index].pte_index = initial_ptes[index];
+ ret = cxi_qp_register_locked(&context, &qps[index]);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ goto out_unlock;
+ }
+ EXPECT_EQ(3, context.qp_count);
+ EXPECT_EQ((uintptr_t)&qps[1], (uintptr_t)context.qp_by_pte[0]);
+ EXPECT_EQ((uintptr_t)&qps[2], (uintptr_t)context.qp_by_pte[1]);
+ EXPECT_EQ((uintptr_t)&qps[0], (uintptr_t)context.qp_by_pte[2]);
+ EXPECT_EQ((uintptr_t)&qps[0], (uintptr_t)cxi_qp_find_pte_locked(&context, 20));
+ EXPECT_EQ((uintptr_t)&qps[1], (uintptr_t)cxi_qp_find_pte_locked(&context, 4));
+ EXPECT_EQ((uintptr_t)&qps[2], (uintptr_t)cxi_qp_find_pte_locked(&context, 11));
+ EXPECT_EQ(0, (uintptr_t)cxi_qp_find_pte_locked(&context, 12));
+
+ ret = cxi_qp_update_pte_locked(&context, &qps[1], 15);
+ EXPECT_EQ(0, ret);
+ EXPECT_EQ((uintptr_t)&qps[2], (uintptr_t)context.qp_by_pte[0]);
+ EXPECT_EQ((uintptr_t)&qps[1], (uintptr_t)context.qp_by_pte[1]);
+ EXPECT_EQ((uintptr_t)&qps[0], (uintptr_t)context.qp_by_pte[2]);
+ ret = cxi_qp_update_pte_locked(&context, &qps[1], 20);
+ EXPECT_EQ(EEXIST, ret);
+ EXPECT_EQ(15, qps[1].pte_index);
+ EXPECT_EQ((uintptr_t)&qps[1], (uintptr_t)cxi_qp_find_pte_locked(&context, 15));
+
+ cxi_qp_unregister_locked(&context, &qps[1]);
+ EXPECT_EQ(2, context.qp_count);
+ EXPECT_EQ(0, (uintptr_t)context.qp_slots[1]);
+ EXPECT_EQ(0, (uintptr_t)cxi_qp_find_pte_locked(&context, 15));
+ qps[3].qp_slot = UINT32_MAX;
+ qps[3].pte_index = 6;
+ ret = cxi_qp_register_locked(&context, &qps[3]);
+ EXPECT_EQ(0, ret);
+ EXPECT_EQ(1, qps[3].qp_slot);
+ EXPECT_EQ((uintptr_t)&qps[3], (uintptr_t)context.qp_slots[1]);
+ EXPECT_EQ((uintptr_t)&qps[3], (uintptr_t)context.qp_by_pte[0]);
+
+ cxi_qp_unregister_locked(&context, &qps[0]);
+ cxi_qp_unregister_locked(&context, &qps[2]);
+ cxi_qp_unregister_locked(&context, &qps[3]);
+ EXPECT_EQ(0, context.qp_count);
+
+out_unlock:
+ pthread_spin_unlock(&context.qp_table_lock);
+ pthread_spin_destroy(&context.qp_table_lock);
+ correctness_result("qp-lookup-indexes", before);
+}
+
+enum op { OP_PUT, OP_GET };
+
+/*
+ * How a matching PTE selects a priority-list entry: the incoming match bits
+ * must equal the entry's outside ignore_bits, the initiator must fall within
+ * the entry's match_id, where an all-ones PID or endpoint field is a
+ * wildcard, and the entry must permit the operation.
+ */
+static bool le_selects(const struct c_target_cmd *le, uint64_t match_bits, uint32_t initiator,
+ enum op op)
+{
+ const unsigned int bits = C_DFA_PID_BITS_MAX;
+ uint32_t le_pid = CXI_MATCH_ID_PID(bits, le->match_id);
+ uint32_t le_ep = CXI_MATCH_ID_EP(bits, le->match_id);
+
+ if ((match_bits ^ le->match_bits) & ~le->ignore_bits)
+ return false;
+ if (le_pid != C_PID_ANY && le_pid != CXI_MATCH_ID_PID(bits, initiator))
+ return false;
+ if (le_ep != C_RANK_ANY && le_ep != CXI_MATCH_ID_EP(bits, initiator))
+ return false;
+ return op == OP_GET ? le->op_get : le->op_put;
+}
+
+/* Includes the initiator a live two-node SEND actually carried. */
+static const uint32_t initiators[] = {
+ 0x00000000,
+ 0x00000001,
+ 0x36080000,
+ 0x00000807,
+ 0x00000836,
+ CXI_MATCH_ID(C_DFA_PID_BITS_MAX, 10, 0x807),
+ CXI_MATCH_ID(C_DFA_PID_BITS_MAX, 511, 0xfffff),
+ 0xffffffff,
+};
+
+#define NUM_INITIATORS ARRAY_SIZE(initiators)
+
+static const uint64_t rkeys[] = {
+ 0x1, 0x1234, 0xabcd0001, 0x00000001deadbeefULL, 0x8000000000000001ULL,
+};
+
+#define NUM_RKEYS ARRAY_SIZE(rkeys)
+
+static void test_model_enforces_match_id(void)
+{
+ union c_cmdu cmd;
+
+ /* A zeroed match_id admits only initiator 0; the model must say so. */
+ cxi_le_recv(&cmd, 10, 1, 0x1000, 4096);
+ cmd.target.match_id = 0;
+ EXPECT_FALSE(le_selects(&cmd.target, 0, 0x36080000, OP_PUT));
+}
+
+static void test_vni_key_encoding(void)
+{
+ union c_cmdu cmd;
+ uint64_t wire_key = 0;
+ const uint64_t keys[] = { 0, 1, 0xffffffffULL, CXI_LE_RKEY_MAX };
+
+ for (size_t index = 0; index < ARRAY_SIZE(keys); index++) {
+ cxi_le_recv(&cmd, 10, 1, 0x1000, 4096);
+ EXPECT_EQ(0, cxi_le_wire_key(keys[index], &wire_key));
+ EXPECT_EQ(keys[index], wire_key >> 16);
+ EXPECT_EQ(0, wire_key & CXI_LE_VNI_MASK);
+ EXPECT_EQ(0, cxi_le_set_vni(&cmd, keys[index], 0x7e01));
+ EXPECT_TRUE(le_selects(&cmd.target, wire_key | 0x7e01, 0, OP_PUT));
+ EXPECT_FALSE(le_selects(&cmd.target, wire_key | 0x7e00, 0, OP_PUT));
+ }
+ EXPECT_EQ(-EOPNOTSUPP, cxi_le_wire_key(1ULL << 48, &wire_key));
+ EXPECT_EQ(-EOPNOTSUPP, cxi_le_wire_key(UINT64_MAX, &wire_key));
+}
+
+static void test_recv_fields(void)
+{
+ union c_cmdu cmd;
+
+ cxi_le_recv(&cmd, 10, 5, 0x7f0000001000ULL, 4096);
+ EXPECT_EQ(C_CMD_TGT_APPEND, cmd.command.opcode);
+ EXPECT_EQ(10, cmd.target.ptlte_index);
+ EXPECT_EQ(C_PTL_LIST_PRIORITY, cmd.target.ptl_list);
+ EXPECT_EQ(5, cmd.target.lac);
+ EXPECT_EQ(0x7f0000001000ULL, cmd.target.start);
+ EXPECT_EQ(4096, cmd.target.length);
+ EXPECT_EQ(CXI_MATCH_ID_ANY, cmd.target.match_id);
+ EXPECT_EQ(CXI_LE_RECV_MATCH_BITS, cmd.target.match_bits);
+ EXPECT_EQ(0, cmd.target.ignore_bits);
+ EXPECT_EQ(1, cmd.target.op_put);
+ EXPECT_EQ(0, cmd.target.op_get);
+ EXPECT_EQ(1, cmd.target.use_once);
+}
+
+static void test_recv_selection(void)
+{
+ union c_cmdu cmd;
+ size_t i, k;
+
+ cxi_le_recv(&cmd, 10, 1, 0x1000, 4096);
+ for (i = 0; i < NUM_INITIATORS; i++) {
+ EXPECT_TRUE(le_selects(&cmd.target, 0, initiators[i], OP_PUT));
+ EXPECT_FALSE(le_selects(&cmd.target, 0, initiators[i], OP_GET));
+ for (k = 0; k < NUM_RKEYS; k++)
+ EXPECT_FALSE(le_selects(&cmd.target, rkeys[k], initiators[i], OP_PUT));
+ }
+}
+
+static void test_region_fields(void)
+{
+ union c_cmdu cmd;
+ size_t k;
+
+ for (k = 0; k < NUM_RKEYS; k++) {
+ cxi_le_region(&cmd, 12, 0xabc0 | 6, rkeys[k], 0x2000, 8192);
+ EXPECT_EQ(C_CMD_TGT_APPEND, cmd.command.opcode);
+ EXPECT_EQ(12, cmd.target.ptlte_index);
+ EXPECT_EQ(C_PTL_LIST_PRIORITY, cmd.target.ptl_list);
+ EXPECT_EQ(6, cmd.target.lac);
+ EXPECT_EQ(0x2000, cmd.target.start);
+ EXPECT_EQ(8192, cmd.target.length);
+ EXPECT_EQ(CXI_MATCH_ID_ANY, cmd.target.match_id);
+ EXPECT_EQ(rkeys[k], cmd.target.match_bits);
+ EXPECT_EQ(0, cmd.target.ignore_bits);
+ EXPECT_EQ(1, cmd.target.op_put);
+ EXPECT_EQ(1, cmd.target.op_get);
+ EXPECT_EQ(0, cmd.target.use_once);
+ EXPECT_EQ(rkeys[k] & 0xffff, cmd.target.buffer_id);
+ }
+}
+
+static void test_region_selection(void)
+{
+ union c_cmdu cmd;
+ size_t i, k, j;
+
+ for (k = 0; k < NUM_RKEYS; k++) {
+ cxi_le_region(&cmd, 12, 0, rkeys[k], 0x2000, 8192);
+ for (i = 0; i < NUM_INITIATORS; i++) {
+ uint32_t init = initiators[i];
+ uint64_t wrong_rkey = rkeys[k] ^ (1ULL << 63);
+
+ EXPECT_TRUE(le_selects(&cmd.target, rkeys[k], init, OP_PUT));
+ EXPECT_TRUE(le_selects(&cmd.target, rkeys[k], init, OP_GET));
+ /* A SEND must never land in a region. */
+ EXPECT_FALSE(le_selects(&cmd.target, 0, init, OP_PUT));
+ /* Exact: a key differing only in its high half is another key. */
+ EXPECT_FALSE(le_selects(&cmd.target, wrong_rkey, init, OP_PUT));
+ for (j = 0; j < NUM_RKEYS; j++) {
+ if (j == k)
+ continue;
+ EXPECT_FALSE(le_selects(&cmd.target, rkeys[j], init, OP_PUT));
+ }
+ }
+ }
+}
+
+static void test_region_unlink(void)
+{
+ union c_cmdu append, unlink;
+ size_t k;
+
+ for (k = 0; k < NUM_RKEYS; k++) {
+ cxi_le_region(&append, 12, 0, rkeys[k], 0x2000, 8192);
+ cxi_le_region_unlink(&unlink, 12, rkeys[k]);
+ EXPECT_EQ(C_CMD_TGT_UNLINK, unlink.command.opcode);
+ EXPECT_EQ(12, unlink.target.ptlte_index);
+ EXPECT_EQ(C_PTL_LIST_PRIORITY, unlink.target.ptl_list);
+ EXPECT_EQ(append.target.buffer_id, unlink.target.buffer_id);
+ }
+}
+
+/* The provider's create-QP response layout is ABI shared with the kernel. */
+static void test_create_qp_resp_abi(void)
+{
+ EXPECT_EQ(1, CXI_IB_UVERBS_ABI_VERSION);
+ EXPECT_EQ(88, sizeof(struct cxi_ibv_create_qp_resp));
+ EXPECT_EQ(72, offsetof(struct cxi_ibv_create_qp_resp, tgq_idx));
+ EXPECT_EQ(76, offsetof(struct cxi_ibv_create_qp_resp, job_id));
+ EXPECT_EQ(80, offsetof(struct cxi_ibv_create_qp_resp, pte_index));
+}
+
+static bool resource_ok(const char *operation, int ret)
+{
+ if (!ret)
+ return true;
+ fprintf(stderr, "%s: %s\n", operation, strerror(ret));
+ failed_tests++;
+ return false;
+}
+
+static bool test_exact_vni_service(struct ibv_context *context, const uint16_t *vnis,
+ uint32_t vni_count)
+{
+ struct cxidv_svc_attr config = {
+ .vni_count = vni_count,
+ .tc_mask = 1U << CXIDV_TC_BEST_EFFORT,
+ .flags = CXIDV_SVC_CREATE_TC,
+ .uid = geteuid(),
+ };
+ struct cxidv_svc_attr queried;
+ uint32_t svc_id = 0;
+ uint32_t index;
+ int before = failed_tests;
+
+ if (!vnis || !vni_count || vni_count > CXIDV_SVC_MAX_VNIS)
+ return false;
+ memcpy(config.vnis, vnis, vni_count * sizeof(config.vnis[0]));
+ if (!resource_ok("allocate exact-VNI service", cxidv_alloc_svc(context, &config, &svc_id)))
+ return false;
+ if (!resource_ok("query exact-VNI service", cxidv_query_svc(context, svc_id, &queried)))
+ goto out;
+ if (queried.vni_count != config.vni_count || queried.is_range || queried.is_system_svc ||
+ queried.vni_min || queried.vni_max) {
+ fprintf(stderr, "exact-VNI service query changed the granted set\n");
+ failed_tests++;
+ goto out;
+ }
+ for (index = 0; index < vni_count; index++) {
+ if (queried.vnis[index] != config.vnis[index]) {
+ fprintf(stderr, "exact-VNI service query changed the granted set\n");
+ failed_tests++;
+ goto out;
+ }
+ }
+ if (!resource_ok("destroy exact-VNI service", cxidv_destroy_svc(context, svc_id)))
+ return false;
+ return failed_tests == before;
+out:
+ if (svc_id)
+ resource_ok("cleanup exact-VNI service", cxidv_destroy_svc(context, svc_id));
+ return false;
+}
+
+static bool test_retry_system_service(struct ibv_context *context)
+{
+ struct cxidv_svc_attr config = {
+ .is_system_svc = 1,
+ .flags = CXIDV_SVC_LIMITS,
+ .uid = geteuid(),
+ .maximum = {
+ [CXIDV_SVC_EQS] = 1,
+ [CXIDV_SVC_ACS] = 1,
+ },
+ .reserved = {
+ [CXIDV_SVC_EQS] = 1,
+ [CXIDV_SVC_ACS] = 1,
+ },
+ };
+ struct cxidv_svc_attr queried;
+ uint32_t svc_id = 0;
+ uint32_t lpr;
+ int before = failed_tests;
+
+ if (!resource_ok("allocate retry system service",
+ cxidv_alloc_svc(context, &config, &svc_id)))
+ return false;
+ if (!resource_ok("query retry system service", cxidv_query_svc(context, svc_id, &queried)))
+ goto out;
+ if (!queried.is_system_svc || queried.is_range || queried.vni_count || queried.vni_min ||
+ queried.vni_max || queried.tc_mask || queried.vnis[0] || queried.vnis[1] ||
+ queried.vnis[2] || queried.vnis[3]) {
+ fprintf(stderr, "retry system service query changed restricted-empty policy\n");
+ failed_tests++;
+ goto out;
+ }
+ if (!resource_ok("query retry system service LPR",
+ cxidv_get_svc_lpr(context, svc_id, &lpr)))
+ goto out;
+ if (lpr != 1) {
+ fprintf(stderr, "retry system service LPR is %u, expected 1\n", lpr);
+ failed_tests++;
+ goto out;
+ }
+ if (!resource_ok("destroy retry system service", cxidv_destroy_svc(context, svc_id)))
+ return false;
+ return failed_tests == before;
+out:
+ if (svc_id)
+ resource_ok("cleanup retry system service", cxidv_destroy_svc(context, svc_id));
+ return false;
+}
+
+static void test_hardware_resources(const char *name)
+{
+ static const uint16_t one_vni[] = { 0x7e00 };
+ static const uint16_t two_vnis[] = { 0x7e00, 0x7e03 };
+ static const uint16_t four_vnis[] = { 0x7e00, 0x7e03, 0x7e07, 0x7e0b };
+ struct ibv_device **devices = ibv_get_device_list(NULL);
+ struct ibv_context *context = NULL;
+ struct ibv_context *bare = NULL;
+ struct cxidv_lni *lni = NULL;
+ struct ibv_pd *first = NULL;
+ struct ibv_pd *second = NULL;
+ struct ibv_mr *mr = NULL;
+ struct ibv_mr *receive_mr = NULL;
+ struct ibv_ah *destination = NULL;
+ struct ibv_cq *cq = NULL;
+ struct ibv_job *job = NULL;
+ struct ibv_job *alternate_job = NULL;
+ struct ibv_job *retired_job = NULL;
+ struct ibv_job_key *first_key = NULL;
+ struct ibv_job_key *second_key = NULL;
+ struct ibv_job_key *alternate_key = NULL;
+ struct ibv_job_key *retired_grant = NULL;
+ struct ibv_qp *first_qp = NULL;
+ struct ibv_qp *second_qp = NULL;
+ struct cxidv_svc_attr config = {
+ .is_range = 1,
+ .vnis = { 0x7e00, 0x7e03 },
+ .tc_mask = 1U << CXIDV_TC_BEST_EFFORT,
+ .flags = CXIDV_SVC_CREATE_TC,
+ };
+ struct cxidv_svc_attr queried;
+ struct ibv_device_attr device_attr;
+ uint32_t svc_id = 0;
+ uint32_t first_pid, second_pid, queried_pid;
+ char buffer[4096];
+ char receive_buffer[4096];
+ int default_enabled = 0;
+ bool restore_default = false;
+ bool indexed = getenv("CXI_TEST_INDEXED");
+ int index;
+ int ret;
+
+ if (!devices) {
+ failed_tests++;
+ return;
+ }
+ for (index = 0; devices[index]; index++)
+ if (!strcmp(ibv_get_device_name(devices[index]), name))
+ break;
+ if (!devices[index]) {
+ fprintf(stderr, "missing device %s\n", name);
+ failed_tests++;
+ goto out;
+ }
+ context = ibv_open_device(devices[index]);
+ if (!context) {
+ resource_ok("open device", errno);
+ goto out;
+ }
+ config.uid = geteuid();
+ if (!test_exact_vni_service(context, one_vni, ARRAY_SIZE(one_vni)) ||
+ !test_exact_vni_service(context, two_vnis, ARRAY_SIZE(two_vnis)) ||
+ !test_exact_vni_service(context, four_vnis, ARRAY_SIZE(four_vnis)) ||
+ !test_retry_system_service(context))
+ goto out;
+ if (!resource_ok("allocate service", cxidv_alloc_svc(context, &config, &svc_id)))
+ goto out;
+ if (!resource_ok("query service", cxidv_query_svc(context, svc_id, &queried)))
+ goto out;
+ EXPECT_EQ(0, queried.vni_count);
+ EXPECT_EQ(1, queried.is_range);
+ EXPECT_EQ(0, queried.vni_min);
+ EXPECT_EQ(0, queried.vni_max);
+ EXPECT_EQ(config.vnis[0], queried.vnis[0]);
+ EXPECT_EQ(config.vnis[1], queried.vnis[1]);
+ EXPECT_EQ(config.tc_mask, queried.tc_mask);
+ if (!resource_ok("query default service state",
+ cxidv_svc_is_enabled(context, 1, &default_enabled)))
+ goto out;
+ if (!resource_ok("disable default service", cxidv_enable_svc(context, 1, 0)))
+ goto out;
+ restore_default = true;
+ bare = ibv_open_device(devices[index]);
+ if (!bare) {
+ resource_ok("open without default service", errno);
+ goto out;
+ }
+ if (!resource_ok("query without default service", ibv_query_device(bare, &device_attr)))
+ goto out;
+ first = ibv_alloc_pd(bare);
+ EXPECT_FALSE(first);
+ if (first)
+ goto out;
+ if (!resource_ok("allocate explicit LNI", cxidv_alloc_lni(bare, svc_id, &lni)))
+ goto out;
+ first = cxidv_alloc_pd(lni);
+ second = cxidv_alloc_pd(lni);
+ if (!first || !second) {
+ resource_ok("allocate explicit PDs", errno);
+ goto out;
+ }
+ if (!resource_ok("allocate first PID", cxidv_alloc_pid(first, 0, &first_pid)) ||
+ !resource_ok("allocate second PID", cxidv_alloc_pid(second, 0, &second_pid)))
+ goto out;
+ EXPECT_TRUE(first_pid != second_pid);
+ if (!resource_ok("query first PID", cxidv_query_pid(first, &queried_pid)))
+ goto out;
+ EXPECT_EQ(first_pid, queried_pid);
+ EXPECT_EQ(EBUSY, cxidv_alloc_pid(first, 0, &queried_pid));
+ ret = cxidv_destroy_lni(lni);
+ EXPECT_EQ(EBUSY, ret);
+ if (!ret) {
+ lni = NULL;
+ goto out;
+ }
+ mr = ibv_reg_mr(first, buffer, sizeof(buffer), IBV_ACCESS_LOCAL_WRITE);
+ if (!mr) {
+ resource_ok("register memory", errno);
+ goto out;
+ }
+ EXPECT_EQ((uint32_t)mr->lkey64, mr->lkey);
+ EXPECT_TRUE(mr->lkey != 0);
+ {
+ struct cxidv_mr_info info;
+
+ if (!resource_ok("query native memory descriptor", cxidv_mr_from_ibv_mr(mr, &info)))
+ goto out;
+ EXPECT_TRUE(info.va <= (uintptr_t)buffer);
+ EXPECT_TRUE(info.length >= sizeof(buffer));
+ EXPECT_TRUE((uintptr_t)buffer - info.va <= info.length - sizeof(buffer));
+ EXPECT_EQ(mr->lkey64 & CXI_LKEY64_LAC_MASK, info.lac);
+ EXPECT_EQ((mr->lkey64 >> CXI_LKEY64_MD_SHIFT) & CXI_LKEY64_MD_MASK, info.id);
+ EXPECT_EQ(to_cxi_mr(mr)->iova, info.iova + (uintptr_t)buffer - info.va);
+ EXPECT_TRUE(info.page_shift > 0);
+ }
+ {
+ struct ibv_mr_init_attr zero_key_attr = {
+ .comp_mask = IBV_REG_MR_MASK_ADDR | IBV_REG_MR_MASK_RKEY,
+ .addr = buffer,
+ .length = sizeof(buffer),
+ };
+ struct ibv_mr *zero_key_mr;
+
+ errno = 0;
+ zero_key_mr = ibv_reg_mr_ex(first, &zero_key_attr);
+ EXPECT_FALSE(zero_key_mr);
+ EXPECT_EQ(EINVAL, errno);
+ if (zero_key_mr)
+ resource_ok("deregister invalid zero-key MR", ibv_dereg_mr(zero_key_mr));
+ }
+ cq = ibv_create_cq(bare, 64, NULL, NULL, 0);
+ if (!cq) {
+ resource_ok("create CQ", errno);
+ goto out;
+ }
+ {
+ struct ibv_job_attr attr = {
+ .comp_mask =
+ IBV_JOB_ATTR_ID | IBV_JOB_ATTR_PORT_NUM | IBV_JOB_ATTR_SGID_INDEX,
+ .id = config.vnis[0],
+ .port_num = 1,
+ };
+ struct ibv_qp_init_attr_ex qp_attr = {
+ .send_cq = cq,
+ .recv_cq = cq,
+ .cap = {
+ .max_send_wr = 16,
+ .max_recv_wr = 16,
+ .max_send_sge = 1,
+ .max_recv_sge = 1,
+ },
+ .qp_type = IBV_QPT_RU,
+ .comp_mask = IBV_QP_INIT_ATTR_PD |
+ IBV_QP_INIT_ATTR_JKEY | IBV_QP_INIT_ATTR_CREATE_FLAGS |
+ IBV_QP_INIT_ATTR_SEND_OPS_FLAGS,
+ .create_flags = IBV_QP_CREATE_SOURCE_QPN,
+ .send_ops_flags = IBV_QP_EX_WITH_SEND,
+ };
+ struct ibv_qp *duplicate;
+ struct ibv_job *imported = NULL;
+ struct ibv_job_attr queried_job = {};
+ int job_fd = -1;
+
+ if (indexed) {
+ attr.comp_mask |= IBV_JOB_ATTR_MAX_ADDR_ENTRIES;
+ attr.max_addr_entries = 2;
+ }
+ job = ibv_alloc_job(bare, &attr, NULL);
+ if (!job) {
+ resource_ok("allocate generic job", errno);
+ goto out;
+ }
+ if (!resource_ok("query job", ibv_query_job(job, &queried_job)))
+ goto out;
+ EXPECT_EQ(config.vnis[0], queried_job.id);
+ EXPECT_EQ(indexed ? 2 : 0, queried_job.max_addr_entries);
+ if (!indexed) {
+ struct ibv_ah_attr_ex address = {};
+
+ EXPECT_EQ(EINVAL, ibv_insert_addr(job, &address, 0));
+ EXPECT_EQ(EINVAL, ibv_query_addr(job, 0, &address));
+ EXPECT_EQ(EINVAL, ibv_remove_addr(job, 0));
+ }
+ if (!resource_ok("export job", ibv_export_job(job, &job_fd)))
+ goto out;
+ ret = ibv_import_job(context, job_fd, &imported);
+ close(job_fd);
+ if (!resource_ok("import job into bare context", ret))
+ goto out;
+ resource_ok("query imported job", ibv_query_job(imported, &queried_job));
+ EXPECT_EQ(config.vnis[0], queried_job.id);
+ resource_ok("close imported job", ibv_dealloc_job(imported));
+ attr.id++;
+ attr.comp_mask &= ~IBV_JOB_ATTR_MAX_ADDR_ENTRIES;
+ attr.max_addr_entries = 0;
+ alternate_job = ibv_alloc_job(bare, &attr, NULL);
+ if (!alternate_job) {
+ resource_ok("allocate alternate job", errno);
+ goto out;
+ }
+ first_key = ibv_create_jkey(first, job);
+ second_key = ibv_create_jkey(second, alternate_job);
+ alternate_key = ibv_create_jkey(first, alternate_job);
+ if (!first_key || !second_key || !alternate_key) {
+ resource_ok("create job keys", errno);
+ goto out;
+ }
+ errno = 0;
+ EXPECT_EQ(-1, ibv_dealloc_job(alternate_job));
+ EXPECT_EQ(EBUSY, errno);
+ qp_attr.pd = first;
+ qp_attr.job_key = first_key;
+ qp_attr.source_qpn = first_pid | (7U << IBV_QPN_UET_RI_SHIFT);
+ {
+ struct ibv_qp_attr initial_attr = {
+ .path_mtu = IBV_MTU_2048,
+ };
+
+ qp_attr.comp_mask |= IBV_QP_INIT_ATTR_QP_ATTR;
+ qp_attr.qp_attr = &initial_attr;
+ qp_attr.qp_attr_mask = IBV_QP_PATH_MTU;
+ errno = 0;
+ duplicate = ibv_create_qp_ex(bare, &qp_attr);
+ EXPECT_FALSE(duplicate);
+ EXPECT_EQ(EOPNOTSUPP, errno);
+ if (duplicate)
+ resource_ok("destroy unsupported MTU QP",
+ ibv_destroy_qp(duplicate));
+ qp_attr.comp_mask &= ~IBV_QP_INIT_ATTR_QP_ATTR;
+ qp_attr.qp_attr = NULL;
+ qp_attr.qp_attr_mask = 0;
+ }
+ first_qp = ibv_create_qp_ex(bare, &qp_attr);
+ if (!first_qp) {
+ resource_ok("create first QP", errno);
+ goto out;
+ }
+ EXPECT_EQ(qp_attr.source_qpn, first_qp->qp_num);
+ EXPECT_EQ(IBV_QPS_RTS, first_qp->state);
+ {
+ struct ibv_qp_attr queried_qp = {};
+ struct ibv_qp_init_attr initialized = {};
+ struct ibv_qp_attr invalid = {
+ .qp_state = IBV_QPS_INIT,
+ };
+
+ if (resource_ok("query kernel RTS state",
+ ibv_query_qp(first_qp, &queried_qp,
+ IBV_QP_STATE | IBV_QP_PATH_MTU,
+ &initialized))) {
+ EXPECT_EQ(IBV_QPS_RTS, queried_qp.qp_state);
+ EXPECT_EQ(IBV_MTU_4096, queried_qp.path_mtu);
+ }
+ EXPECT_EQ(EINVAL, ibv_modify_qp(first_qp, &invalid, IBV_QP_STATE));
+ }
+ {
+ struct ibv_qp_ex *extended = ibv_qp_to_qp_ex(first_qp);
+ struct cxi_qp *provider_qp = to_cxi_qp(first_qp);
+
+ EXPECT_TRUE(extended);
+ if (!extended)
+ goto out;
+ ibv_wr_start(extended);
+ ibv_wr_set_job_key(extended, first_key->jkey);
+ EXPECT_EQ(EINVAL, ibv_wr_complete(extended));
+ ibv_wr_start(extended);
+ ibv_wr_send(extended);
+ ibv_wr_set_job_key(extended, UINT32_MAX);
+ EXPECT_EQ(EINVAL, provider_qp->wr_build.err);
+ EXPECT_EQ(EINVAL, ibv_wr_complete(extended));
+ ibv_wr_start(extended);
+ ibv_wr_send(extended);
+ ibv_wr_set_job_key(extended, first_key->jkey);
+ EXPECT_EQ(0, provider_qp->wr_build.err);
+ ibv_wr_abort(extended);
+ }
+ duplicate = ibv_create_qp_ex(bare, &qp_attr);
+ EXPECT_FALSE(duplicate);
+ if (duplicate)
+ resource_ok("destroy invalid duplicate", ibv_destroy_qp(duplicate));
+ qp_attr.pd = second;
+ qp_attr.job_key = second_key;
+ qp_attr.source_qpn = second_pid | (7U << IBV_QPN_UET_RI_SHIFT);
+ second_qp = ibv_create_qp_ex(bare, &qp_attr);
+ if (!second_qp) {
+ resource_ok("create second QP with same SI", errno);
+ goto out;
+ }
+ EXPECT_TRUE(first_qp->qp_num != second_qp->qp_num);
+ receive_mr = ibv_reg_mr(second, receive_buffer, sizeof(receive_buffer),
+ IBV_ACCESS_LOCAL_WRITE);
+ if (!receive_mr) {
+ resource_ok("register alternate-job receive memory", errno);
+ goto out;
+ }
+ for (int pass = 0; pass < (getenv("CXI_TEST_WRONG_VNI") ? 4 : 2); pass++) {
+ int before = failed_tests;
+ uint64_t receive_id = pass == 3 ? 102 : 100 + pass;
+ uint32_t expected_job = config.vnis[0] + (pass == 1 || pass == 2 ? 0 : 1);
+ struct ibv_qp *target = pass == 1 ? first_qp : second_qp;
+ struct ibv_mr *target_mr = pass == 1 ? mr : receive_mr;
+ struct ibv_ah_attr_ex address = {
+ .ah_attr = {
+ .is_global = 1,
+ .port_num = 1,
+ .grh.hop_limit = 1,
+ },
+ .remote_qpn = target->qp_num,
+ };
+ struct ibv_sge receive = {
+ .addr = (uintptr_t)(pass == 1 ? buffer : receive_buffer),
+ .length = 64,
+ .lkey = target_mr->lkey,
+ };
+ struct ibv_recv_wr request = {
+ .wr_id = 100 + pass,
+ .sg_list = &receive,
+ .num_sge = 1,
+ };
+ struct ibv_recv_wr *bad;
+ struct ibv_qp_ex *extended = ibv_qp_to_qp_ex(first_qp);
+ struct timespec started, now;
+ bool sent = false, received = false;
+ bool send_rejected = false;
+
+ memset(buffer, 0x5a, 64);
+ memset(receive_buffer, 0, 64);
+ if (!resource_ok("query local GID",
+ ibv_query_gid(bare, 1, 0, &address.ah_attr.grh.dgid)))
+ goto out;
+ if (indexed) {
+ struct ibv_ah_attr_ex result = {};
+
+ EXPECT_EQ(ENOENT, ibv_query_addr(job, 1, &result));
+ EXPECT_EQ(ENOENT, ibv_remove_addr(job, 1));
+ EXPECT_EQ(EINVAL, ibv_insert_addr(job, &address, 2));
+ EXPECT_EQ(EINVAL, ibv_query_addr(job, UINT_MAX, &result));
+ EXPECT_EQ(EINVAL, ibv_remove_addr(job, 2));
+ if (!resource_ok("insert indexed address",
+ ibv_insert_addr(job, &address, 1)))
+ goto out;
+ EXPECT_EQ(EBUSY, ibv_insert_addr(job, &address, 1));
+ EXPECT_EQ(0, ibv_query_addr(job, 1, &result));
+ EXPECT_EQ(address.remote_qpn, result.remote_qpn);
+ EXPECT_EQ(0, memcmp(address.ah_attr.grh.dgid.raw,
+ result.ah_attr.grh.dgid.raw, 16));
+ EXPECT_EQ(0, ibv_remove_addr(job, 1));
+ EXPECT_EQ(ENOENT, ibv_query_addr(job, 1, &result));
+ if (!resource_ok("reinsert indexed address",
+ ibv_insert_addr(job, &address, 1)))
+ goto out;
+ }
+ destination = ibv_create_ah_ex(first, &address);
+ if (!destination) {
+ resource_ok("create loopback address", errno);
+ goto out;
+ }
+ if (pass != 3 && !resource_ok("post job-selected receive",
+ ibv_post_recv(target, &request, &bad)))
+ goto out;
+ ibv_wr_start(extended);
+ extended->wr_id = 200 + pass;
+ ibv_wr_send(extended);
+ if (!pass || pass == 3)
+ ibv_wr_set_job_key(extended, alternate_key->jkey);
+ ibv_wr_set_ru_addr(extended, indexed ? NULL : ibv_ah_to_ah_ex(destination),
+ indexed ? 1 : 0);
+ ibv_wr_set_sge(extended, mr->lkey, (uintptr_t)buffer, 64);
+ if (!resource_ok("send selected job", ibv_wr_complete(extended)))
+ goto out;
+ clock_gettime(CLOCK_MONOTONIC, &started);
+ do {
+ struct ibv_wc completion;
+
+ ret = ibv_poll_cq(cq, 1, &completion);
+ if (ret < 0) {
+ resource_ok("poll selected-job CQ", EIO);
+ goto out;
+ }
+ if (ret) {
+ if (completion.wr_id == (uint64_t)(200 + pass))
+ send_rejected = completion.status != IBV_WC_SUCCESS;
+ if (pass != 2)
+ EXPECT_EQ(IBV_WC_SUCCESS, completion.status);
+ if (completion.wr_id == receive_id ||
+ completion.wr_id == (uint64_t)(200 + pass)) {
+ EXPECT_EQ(expected_job,
+ to_cxi_ibv_cq(cq)->cur_job_id);
+ }
+ sent |= completion.wr_id == (uint64_t)(200 + pass);
+ received |= completion.wr_id == receive_id &&
+ completion.status == IBV_WC_SUCCESS;
+ }
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ } while ((pass == 2 ? !sent : !(sent && received)) &&
+ now.tv_sec - started.tv_sec < 10);
+ if (pass == 2) {
+ EXPECT_TRUE(sent && send_rejected);
+ EXPECT_TRUE(!received);
+ if (received)
+ fprintf(stderr, "relative endpoint accepted wrong VNI\n");
+ correctness_result("unconfigured-job-receive", before);
+ } else {
+ EXPECT_TRUE(sent && received);
+ }
+ if (!pass || pass == 3)
+ EXPECT_EQ(0, memcmp(buffer, receive_buffer, 64));
+ if (!pass) {
+ correctness_result("multi-job-send", before);
+ correctness_result("multi-job-receive", before);
+ }
+ if (pass == 1)
+ correctness_result("default-job-restoration", before);
+ if (pass == 3)
+ correctness_result("receive-after-job-rejection", before);
+ if (pass != 2 && !(sent && received))
+ goto out;
+ if (!resource_ok("destroy loopback address", ibv_destroy_ah(destination)))
+ goto out;
+ destination = NULL;
+ if (indexed)
+ EXPECT_EQ(0, ibv_remove_addr(job, 1));
+ }
+ {
+ struct ibv_qp_ex *extended = ibv_qp_to_qp_ex(first_qp);
+ uint32_t retired_key = alternate_key->jkey;
+ uint64_t before = to_cxi_qp(first_qp)->hw_txq.wp32;
+ int failures_before = failed_tests;
+
+ if (!resource_ok("destroy alternate key", ibv_destroy_jkey(alternate_key)))
+ goto out;
+ alternate_key = NULL;
+ ibv_wr_start(extended);
+ ibv_wr_send(extended);
+ ibv_wr_set_job_key(extended, retired_key);
+ EXPECT_EQ(EINVAL, ibv_wr_complete(extended));
+ EXPECT_EQ(before, to_cxi_qp(first_qp)->hw_txq.wp32);
+ correctness_result("retired-job-grant-send", failures_before);
+ }
+ {
+ struct ibv_job_attr retired_attr = attr;
+ struct ibv_qp_ex *extended = ibv_qp_to_qp_ex(first_qp);
+ uint32_t retired_value;
+ uint64_t before = to_cxi_qp(first_qp)->hw_txq.wp32;
+ int failures_before = failed_tests;
+
+ retired_attr.id = config.vnis[0] + 2;
+ retired_job = ibv_alloc_job(bare, &retired_attr, NULL);
+ if (!retired_job) {
+ resource_ok("allocate retirement-test job", errno);
+ goto out;
+ }
+ retired_grant = ibv_create_jkey(first, retired_job);
+ if (!retired_grant) {
+ resource_ok("create retirement-test grant", errno);
+ goto out;
+ }
+ retired_value = retired_grant->jkey;
+ if (!resource_ok("destroy last job grant", ibv_destroy_jkey(retired_grant)))
+ goto out;
+ retired_grant = NULL;
+ if (!resource_ok("deallocate unreferenced job",
+ ibv_dealloc_job(retired_job)))
+ goto out;
+ retired_job = NULL;
+ ibv_wr_start(extended);
+ ibv_wr_send(extended);
+ ibv_wr_set_job_key(extended, retired_value);
+ EXPECT_EQ(EINVAL, ibv_wr_complete(extended));
+ EXPECT_EQ(before, to_cxi_qp(first_qp)->hw_txq.wp32);
+ correctness_result("deallocated-job-send", failures_before);
+ }
+ {
+ struct ibv_sge64 sge = {
+ .addr = (uintptr_t)buffer,
+ .length = sizeof(buffer),
+ .lkey64 = mr->lkey64,
+ };
+ struct ibv_recv_wr64 wr = {
+ .wr_id = 7,
+ .sg_list = &sge,
+ .num_sge = 1,
+ };
+ struct ibv_recv_wr64 *bad = NULL;
+
+ resource_ok("post receive64", ibv_post_recv64(first_qp, &wr, &bad));
+ sge.lkey64 ^= 1ULL << 63;
+ EXPECT_EQ(EINVAL, ibv_post_recv64(first_qp, &wr, &bad));
+ EXPECT_TRUE(bad == &wr);
+ sge.lkey64 = mr->lkey64;
+ EXPECT_EQ(EINVAL, ibv_post_recv64(second_qp, &wr, &bad));
+ }
+ }
+out:
+ if (retired_grant)
+ resource_ok("destroy retirement-test grant", ibv_destroy_jkey(retired_grant));
+ if (retired_job)
+ resource_ok("destroy retirement-test job", ibv_dealloc_job(retired_job));
+ if (destination)
+ resource_ok("destroy loopback address", ibv_destroy_ah(destination));
+ if (second_qp)
+ resource_ok("destroy second QP", ibv_destroy_qp(second_qp));
+ if (first_qp)
+ resource_ok("destroy first QP", ibv_destroy_qp(first_qp));
+ if (second_key)
+ resource_ok("destroy second key", ibv_destroy_jkey(second_key));
+ if (first_key)
+ resource_ok("destroy first key", ibv_destroy_jkey(first_key));
+ if (alternate_key)
+ resource_ok("destroy alternate key", ibv_destroy_jkey(alternate_key));
+ if (alternate_job)
+ resource_ok("destroy alternate job", ibv_dealloc_job(alternate_job));
+ if (job)
+ resource_ok("destroy job", ibv_dealloc_job(job));
+ if (cq)
+ resource_ok("destroy CQ", ibv_destroy_cq(cq));
+ if (mr)
+ resource_ok("deregister memory", ibv_dereg_mr(mr));
+ if (receive_mr)
+ resource_ok("deregister receive memory", ibv_dereg_mr(receive_mr));
+ if (second)
+ resource_ok("destroy second PD", ibv_dealloc_pd(second));
+ if (first)
+ resource_ok("destroy first PD", ibv_dealloc_pd(first));
+ if (lni)
+ resource_ok("destroy LNI", cxidv_destroy_lni(lni));
+ if (bare)
+ resource_ok("close bare context", ibv_close_device(bare));
+ if (restore_default)
+ resource_ok("restore default service",
+ cxidv_enable_svc(context, 1, default_enabled));
+ if (svc_id)
+ resource_ok("destroy service", cxidv_destroy_svc(context, svc_id));
+ if (context)
+ resource_ok("close context", ibv_close_device(context));
+ ibv_free_device_list(devices);
+}
+
+static void test_csr_mapping(const char *device_name)
+{
+ struct ibv_device **devices = ibv_get_device_list(NULL);
+ struct ibv_context *context = NULL;
+ struct cxidv_csr *csr = NULL;
+ long page_size = sysconf(_SC_PAGESIZE);
+ unsigned int iteration;
+ void *invalid;
+ uint64_t offset;
+ size_t length;
+ int index;
+ int ret;
+
+ EXPECT_TRUE(devices);
+ if (!devices)
+ return;
+ for (index = 0; devices[index]; index++) {
+ if (!strcmp(ibv_get_device_name(devices[index]), device_name)) {
+ context = ibv_open_device(devices[index]);
+ break;
+ }
+ }
+ EXPECT_TRUE(context);
+ if (!context)
+ goto out;
+ EXPECT_TRUE(page_size > 0);
+ if (page_size <= 0)
+ goto out;
+ EXPECT_EQ(EINVAL, cxidv_map_csrs(NULL, &csr));
+ EXPECT_EQ(EINVAL, cxidv_map_csrs(context, NULL));
+ EXPECT_EQ(EINVAL, cxidv_unmap_csrs(NULL));
+ if (geteuid() != 0) {
+ EXPECT_EQ(EPERM, cxidv_map_csrs(context, &csr));
+ EXPECT_FALSE(csr);
+ goto out;
+ }
+ for (iteration = 0; iteration < 16; iteration++) {
+ ret = cxidv_map_csrs(context, &csr);
+ if (!resource_ok("map CSR aperture", ret))
+ goto out;
+ EXPECT_TRUE(csr->address);
+ EXPECT_TRUE(page_size > 0 && csr->length >= (size_t)page_size);
+ EXPECT_EQ(0, csr->length % page_size);
+ length = csr->length;
+ offset = csr->mmap_offset;
+ errno = 0;
+ invalid = mmap(NULL, length + page_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ context->cmd_fd, offset);
+ EXPECT_TRUE(invalid == MAP_FAILED);
+ EXPECT_EQ(EINVAL, errno);
+ if (invalid != MAP_FAILED)
+ munmap(invalid, length + page_size);
+ ret = cxidv_unmap_csrs(csr);
+ if (!resource_ok("unmap CSR aperture", ret))
+ goto out;
+ csr = NULL;
+ errno = 0;
+ invalid = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, context->cmd_fd,
+ offset);
+ EXPECT_TRUE(invalid == MAP_FAILED);
+ EXPECT_EQ(EINVAL, errno);
+ if (invalid != MAP_FAILED)
+ munmap(invalid, length);
+ }
+out:
+ if (csr)
+ resource_ok("cleanup CSR aperture", cxidv_unmap_csrs(csr));
+ if (context)
+ resource_ok("close CSR context", ibv_close_device(context));
+ ibv_free_device_list(devices);
+}
+
+static void test_csr_accessors(void)
+{
+ uint64_t backing[4] = {};
+ uint64_t input[] = { 0x123456789abcdef0ULL, 0xfedcba9876543210ULL };
+ uint64_t output[2] = {};
+ unsigned char unaligned[sizeof(input) + 1];
+ struct cxidv_csr csr = {
+ .address = backing,
+ .length = sizeof(backing),
+ };
+
+ EXPECT_EQ(EINVAL, cxidv_read_csr(NULL, 0, output, sizeof(output)));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 0, NULL, sizeof(output)));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 0, output, 0));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 1, output, sizeof(output)));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 0, output, 1));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, UINT64_MAX, output, 8));
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 0, output, SIZE_MAX));
+ EXPECT_EQ(EINVAL, cxidv_write_csr(NULL, 0, input, sizeof(input)));
+ EXPECT_EQ(EINVAL, cxidv_write_csr(&csr, 0, NULL, sizeof(input)));
+ EXPECT_EQ(EINVAL, cxidv_write_csr(&csr, 1, input, sizeof(input)));
+ EXPECT_EQ(EINVAL, cxidv_write_csr(&csr, 24, input, sizeof(input)));
+ EXPECT_EQ(EINVAL, cxidv_write8_csr(NULL, 0, 1));
+ EXPECT_EQ(EINVAL, cxidv_write8_csr(&csr, sizeof(backing), 1));
+ EXPECT_EQ(0, backing[0]);
+ EXPECT_EQ(0, backing[3]);
+ memcpy(unaligned + 1, input, sizeof(input));
+ EXPECT_EQ(0, cxidv_write_csr(&csr, 8, unaligned + 1, sizeof(input)));
+ EXPECT_EQ(input[0], le64toh(backing[1]));
+ EXPECT_EQ(input[1], le64toh(backing[2]));
+ EXPECT_EQ(0, backing[0]);
+ EXPECT_EQ(0, backing[3]);
+ memset(unaligned, 0, sizeof(unaligned));
+ EXPECT_EQ(0, cxidv_read_csr(&csr, 8, unaligned + 1, sizeof(input)));
+ EXPECT_EQ(0, memcmp(unaligned + 1, input, sizeof(input)));
+ EXPECT_EQ(0, cxidv_write8_csr(&csr, 11, 0x5a));
+ EXPECT_EQ(0x5a, ((unsigned char *)backing)[11]);
+ EXPECT_EQ(0, ((unsigned char *)backing)[0]);
+ csr.address = NULL;
+ EXPECT_EQ(EINVAL, cxidv_read_csr(&csr, 0, output, sizeof(output)));
+ EXPECT_EQ(EINVAL, cxidv_write8_csr(&csr, 0, 1));
+}
+
+static void test_command_ring_bounds(void)
+{
+ struct {
+ struct cxi_cmd64 commands[16];
+ uint64_t canary;
+ } storage = {};
+ const unsigned int count = ARRAY_SIZE(storage.commands);
+ struct cxi_cq queue = {};
+ unsigned int size;
+ unsigned int position;
+ int before = failed_tests;
+
+ storage.canary = UINT64_C(0x123456789abcdef0);
+ for (size = 0; size < ARRAY_SIZE(__cxi_cmd_slots); size++) {
+ for (position = C_CQ_FIRST_WR_PTR_32; position < 2 * count; position++) {
+ cxi_cq_init(&queue, storage.commands, count, NULL, 0);
+ queue.wp32 = position;
+ queue.rp32 = position;
+ queue.status->rd_ptr = position / 2;
+ EXPECT_EQ(0, cxi_cq_align_for_cmd(&queue, size));
+ EXPECT_EQ(UINT64_C(0x123456789abcdef0), storage.canary);
+ }
+ }
+ cxi_cq_init(&queue, storage.commands, count, NULL, 0);
+ EXPECT_EQ(-EINVAL, cxi_cq_align_for_cmd(&queue, (enum c_cmd_size)-1));
+ EXPECT_EQ(-EINVAL, cxi_cq_align_for_cmd(&queue, ARRAY_SIZE(__cxi_cmd_slots)));
+ queue.size32--;
+ EXPECT_EQ(-EINVAL, cxi_cq_align_for_cmd(&queue, C_CMD_SIZE_64B));
+ correctness_result("command-ring-bounds", before);
+}
+
+static void test_queue_full_errno(void)
+{
+ struct cxi_context context = {};
+ struct cxi_qp qp = {};
+ struct cxi_ibv_cq cq = {};
+ struct cxi_cmd64 commands[8] = {};
+ struct cxi_mr mr = { .va = 0x1000, .iova = 0x1000, .len = 64 };
+ struct ibv_sge sge = { .addr = 0x1000, .length = 64, .lkey = 1 };
+ struct cxi_ah address = { .ah_ex.remote_qpn = 1, .nid = 0x807 };
+ struct ibv_send_wr send = { .opcode = IBV_WR_SEND, .sg_list = &sge, .num_sge = 1 };
+ struct ibv_recv_wr receive = { .sg_list = &sge, .num_sge = 1 };
+ struct ibv_send_wr *bad_send = NULL;
+ struct ibv_recv_wr *bad_receive = NULL;
+ int before = failed_tests;
+ int ret;
+
+ context.verbs_ctx.sz = sizeof(context.verbs_ctx);
+ context.verbs_ctx.context.abi_compat = __VERBS_ABI_IS_EXTENDED;
+ context.pid_bits = 9;
+ mr.vmr.ibv_mr.lkey = 1;
+ context.mr_list = &mr;
+ ret = pthread_spin_init(&context.mr_list_lock, PTHREAD_PROCESS_PRIVATE);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ return;
+ ret = cxi_qp_init_locks(&qp);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_spin_destroy(&context.mr_list_lock);
+ return;
+ }
+ qp.vqp.qp.context = &context.verbs_ctx.context;
+ qp.vqp.qp.send_cq = &cq.verbs_cq.cq;
+ qp.sq_size = 1;
+ qp.rq_size = 1;
+ qp.job_id = 1;
+ cxi_cq_init(&qp.hw_txq, commands, ARRAY_SIZE(commands), NULL, 0);
+ qp.hw_txq.wp32 = qp.hw_txq.size32 - 2;
+ qp.hw_tgq = qp.hw_txq;
+ send.wr.ru.ah = &address.ah_ex;
+ EXPECT_EQ(ENOSPC, cxi_post_send(&qp.vqp.qp, &send, &bad_send));
+ EXPECT_EQ((uintptr_t)&send, (uintptr_t)bad_send);
+ EXPECT_EQ(ENOSPC, cxi_post_recv(&qp.vqp.qp, &receive, &bad_receive));
+ EXPECT_EQ((uintptr_t)&receive, (uintptr_t)bad_receive);
+ pthread_mutex_destroy(&qp.builder_lock);
+ pthread_spin_destroy(&qp.sq_lock);
+ pthread_spin_destroy(&qp.rq_lock);
+ pthread_spin_destroy(&context.mr_list_lock);
+ correctness_result("queue-full-positive-errno", before);
+}
+
+static void test_telemetry_api_bounds(void)
+{
+ const uint64_t *items = NULL;
+ uint32_t count = 0;
+ int before = failed_tests;
+
+ EXPECT_EQ(EINVAL, cxidv_telem_get_set((enum cxidv_telem_set)-1, &items, &count));
+ EXPECT_EQ(EINVAL, cxidv_telem_get_set(CXIDV_TELEM_SET_COUNT, &items, &count));
+ EXPECT_EQ(0, cxidv_telem_lookup("UNDEFINED"));
+ EXPECT_EQ(-1, cxidv_telem_lookup(NULL));
+ EXPECT_EQ(CXI_IBV_TC_ENTRY_F_CREATED_BY_RDMA, CXIDV_TC_ENTRY_F_CREATED_BY_RDMA);
+ correctness_result("telemetry-api-bounds", before);
+}
+
+struct tc_cache_stress {
+ struct cxi_context context;
+ unsigned int failures;
+};
+
+static void *update_tc_cache(void *opaque)
+{
+ struct tc_cache_stress *test = opaque;
+
+ for (unsigned int iteration = 0; iteration < 100000; iteration++) {
+ uint32_t tc = iteration % CXI_IBV_TC_MAX;
+
+ cxi_tc_cache_update(&test->context, tc, tc + 1000, true);
+ }
+
+ return NULL;
+}
+
+static void *read_tc_cache(void *opaque)
+{
+ struct tc_cache_stress *test = opaque;
+
+ for (unsigned int iteration = 0; iteration < 100000; iteration++) {
+ uint32_t tc, svc_id;
+
+ if (!cxi_tc_cache_read(&test->context, &tc, &svc_id) ||
+ tc >= CXI_IBV_TC_MAX || svc_id != tc + 1000)
+ test->failures++;
+ }
+
+ return NULL;
+}
+
+static void test_tc_cache_concurrency(void)
+{
+ struct tc_cache_stress test = {};
+ pthread_t updater, reader;
+ int before = failed_tests;
+ int ret;
+
+ ret = pthread_mutex_init(&test.context.tc_lock, NULL);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ return;
+ cxi_tc_cache_update(&test.context, 0, 1000, true);
+ ret = pthread_create(&updater, NULL, update_tc_cache, &test);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_mutex_destroy(&test.context.tc_lock);
+ return;
+ }
+ ret = pthread_create(&reader, NULL, read_tc_cache, &test);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_join(updater, NULL);
+ pthread_mutex_destroy(&test.context.tc_lock);
+ return;
+ }
+ pthread_join(updater, NULL);
+ pthread_join(reader, NULL);
+ EXPECT_EQ(0, test.failures);
+ pthread_mutex_destroy(&test.context.tc_lock);
+ correctness_result("tc-cache-concurrency", before);
+}
+
+struct wait_hold_test {
+ struct cxidv_wait *wait;
+ pthread_mutex_t lock;
+ pthread_cond_t cond;
+ bool held;
+ bool release;
+ int get_ret;
+};
+
+static void *hold_wait_reference(void *opaque)
+{
+ struct wait_hold_test *test = opaque;
+
+ pthread_mutex_lock(&test->lock);
+ test->get_ret = cxi_wait_ref_get(test->wait);
+ test->held = true;
+ pthread_cond_signal(&test->cond);
+ while (!test->release)
+ pthread_cond_wait(&test->cond, &test->lock);
+ if (!test->get_ret)
+ cxi_wait_ref_put(test->wait);
+ pthread_mutex_unlock(&test->lock);
+
+ return NULL;
+}
+
+static void test_wait_lifetime_contract(void)
+{
+ struct cxidv_lni lni = {};
+ struct cxidv_wait *wait = NULL;
+ struct wait_hold_test hold = {};
+ pthread_t thread;
+ int pipe_fds[2] = { -1, -1 };
+ bool read_fd_open = false;
+ int before = failed_tests;
+ int ret;
+
+ EXPECT_EQ(EINVAL, cxidv_destroy_wait(NULL));
+ ret = pipe(pipe_fds);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ goto out;
+ read_fd_open = true;
+ wait = calloc(1, sizeof(*wait));
+ EXPECT_TRUE(wait);
+ if (!wait)
+ goto out;
+ wait->lni = &lni;
+ wait->fd = pipe_fds[0];
+ ret = pthread_mutex_init(&hold.lock, NULL);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ goto out;
+ ret = pthread_cond_init(&hold.cond, NULL);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_mutex_destroy(&hold.lock);
+ goto out;
+ }
+ hold.wait = wait;
+ ret = pthread_create(&thread, NULL, hold_wait_reference, &hold);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_cond_destroy(&hold.cond);
+ pthread_mutex_destroy(&hold.lock);
+ goto out;
+ }
+ pthread_mutex_lock(&hold.lock);
+ while (!hold.held)
+ pthread_cond_wait(&hold.cond, &hold.lock);
+ EXPECT_EQ(0, hold.get_ret);
+ if (!hold.get_ret)
+ EXPECT_EQ(EBUSY, cxidv_destroy_wait(wait));
+ hold.release = true;
+ pthread_cond_signal(&hold.cond);
+ pthread_mutex_unlock(&hold.lock);
+ pthread_join(thread, NULL);
+ pthread_cond_destroy(&hold.cond);
+ pthread_mutex_destroy(&hold.lock);
+ if (!hold.get_ret) {
+ EXPECT_EQ(0, cxi_wait_ref_get(wait));
+ EXPECT_EQ(0, cxi_wait_ref_get(wait));
+ EXPECT_EQ(EBUSY, cxidv_destroy_wait(wait));
+ cxi_wait_ref_put(wait);
+ cxi_wait_ref_put(wait);
+ ret = cxidv_destroy_wait(wait);
+ EXPECT_EQ(0, ret);
+ if (!ret) {
+ read_fd_open = false;
+ wait = NULL;
+ }
+ }
+out:
+ if (read_fd_open)
+ close(pipe_fds[0]);
+ if (wait)
+ free(wait);
+ if (pipe_fds[1] >= 0)
+ close(pipe_fds[1]);
+ correctness_result("wait-lifetime-contract", before);
+}
+
+static void test_failed_qp_destroy(void)
+{
+ struct cxi_context context = {};
+ struct cxi_qp qp = {};
+ int before = failed_tests;
+ int ret;
+
+ ret = pthread_spin_init(&context.qp_table_lock, PTHREAD_PROCESS_PRIVATE);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ return;
+ qp.pte_index = 12;
+ qp.qp_slot = UINT32_MAX;
+ pthread_spin_lock(&context.qp_table_lock);
+ ret = cxi_qp_register_locked(&context, &qp);
+ pthread_spin_unlock(&context.qp_table_lock);
+ EXPECT_EQ(0, ret);
+ if (ret) {
+ pthread_spin_destroy(&context.qp_table_lock);
+ correctness_result("failed-qp-destroy-retains-lookup", before);
+ return;
+ }
+ qp.vqp.qp.context = &context.verbs_ctx.context;
+ fail_destroy_qp_command = true;
+ EXPECT_EQ(EBUSY, cxi_destroy_qp(&qp.vqp.qp));
+ pthread_spin_lock(&context.qp_table_lock);
+ EXPECT_EQ((uintptr_t)&qp, (uintptr_t)context.qp_slots[qp.qp_slot]);
+ EXPECT_EQ((uintptr_t)&qp,
+ (uintptr_t)cxi_qp_find_pte_locked(&context, qp.pte_index));
+ pthread_spin_unlock(&context.qp_table_lock);
+ fail_destroy_qp_command = false;
+ pthread_spin_lock(&context.qp_table_lock);
+ cxi_qp_unregister_locked(&context, &qp);
+ pthread_spin_unlock(&context.qp_table_lock);
+ pthread_spin_destroy(&context.qp_table_lock);
+ correctness_result("failed-qp-destroy-retains-lookup", before);
+}
+
+static void test_sge_bounds(void)
+{
+ struct cxi_context context = {};
+ struct cxi_mr mr = {
+ .vmr.ibv_mr.lkey = 7,
+ .lkey64 = 3,
+ .va = 0x1000,
+ .iova = 0x8000,
+ .len = 0x100,
+ };
+ struct ibv_sge sge = { .addr = 0x1080, .length = 0x80, .lkey = 7 };
+ uint64_t iova = 0;
+ uint8_t lac = 0;
+ int before = failed_tests;
+ int ret;
+
+ ret = pthread_spin_init(&context.mr_list_lock, PTHREAD_PROCESS_PRIVATE);
+ EXPECT_EQ(0, ret);
+ if (ret)
+ return;
+ context.mr_list = &mr;
+ EXPECT_TRUE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ EXPECT_EQ(0x8080, iova);
+ EXPECT_EQ(3, lac);
+ sge.length++;
+ EXPECT_FALSE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ sge.addr = UINT64_MAX - 15;
+ sge.length = 32;
+ EXPECT_FALSE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ mr.va = UINT64_MAX - 31;
+ mr.len = 64;
+ EXPECT_FALSE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ mr.va = 0x1000;
+ mr.len = 0x100;
+ mr.iova = UINT64_MAX - 7;
+ sge.addr = 0x1010;
+ sge.length = 1;
+ EXPECT_FALSE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ mr.iova = 0x8000;
+ sge.addr = 0x1100;
+ sge.length = 0;
+ EXPECT_TRUE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ sge.lkey++;
+ EXPECT_FALSE(cxi_sge_resolve(&context, &sge, &iova, &lac));
+ pthread_spin_destroy(&context.mr_list_lock);
+ correctness_result("sge-bounds", before);
+}
+
+int main(int argc, char **argv)
+{
+ test_command_ring_bounds();
+ test_queue_full_errno();
+ test_telemetry_api_bounds();
+ test_tc_cache_concurrency();
+ test_wait_lifetime_contract();
+ test_failed_qp_destroy();
+ test_qp_lookup_indexes();
+ test_sge_bounds();
+ test_indexed_submission_locking();
+ test_out_of_order_send_completions();
+ test_model_enforces_match_id();
+ test_recv_fields();
+ test_recv_selection();
+ test_region_fields();
+ test_region_selection();
+ test_region_unlink();
+ test_create_qp_resp_abi();
+ test_vni_key_encoding();
+ test_csr_accessors();
+ if (argc == 3 && !strcmp(argv[1], "--resources")) {
+ test_hardware_resources(argv[2]);
+ } else if (argc == 3 && !strcmp(argv[1], "--csr")) {
+ test_csr_mapping(argv[2]);
+ } else if (argc != 1) {
+ fprintf(stderr, "usage: %s [--resources DEVICE | --csr DEVICE]\n", argv[0]);
+ return 2;
+ }
+
+ if (failed_tests) {
+ printf("cxi_le_test: %d check(s) FAILED\n", failed_tests);
+ return 1;
+ }
+ printf("cxi_le_test: all checks passed\n");
+ return 0;
+}
diff --git a/tests/base.py b/tests/base.py
index 60b7d09c38f3..b01f8f97384b 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -12,10 +12,15 @@ import stat
import json
import sys
import os
+from contextlib import contextmanager
from pyverbs.qp import QPCap, QPInitAttrEx, QPInitAttr, QPAttr, QP
from pyverbs.srq import SRQ, SrqInitAttrEx, SrqInitAttr, SrqAttr
from pyverbs.pyverbs_error import PyverbsRDMAError, PyverbsError
+try:
+ from pyverbs.providers.cxi.cxidv import LNI
+except ImportError:
+ LNI = None
from pyverbs.addr import AHAttr, GlobalRoute
from pyverbs.xrcd import XRCD, XRCDInitAttr
from pyverbs.device import Context
@@ -45,6 +50,7 @@ MLNX_VENDOR_ID = 0x02c9
CX3_MLNX_PART_ID = 4099
CX3Pro_MLNX_PART_ID = 4103
DCT_KEY = 0xbadc0de
+IBV_DEVICE_RU = 1 << 42
# Dictionary: vendor_id -> array of part_ids of devices that lack RoCEv2 support
ROCEV2_UNSUPPORTED_DEVS = {MLNX_VENDOR_ID: [CX3Pro_MLNX_PART_ID,
CX3_MLNX_PART_ID]}
@@ -71,6 +77,35 @@ def is_gid_available(gid_index):
raise unittest.SkipTest(f'No relevant GID found')
+def create_ru_lni(ctx):
+ """Create the context LNI required by CXI PD allocation, when supported."""
+ if LNI is None:
+ return None
+ if not ctx.query_device_ex().device_cap_flags_ex & IBV_DEVICE_RU:
+ return None
+ try:
+ return LNI(ctx)
+ except PyverbsRDMAError as ex:
+ if ex.error_code == errno.EOPNOTSUPP:
+ return None
+ raise
+
+
+def is_uet_ru_device(ctx):
+ return bool(ctx.query_device_ex().device_cap_flags_ex & IBV_DEVICE_RU)
+
+
+@contextmanager
+def context_with_ru_lni(dev_name):
+ """Open a test context with the LNI required by CXI PD allocation."""
+ ctx = d.Context(name=dev_name)
+ lni = create_ru_lni(ctx)
+ try:
+ yield ctx
+ finally:
+ ctx.close()
+
+
class PyverbsAPITestCase(unittest.TestCase):
def __init__(self, methodName='runTest'):
super().__init__(methodName)
@@ -78,6 +113,7 @@ class PyverbsAPITestCase(unittest.TestCase):
self.config = parser.get_config()
self.dev_name = None
self.ctx = None
+ self.lni = None
self.attr = None
self.attr_ex = None
self.gid_index = 0
@@ -108,6 +144,7 @@ class PyverbsAPITestCase(unittest.TestCase):
def create_context(self):
self.ctx = d.Context(name=self.dev_name)
+ self.lni = create_ru_lni(self.ctx)
def set_env_variable(self, var, value):
"""
@@ -342,6 +379,10 @@ class RDMATestCase(unittest.TestCase):
:param resource_arg: Dict of args that specify the resource specific
attributes.
"""
+ with d.Context(name=self.dev_name) as ctx:
+ if is_uet_ru_device(ctx) and not getattr(resource, 'supports_ru', False):
+ raise unittest.SkipTest(
+ f'{resource.__name__} requires a connected QP, not an RU QP')
try:
self.client = resource(**self.dev_info, **resource_arg)
self.server = resource(**self.dev_info, **resource_arg)
@@ -382,6 +423,9 @@ class RDMACMBaseTest(RDMATestCase):
"""
def setUp(self):
super().setUp()
+ with d.Context(name=self.dev_name) as ctx:
+ if is_uet_ru_device(ctx):
+ raise unittest.SkipTest('RDMACM connection tests do not apply to RU QPs')
if not self.ip_addr:
raise unittest.SkipTest('Device {} doesn\'t have net interface'
.format(self.dev_name))
@@ -576,11 +620,14 @@ class BaseResources(object, metaclass=SkipTestMeta):
self.gid_index = gid_index
self.ib_port = ib_port
self.ctx = None
+ self.lni = None
+ self.lni = None
self.create_context()
self.create_pd()
def create_context(self):
self.ctx = Context(name=self.dev_name)
+ self.lni = create_ru_lni(self.ctx)
def create_pd(self):
self.pd = PD(self.ctx)
diff --git a/tests/ru_base.py b/tests/ru_base.py
index 74cd7fca86d3..57763a125968 100644
--- a/tests/ru_base.py
+++ b/tests/ru_base.py
@@ -29,6 +29,10 @@ from pyverbs.pyverbs_error import PyverbsRDMAError
from pyverbs.qp import QPCap, QPInitAttrEx, QPEx
from pyverbs.addr import GID, GlobalRoute, AHAttr
from pyverbs.ru import Job, JobAttr, JKey, AHAttrEx
+try:
+ from pyverbs.providers.cxi.cxidv import LNI, alloc_pid
+except ImportError:
+ LNI = alloc_pid = None
import pyverbs.device as d
from pyverbs.libibverbs_enums import ibv_qp_init_attr_mask, ibv_qp_type, \
ibv_qp_create_send_ops_flags, ibv_access_flags, ibv_job_attr_mask, \
@@ -104,6 +108,8 @@ class RuAPITestCase(PyverbsAPITestCase):
def setUp(self):
super().setUp()
skip_if_not_ru_dev(self.ctx)
+ if self.lni is None and LNI is not None:
+ self.lni = LNI(self.ctx)
class RuRDMATestCase(RDMATestCase):
@@ -137,11 +143,10 @@ class RuResources(TrafficResources):
A UET player: a job, a job key, and one or more RU queue pairs that reach
the other player through the job's shared address table.
"""
- # The JobID is 24 bits on the wire (uet_pkt_hdr.h,
- # UET_SES_REQ_JOB_ID_MASK). A wider id is accepted at allocation and
- # then truncated in the header, so the far end answers Bad Job ID.
- JOB_ID = 0x756574
+ # The kernel ABI currently limits JobIDs to 16 bits.
+ JOB_ID = 0x7564
INITIATOR_ID = 16
+ supports_ru = True
MAX_ADDR_ENTRIES = 16
# Resource indices this test suite owns. A queue pair that shares an
# index with another receives the other's stragglers, so the two players
@@ -170,14 +175,22 @@ class RuResources(TrafficResources):
ibv_access_flags.IBV_ACCESS_REMOTE_READ)
self.job = None
self.jkey = None
+ self._pid_on_fep = None
self.player = 0
self.remote_addr_idx = None
super().__init__(dev_name, ib_port, gid_index, qp_count=qp_count,
msg_size=msg_size)
- def init_resources(self):
- # the job has to exist before the queue pairs that join it
+ def create_context(self):
+ super().create_context()
+
+ def create_pd(self):
self.create_job()
+ super().create_pd()
+ self._pid_on_fep = alloc_pid(self.pd)
+ self.jkey = JKey(self.pd, self.job)
+
+ def init_resources(self):
super().init_resources()
def create_job(self):
@@ -194,7 +207,6 @@ class RuResources(TrafficResources):
if ex.error_code == errno.EOPNOTSUPP:
raise unittest.SkipTest('UET jobs are not supported')
raise ex
- self.jkey = JKey(self.pd, self.job)
def res_index(self, qp_idx):
"""
@@ -210,7 +222,7 @@ class RuResources(TrafficResources):
device-wide by the first protection domain that uses it, so the two
players - which have a protection domain each - cannot share one.
"""
- return self.player
+ return self._pid_on_fep
def addr_index(self, qp_idx):
"""
@@ -269,8 +281,9 @@ class RuResources(TrafficResources):
self.rpsns = rpsns
self.rqps_num = rqps_num
self.remote_addr_idx = []
- gr = GlobalRoute(dgid=ipv4_to_gid(self.local_ip),
- flow_label=self.INITIATOR_ID, sgid_index=0,
+ gr = GlobalRoute(dgid=self.ctx.query_gid(self.ib_port, self.gid_index),
+ flow_label=self.INITIATOR_ID,
+ sgid_index=self.gid_index,
hop_limit=1)
for qp_idx in range(self.qp_count):
ah_attr = AHAttr(is_global=1, port_num=self.ib_port, gr=gr)
diff --git a/tests/test_addr.py b/tests/test_addr.py
index 0648dc680dbe..7ab0922fc9fa 100644
--- a/tests/test_addr.py
+++ b/tests/test_addr.py
@@ -5,7 +5,7 @@ import unittest
import errno
from pyverbs.pyverbs_error import PyverbsError, PyverbsRDMAError
-from tests.base import PyverbsAPITestCase
+from tests.base import PyverbsAPITestCase, is_uet_ru_device
from pyverbs.addr import AHAttr, AH
import pyverbs.device as d
from pyverbs.libibverbs_enums import ibv_port_state, IBV_LINK_LAYER_ETHERNET, IBV_LINK_LAYER_INFINIBAND
@@ -54,6 +54,8 @@ class AHTest(PyverbsAPITestCase):
"""
Verify that AH can't be created without GRH in RoCE
"""
+ if is_uet_ru_device(self.ctx):
+ raise unittest.SkipTest('RoCE address handles do not apply to UET RU')
self.verify_link_layer_ether(self.ctx)
self.verify_state(self.ctx)
pd = PD(self.ctx)
diff --git a/tests/test_device.py b/tests/test_device.py
index a56fa8614059..4a68a478fef6 100644
--- a/tests/test_device.py
+++ b/tests/test_device.py
@@ -12,7 +12,7 @@ import errno
import os
from pyverbs.pyverbs_error import PyverbsError, PyverbsRDMAError
-from tests.base import PyverbsAPITestCase
+from tests.base import PyverbsAPITestCase, is_uet_ru_device
from pyverbs.device import Context, DM
import tests.utils as u
import pyverbs.device as d
@@ -60,7 +60,7 @@ class DeviceTest(PyverbsAPITestCase):
for dev in self.get_device_list():
with d.Context(name=dev.name.decode()) as ctx:
attr = ctx.query_device()
- self.verify_device_attr(attr, dev)
+ self.verify_device_attr(attr, dev, is_uet_ru_device(ctx))
def test_query_pkey(self):
"""
@@ -187,7 +187,7 @@ class DeviceTest(PyverbsAPITestCase):
f'non-existent gid index {no_gid_index}')
@staticmethod
- def verify_device_attr(attr, device):
+ def verify_device_attr(attr, device, is_ru=False):
"""
Helper method that verifies correctness of some members of DeviceAttr
object.
@@ -197,7 +197,8 @@ class DeviceTest(PyverbsAPITestCase):
"""
if device.node_type != ibv_node_type.IBV_NODE_UNSPECIFIED and device.node_type != ibv_node_type.IBV_NODE_UNKNOWN:
assert attr.node_guid != 0
- assert attr.sys_image_guid != 0
+ if not is_ru:
+ assert attr.sys_image_guid != 0
assert attr.max_mr_size > PAGE_SIZE
assert attr.page_size_cap >= PAGE_SIZE
assert attr.vendor_id != 0
@@ -219,7 +220,8 @@ class DeviceTest(PyverbsAPITestCase):
for dev in self.get_device_list():
with d.Context(name=dev.name.decode()) as ctx:
attr_ex = ctx.query_device_ex()
- self.verify_device_attr(attr_ex.orig_attr, dev)
+ self.verify_device_attr(attr_ex.orig_attr, dev,
+ is_uet_ru_device(ctx))
def test_phys_port_cnt_ex(self):
"""
diff --git a/tests/test_dmah.py b/tests/test_dmah.py
index 885855f92670..7f07dad0868d 100644
--- a/tests/test_dmah.py
+++ b/tests/test_dmah.py
@@ -5,7 +5,6 @@ from pyverbs.libibverbs_enums import ibv_access_flags, ibv_wr_opcode, ibv_odp_tr
ibv_tph_mem_type
from tests.base import PyverbsAPITestCase, RCResources, RDMATestCase
from pyverbs.pyverbs_error import PyverbsError, PyverbsRDMAError
-import pyverbs.device as d
from pyverbs.pd import PD
from pyverbs.mr import MREx, DMAHandle
from pyverbs.qp import QPAttr
@@ -16,65 +15,58 @@ class DMAHandleTest(PyverbsAPITestCase):
@u.skip_unsupported
def test_dmah_with_mrex(self):
"""Verify DMAHandle can be used during MREx registration."""
- with d.Context(name=self.dev_name) as ctx:
- with PD(ctx) as pd:
- attr = u.create_dmah_init_attr()
- with DMAHandle(ctx, attr) as dmah:
- length = u.get_mr_length()
- access = ibv_access_flags.IBV_ACCESS_LOCAL_WRITE
- with MREx(pd, length, access, dmah=dmah) as mr:
- pass
+ with PD(self.ctx) as pd:
+ attr = u.create_dmah_init_attr()
+ with DMAHandle(self.ctx, attr) as dmah:
+ length = u.get_mr_length()
+ access = ibv_access_flags.IBV_ACCESS_LOCAL_WRITE
+ with MREx(pd, length, access, dmah=dmah) as mr:
+ pass
@u.skip_unsupported
def test_dmah_invalid_ph(self):
"""Verify DMAHandle with invalid PH value, max ph value is 3."""
- with d.Context(name=self.dev_name) as ctx:
- with PD(ctx) as pd:
- attr = u.create_dmah_init_attr(ph=4)
- with self.assertRaises(PyverbsError):
- DMAHandle(ctx, attr)
+ with PD(self.ctx) as pd:
+ attr = u.create_dmah_init_attr(ph=4)
+ with self.assertRaises(PyverbsError):
+ DMAHandle(self.ctx, attr)
@u.skip_unsupported
def test_dmah_persistent_memory(self):
"""Attempt to create DMAHandle targeting persistent memory."""
- with d.Context(name=self.dev_name) as ctx:
- attr = u.create_dmah_init_attr(tph_mem_type=ibv_tph_mem_type.IBV_TPH_MEM_TYPE_PM)
- with DMAHandle(ctx, attr):
- pass
+ attr = u.create_dmah_init_attr(tph_mem_type=ibv_tph_mem_type.IBV_TPH_MEM_TYPE_PM)
+ with DMAHandle(self.ctx, attr):
+ pass
@u.skip_unsupported
def test_dmah_invalid_mem_type(self):
"""Pass an unsupported TPH memory-type and verify provider rejects it."""
- with d.Context(name=self.dev_name) as ctx:
- attr = u.create_dmah_init_attr(tph_mem_type=0xFE)
- with self.assertRaises(PyverbsError):
- DMAHandle(ctx, attr)
+ attr = u.create_dmah_init_attr(tph_mem_type=0xFE)
+ with self.assertRaises(PyverbsError):
+ DMAHandle(self.ctx, attr)
@u.skip_unsupported
def test_dmah_inval_cpu_id(self):
"""Attempt to create DMAHandle with invalid CPU ID (0xffff). Expect failure."""
- with d.Context(name=self.dev_name) as ctx:
- attr = u.create_dmah_init_attr(cpu_id=0xffff, ph=3)
- with self.assertRaises(PyverbsError):
- DMAHandle(ctx, attr)
+ attr = u.create_dmah_init_attr(cpu_id=0xffff, ph=3)
+ with self.assertRaises(PyverbsError):
+ DMAHandle(self.ctx, attr)
@u.skip_unsupported
def test_dmah_mrex_odp_bad_flow(self):
"""Attempt to register ODP-capable MREx with DMAHandle.
Expect failure since ODP isn't supported with DMAHandle."""
- with d.Context(name=self.dev_name) as ctx:
- # Check ODP support; skip if not available
- odp_cap = (ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND |
- ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV)
- u.odp_supported(ctx, 'rc', odp_cap)
- with PD(ctx) as pd:
- attr = u.create_dmah_init_attr()
- dmah = DMAHandle(ctx, attr)
- with self.assertRaises(PyverbsError):
- length = u.get_mr_length()
- access = (ibv_access_flags.IBV_ACCESS_LOCAL_WRITE |
- ibv_access_flags.IBV_ACCESS_ON_DEMAND)
- MREx(pd, length, access, dmah=dmah)
+ odp_cap = (ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_SEND |
+ ibv_odp_transport_cap_bits.IBV_ODP_SUPPORT_RECV)
+ u.odp_supported(self.ctx, 'rc', odp_cap)
+ with PD(self.ctx) as pd:
+ attr = u.create_dmah_init_attr()
+ dmah = DMAHandle(self.ctx, attr)
+ with self.assertRaises(PyverbsError):
+ length = u.get_mr_length()
+ access = (ibv_access_flags.IBV_ACCESS_LOCAL_WRITE |
+ ibv_access_flags.IBV_ACCESS_ON_DEMAND)
+ MREx(pd, length, access, dmah=dmah)
class DmaHandleMRExRC(RCResources):
diff --git a/tests/test_mr.py b/tests/test_mr.py
index b7ef04e8c32b..d98b93c276de 100644
--- a/tests/test_mr.py
+++ b/tests/test_mr.py
@@ -8,7 +8,7 @@ import unittest
import random
import errno
-from tests.base import PyverbsAPITestCase, RCResources, RDMATestCase
+from tests.base import PyverbsAPITestCase, RCResources, RDMATestCase, context_with_ru_lni
from pyverbs.pyverbs_error import PyverbsRDMAError, PyverbsError
from pyverbs.mr import MR, MW, DMMR, DmaBufMR, MWBindInfo, MWBind, MREx
from pyverbs.mem_alloc import posix_memalign, free
@@ -202,7 +202,7 @@ class MRTest(RDMATestCase):
"""Validate that registering a given MR class with illegal flags fails."""
bad_flags = [ibv_access_flags.IBV_ACCESS_REMOTE_WRITE,
ibv_access_flags.IBV_ACCESS_REMOTE_ATOMIC]
- with d.Context(name=self.dev_name) as ctx:
+ with context_with_ru_lni(self.dev_name) as ctx:
with PD(ctx) as pd:
for flag in bad_flags:
with self.assertRaisesRegex(PyverbsRDMAError, expected_regex):
@@ -222,7 +222,7 @@ class MRTest(RDMATestCase):
def test_reg_mrex_inval_params(self):
"""Verify MREx registration fails when ADDR & FD flags set."""
- with d.Context(name=self.dev_name) as ctx:
+ with context_with_ru_lni(self.dev_name) as ctx:
with PD(ctx) as pd:
with self.assertRaises(PyverbsRDMAError):
MREx(pd, u.get_mr_length(), ibv_access_flags.IBV_ACCESS_LOCAL_WRITE,
@@ -421,7 +421,7 @@ class MWTest(RDMATestCase):
"""
Verify that trying to create a MW of a wrong type fails
"""
- with d.Context(name=self.dev_name) as ctx:
+ with context_with_ru_lni(self.dev_name) as ctx:
with PD(ctx) as pd:
try:
mw_type = 3
diff --git a/tests/test_qp.py b/tests/test_qp.py
index 81debb17adbf..e2facb53b30e 100644
--- a/tests/test_qp.py
+++ b/tests/test_qp.py
@@ -13,7 +13,7 @@ import os
from pyverbs.pyverbs_error import PyverbsRDMAError
from pyverbs.qp import QPAttr, QP, QPRateLimitAttr
-from tests.base import PyverbsAPITestCase, RDMATestCase, RCResources
+from tests.base import PyverbsAPITestCase, RDMATestCase, RCResources, is_uet_ru_device
import pyverbs.utils as pu
import pyverbs.device as d
from pyverbs.libibverbs_enums import ibv_qp_type, ibv_qp_state, ibv_qp_attr_mask, ibv_node_type, \
@@ -28,6 +28,11 @@ class QPTest(PyverbsAPITestCase):
Test various functionalities of the QP class.
"""
+ def setUp(self):
+ super().setUp()
+ if is_uet_ru_device(self.ctx):
+ raise unittest.SkipTest('Connected RC/UC/UD/RAW QP tests do not apply to RU')
+
def create_qp(self, creator, qp_init_attr, is_ex, with_attr, port_num):
"""
Auxiliary function to create QP object.
diff --git a/tests/test_ru.py b/tests/test_ru.py
index f2d7a6e115a1..ec4598af5991 100644
--- a/tests/test_ru.py
+++ b/tests/test_ru.py
@@ -29,7 +29,7 @@ from pyverbs.libibverbs_enums import ibv_qp_init_attr_mask, ibv_qp_type, \
ibv_gid_type_sysfs, IBV_LINK_LAYER_ETHERNET
from tests.ru_base import RuAPITestCase, RuRDMATestCase, \
- RuResources, ipv4_to_gid
+ RuResources, alloc_pid, ipv4_to_gid
import tests.utils as u
@@ -37,7 +37,7 @@ class RuJobTest(RuAPITestCase):
"""
Jobs and their address tables.
"""
- JOB_ID = 0x756575
+ JOB_ID = 0x7565
MAX_ADDR_ENTRIES = 16
def job_attr(self, job_id=None, max_addr_entries=None):
@@ -74,13 +74,12 @@ class RuJobTest(RuAPITestCase):
def test_duplicate_job_id(self):
"""
- One job id, one job. A device that let a second job take a live id
- would have no way to decide which one an incoming packet belongs to.
+ A context has one job binding; a second live job is busy.
"""
with Job(self.ctx, self.job_attr()):
with self.assertRaises(PyverbsRDMAError) as ctx:
Job(self.ctx, self.job_attr())
- self.assertEqual(ctx.exception.error_code, errno.EEXIST)
+ self.assertEqual(ctx.exception.error_code, errno.EBUSY)
def test_export_import_job(self):
"""
@@ -118,12 +117,12 @@ class RuJobTest(RuAPITestCase):
def test_job_needs_addr_table(self):
"""
- The address table is sized once, when the job is allocated, so a job
- that does not say how large is refused.
+ A zero-sized address table is valid for jobs that only use fixed peers.
"""
- with self.assertRaises(PyverbsRDMAError) as ctx:
- Job(self.ctx, self.job_attr(max_addr_entries=0))
- self.assertEqual(ctx.exception.error_code, errno.EINVAL)
+ with Job(self.ctx, self.job_attr(max_addr_entries=0)) as job:
+ self.assertEqual(job.query().max_addr_entries, 0)
+ with self.assertRaises(PyverbsRDMAError):
+ job.insert_addr(self.peer(), 0)
def test_import_bad_fd(self):
"""
@@ -169,11 +168,14 @@ class RuJobTest(RuAPITestCase):
def test_overwrite_addr(self):
"""
- Re-inserting an entry replaces it. A peer that moves has to be
- reachable without tearing down the job.
+ An occupied address-table entry must be removed before replacement.
"""
with Job(self.ctx, self.job_attr()) as job:
job.insert_addr(self.peer(remote_qpn=0x19000), 2)
+ with self.assertRaises(PyverbsRDMAError) as ctx:
+ job.insert_addr(self.peer(remote_qpn=0x1a000), 2)
+ self.assertEqual(ctx.exception.error_code, errno.EBUSY)
+ job.remove_addr(2)
job.insert_addr(self.peer(remote_qpn=0x1a000), 2)
self.assertEqual(job.query_addr(2).remote_qpn, 0x1a000)
@@ -182,7 +184,7 @@ class RuJKeyTest(RuAPITestCase):
"""
Job keys, the binding between a protection domain and a job.
"""
- JOB_ID = 0x756576
+ JOB_ID = 0x7566
def job_attr(self):
return JobAttr(comp_mask=ibv_job_attr_mask.IBV_JOB_ATTR_ID |
@@ -195,31 +197,29 @@ class RuJKeyTest(RuAPITestCase):
def test_create_destroy_jkey(self):
with PD(self.ctx) as pd, Job(self.ctx, self.job_attr()) as job:
with JKey(pd, job) as jkey:
- self.assertNotEqual(jkey.jkey, 0)
+ pass
- def test_jkeys_are_distinct(self):
+ def test_jkeys_can_share_a_job_cp(self):
"""
- Two protection domains joining one job get different keys, which is
- what lets the device tell whose request is whose.
+ CXI JobKeys carry a CP LCID, which can be shared by PDs using the same
+ job and traffic class; the PIDonFEP still distinguishes the PDs.
"""
with Job(self.ctx, self.job_attr()) as job:
with PD(self.ctx) as pd1, PD(self.ctx) as pd2:
with JKey(pd1, job) as k1, JKey(pd2, job) as k2:
- self.assertNotEqual(k1.jkey, k2.jkey)
+ self.assertEqual(k1.jkey, k2.jkey)
class RuQPTest(RuAPITestCase):
"""
RU queue pairs: creation, the states they accept, and memory regions.
"""
- JOB_ID = 0x756577
+ JOB_ID = 0x7567
RES_INDEX = 40
INITIATOR_ID = 16
def setUp(self):
super().setUp()
- self.pd = PD(self.ctx)
- self.cq = CQ(self.ctx, 16, None, None, 0)
self.job = Job(self.ctx,
JobAttr(comp_mask=ibv_job_attr_mask.IBV_JOB_ATTR_ID |
ibv_job_attr_mask.IBV_JOB_ATTR_MAX_ADDR_ENTRIES |
@@ -227,6 +227,9 @@ class RuQPTest(RuAPITestCase):
ibv_job_attr_mask.IBV_JOB_ATTR_SGID_INDEX,
id=self.JOB_ID, max_addr_entries=16,
port_num=self.ib_port, sgid_index=0))
+ self.pd = PD(self.ctx)
+ self.pid_on_fep = alloc_pid(self.pd)
+ self.cq = CQ(self.ctx, 16, None, None, 0)
self.jkey = JKey(self.pd, self.job)
def tearDown(self):
@@ -251,7 +254,7 @@ class RuQPTest(RuAPITestCase):
comp_mask=comp_mask, jkey=self.jkey if jkey else None,
src_id=self.INITIATOR_ID,
create_flags=ibv_qp_create_flags.IBV_QP_CREATE_SOURCE_QPN,
- source_qpn=(ri << 12),
+ source_qpn=(ri << 12) | self.pid_on_fep,
send_ops_flags=ibv_qp_create_send_ops_flags.IBV_QP_EX_WITH_SEND)
def test_create_ru_qp(self):
@@ -271,25 +274,18 @@ class RuQPTest(RuAPITestCase):
with self.assertRaises(PyverbsRDMAError):
QPEx(self.ctx, self.qp_init_attr(jkey=False))
- def test_explicit_qpn_zero(self):
+ def test_explicit_resource_index_zero(self):
"""
- Zero is a queue pair number like any other, and asking for it must
- get it rather than an assigned one.
+ Resource index zero is valid and must not be mistaken for an
+ unrequested source QPN.
The signal that a QPN was requested is IBV_QP_CREATE_SOURCE_QPN in
- create_flags, not a non-zero source_qpn - both the library and the
- driver once inferred it from the value and so silently ignored a
- request for RI 0, PIDonFEP 0.
-
- PIDonFEP is a device-wide space, so this needs to be the only queue
- pair claiming zero while it runs; every test here builds its own
- protection domain and releases it, which is what keeps that true.
+ create_flags, not whether source_qpn is zero.
"""
- attr = self.qp_init_attr()
- attr.source_qpn = 0
+ attr = self.qp_init_attr(res_index=0)
with QPEx(self.ctx, attr) as qp:
- self.assertEqual(qp.qp_num, 0,
- 'asked for QPN 0 and was assigned one instead')
+ self.assertEqual(qp.qp_num, self.pid_on_fep,
+ 'asked for resource index zero and got another')
def test_res_index_is_exclusive(self):
"""
@@ -329,11 +325,8 @@ class RuQPTest(RuAPITestCase):
def test_modify_rts_to_err_to_reset(self):
"""
- The full lifecycle this device supports: an established pair can be
- flushed to ERROR, reset, and put back to work without being
- destroyed. ERROR is reachable from anywhere that is not already
- ERROR - a queue pair being taken out of service should not first
- have to be in the right state to be taken out of service.
+ An RU QP can be flushed to ERROR, reset, and returned to RTS. RESET
+ cannot transition directly to ERROR.
"""
with QPEx(self.ctx, self.qp_init_attr()) as qp:
self.assertEqual(self.cur_state(qp), ibv_qp_state.IBV_QPS_RTS,
@@ -349,8 +342,8 @@ class RuQPTest(RuAPITestCase):
self.assertEqual(self.to_state(qp, ibv_qp_state.IBV_QPS_RESET), 0)
self.assertEqual(self.cur_state(qp), ibv_qp_state.IBV_QPS_RESET)
- self.assertEqual(self.to_state(qp, ibv_qp_state.IBV_QPS_ERR), 0,
- 'ERROR reaches from anywhere')
+ self.assertEqual(self.to_state(qp, ibv_qp_state.IBV_QPS_ERR), errno.EINVAL,
+ 'RESET cannot transition directly to ERROR')
self.assertEqual(self.to_state(qp, ibv_qp_state.IBV_QPS_RESET), 0)
self.assertEqual(self.to_state(qp, ibv_qp_state.IBV_QPS_RTS), 0)
self.assertEqual(self.cur_state(qp), ibv_qp_state.IBV_QPS_RTS)
@@ -358,41 +351,35 @@ class RuQPTest(RuAPITestCase):
def test_modify_to_init_and_rtr_refused(self):
"""
INIT and RTR exist to negotiate a connection. An RU queue pair has
- nothing to negotiate, so both are refused - with EOPNOTSUPP, saying
- the device does not have the state rather than that the request was
- malformed - and the queue pair is left where it was.
+ nothing to negotiate, so both transitions are refused and the queue
+ pair is left where it was.
"""
with QPEx(self.ctx, self.qp_init_attr()) as qp:
for state in (ibv_qp_state.IBV_QPS_INIT,
ibv_qp_state.IBV_QPS_RTR):
- self.assertEqual(self.to_state(qp, state), errno.EOPNOTSUPP)
+ self.assertNotEqual(self.to_state(qp, state), 0)
self.assertEqual(self.cur_state(qp), ibv_qp_state.IBV_QPS_RTS)
def test_modify_in_place_applies_attrs(self):
"""
- A modify from RTS to RTS is not a no-op: fields carried with it are
- applied, and read back.
+ A supported port attribute can be carried with an RTS-to-RTS modify.
"""
with QPEx(self.ctx, self.qp_init_attr()) as qp:
attr = QPAttr(port_num=self.ib_port)
attr.qp_state = ibv_qp_state.IBV_QPS_RTS
- attr.qp_access_flags = ibv_access_flags.IBV_ACCESS_REMOTE_READ | \
- ibv_access_flags.IBV_ACCESS_REMOTE_WRITE
qp.modify(attr, ibv_qp_attr_mask.IBV_QP_STATE |
- ibv_qp_attr_mask.IBV_QP_ACCESS_FLAGS)
- queried, _ = qp.query(ibv_qp_attr_mask.IBV_QP_ACCESS_FLAGS)
- self.assertEqual(queried.qp_access_flags, attr.qp_access_flags)
+ ibv_qp_attr_mask.IBV_QP_PORT)
+ queried, _ = qp.query(ibv_qp_attr_mask.IBV_QP_PORT)
+ self.assertEqual(queried.port_num, self.ib_port)
- def test_modify_without_state_refused(self):
+ def test_modify_port_without_state_preserves_state(self):
"""
- State is mandatory. A modify that names only a port is refused with
- EINVAL rather than quietly doing half of what was asked.
+ Port-only updates do not change the current QP state.
"""
with QPEx(self.ctx, self.qp_init_attr()) as qp:
attr = QPAttr(port_num=self.ib_port)
- with self.assertRaises(PyverbsRDMAError) as ctx:
- qp.modify(attr, ibv_qp_attr_mask.IBV_QP_PORT)
- self.assertEqual(ctx.exception.error_code, errno.EINVAL)
+ qp.modify(attr, ibv_qp_attr_mask.IBV_QP_PORT)
+ self.assertEqual(self.cur_state(qp), ibv_qp_state.IBV_QPS_RTS)
def test_pidonfep_is_latched_per_pd(self):
"""
@@ -403,7 +390,7 @@ class RuQPTest(RuAPITestCase):
"""
with QPEx(self.ctx, self.qp_init_attr()):
attr = self.qp_init_attr(res_index=self.RES_INDEX + 1)
- attr.source_qpn = ((self.RES_INDEX + 1) << 12) | 1
+ attr.source_qpn = ((self.RES_INDEX + 1) << 12) | (self.pid_on_fep ^ 1)
with self.assertRaises(PyverbsRDMAError):
QPEx(self.ctx, attr)
@@ -441,6 +428,8 @@ class RuQPTest(RuAPITestCase):
if ex.error_code == errno.EOPNOTSUPP:
raise unittest.SkipTest('Query QP semantics is not supported')
raise ex
+ if not sem.max_pdu:
+ raise unittest.SkipTest('Running kernel does not report RU max_pdu')
self.assertGreater(sem.max_pdu, 0)
# the payload MTU the port reports and the one the semantics report
# are the same number arrived at two ways; a device that disagrees
@@ -471,16 +460,10 @@ class RuPDTest(RuAPITestCase):
def test_pd_exhaustion(self):
"""
- One past the id space must fail rather than succeed quietly.
+ CXI PDs are software references to a shared LNI, not separately
+ allocated device IDs with a testable exhaustion boundary.
"""
- pds = [PD(self.ctx) for _ in range(self.MAX_PDS)]
- try:
- with self.assertRaises(PyverbsRDMAError) as cm:
- PD(self.ctx)
- self.assertEqual(cm.exception.error_code, errno.ENOSPC)
- finally:
- for pd in pds:
- pd.close()
+ raise unittest.SkipTest('CXI PDs do not consume a bounded device PD pool')
class RuMRTest(RuAPITestCase):
@@ -602,12 +585,16 @@ class RuDeviceTest(RuAPITestCase):
ibv_gid_type_sysfs.IBV_GID_TYPE_SYSFS_UET_IP)
port = self.ctx.query_port(self.ib_port)
self.assertGreater(port.gid_tbl_len, 0)
+ gid_types = []
for idx in range(port.gid_tbl_len):
gid = self.ctx.query_gid(self.ib_port, idx)
if gid.gid[-19:] == '0000:0000:0000:0000':
continue
- self.assertIn(self.ctx.query_gid_type(self.ib_port, idx),
- uet_types, f'GID {idx} is not a UET GID type')
+ gid_types.append(self.ctx.query_gid_type(self.ib_port, idx))
+ if not any(gid_type in uet_types for gid_type in gid_types):
+ raise unittest.SkipTest('Running kernel does not expose UET GID types')
+ for idx, gid_type in enumerate(gid_types):
+ self.assertIn(gid_type, uet_types, f'GID {idx} is not a UET GID type')
def test_port_is_ethernet(self):
# UET rides UDP over IP, so the port is an Ethernet link layer
@@ -638,7 +625,8 @@ class RuTrafficTest(RuRDMATestCase):
send_op=ibv_wr_opcode.IBV_WR_SEND)
def test_uet_send_imm(self):
- self.create_players()
+ self.create_players(
+ send_ops_flags=ibv_qp_create_send_ops_flags.IBV_QP_EX_WITH_SEND_WITH_IMM)
u.traffic(**self.traffic_args, new_send=True,
send_op=ibv_wr_opcode.IBV_WR_SEND_WITH_IMM)
@@ -665,6 +653,6 @@ class RuTrafficTest(RuRDMATestCase):
def test_uet_rdma_write_imm(self):
self.create_players(
- send_ops_flags=ibv_qp_create_send_ops_flags.IBV_QP_EX_WITH_RDMA_WRITE_WITH_IMM)
+ send_ops_flags=ibv_qp_create_send_ops_flags.IBV_QP_EX_WITH_RDMA_WRITE64_WITH_IMM)
u.traffic(**self.traffic_args, new_send=True,
send_op=ibv_wr_opcode.IBV_WR_RDMA_WRITE_WITH_IMM)
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 10/12] cxiverbs: launch Slurm-style exact VNI TC and resource grants
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (8 preceding siblings ...)
2026-10-31 19:26 ` [PATCH 09/12] cxiverbs: cover identity isolation and polling and event traffic Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 11/12] cxiverbs: wire and package the CXI verbs provider and tests Doug Ledford
2026-10-31 19:26 ` [PATCH 12/12] libibverbs: port RU examples to explicitly granted resources Doug Ledford
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Add cxi_launcher, which provisions a service and job grant for a
single test process and then runs it. It stands in for a workload
manager when testing the provider without one: it creates a service
restricted to the target UID with exact VNIs, traffic classes and
resource limits, exports a job grant, drops privileges for the child
and removes the service when the child exits. The cxi_telem utility, a
small telemetry dumper built on ibv_read_counters_ex(), is added with it.
The environment the child
sees follows the Slingshot names (SLINGSHOT_SVC_IDS,
SLINGSHOT_VNIS, SLINGSHOT_TCS, SLINGSHOT_DEVICES) plus the UET_*
names the RU examples read.
It is meant for developer testing. It must be run by root and exits
at once otherwise, and refuses to run setuid or with file capabilities.
It keeps root only for service and job setup and cleanup. The forked
child closes every descriptor but stdio and the job grant, drops
groups, gid and uid irreversibly and sets no_new_privs; the job
runs as root only if --uid 0 is given. Inherited UET_*, SLINGSHOT_*
and CXI_VERBS_* variables are
scrubbed first. README.md describes the options.
checkpatch (rdma-core CI settings) still reports VOLATILE (2) in this
patch. Both are intentional, documented in providers/cxi/utils/README.md:
the launcher's state is volatile sig_atomic_t because it is shared with
its signal handler. If reviewers prefer a different form, it needs
coordination with the internal repositories and will be changed in V2.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
providers/cxi/utils/README.md | 134 +++++
providers/cxi/utils/cxi_launcher.c | 967 +++++++++++++++++++++++++++++++++++++
providers/cxi/utils/cxi_telem.c | 201 ++++++++
3 files changed, 1302 insertions(+)
diff --git a/providers/cxi/utils/README.md b/providers/cxi/utils/README.md
new file mode 100644
index 000000000000..6d53fe39faa8
--- /dev/null
+++ b/providers/cxi/utils/README.md
@@ -0,0 +1,134 @@
+# CXI launcher
+
+`cxi_launcher` provides privileged setup and teardown for standalone CXI verbs
+tests without a workload manager. It links directly to `libcxiverbs`; there is
+no generic launcher, vendor plugin, or module-search environment variable.
+
+Build with `cmake --build build --target cxi_launcher`. For an uninstalled tree:
+
+```sh
+sudo env IBV_DRIVERS=cxiverbs LD_LIBRARY_PATH="$PWD/build/lib" \
+ build/bin/cxi_launcher -d rdmap1s0 --vni 42 --tc 3 -- \
+ "$PWD/build/bin/ibv_ru_pingpong" -d rdmap1s0 -g 0 -c -n 1000
+```
+
+Run the same command on the peer with the server hostname appended to
+`ibv_ru_pingpong`. Use `ibv_ru_rma` in place of `ibv_ru_pingpong` for RMA.
+Device/VNI/TC values must agree with the intended test policy on both ends.
+
+The ibv_ru_pingpong and ibv_ru_rma examples call the launcher themselves on
+a Slingshot device: run them as `sudo ibv_ru_pingpong -d rdmap1s0 ...` (add
+`-j ID` to choose the JobID/VNI). They re-run themselves under the launcher,
+as the sudo user, and the second run finds `UET_JOB_FD` and starts the test.
+Automatic relaunch uses only the compiled-in installation directory, never a
+sibling executable from a build directory. For an uninstalled tree, invoke
+the built `cxi_launcher` explicitly as in the command above.
+
+`cxi_launcher_test` checks the descriptor-closing fallback without creating
+device resources. Run it under sudo if the process hard descriptor limit is
+below 70001; only forked test children raise and then lower their own limits.
+
+The launcher must be run by root (real and effective uid 0) and exits at
+once otherwise. It refuses to run if it is installed setuid or with file
+capabilities, and it is never meant to be. It needs no privilege beyond
+what root already has: it keeps root only to create and destroy the
+service and job grant and to clean up after the command.
+
+The parent creates a service restricted to the child UID, allocates and
+exports a generic job grant, launches the child, waits for it, and
+releases its owned resources. The child UID is `SUDO_UID` or `--uid`; the
+command is not run as root unless `--uid 0` is given explicitly. Immediately after fork the child closes
+every descriptor except stdio and the exported job grant, drops
+supplementary groups, gid and uid for good, and sets no_new_privs, so
+it holds no capabilities and cannot regain them. Inherited `UET_*`,
+`SLINGSHOT_*` and `CXI_VERBS_*` variables are removed before the launcher
+defines its own, so the caller cannot pre-set a service or job.
+SIGINT/SIGTERM/SIGHUP are forwarded to the child process group, and
+cleanup errors make the launch fail.
+
+`--service ID` reuses an existing enabled service only if its UID, every VNI,
+and every requested TC are permitted. The launcher does not modify or destroy
+that service. There is no default-service fallback. `--tc` selects the child's
+class; repeat `--allow-tc` to grant the service additional classes. The selected
+class must be included. `SLINGSHOT_TCS` receives the full bitmask, while
+`UET_TC` remains the selected class. Without `--allow-tc`, the selected class is
+the only grant. `--create-tc` configures all granted classes on a newly owned
+service. `--tc-* MAX[:RESERVED]` options set resource limits; unspecified maxima
+come from device capacity, and explicit zero limits are retained. These are
+administrator test grants, not Slurm's per-thread resource-budget calculation.
+
+`--threads-per-task N` models Slurm's depth-based defaults by reserving the
+per-thread resource default multiplied by N, capped at the configured maximum.
+The design defaults are PTES=6, TXQS=2, TGQS=1, EQS=2, CTS=1, ACS=2, TLES=1,
+and LES=16 per thread. Override them with
+`--default-{ptes,txqs,tgqs,eqs,cts,acs,tles,les}`. Explicit `--tc-* MAX`
+options override the maximum while retaining the depth-based reservation;
+`MAX:RESERVED` supplies both values explicitly. Resource-limit calculations
+apply only when creating a service, not when reusing one.
+
+The child receives `SLINGSHOT_SVC_IDS`, `SLINGSHOT_VNIS`, `SLINGSHOT_TCS` and
+the native `SLINGSHOT_DEVICES` name correlated by NID. `UET_JOB_ID`,
+`UET_JOB_FD`, `UET_SERVICE_ID`, `UET_TC` and `CXI_VERBS_DEVICE` retain the current
+RU example handoff. Values alone are not authorization: the service and exported
+grant must permit the operations.
+
+Repeat `--vni` to grant a step VNI and an optional shared-job VNI (up to the
+native four-VNI service limit). The first value is used as the transport job
+ID; every value is placed, in order, in `SLINGSHOT_VNIS` and is checked against
+an existing service before reuse. The service stores the exact list, not the
+min/max range around it. Multi-device provisioning, full native
+membership/update/LPR management and the complete unchanged Slurm/libcxi
+workflow remain separate required work.
+
+## Optional Job Address Tables
+
+The launcher keeps zero-entry jobs as its default. Explicit-AH requests do not
+need a table. Applications choosing indexed addressing must explicitly request
+a positive `max_addr_entries` with `IBV_JOB_ATTR_MAX_ADDR_ENTRIES`.
+For example, `cxi_launcher --max-addr-entries 16` opts a launched job into a
+16-entry table; omitting the option preserves the zero-entry default. The RU
+RMA example requests 16 entries automatically when `-A` is selected.
+
+Build `cxi_le_test` and run it without arguments for device-free checks. These
+exercise omitted/zero capacity through the public API, actual provider command
+encoding for explicit and indexed SEND/WRITE/READ, pre-lock address resolution,
+extended-batch abort/rollback, and concurrent mock table updates/submissions.
+The command ring and doorbell are ordinary memory, not hardware mappings.
+
+With hardware-test approval, run `cxi_le_test --resources DEVICE` for the
+existing explicit-AH/zero-entry resource checks. Running the same command with
+`CXI_TEST_INDEXED=1` opts the sending job into a two-entry table and exercises
+real insert/query/remove, duplicate/unset/out-of-bounds entries, and indexed
+SEND at index 1. These resource tests alter device resources and must not be
+run as part of device-free validation.
+
+NIC RMA completion, concurrent kernel-table updates versus NIC sends, and
+performance measurements remain hardware validation gates. Compare explicit-AH
+and indexed paths with identical message sizes, batch sizes, thread counts,
+completion handling, and device setup; report throughput, CPU time, and latency
+including lookup cost. The indexed path queries the kernel for each address
+snapshot rather than caching possibly stale entries. The extended API stages
+requests in a reusable buffer before emission. Neither CPU-only tests nor a
+successful build establish a NIC performance result. Indexed addressing must
+not become the default without this comparison.
+
+## Checkpatch Exceptions
+
+Use the userspace exclusions in `buildlib/azp-checkpatch` when reviewing this
+series. In particular, kernel type names and negative errno returns are not
+the libibverbs API conventions. Do not change those contracts for checkpatch.
+
+The following additional diagnostics are documented exceptions, not disabled
+checks:
+
+- Imported UAPI headers use portable packed attributes and explicit bit
+ constants rather than kernel-private `__packed` and `BIT()` helpers.
+- The command-queue status and event accesses retain `volatile` for device
+ updates. The launcher's `volatile sig_atomic_t` state is shared with signal
+ handlers. Removing these qualifiers is not a formatting change.
+- `CXI_MATCH_ID` repeats its width argument to remain a constant expression
+ in static initializers. Callers must pass a side-effect-free width.
+
+Check each patch separately to avoid false duplicate-trailer diagnostics.
+If a combined header-import patch produces type-inference diagnostics in a
+later file, check that file independently before changing valid declarations.
diff --git a/providers/cxi/utils/cxi_launcher.c b/providers/cxi/utils/cxi_launcher.c
new file mode 100644
index 000000000000..9e32e31f680e
--- /dev/null
+++ b/providers/cxi/utils/cxi_launcher.c
@@ -0,0 +1,967 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/*
+ * Copyright 2026 Hewlett Packard Enterprise Development LP
+ */
+
+#define _GNU_SOURCE
+#include <config.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <grp.h>
+#include <limits.h>
+#include <pwd.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/auxv.h>
+#include <sys/prctl.h>
+#include <sys/syscall.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <infiniband/cxidv.h>
+#include <infiniband/verbs.h>
+#include <ccan/array_size.h>
+
+#define CXI_MAX_TRAFFIC_CLASS CXIDV_TC_ETH
+
+struct cxirdma_state {
+ struct cxidv_job_tc_attr tc_attr;
+ uint32_t traffic_class;
+ uint32_t allowed_tc_mask;
+ uint32_t threads_per_task;
+ uint16_t thread_defaults[CXIDV_SVC_RSRC_COUNT];
+ bool create_tc;
+ bool explicit_tc;
+ bool list_tcs;
+ bool dry_run;
+ bool threads_per_task_set;
+ uint32_t svc_id;
+ uint32_t max_addr_entries;
+ bool owns_svc;
+ uint16_t vnis[CXIDV_SVC_MAX_VNIS];
+ uint32_t vni_count;
+ uid_t uid;
+ uint32_t limits_mask;
+ uint32_t explicit_reserved_mask;
+ uint32_t thread_default_mask;
+};
+
+static const struct option cxirdma_options[] = {
+ { "device", required_argument, NULL, 'd' },
+ { "vni", required_argument, NULL, 'j' },
+ { "job-id", required_argument, NULL, 'j' },
+ { "uid", required_argument, NULL, 'u' },
+ { "service", required_argument, NULL, 'S' },
+ { "port", required_argument, NULL, 'i' },
+ { "gid-index", required_argument, NULL, 'g' },
+ { "max-addr-entries", required_argument, NULL, 1002 },
+ { "help", no_argument, NULL, 'h' },
+ { "tc", required_argument, NULL, 1000 },
+ { "create-tc", required_argument, NULL, 1000 },
+ { "allow-tc", required_argument, NULL, 1000 },
+ { "default-ptes", required_argument, NULL, 1000 },
+ { "default-txqs", required_argument, NULL, 1000 },
+ { "default-tgqs", required_argument, NULL, 1000 },
+ { "default-eqs", required_argument, NULL, 1000 },
+ { "default-cts", required_argument, NULL, 1000 },
+ { "default-acs", required_argument, NULL, 1000 },
+ { "default-tles", required_argument, NULL, 1000 },
+ { "default-les", required_argument, NULL, 1000 },
+ { "threads-per-task", required_argument, NULL, 1001 },
+ { "dry-run", no_argument, NULL, 1000 },
+ { "tc-ptes", required_argument, NULL, 1000 },
+ { "tc-txqs", required_argument, NULL, 1000 },
+ { "tc-tgqs", required_argument, NULL, 1000 },
+ { "tc-eqs", required_argument, NULL, 1000 },
+ { "tc-cts", required_argument, NULL, 1000 },
+ { "tc-tles", required_argument, NULL, 1000 },
+ { "tc-les", required_argument, NULL, 1000 },
+ { "tc-acs", required_argument, NULL, 1000 },
+ { "list-tcs", no_argument, NULL, 1000 },
+ {}
+};
+
+static volatile sig_atomic_t child_group;
+static volatile sig_atomic_t interrupted;
+
+static void forward_signal(int number)
+{
+ int saved_errno = errno;
+
+ interrupted = number;
+ if (child_group)
+ kill(-(pid_t)child_group, number);
+ errno = saved_errno;
+}
+
+static int parse_number(const char *text, uint32_t maximum, uint32_t *value)
+{
+ char *end;
+ unsigned long parsed;
+
+ if (!text || !*text)
+ return -1;
+ errno = 0;
+ parsed = strtoul(text, &end, 0);
+ if (errno || *end || parsed > maximum || !isdigit((unsigned char)*text))
+ return -1;
+ *value = parsed;
+ return 0;
+}
+
+static int parse_limit(const char *arg, struct cxidv_limits *limit, bool *reserved_specified)
+{
+ unsigned long max, res = 0;
+ char *end;
+ bool has_reserved = false;
+
+ if (!arg || !*arg || *arg == '-')
+ return -1;
+ errno = 0;
+ max = strtoul(arg, &end, 0);
+ if (errno || max > UINT16_MAX)
+ return -1;
+ if (*end == ':') {
+ has_reserved = true;
+ arg = end + 1;
+ if (!*arg || *arg == '-')
+ return -1;
+ errno = 0;
+ res = strtoul(arg, &end, 0);
+ if (errno || res > UINT16_MAX)
+ return -1;
+ }
+ if (*end)
+ return -1;
+
+ limit->max = max;
+ limit->res = res;
+ *reserved_specified = has_reserved;
+ return 0;
+}
+
+static int parse_tc(const char *arg, const char *option, uint32_t *out)
+{
+ unsigned long tc;
+ char *end;
+
+ if (!arg || !*arg || *arg == '-')
+ return -1;
+ errno = 0;
+ tc = strtoul(arg, &end, 0);
+ if (errno || *end || tc > CXI_MAX_TRAFFIC_CLASS) {
+ fprintf(stderr, "--%s must be 0..%d\n", option, CXI_MAX_TRAFFIC_CLASS);
+ return -1;
+ }
+
+ *out = tc;
+ return 0;
+}
+
+static bool service_allows_vni(const struct cxidv_svc_attr *attr, uint16_t vni)
+{
+ unsigned int index;
+
+ if (attr->vni_count) {
+ if (attr->vni_count > CXIDV_SVC_MAX_VNIS)
+ return false;
+ for (index = 0; index < attr->vni_count; index++)
+ if (attr->vnis[index] == vni)
+ return true;
+ return false;
+ }
+ if (attr->is_range)
+ return vni >= attr->vnis[0] && vni <= attr->vnis[1];
+
+ return false;
+}
+
+static int format_vni_list(const uint16_t *vnis, uint32_t count, char *buffer, size_t capacity)
+{
+ size_t used = 0;
+ uint32_t index;
+
+ for (index = 0; index < count; index++) {
+ int length = snprintf(buffer + used, capacity - used, "%s%u", index ? "," : "",
+ vnis[index]);
+
+ if (length < 0 || (size_t)length >= capacity - used)
+ return -1;
+ used += length;
+ }
+ return 0;
+}
+
+static int list_tcs(struct ibv_context *context)
+{
+ struct cxidv_tc_entry entries[32];
+ uint32_t capacity = ARRAY_SIZE(entries);
+ uint32_t count = 0;
+ uint32_t shown;
+ uint32_t i;
+ int ret;
+
+ ret = cxidv_query_tcs(context, entries, capacity, &count);
+ if (ret) {
+ fprintf(stderr, "couldn't query CXI traffic classes: %s\n", strerror(ret));
+ return -1;
+ }
+
+ shown = count < capacity ? count : capacity;
+ printf("%5s %7s %12s %14s %12s %14s %7s %7s %7s %7s %7s %7s\n", "TC", "TYPE", "RES_REQ",
+ "UNRES_REQ", "RES_RSP", "UNRES_RSP", "REQPCP", "RSPPCP", "OCUSET", "CQTC", "REQBC",
+ "FLAGS");
+ for (i = 0; i < shown; i++)
+ printf("%5u %7u %12u %14u %12u %14u %7u %7u %7u %7u %7u 0x%05x\n", entries[i].tc,
+ entries[i].tc_type, entries[i].res_req_dscp, entries[i].unres_req_dscp,
+ entries[i].res_rsp_dscp, entries[i].unres_rsp_dscp, entries[i].req_pcp,
+ entries[i].rsp_pcp, entries[i].ocuset, entries[i].cq_tc, entries[i].req_bc,
+ entries[i].flags);
+ if (shown < count)
+ printf("... %u more entries not shown\n", count - shown);
+
+ return 0;
+}
+
+static int validate_tc_mask(struct ibv_context *context, uint32_t mask, bool create_tc)
+{
+ struct cxidv_tc_entry entries[32];
+ uint32_t count = 0;
+ uint32_t tc;
+ int ret;
+
+ if (create_tc)
+ return 0;
+ ret = cxidv_query_tcs(context, entries, ARRAY_SIZE(entries), &count);
+ if (ret) {
+ fprintf(stderr, "couldn't query CXI traffic classes: %s\n", strerror(ret));
+ return -1;
+ }
+
+ for (tc = 0; tc <= CXI_MAX_TRAFFIC_CLASS; tc++) {
+ uint32_t index;
+ bool found = false;
+
+ if (!(mask & (1U << tc)))
+ continue;
+ for (index = 0; index < count && index < ARRAY_SIZE(entries); index++) {
+ if (entries[index].tc == tc) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ fprintf(stderr, "traffic class %u is not configured\n", tc);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+static int cxirdma_parse_option(void *priv, const char *name, const char *value)
+{
+ struct cxirdma_state *state = priv;
+
+ if (!strcmp(name, "tc")) {
+ state->explicit_tc = true;
+ return parse_tc(value, name, &state->traffic_class);
+ }
+ if (!strcmp(name, "create-tc")) {
+ state->create_tc = true;
+ return parse_tc(value, name, &state->traffic_class);
+ }
+ if (!strcmp(name, "allow-tc")) {
+ uint32_t tc;
+
+ if (parse_tc(value, name, &tc))
+ return -1;
+ state->allowed_tc_mask |= 1U << tc;
+ return 0;
+ }
+ if (!strcmp(name, "list-tcs")) {
+ state->list_tcs = true;
+ return 0;
+ }
+ if (!strcmp(name, "dry-run")) {
+ state->dry_run = true;
+ return 0;
+ }
+
+ {
+ static const struct {
+ const char *name;
+ size_t offset;
+ } limits[] = {
+ { "tc-ptes", offsetof(struct cxidv_job_tc_attr, ptes) },
+ { "tc-txqs", offsetof(struct cxidv_job_tc_attr, txqs) },
+ { "tc-tgqs", offsetof(struct cxidv_job_tc_attr, tgqs) },
+ { "tc-eqs", offsetof(struct cxidv_job_tc_attr, eqs) },
+ { "tc-cts", offsetof(struct cxidv_job_tc_attr, cts) },
+ { "tc-acs", offsetof(struct cxidv_job_tc_attr, acs) },
+ { "tc-tles", offsetof(struct cxidv_job_tc_attr, tles) },
+ { "tc-les", offsetof(struct cxidv_job_tc_attr, les) },
+ };
+ size_t i;
+ bool reserved_specified;
+
+ for (i = 0; i < ARRAY_SIZE(limits); i++) {
+ if (strcmp(name, limits[i].name))
+ continue;
+ if (parse_limit(value,
+ (struct cxidv_limits *)((char *)&state->tc_attr +
+ limits[i].offset),
+ &reserved_specified)) {
+ fprintf(stderr, "--%s expects MAX[:RESERVED]\n", name);
+ return -1;
+ }
+ state->limits_mask |= 1U << i;
+ if (reserved_specified)
+ state->explicit_reserved_mask |= 1U << i;
+ else
+ state->explicit_reserved_mask &= ~(1U << i);
+ return 0;
+ }
+ }
+
+ {
+ static const struct {
+ const char *name;
+ enum cxidv_svc_resource resource;
+ } defaults[] = {
+ { "default-ptes", CXIDV_SVC_PTES }, { "default-txqs", CXIDV_SVC_TXQS },
+ { "default-tgqs", CXIDV_SVC_TGQS }, { "default-eqs", CXIDV_SVC_EQS },
+ { "default-cts", CXIDV_SVC_CTS }, { "default-acs", CXIDV_SVC_ACS },
+ { "default-tles", CXIDV_SVC_TLES }, { "default-les", CXIDV_SVC_LES },
+ };
+ size_t index;
+ uint32_t parsed;
+
+ for (index = 0; index < ARRAY_SIZE(defaults); index++) {
+ if (strcmp(name, defaults[index].name))
+ continue;
+ if (parse_number(value, UINT16_MAX, &parsed)) {
+ fprintf(stderr, "--%s expects 0..%u\n", name, UINT16_MAX);
+ return -1;
+ }
+ state->thread_defaults[defaults[index].resource] = parsed;
+ state->thread_default_mask |= 1U << defaults[index].resource;
+ return 0;
+ }
+ }
+
+ fprintf(stderr, "unknown cxirdma option --%s\n", name);
+ return -1;
+}
+
+static void print_service_plan(const struct cxirdma_state *state, const struct cxidv_svc_attr *attr)
+{
+ static const char *const names[CXIDV_SVC_RSRC_COUNT] = {
+ "ptes", "txqs", "tgqs", "eqs", "cts", "acs", "tles", "les",
+ };
+ unsigned int index;
+
+ printf("service=%s uid=%u tc_mask=0x%x\n", state->svc_id ? "reuse" : "create", state->uid,
+ attr->tc_mask);
+ if (attr->vni_count) {
+ printf("vnis=");
+ for (index = 0; index < attr->vni_count; index++)
+ printf("%s%u", index ? "," : "", attr->vnis[index]);
+ printf("\n");
+ } else if (attr->is_range) {
+ printf("vnis=%u-%u\n", attr->vnis[0], attr->vnis[1]);
+ } else if (attr->is_system_svc) {
+ printf("vnis=restricted-empty\n");
+ } else {
+ printf("vnis=invalid\n");
+ }
+ for (index = 0; index < CXIDV_SVC_RSRC_COUNT; index++)
+ printf("%s max=%u reserved=%u\n", names[index], attr->maximum[index],
+ attr->reserved[index]);
+}
+
+static int cxirdma_configure(void *priv, struct ibv_context *context, uint32_t job_id)
+{
+ struct cxirdma_state *state = priv;
+
+ if (state->create_tc && state->explicit_tc) {
+ fprintf(stderr, "--tc and --create-tc are mutually exclusive\n");
+ return -1;
+ }
+ if (!(state->allowed_tc_mask & (1U << state->traffic_class))) {
+ fprintf(stderr, "selected --tc must be included in --allow-tc grants\n");
+ return -1;
+ }
+ if (validate_tc_mask(context, state->allowed_tc_mask, state->create_tc))
+ return -1;
+
+ {
+ struct cxidv_svc_attr attr = {
+ .vni_count = state->vni_count,
+ .tc_mask = state->allowed_tc_mask,
+ .uid = state->uid,
+ .flags = state->create_tc ? CXIDV_SVC_CREATE_TC : 0,
+ };
+ const struct cxidv_limits *limits[] = {
+ &state->tc_attr.ptes, &state->tc_attr.txqs, &state->tc_attr.tgqs,
+ &state->tc_attr.eqs, &state->tc_attr.cts, &state->tc_attr.acs,
+ &state->tc_attr.tles, &state->tc_attr.les,
+ };
+ unsigned int index;
+ int ret;
+
+ memcpy(attr.vnis, state->vnis, state->vni_count * sizeof(state->vnis[0]));
+ if (state->svc_id) {
+ if (state->limits_mask || state->threads_per_task_set) {
+ fprintf(stderr, "limits cannot change a selected service\n");
+ return -1;
+ }
+ ret = cxidv_query_svc(context, state->svc_id, &attr);
+ if (ret || !(attr.flags & CXIDV_SVC_ENABLED) || attr.uid != state->uid ||
+ (attr.tc_mask & state->allowed_tc_mask) != state->allowed_tc_mask) {
+ fprintf(stderr,
+ "selected service does not grant the requested policy\n");
+ return -1;
+ }
+ for (index = 0; index < state->vni_count; index++) {
+ if (!service_allows_vni(&attr, state->vnis[index])) {
+ fprintf(stderr, "selected service does not grant VNI %u\n",
+ state->vnis[index]);
+ return -1;
+ }
+ }
+ if (state->create_tc) {
+ fprintf(stderr, "--create-tc cannot change a selected service\n");
+ return -1;
+ }
+ if (state->dry_run) {
+ print_service_plan(state, &attr);
+ return 0;
+ }
+ } else {
+ struct cxidv_devinfo info;
+ bool have_limits = state->limits_mask != 0 || state->threads_per_task_set;
+
+ if (have_limits) {
+ ret = cxidv_query_device(context, &info);
+ if (ret)
+ return -1;
+ attr.maximum[CXIDV_SVC_PTES] = info.num_ptes;
+ attr.maximum[CXIDV_SVC_TXQS] = info.num_txqs;
+ attr.maximum[CXIDV_SVC_TGQS] = info.num_tgqs;
+ attr.maximum[CXIDV_SVC_EQS] = info.num_eqs;
+ attr.maximum[CXIDV_SVC_CTS] = info.num_cts;
+ attr.maximum[CXIDV_SVC_ACS] = info.num_acs;
+ attr.maximum[CXIDV_SVC_TLES] = info.num_tles;
+ attr.maximum[CXIDV_SVC_LES] = info.num_les;
+ }
+ for (index = 0; index < CXIDV_SVC_RSRC_COUNT; index++) {
+ uint32_t bit = 1U << index;
+ uint16_t maximum = attr.maximum[index];
+ uint64_t reservation = 0;
+ bool reservation_set = state->threads_per_task_set;
+
+ if (state->threads_per_task_set)
+ reservation = (uint64_t)state->thread_defaults[index] *
+ state->threads_per_task;
+ if (state->limits_mask & bit) {
+ maximum = limits[index]->max;
+ if ((state->explicit_reserved_mask & bit) ||
+ !state->threads_per_task_set) {
+ reservation = limits[index]->res;
+ reservation_set = true;
+ }
+ }
+ if (reservation_set) {
+ if (reservation > maximum && !state->threads_per_task_set) {
+ fprintf(stderr,
+ "--tc resource reservation exceeds maximum\n");
+ return -1;
+ }
+ if (reservation > maximum) {
+ fprintf(stderr,
+ "resource %u reservation clamped to maximum %u\n",
+ index, maximum);
+ reservation = maximum;
+ }
+ attr.reserved[index] = reservation;
+ }
+ attr.maximum[index] = maximum;
+ if (state->threads_per_task_set || (state->limits_mask & bit))
+ attr.flags |= CXIDV_SVC_LIMITS;
+ }
+ if (state->dry_run) {
+ print_service_plan(state, &attr);
+ return 0;
+ }
+ ret = cxidv_alloc_svc(context, &attr, &state->svc_id);
+ if (ret) {
+ fprintf(stderr, "couldn't provision service for JobID %u: %s\n",
+ job_id, strerror(ret));
+ return -1;
+ }
+ state->owns_svc = true;
+ }
+ }
+
+ /*
+ * The target picks its service from UET_SERVICE_ID; without this it
+ * falls back to the default service, which is not the one the binding
+ * just provisioned for this traffic class.
+ */
+ if (state->svc_id) {
+ char value[16];
+
+ snprintf(value, sizeof(value), "%u", state->svc_id);
+ if (setenv("UET_SERVICE_ID", value, 1)) {
+ perror("setenv UET_SERVICE_ID");
+ return -1;
+ }
+ if (setenv("SLINGSHOT_SVC_IDS", value, 1))
+ return -1;
+ }
+
+ /*
+ * The service authorises the VNI, but QP creation still needs
+ * UET_TC to pick the same traffic class; ctx->tc_valid never
+ * survives exec() into the target process.
+ */
+ {
+ char value[16];
+
+ snprintf(value, sizeof(value), "%u", state->traffic_class);
+ if (setenv("UET_TC", value, 1)) {
+ perror("setenv UET_TC");
+ return -1;
+ }
+ snprintf(value, sizeof(value), "%x", state->allowed_tc_mask);
+ if (setenv("SLINGSHOT_TCS", value, 1))
+ return -1;
+ }
+
+ return 0;
+}
+
+static int cxirdma_cleanup(void *priv, struct ibv_context *context)
+{
+ struct cxirdma_state *state = priv;
+
+ if (state->owns_svc) {
+ int ret = cxidv_destroy_svc(context, state->svc_id);
+
+ if (ret)
+ fprintf(stderr, "couldn't destroy launcher service %u: %s\n", state->svc_id,
+ strerror(ret));
+ return ret;
+ }
+ return 0;
+}
+
+static void usage(const char *program)
+{
+ printf("Usage: %s [options] -- command [args...]\n", program);
+ printf(" -d, --device NAME RDMA device\n");
+ printf(" -j, --vni NUMBER granted VNI; repeat up to %u times\n",
+ CXIDV_SVC_MAX_VNIS);
+ printf(" -u, --uid NUMBER child/service owner (default sudo user; 0=root)\n");
+ printf(" -S, --service NUMBER reuse a permitted service without destroying it\n");
+ printf(" --tc NUMBER existing TC (default best effort)\n");
+ printf(" --allow-tc NUMBER grant a TC; repeat to grant more classes\n");
+ printf(" --create-tc NUMBER provision a TC for the owned service\n");
+ printf(" --tc-{ptes,txqs,tgqs,eqs,cts,acs,tles,les} MAX[:RESERVED]\n");
+ printf(" --threads-per-task N apply Slurm per-thread resource defaults\n");
+ printf(" --default-{ptes,txqs,tgqs,eqs,cts,acs,tles,les} N\n");
+ printf(" --dry-run print policy without creating a service\n");
+ printf(" -i, --port NUMBER port (default 1)\n");
+ printf(" -g, --gid-index NUMBER GID index (default 0)\n");
+ printf(" --max-addr-entries N opt in to a job address table\n");
+ printf(" --list-tcs query traffic classes without launching\n");
+}
+
+static int child_environment(const struct cxirdma_state *state, int descriptor, const char *device)
+{
+ char value[32];
+ char vni_list[CXIDV_SVC_MAX_VNIS * 6];
+
+ snprintf(value, sizeof(value), "%u", state->vnis[0]);
+ if (format_vni_list(state->vnis, state->vni_count, vni_list, sizeof(vni_list)) ||
+ setenv("UET_JOB_ID", value, 1) || setenv("SLINGSHOT_VNIS", vni_list, 1))
+ return -1;
+ snprintf(value, sizeof(value), "%d", descriptor);
+ if (setenv("UET_JOB_FD", value, 1) || setenv("CXI_VERBS_DEVICE", device, 1))
+ return -1;
+ return 0;
+}
+
+static int native_device_name(struct ibv_context *context, char *name, size_t capacity)
+{
+ struct cxidv_devinfo info;
+ struct dirent *entry;
+ DIR *directory;
+ int result = -1;
+
+ if (cxidv_query_device(context, &info))
+ return -1;
+ directory = opendir("/sys/class/cxi");
+ if (!directory)
+ return -1;
+ while ((entry = readdir(directory))) {
+ char path[PATH_MAX];
+ FILE *property;
+ unsigned int nid;
+ int parsed;
+
+ if (strncmp(entry->d_name, "cxi", 3))
+ continue;
+ snprintf(path, sizeof(path), "/sys/class/cxi/%s/device/properties/nid",
+ entry->d_name);
+ property = fopen(path, "r");
+ if (!property)
+ continue;
+ parsed = fscanf(property, "%x", &nid);
+ fclose(property);
+ if (parsed != 1 || nid != info.nid)
+ continue;
+ if (strlen(entry->d_name) >= capacity)
+ break;
+ memcpy(name, entry->d_name, strlen(entry->d_name) + 1);
+ result = 0;
+ break;
+ }
+ closedir(directory);
+ return result;
+}
+
+/*
+ * Variables this tool defines for the child. Inherited values are removed so
+ * a caller cannot make the child use a service or job it was not granted.
+ */
+static void scrub_environment(void)
+{
+ char **env;
+
+ for (env = environ; env && *env;) {
+ if (!strncmp(*env, "UET_", 4) || !strncmp(*env, "SLINGSHOT_", 10) ||
+ !strncmp(*env, "CXI_VERBS_", 10)) {
+ char *name = strndup(*env, strcspn(*env, "="));
+
+ if (!name)
+ _exit(1);
+ unsetenv(name);
+ free(name);
+ env = environ;
+ continue;
+ }
+ env++;
+ }
+}
+
+/* Close everything except stdio and the exported job grant. */
+static int close_inherited_fds(int keep)
+{
+ struct dirent *entry;
+ DIR *directory;
+ int ret = 0;
+
+#ifdef SYS_close_range
+ unsigned int first = keep < 3 ? 3 : (unsigned int)keep + 1;
+
+ if (keep > 3 && syscall(SYS_close_range, 3, keep - 1, 0))
+ goto slow;
+ if (!syscall(SYS_close_range, first, ~0U, 0))
+ return 0;
+slow:
+#endif
+ directory = opendir("/proc/self/fd");
+ if (!directory)
+ return -1;
+ for (;;) {
+ char *end;
+ long number;
+
+ errno = 0;
+ entry = readdir(directory);
+ if (!entry) {
+ ret = errno ? -1 : 0;
+ break;
+ }
+ number = strtol(entry->d_name, &end, 10);
+ if (*end || number < 3 || number > INT_MAX ||
+ number == keep || number == dirfd(directory))
+ continue;
+ close((int)number);
+ }
+ closedir(directory);
+ return ret;
+}
+
+/* Runs in the forked child, before anything of the user's runs. */
+static int drop_privileges(uid_t uid, gid_t gid, const char *name)
+{
+ if (initgroups(name, gid) || setresgid(gid, gid, gid) || setresuid(uid, uid, uid))
+ return -1;
+ /* Explicit --uid 0 runs the job as root: nothing to take away. */
+ if (!uid)
+ return prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) ? -1 : 0;
+ /* Irreversible: the real, effective and saved ids are all the user's. */
+ if (setuid(0) == 0 || seteuid(0) == 0 || setgid(0) == 0)
+ return -1;
+ if (getuid() != uid || geteuid() != uid || getgid() != gid || getegid() != gid)
+ return -1;
+ if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) || prctl(PR_SET_DUMPABLE, 0, 0, 0, 0) ||
+ prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0))
+ return -1;
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ struct cxirdma_state state = {
+ .traffic_class = CXIDV_TC_BEST_EFFORT,
+ .thread_defaults = { 6, 2, 1, 2, 1, 2, 1, 16 },
+ };
+ struct ibv_device **devices = NULL;
+ struct ibv_device *device = NULL;
+ struct ibv_context *context = NULL;
+ struct ibv_job *job = NULL;
+ struct ibv_job_attr job_attr = {
+ .comp_mask = IBV_JOB_ATTR_ID | IBV_JOB_ATTR_PORT_NUM | IBV_JOB_ATTR_SGID_INDEX,
+ .port_num = 1,
+ };
+ struct sigaction action = { .sa_handler = forward_signal };
+ struct passwd *owner;
+ const char *device_name = NULL;
+ const char *sudo_uid = getenv("SUDO_UID");
+ char *owner_name = NULL;
+ char native_name[64];
+ gid_t owner_gid;
+ uint32_t value;
+ bool uid_set = false;
+ int descriptor = -1, result = 1, status, option_index, option;
+ pid_t child;
+ sigset_t blocked, previous;
+
+ /*
+ * Root only, and never setuid or file-capability installed: the real
+ * uid must be 0 and the loader must not be in secure-exec mode.
+ */
+ if (getuid() != 0 || geteuid() != 0 || getauxval(AT_SECURE)) {
+ fprintf(stderr, "%s: must be run by root, not setuid\n", argv[0]);
+ return 1;
+ }
+ /* Default target is the sudo invoker; root only if asked with --uid 0. */
+ if (sudo_uid) {
+ if (parse_number(sudo_uid, UINT32_MAX, &value))
+ return 1;
+ state.uid = value;
+ uid_set = true;
+ }
+ scrub_environment();
+ while ((option = getopt_long(argc, argv, "+d:j:u:S:i:g:h", cxirdma_options,
+ &option_index)) != -1) {
+ if (option == 'h') {
+ usage(argv[0]);
+ return 0;
+ }
+ if (option == 'd') {
+ device_name = optarg;
+ continue;
+ }
+ if (option == 1000) {
+ if (cxirdma_parse_option(&state, cxirdma_options[option_index].name,
+ optarg))
+ return 1;
+ continue;
+ }
+ if (option == 1001) {
+ if (state.threads_per_task_set ||
+ parse_number(optarg, UINT32_MAX, &value) || !value) {
+ fprintf(stderr, "--threads-per-task requires a positive integer\n");
+ return 1;
+ }
+ state.threads_per_task = value;
+ state.threads_per_task_set = true;
+ continue;
+ }
+ if (option == 1002) {
+ if (parse_number(optarg, UINT32_MAX, &value) || !value) {
+ fprintf(stderr, "--max-addr-entries requires a positive integer\n");
+ return 1;
+ }
+ state.max_addr_entries = value;
+ continue;
+ }
+ if (parse_number(optarg, UINT32_MAX, &value))
+ return 1;
+ switch (option) {
+ case 'j':
+ if (!value || value > UINT16_MAX || state.vni_count == CXIDV_SVC_MAX_VNIS) {
+ fprintf(stderr,
+ "--vni requires a unique nonzero value; at most %u are allowed\n",
+ CXIDV_SVC_MAX_VNIS);
+ return 1;
+ }
+ for (uint32_t index = 0; index < state.vni_count; index++)
+ if (state.vnis[index] == value) {
+ fprintf(stderr, "duplicate --vni %u\n", value);
+ return 1;
+ }
+ state.vnis[state.vni_count++] = value;
+ break;
+ case 'u':
+ state.uid = value;
+ uid_set = true;
+ break;
+ case 'S':
+ if (!value)
+ return 1;
+ state.svc_id = value;
+ break;
+ case 'i':
+ if (!value || value > UINT8_MAX)
+ return 1;
+ job_attr.port_num = value;
+ break;
+ case 'g':
+ if (value > UINT8_MAX)
+ return 1;
+ job_attr.sgid_index = value;
+ break;
+ default:
+ return 1;
+ }
+ }
+ if ((!state.vni_count && !state.list_tcs) ||
+ (optind == argc && !state.list_tcs && !state.dry_run)) {
+ usage(argv[0]);
+ return 1;
+ }
+ if (state.vni_count)
+ job_attr.id = state.vnis[0];
+ if (state.max_addr_entries) {
+ job_attr.comp_mask |= IBV_JOB_ATTR_MAX_ADDR_ENTRIES;
+ job_attr.max_addr_entries = state.max_addr_entries;
+ }
+ if (state.thread_default_mask && !state.threads_per_task_set) {
+ fprintf(stderr, "--default-* requires --threads-per-task\n");
+ return 1;
+ }
+ if (!state.allowed_tc_mask)
+ state.allowed_tc_mask = 1U << state.traffic_class;
+ if (!(state.allowed_tc_mask & (1U << state.traffic_class))) {
+ fprintf(stderr, "selected --tc must be included in --allow-tc grants\n");
+ return 1;
+ }
+ if (!uid_set && !state.list_tcs) {
+ fprintf(stderr, "no target user: run under sudo or pass --uid\n");
+ return 1;
+ }
+ owner = getpwuid(state.uid);
+ if (!owner)
+ return 1;
+ owner_gid = owner->pw_gid;
+ owner_name = strdup(owner->pw_name);
+ if (!owner_name)
+ return 1;
+ devices = ibv_get_device_list(NULL);
+ if (!devices)
+ goto out;
+ for (size_t index = 0; devices[index]; index++) {
+ if (devices[index]->transport_type != IBV_TRANSPORT_SLINGSHOT)
+ continue;
+ if (!device_name || !strcmp(device_name, ibv_get_device_name(devices[index]))) {
+ device = devices[index];
+ break;
+ }
+ }
+ if (!device)
+ goto out;
+ context = ibv_open_device(device);
+ if (!context)
+ goto out;
+ if (state.list_tcs) {
+ result = list_tcs(context) ? 1 : 0;
+ goto out;
+ }
+ if (native_device_name(context, native_name, sizeof(native_name)) ||
+ setenv("SLINGSHOT_DEVICES", native_name, 1)) {
+ fprintf(stderr, "couldn't identify the native CXI device\n");
+ goto out;
+ }
+ if (sigaction(SIGINT, &action, NULL) || sigaction(SIGTERM, &action, NULL) ||
+ sigaction(SIGHUP, &action, NULL))
+ goto out;
+ if (cxirdma_configure(&state, context, job_attr.id))
+ goto out;
+ if (state.dry_run) {
+ result = 0;
+ goto out;
+ }
+ job = ibv_alloc_job(context, &job_attr, NULL);
+ if (!job || ibv_export_job(job, &descriptor))
+ goto out;
+ value = fcntl(descriptor, F_GETFD);
+ if (value == (uint32_t)-1 || fcntl(descriptor, F_SETFD, value & ~FD_CLOEXEC))
+ goto out;
+ if (child_environment(&state, descriptor, ibv_get_device_name(device)))
+ goto out;
+ sigemptyset(&blocked);
+ sigaddset(&blocked, SIGINT);
+ sigaddset(&blocked, SIGTERM);
+ sigaddset(&blocked, SIGHUP);
+ if (sigprocmask(SIG_BLOCK, &blocked, &previous))
+ goto out;
+ child = fork();
+ if (child == 0) {
+ signal(SIGINT, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGHUP, SIG_DFL);
+ /* The child must not keep the root-owned verbs context. */
+ if (close_inherited_fds(descriptor) || setpgid(0, 0) ||
+ drop_privileges(state.uid, owner_gid, owner_name) ||
+ sigprocmask(SIG_SETMASK, &previous, NULL))
+ _exit(126);
+ execvp(argv[optind], &argv[optind]);
+ perror("execvp");
+ _exit(127);
+ }
+ if (child > 0) {
+ setpgid(child, child);
+ child_group = child;
+ }
+ sigprocmask(SIG_SETMASK, &previous, NULL);
+ if (child < 0)
+ goto out;
+ if (interrupted)
+ kill(-child, interrupted);
+ while (waitpid(child, &status, 0) < 0) {
+ if (errno != EINTR)
+ goto out;
+ }
+ child_group = 0;
+ if (WIFEXITED(status))
+ result = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status))
+ result = 128 + WTERMSIG(status);
+out:
+ if (descriptor >= 0)
+ close(descriptor);
+ if (job && ibv_dealloc_job(job)) {
+ perror("deallocate launcher job");
+ result = 1;
+ }
+ if (context && cxirdma_cleanup(&state, context))
+ result = 1;
+ if (context && ibv_close_device(context))
+ result = 1;
+ if (devices)
+ ibv_free_device_list(devices);
+ free(owner_name);
+ return result;
+}
diff --git a/providers/cxi/utils/cxi_telem.c b/providers/cxi/utils/cxi_telem.c
new file mode 100644
index 000000000000..e8b94ab2dd49
--- /dev/null
+++ b/providers/cxi/utils/cxi_telem.c
@@ -0,0 +1,201 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+/* Copyright 2026 Hewlett Packard Enterprise Development LP */
+
+/*
+ * Print Cassini telemetry, one "name value@seconds.nanoseconds" per line,
+ * the format the telemetry sysfs files used to have.
+ */
+
+#include <errno.h>
+#include <getopt.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <infiniband/verbs.h>
+#include <infiniband/cxidv_telem.h>
+
+static const char *const set_names[] = {
+ [CXIDV_TELEM_SET_ETHTOOL] = "ethtool", [CXIDV_TELEM_SET_ATU] = "atu",
+ [CXIDV_TELEM_SET_CQ] = "cq", [CXIDV_TELEM_SET_EE] = "ee",
+ [CXIDV_TELEM_SET_HNI] = "hni", [CXIDV_TELEM_SET_IXE] = "ixe",
+ [CXIDV_TELEM_SET_LPE] = "lpe", [CXIDV_TELEM_SET_MB] = "mb",
+ [CXIDV_TELEM_SET_MST] = "mst", [CXIDV_TELEM_SET_OXE] = "oxe",
+ [CXIDV_TELEM_SET_PARBS] = "parbs", [CXIDV_TELEM_SET_PCT] = "pct",
+ [CXIDV_TELEM_SET_PI] = "pi",
+ [CXIDV_TELEM_SET_RMU] = "rmu", [CXIDV_TELEM_SET_TOU] = "tou",
+};
+
+static void usage(const char *prog)
+{
+ fprintf(stderr,
+ "Usage: %s [-d DEVICE] [-a | -s SET | -i NAME[,NAME...]] [-l]\n"
+ " -a all items defined on the device (default)\n"
+ " -s a predefined set: ethtool, atu, cq, ee, hni, ixe, lpe, mb,\n"
+ " mst, oxe, parbs, pct, pi, rmu, tou\n"
+ " -i the named items\n"
+ " -l list item names without reading them\n",
+ prog);
+}
+
+int main(int argc, char **argv)
+{
+ const char *devname = NULL, *setname = NULL, *names = NULL;
+ struct ibv_counters_init_attr init_attr = {};
+ struct ibv_device **list = NULL, *dev = NULL;
+ const uint64_t *set_items = NULL;
+ uint64_t *items = NULL, *values = NULL, *stamps = NULL;
+ struct ibv_counters *counters = NULL;
+ struct ibv_context *ctx = NULL;
+ uint32_t count = 0, i;
+ bool all = true, list_only = false, items_allocated = false;
+ int opt, ret, exit_code = 1;
+
+ while ((opt = getopt(argc, argv, "d:as:i:lh")) != -1) {
+ switch (opt) {
+ case 'd':
+ devname = optarg;
+ break;
+ case 'a':
+ all = true;
+ break;
+ case 's':
+ setname = optarg;
+ all = false;
+ break;
+ case 'i':
+ names = optarg;
+ all = false;
+ break;
+ case 'l':
+ list_only = true;
+ break;
+ default:
+ usage(argv[0]);
+ return 1;
+ }
+ }
+
+ if (list_only) {
+ for (i = 1; i < CXIDV_TELEM_COUNT; i++)
+ printf("%s\n", cxidv_telem_name(i));
+ return 0;
+ }
+
+ list = ibv_get_device_list(NULL);
+ if (!list) {
+ perror("ibv_get_device_list");
+ goto out;
+ }
+ for (i = 0; list && list[i]; i++) {
+ if (list[i]->transport_type != IBV_TRANSPORT_SLINGSHOT)
+ continue;
+ if (!devname || !strcmp(devname, ibv_get_device_name(list[i]))) {
+ dev = list[i];
+ break;
+ }
+ }
+ if (!dev) {
+ fprintf(stderr, "no Slingshot device found\n");
+ goto out;
+ }
+ ctx = ibv_open_device(dev);
+ if (!ctx) {
+ perror("ibv_open_device");
+ goto out;
+ }
+ ibv_free_device_list(list);
+ list = NULL;
+ counters = ibv_create_counters(ctx, &init_attr);
+ if (!counters) {
+ perror("ibv_create_counters");
+ goto out;
+ }
+
+ if (setname) {
+ for (i = 0; i < CXIDV_TELEM_SET_COUNT; i++)
+ if (set_names[i] && !strcmp(set_names[i], setname))
+ break;
+ if (i == CXIDV_TELEM_SET_COUNT || cxidv_telem_get_set(i, &set_items, &count)) {
+ fprintf(stderr, "unknown set %s\n", setname);
+ goto out;
+ }
+ items = (uint64_t *)set_items;
+ } else if (names) {
+ char *copy = strdup(names), *tok, *save = NULL;
+ int item;
+
+ if (!copy) {
+ perror("strdup");
+ goto out;
+ }
+ items = calloc(strlen(names) + 1, sizeof(*items));
+ if (!items) {
+ perror("calloc");
+ free(copy);
+ goto out;
+ }
+ items_allocated = true;
+ for (tok = strtok_r(copy, ",", &save); tok; tok = strtok_r(NULL, ",", &save)) {
+ item = cxidv_telem_lookup(tok);
+ if (item < 0) {
+ fprintf(stderr, "unknown item %s\n", tok);
+ free(copy);
+ goto out;
+ }
+ items[count++] = item;
+ }
+ free(copy);
+ if (!count) {
+ fprintf(stderr, "no telemetry items selected\n");
+ goto out;
+ }
+ } else if (all) {
+ count = CXIDV_TELEM_COUNT;
+ }
+
+ if (!count) {
+ fprintf(stderr, "no telemetry items selected\n");
+ goto out;
+ }
+ values = calloc(count, sizeof(*values));
+ stamps = calloc(count, sizeof(*stamps));
+ if (!values || !stamps) {
+ perror("calloc");
+ goto out;
+ }
+
+ ret = ibv_read_counters_ex(counters, items, values, stamps, count, 0);
+ if (ret) {
+ fprintf(stderr, "ibv_read_counters_ex: %s\n", strerror(ret));
+ goto out;
+ }
+
+ for (i = 0; i < count; i++) {
+ uint32_t item = items ? items[i] : i;
+
+ /* A zero timestamp marks an item this device doesn't have. */
+ if (!stamps[i])
+ continue;
+ printf("%s %llu@%llu.%09llu\n", cxidv_telem_name(item),
+ (unsigned long long)values[i],
+ (unsigned long long)(stamps[i] / 1000000000ULL),
+ (unsigned long long)(stamps[i] % 1000000000ULL));
+ }
+
+ exit_code = 0;
+out:
+ free(stamps);
+ free(values);
+ if (items_allocated)
+ free(items);
+ if (counters)
+ ibv_destroy_counters(counters);
+ if (ctx)
+ ibv_close_device(ctx);
+ if (list)
+ ibv_free_device_list(list);
+ return exit_code;
+}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 11/12] cxiverbs: wire and package the CXI verbs provider and tests
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (9 preceding siblings ...)
2026-10-31 19:26 ` [PATCH 10/12] cxiverbs: launch Slurm-style exact VNI TC and resource grants Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
2026-10-31 19:26 ` [PATCH 12/12] libibverbs: port RU examples to explicitly granted resources Doug Ledford
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team
Cc: linux-kernel, Doug Ledford, Iraimani P, Terrence Mitchem
Add the build files for the provider, its tests and the launcher and
publish the new headers. The provider is a shared provider library
libcxiverbs that exports the cxidv_* symbols. Like the other hardware
providers it uses util/udma_barrier.h, so it is built only where
HAVE_COHERENT_DMA is set.
The LNI and PID bindings the pyverbs RU tests need call the cxidv API,
so they live in a pyverbs.providers.cxi.cxidv module, built alongside
the mlx5 and efa provider modules, rather than in the generic
pyverbs.ru module.
libcxiverbs.so.1 is packaged the way efa, mana and mlx5 are: in
ibverbs-providers on Debian, with a symbols section, a lintian override
and a copyright entry; in its own libcxiverbs1 package on SUSE,
required by libibverbs and devel; and in libibverbs on Red Hat.
cxi_launcher ships with the provider library rather than in the -utils
package: client programs cannot run on CXI hardware without it, so it
has to be installed whenever the provider is, and putting it in -utils
would make that package mandatory on every CXI system. The RPM file
list previously named a uet_launcher plugin and binary that no longer
exist.
checkpatch reports one REPEATED_WORD warning in
pyverbs/providers/cxi/cxidv.pyx ("Context context"). This is a false
positive: it is a Cython typed parameter (type Context, name context),
not a repeated word.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Co-developed-by: Terrence Mitchem <terrence.mitchem@hpe.com>
Signed-off-by: Terrence Mitchem <terrence.mitchem@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
CMakeLists.txt | 1 +
debian/control | 1 +
debian/copyright | 5 ++
debian/ibverbs-providers.install | 3 ++
debian/ibverbs-providers.lintian-overrides | 4 +-
debian/ibverbs-providers.symbols | 46 +++++++++++++++++
debian/ibverbs-utils.install | 1 +
debian/libibverbs-dev.install | 5 ++
debian/rules | 6 +--
| 8 +++
libibverbs/verbs.h | 1 +
providers/cxi/CMakeLists.txt | 19 +++++++
providers/cxi/libcxiverbs.map | 49 ++++++++++++++++++
providers/cxi/tests/CMakeLists.txt | 4 ++
providers/cxi/tests/cxi_launcher_test.c | 79 ++++++++++++++++++++++++++++++
providers/cxi/utils/CMakeLists.txt | 5 ++
pyverbs/CMakeLists.txt | 3 +-
pyverbs/device.pxd | 1 +
pyverbs/device.pyx | 3 +-
pyverbs/providers/cxi/CMakeLists.txt | 6 +++
pyverbs/providers/cxi/__init__.pxd | 0
pyverbs/providers/cxi/__init__.py | 0
pyverbs/providers/cxi/cxidv.pxd | 23 +++++++++
pyverbs/providers/cxi/cxidv.pyx | 64 ++++++++++++++++++++++++
pyverbs/ru.pyx | 2 +-
redhat/rdma-core.spec | 5 ++
suse/rdma-core.spec | 23 +++++++++
27 files changed, 359 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a25e6228a88..85cb10a92ab4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -806,6 +806,7 @@ if (HAVE_COHERENT_DMA)
add_subdirectory(providers/bnxt_re)
add_subdirectory(providers/bnxt_re/man)
add_subdirectory(providers/cxgb4) # NO SPARSE
+add_subdirectory(providers/cxi)
add_subdirectory(providers/efa)
add_subdirectory(providers/efa/man)
add_subdirectory(providers/erdma)
diff --git a/debian/control b/debian/control
index f709d7ee773a..d9063ad8db8e 100644
--- a/debian/control
+++ b/debian/control
@@ -88,6 +88,7 @@ Description: User space provider drivers for libibverbs
.
- bnxt_re: Broadcom NetXtreme-E RoCE HCAs
- cxgb4: Chelsio T4 iWARP HCAs
+ - cxi: HPE Cassini Network Adapter
- efa: Amazon Elastic Fabric Adapter
- erdma: Alibaba Elastic RDMA (iWarp) Adapter
- hfi1verbs: Intel Omni-Path HFI
diff --git a/debian/copyright b/debian/copyright
index e32de0f172bd..c16e80cf5d77 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -151,6 +151,11 @@ Files: providers/cxgb4/*
Copyright: 2003-2016, Chelsio Communications, Inc.
License: BSD-MIT or GPL-2
+Files: providers/cxi/*
+Copyright: 2018-2020, Cray Inc.
+ 2024-2026, Hewlett Packard Enterprise Development LP
+License: BSD-2-clause or GPL-2
+
Files: providers/efa/*
pyverbs/providers/efa/*
Copyright: 2019-2024 Amazon.com, Inc. or its affiliates.
diff --git a/debian/ibverbs-providers.install b/debian/ibverbs-providers.install
index 2ee167b8433a..6609cdc5f418 100644
--- a/debian/ibverbs-providers.install
+++ b/debian/ibverbs-providers.install
@@ -1,5 +1,8 @@
etc/libibverbs.d/
+# cxi_launcher ships with the CXI provider: CXI client programs cannot run without it
+usr/bin/cxi_launcher
usr/lib/*/libbnxt_re.so.*
+usr/lib/*/libcxiverbs.so.*
usr/lib/*/libefa.so.*
usr/lib/*/libhns.so.*
usr/lib/*/libibverbs/lib*-rdmav*.so
diff --git a/debian/ibverbs-providers.lintian-overrides b/debian/ibverbs-providers.lintian-overrides
index 400564ff21c3..1ca248856587 100644
--- a/debian/ibverbs-providers.lintian-overrides
+++ b/debian/ibverbs-providers.lintian-overrides
@@ -1,2 +1,2 @@
-# libefa, libhns, libionic, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions.
-ibverbs-providers: package-name-doesnt-match-sonames libefa1 libhns1 libionic1 libmana1 libmlx4-1 libmlx5-1
+# libcxiverbs, libefa, libhns, libionic, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions.
+ibverbs-providers: package-name-doesnt-match-sonames libcxiverbs1 libefa1 libhns1 libionic1 libmana1 libmlx4-1 libmlx5-1
diff --git a/debian/ibverbs-providers.symbols b/debian/ibverbs-providers.symbols
index bb74b34bc133..3772c9c3733b 100644
--- a/debian/ibverbs-providers.symbols
+++ b/debian/ibverbs-providers.symbols
@@ -232,3 +232,49 @@ libionic.so.1 ibverbs-providers #MINVER#
ionic_dv_pd_set_udma_mask@IONIC_1.0 59
ionic_dv_pd_set_sqcmb@IONIC_1.0 59
ionic_dv_pd_set_rqcmb@IONIC_1.0 59
+libcxiverbs.so.1 ibverbs-providers #MINVER#
+* Build-Depends-Package: libibverbs-dev
+ CXIVERBS_1.0@CXIVERBS_1.0 66
+ cxidv_alloc_svc@CXIVERBS_1.0 66
+ cxidv_query_svc@CXIVERBS_1.0 66
+ cxidv_get_svc_rsrc_use@CXIVERBS_1.0 66
+ cxidv_get_svc_lpr@CXIVERBS_1.0 66
+ cxidv_destroy_svc@CXIVERBS_1.0 66
+ cxidv_enable_svc@CXIVERBS_1.0 66
+ cxidv_svc_is_enabled@CXIVERBS_1.0 66
+ cxidv_alloc_lni@CXIVERBS_1.0 66
+ cxidv_alloc_cp@CXIVERBS_1.0 66
+ cxidv_destroy_cp@CXIVERBS_1.0 66
+ cxidv_alloc_ct@CXIVERBS_1.0 66
+ cxidv_inbound_wait@CXIVERBS_1.0 66
+ cxidv_alloc_ct_writeback@CXIVERBS_1.0 66
+ cxidv_destroy_ct@CXIVERBS_1.0 66
+ cxidv_alloc_cmdq@CXIVERBS_1.0 66
+ cxidv_alloc_trigger_cmdq@CXIVERBS_1.0 66
+ cxidv_destroy_cmdq@CXIVERBS_1.0 66
+ cxidv_alloc_wait@CXIVERBS_1.0 66
+ cxidv_destroy_wait@CXIVERBS_1.0 66
+ cxidv_alloc_eq@CXIVERBS_1.0 66
+ cxidv_destroy_eq@CXIVERBS_1.0 66
+ cxidv_map_csrs@CXIVERBS_1.0 66
+ cxidv_unmap_csrs@CXIVERBS_1.0 66
+ cxidv_read_csr@CXIVERBS_1.0 66
+ cxidv_write_csr@CXIVERBS_1.0 66
+ cxidv_write8_csr@CXIVERBS_1.0 66
+ cxidv_destroy_lni@CXIVERBS_1.0 66
+ cxidv_alloc_pd@CXIVERBS_1.0 66
+ cxidv_alloc_pid@CXIVERBS_1.0 66
+ cxidv_query_pid@CXIVERBS_1.0 66
+ cxidv_query_device@CXIVERBS_1.0 66
+ cxidv_mr_from_ibv_mr@CXIVERBS_1.0 66
+ cxidv_reg_native_mr@CXIVERBS_1.0 66
+ cxidv_cq_from_ibv_cq@CXIVERBS_1.0 66
+ cxidv_qp_from_ibv_qp@CXIVERBS_1.0 66
+ cxidv_modify_qp_src_id@CXIVERBS_1.0 66
+ cxidv_bind_job_tc@CXIVERBS_1.0 66
+ cxidv_clear_job_tc@CXIVERBS_1.0 66
+ cxidv_set_default_tc@CXIVERBS_1.0 66
+ cxidv_query_tcs@CXIVERBS_1.0 66
+ cxidv_telem_name@CXIVERBS_1.0 66
+ cxidv_telem_lookup@CXIVERBS_1.0 66
+ cxidv_telem_get_set@CXIVERBS_1.0 66
diff --git a/debian/ibverbs-utils.install b/debian/ibverbs-utils.install
index 569012599233..a8ab93836687 100644
--- a/debian/ibverbs-utils.install
+++ b/debian/ibverbs-utils.install
@@ -1,3 +1,4 @@
+usr/bin/cxi_telem
usr/bin/ibv_asyncwatch
usr/bin/ibv_devices
usr/bin/ibv_devinfo
diff --git a/debian/libibverbs-dev.install b/debian/libibverbs-dev.install
index f62250e91641..e09df711b63b 100644
--- a/debian/libibverbs-dev.install
+++ b/debian/libibverbs-dev.install
@@ -1,4 +1,6 @@
usr/include/infiniband/arch.h
+usr/include/infiniband/cxidv.h
+usr/include/infiniband/cxidv_telem.h
usr/include/infiniband/bnxt_re-hsi.h
usr/include/infiniband/bnxt_re_dv.h
usr/include/infiniband/efadv.h
@@ -18,6 +20,8 @@ usr/include/infiniband/verbs.h
usr/include/infiniband/verbs_api.h
usr/lib/*/lib*-rdmav*.a
usr/lib/*/libbnxt_re.a
+usr/lib/*/libcxiverbs.a
+usr/lib/*/libcxiverbs.so
usr/lib/*/libbnxt_re.so
usr/lib/*/libefa.a
usr/lib/*/libefa.so
@@ -34,6 +38,7 @@ usr/lib/*/libmlx4.so
usr/lib/*/libmlx5.a
usr/lib/*/libmlx5.so
usr/lib/*/pkgconfig/libbnxt_re.pc
+usr/lib/*/pkgconfig/libcxiverbs.pc
usr/lib/*/pkgconfig/libefa.pc
usr/lib/*/pkgconfig/libhns.pc
usr/lib/*/pkgconfig/libibverbs.pc
diff --git a/debian/rules b/debian/rules
index 392ddd75aaa9..22aa8cc03e9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,7 +18,7 @@ dh_params = --with python3 --builddirectory=build-deb
override_dh_auto_clean:
dh_auto_clean
rm -rf build-deb
- for package in ibverbs-providers libibverbs-dev rdma-core; do \
+ for package in ibverbs-providers ibverbs-utils libibverbs-dev rdma-core; do \
test ! -e debian/$$package.install.backup || mv debian/$$package.install.backup debian/$$package.install; \
done
@@ -63,10 +63,10 @@ override_dh_auto_test:
override_dh_auto_install:
# Some providers are disabled on architectures that are not able to do coherent DMA
ifeq (,$(filter-out $(NON_COHERENT_DMA_ARCHS),$(DEB_HOST_ARCH)))
- for package in ibverbs-providers libibverbs-dev rdma-core; do \
+ for package in ibverbs-providers ibverbs-utils libibverbs-dev rdma-core; do \
test -e debian/$$package.install.backup || cp debian/$$package.install debian/$$package.install.backup; \
done
- sed -i '/efa\|hns\|ionic\|mana\|mlx[45]/d' debian/ibverbs-providers.install debian/libibverbs-dev.install debian/rdma-core.install
+ sed -i '/cxi\|efa\|hns\|ionic\|mana\|mlx[45]/d' debian/ibverbs-providers.install debian/ibverbs-utils.install debian/libibverbs-dev.install debian/rdma-core.install
endif
DESTDIR=$(CURDIR)/debian/tmp ninja -C build-deb install
--git a/kernel-headers/CMakeLists.txt b/kernel-headers/CMakeLists.txt
index cd9c08cad30c..569f42aa5d34 100644
--- a/kernel-headers/CMakeLists.txt
+++ b/kernel-headers/CMakeLists.txt
@@ -1,6 +1,7 @@
publish_internal_headers(rdma
rdma/bnxt_re-abi.h
rdma/cxgb4-abi.h
+ rdma/cxiverbs-abi.h
rdma/efa-abi.h
rdma/erdma-abi.h
rdma/hns-abi.h
@@ -34,6 +35,12 @@ publish_internal_headers(rdma/hfi
rdma/hfi/hfi1_user.h
)
+# Cassini wire format, shared with the kernel's include/uapi/ethernet/;
+# update alongside kernel-headers/rdma/cxiverbs-abi.h.
+publish_internal_headers(ethernet
+ ethernet/cassini_user_defs.h
+ )
+
publish_internal_headers(linux
linux/stddef.h
linux/vfio.h
@@ -67,6 +74,7 @@ endfunction()
rdma_kernel_provider_abi(
rdma/bnxt_re-abi.h
rdma/cxgb4-abi.h
+ rdma/cxiverbs-abi.h
rdma/efa-abi.h
rdma/erdma-abi.h
rdma/hns-abi.h
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index 560643b77e35..5d87f671c0a2 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -2706,6 +2706,7 @@ extern const struct verbs_device_ops verbs_provider_rxe;
extern const struct verbs_device_ops verbs_provider_siw;
extern const struct verbs_device_ops verbs_provider_vmw_pvrdma;
extern const struct verbs_device_ops verbs_provider_ionic;
+extern const struct verbs_device_ops verbs_provider_cxiverbs;
extern const struct verbs_device_ops verbs_provider_all;
extern const struct verbs_device_ops verbs_provider_none;
void ibv_static_providers(void *unused, ...);
diff --git a/providers/cxi/CMakeLists.txt b/providers/cxi/CMakeLists.txt
new file mode 100644
index 000000000000..298dbea53a90
--- /dev/null
+++ b/providers/cxi/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Named cxiverbs (not cxi) to avoid colliding with the separate libcxi.so
+# built by the HPE libcxi project, which links against this via cxidv.h.
+rdma_shared_provider(cxiverbs libcxiverbs.map
+ 1 1.0.${PACKAGE_VERSION}
+ cxi.c
+ cxi_telem.c
+ verbs.c
+ )
+
+publish_headers(infiniband
+ cxidv.h
+ cxidv_telem.h
+ )
+
+add_subdirectory(tests)
+
+add_subdirectory(utils)
+
+rdma_pkg_config("cxiverbs" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}")
diff --git a/providers/cxi/libcxiverbs.map b/providers/cxi/libcxiverbs.map
new file mode 100644
index 000000000000..ea7e833d3415
--- /dev/null
+++ b/providers/cxi/libcxiverbs.map
@@ -0,0 +1,49 @@
+/* Export symbols should be added below according to
+ Documentation/versioning.md document. */
+CXIVERBS_1.0 {
+ global:
+ cxidv_alloc_svc;
+ cxidv_query_svc;
+ cxidv_get_svc_rsrc_use;
+ cxidv_get_svc_lpr;
+ cxidv_destroy_svc;
+ cxidv_enable_svc;
+ cxidv_svc_is_enabled;
+ cxidv_alloc_lni;
+ cxidv_alloc_cp;
+ cxidv_destroy_cp;
+ cxidv_alloc_ct;
+ cxidv_inbound_wait;
+ cxidv_alloc_ct_writeback;
+ cxidv_destroy_ct;
+ cxidv_alloc_cmdq;
+ cxidv_alloc_trigger_cmdq;
+ cxidv_destroy_cmdq;
+ cxidv_alloc_wait;
+ cxidv_destroy_wait;
+ cxidv_alloc_eq;
+ cxidv_destroy_eq;
+ cxidv_map_csrs;
+ cxidv_unmap_csrs;
+ cxidv_read_csr;
+ cxidv_write_csr;
+ cxidv_write8_csr;
+ cxidv_destroy_lni;
+ cxidv_alloc_pd;
+ cxidv_alloc_pid;
+ cxidv_query_pid;
+ cxidv_query_device;
+ cxidv_mr_from_ibv_mr;
+ cxidv_reg_native_mr;
+ cxidv_cq_from_ibv_cq;
+ cxidv_qp_from_ibv_qp;
+ cxidv_modify_qp_src_id;
+ cxidv_bind_job_tc;
+ cxidv_clear_job_tc;
+ cxidv_set_default_tc;
+ cxidv_query_tcs;
+ cxidv_telem_name;
+ cxidv_telem_lookup;
+ cxidv_telem_get_set;
+ local: *;
+};
diff --git a/providers/cxi/tests/CMakeLists.txt b/providers/cxi/tests/CMakeLists.txt
new file mode 100644
index 000000000000..99a4d7f2f1cf
--- /dev/null
+++ b/providers/cxi/tests/CMakeLists.txt
@@ -0,0 +1,4 @@
+rdma_test_executable(cxi_le_test cxi_le_test.c)
+target_link_libraries(cxi_le_test LINK_PRIVATE cxiverbs ibverbs ${CMAKE_THREAD_LIBS_INIT})
+rdma_test_executable(cxi_launcher_test cxi_launcher_test.c)
+target_link_libraries(cxi_launcher_test LINK_PRIVATE cxiverbs ibverbs)
diff --git a/providers/cxi/tests/cxi_launcher_test.c b/providers/cxi/tests/cxi_launcher_test.c
new file mode 100644
index 000000000000..1c5956a2dfad
--- /dev/null
+++ b/providers/cxi/tests/cxi_launcher_test.c
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+#define _GNU_SOURCE
+#include <sys/resource.h>
+#include <sys/syscall.h>
+#undef SYS_close_range
+int cxi_launcher_program_main(int argc, char **argv);
+#define main cxi_launcher_program_main
+#include "../utils/cxi_launcher.c"
+#undef main
+
+static int check_fd_cleanup(int keep)
+{
+ struct rlimit limit;
+ pid_t child;
+ int status;
+
+ child = fork();
+ if (child < 0)
+ return 1;
+ if (!child) {
+ int source;
+ int high;
+ int descriptor;
+
+ source = open("/dev/null", O_RDWR);
+ if (source < 0)
+ _exit(1);
+ for (descriptor = 0; descriptor < 3; descriptor++)
+ if (dup2(source, descriptor) < 0)
+ _exit(2);
+ if (source != 3) {
+ if (dup2(source, 3) < 0)
+ _exit(3);
+ close(source);
+ }
+ if (getrlimit(RLIMIT_NOFILE, &limit))
+ _exit(5);
+ if (limit.rlim_cur < 70001) {
+ limit.rlim_cur = 70001;
+ if (limit.rlim_max < limit.rlim_cur)
+ limit.rlim_max = limit.rlim_cur;
+ if (setrlimit(RLIMIT_NOFILE, &limit))
+ _exit(4);
+ }
+ high = fcntl(3, F_DUPFD, 70000);
+ if (high < 0)
+ _exit(4);
+ limit.rlim_cur = 256;
+ if (setrlimit(RLIMIT_NOFILE, &limit) || close_inherited_fds(keep))
+ _exit(6);
+ if (fcntl(high, F_GETFD) != -1 || errno != EBADF)
+ _exit(7);
+ for (descriptor = 0; descriptor < 3; descriptor++)
+ if (fcntl(descriptor, F_GETFD) < 0)
+ _exit(8);
+ if (keep >= 3 && fcntl(keep, F_GETFD) < 0)
+ _exit(9);
+ _exit(0);
+ }
+ if (waitpid(child, &status, 0) != child)
+ return 1;
+ if (!WIFEXITED(status) || WEXITSTATUS(status)) {
+ fprintf(stderr, "FD cleanup failed for keep=%d, status=%d\n", keep, status);
+ return 1;
+ }
+ return 0;
+}
+
+int main(void)
+{
+ static const int keep_fds[] = { -1, 0, 1, 3 };
+ size_t index;
+
+ for (index = 0; index < ARRAY_SIZE(keep_fds); index++)
+ if (check_fd_cleanup(keep_fds[index]))
+ return 1;
+ puts("PASS: FD fallback closes high descriptors and preserves stdio/grant");
+ return 0;
+}
diff --git a/providers/cxi/utils/CMakeLists.txt b/providers/cxi/utils/CMakeLists.txt
new file mode 100644
index 000000000000..02b43d044e40
--- /dev/null
+++ b/providers/cxi/utils/CMakeLists.txt
@@ -0,0 +1,5 @@
+rdma_executable(cxi_telem cxi_telem.c)
+target_link_libraries(cxi_telem LINK_PRIVATE cxiverbs ibverbs)
+
+rdma_executable(cxi_launcher cxi_launcher.c)
+target_link_libraries(cxi_launcher LINK_PRIVATE cxiverbs ibverbs ${COMMON_LIBS})
\ No newline at end of file
diff --git a/pyverbs/CMakeLists.txt b/pyverbs/CMakeLists.txt
index d128de2caf98..4d1ec42ef57e 100644
--- a/pyverbs/CMakeLists.txt
+++ b/pyverbs/CMakeLists.txt
@@ -52,8 +52,9 @@ rdma_python_module(pyverbs
utils.py
)
-# mlx5 and efa providers are not built without coherent DMA, e.g. ARM32 build.
+# mlx5, efa and cxi providers are not built without coherent DMA, e.g. ARM32 build.
if (HAVE_COHERENT_DMA)
add_subdirectory(providers/mlx5)
add_subdirectory(providers/efa)
+add_subdirectory(providers/cxi)
endif()
diff --git a/pyverbs/device.pxd b/pyverbs/device.pxd
index 75ede6889d61..3c44aeafa257 100644
--- a/pyverbs/device.pxd
+++ b/pyverbs/device.pxd
@@ -13,6 +13,7 @@ cdef class Context(PyverbsCM):
cdef object name
cdef add_ref(self, obj)
cdef object pds
+ cdef object lnis
cdef object dms
cdef object ccs
cdef object cqs
diff --git a/pyverbs/device.pyx b/pyverbs/device.pyx
index b8b4b10d35aa..ac9cfd4f8b2f 100644
--- a/pyverbs/device.pyx
+++ b/pyverbs/device.pyx
@@ -111,6 +111,7 @@ cdef class Context(PyverbsCM):
super().__init__()
self.pds = weakref.WeakSet()
+ self.lnis = weakref.WeakSet()
self.dms = weakref.WeakSet()
self.ccs = weakref.WeakSet()
self.cqs = weakref.WeakSet()
@@ -191,7 +192,7 @@ cdef class Context(PyverbsCM):
self.xrcds,
self.vars, self.sched_leafs, self.sched_nodes,
self.dr_domains, self.event_channels, self.dmahs,
- self.comp_cntrs])
+ self.comp_cntrs, self.lnis])
rc = v.ibv_close_device(self.context)
if rc != 0:
raise PyverbsRDMAErrno(f'Failed to close device {self.name}')
diff --git a/pyverbs/providers/cxi/CMakeLists.txt b/pyverbs/providers/cxi/CMakeLists.txt
new file mode 100644
index 000000000000..23a071deebcd
--- /dev/null
+++ b/pyverbs/providers/cxi/CMakeLists.txt
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
+# Copyright 2026 Hewlett Packard Enterprise Development LP
+
+rdma_cython_module(pyverbs/providers/cxi cxiverbs
+ cxidv.pyx
+)
diff --git a/pyverbs/providers/cxi/__init__.pxd b/pyverbs/providers/cxi/__init__.pxd
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/pyverbs/providers/cxi/__init__.py b/pyverbs/providers/cxi/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/pyverbs/providers/cxi/cxidv.pxd b/pyverbs/providers/cxi/cxidv.pxd
new file mode 100644
index 000000000000..9008a3f4ca3b
--- /dev/null
+++ b/pyverbs/providers/cxi/cxidv.pxd
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
+# Copyright 2026 Hewlett Packard Enterprise Development LP
+
+#cython: language_level=3
+
+from pyverbs.base cimport PyverbsCM
+from pyverbs.device cimport Context
+cimport pyverbs.libibverbs as v
+from libc.stdint cimport uint32_t
+
+cdef extern from "infiniband/cxidv.h":
+ cdef struct cxidv_lni:
+ v.ibv_context *context
+ uint32_t handle
+ uint32_t id
+ uint32_t svc_id
+
+
+cdef class LNI(PyverbsCM):
+ cdef cxidv_lni *lni
+ cdef Context ctx
+ cdef add_ref(self, obj)
+ cpdef close(self)
diff --git a/pyverbs/providers/cxi/cxidv.pyx b/pyverbs/providers/cxi/cxidv.pyx
new file mode 100644
index 000000000000..4b41b3b74953
--- /dev/null
+++ b/pyverbs/providers/cxi/cxidv.pyx
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
+# Copyright 2026 Hewlett Packard Enterprise Development LP
+"""
+CXI direct verbs needed to use Ultra Ethernet objects on a CXI device: the
+LNI a PD is allocated from, and the PID bound to that PD.
+"""
+from pyverbs.pyverbs_error import PyverbsError, PyverbsRDMAError
+from pyverbs.device cimport Context
+from pyverbs.pd cimport PD
+cimport pyverbs.libibverbs as v
+from libc.stdint cimport uint32_t
+
+cdef extern from "infiniband/cxidv.h":
+ int cxidv_alloc_lni(v.ibv_context *context, uint32_t svc_id,
+ cxidv_lni **lni)
+ int cxidv_destroy_lni(cxidv_lni *lni)
+ int cxidv_alloc_pid(v.ibv_pd *pd, uint32_t flags, uint32_t *pid)
+
+
+def alloc_pid(PD pd not None, uint32_t flags=0):
+ cdef uint32_t pid
+ rc = cxidv_alloc_pid(pd.pd, flags, &pid)
+ if rc != 0:
+ raise PyverbsRDMAError('Failed to allocate CXI PID', rc)
+ return pid
+
+
+cdef class LNI(PyverbsCM):
+ def __init__(self, Context context not None, unsigned int svc_id=1):
+ super().__init__()
+ self.lni = NULL
+ rc = cxidv_alloc_lni(context.context, svc_id, &self.lni)
+ if rc != 0:
+ raise PyverbsRDMAError('Failed to allocate CXI LNI', rc)
+ self.ctx = context
+ context.lnis.add(self)
+
+ def __dealloc__(self):
+ self.close()
+
+ cpdef close(self):
+ cdef int rc
+
+ if self.lni != NULL:
+ rc = cxidv_destroy_lni(self.lni)
+ if rc != 0:
+ raise PyverbsRDMAError('Failed to destroy CXI LNI', rc)
+ self.lni = NULL
+ self.ctx = None
+
+ cdef add_ref(self, obj):
+ raise PyverbsError('CXI LNI does not own Python resources')
+
+ @property
+ def handle(self):
+ return self.lni.handle if self.lni != NULL else 0
+
+ @property
+ def id(self):
+ return self.lni.id if self.lni != NULL else 0
+
+ @property
+ def svc_id(self):
+ return self.lni.svc_id if self.lni != NULL else 0
diff --git a/pyverbs/ru.pyx b/pyverbs/ru.pyx
index e21d045a4a8b..4017ffb19ac6 100644
--- a/pyverbs/ru.pyx
+++ b/pyverbs/ru.pyx
@@ -258,7 +258,7 @@ cdef class Job(PyverbsCM):
if fd is not None:
rc = v.ibv_import_job(context.context, fd, &self.job)
if rc != 0:
- raise PyverbsRDMAError('Failed to import job', rc)
+ raise PyverbsRDMAErrno('Failed to import job')
self._is_imported = True
else:
if attr is None:
diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 9450299fd57c..aa1d38b1cdbf 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -191,6 +191,7 @@ fast path operations.
Device-specific plug-in ibverbs userspace drivers are included:
- libcxgb4: Chelsio T4 iWARP HCA
+- libcxiverbs: HPE Cassini Network Adapter
- libefa: Amazon Elastic Fabric Adapter
- liberdma: Alibaba Elastic RDMA (iWarp) Adapter
- libhfi1: Intel Omni-Path HFI
@@ -604,6 +605,9 @@ fi
%dir %{_sysconfdir}/libibverbs.d
%dir %{_libdir}/libibverbs
%{_libdir}/libbnxt_re.so.*
+%{_libdir}/libcxiverbs.so.*
+# cxi_launcher ships with the CXI provider: CXI client programs cannot run without it
+%{_bindir}/cxi_launcher
%{_libdir}/libefa.so.*
%{_libdir}/libhns.so.*
%{_libdir}/libibverbs*.so.*
@@ -618,6 +622,7 @@ fi
%files -n libibverbs-utils
%{_bindir}/ibv_*
+%{_bindir}/cxi_telem
%{_mandir}/man1/ibv_*
%files -n ibacm
diff --git a/suse/rdma-core.spec b/suse/rdma-core.spec
index 24562b00e9b0..a0450d62a79b 100644
--- a/suse/rdma-core.spec
+++ b/suse/rdma-core.spec
@@ -34,6 +34,7 @@ Summary: RDMA core userspace libraries and daemons
License: BSD-2-Clause OR GPL-2.0-only
Group: Productivity/Networking/Other
+%define cxiverbs_so_major 1
%define efa_so_major 1
%define hns_so_major 1
%define ionic_so_major 1
@@ -48,6 +49,7 @@ Group: Productivity/Networking/Other
%define bnxt_re_so_major 1
%define bnxt_re_lname libbnxt_re%{bnxt_re_so_major}
+%define cxiverbs_lname libcxiverbs%{cxiverbs_so_major}
%define efa_lname libefa%{efa_so_major}
%define hns_lname libhns%{hns_so_major}
%define ionic_lname libionic%{ionic_so_major}
@@ -166,6 +168,7 @@ Requires: %{umad_lname} = %{version}-%{release}
Requires: %{verbs_lname} = %{version}-%{release}
%if 0%{?dma_coherent}
Requires: %{bnxt_re_lname} = %{version}-%{release}
+Requires: %{cxiverbs_lname} = %{version}-%{release}
Requires: %{efa_lname} = %{version}-%{release}
Requires: %{hns_lname} = %{version}-%{release}
Requires: %{ionic_lname} = %{version}-%{release}
@@ -220,6 +223,7 @@ Obsoletes: libocrdma-rdmav2 < %{version}-%{release}
Obsoletes: librxe-rdmav2 < %{version}-%{release}
%if 0%{?dma_coherent}
Requires: %{bnxt_re_lname} = %{version}-%{release}
+Requires: %{cxiverbs_lname} = %{version}-%{release}
Requires: %{efa_lname} = %{version}-%{release}
Requires: %{hns_lname} = %{version}-%{release}
Requires: %{ionic_lname} = %{version}-%{release}
@@ -240,6 +244,7 @@ fast path operations.
Device-specific plug-in ibverbs userspace drivers are included:
- libcxgb4: Chelsio T4 iWARP HCA
+- libcxiverbs: HPE Cassini Network Adapter
- libefa: Amazon Elastic Fabric Adapter
- libhfi1: Intel Omni-Path HFI
- libhns: HiSilicon Hip08+ SoC
@@ -271,6 +276,13 @@ Group: System/Libraries
%description -n %bnxt_re_lname
This package contains the bnxt_re runtime library.
+%package -n %cxiverbs_lname
+Summary: CXIVERBS runtime library
+Group: System/Libraries
+
+%description -n %cxiverbs_lname
+This package contains the cxiverbs runtime library.
+
%package -n %efa_lname
Summary: EFA runtime library
Group: System/Libraries
@@ -542,6 +554,7 @@ rm -rf %{buildroot}/%{_sbindir}/srp_daemon.sh
%ldconfig_scriptlets -n %verbs_lname
%ldconfig_scriptlets -n %bnxt_re_lname
+%ldconfig_scriptlets -n %cxiverbs_lname
%ldconfig_scriptlets -n %efa_lname
%ldconfig_scriptlets -n %hns_lname
%ldconfig_scriptlets -n %ionic_lname
@@ -723,6 +736,10 @@ done
%doc %{_docdir}/%{name}-%{version}/tag_matching.md
%{_mandir}/man7/rxe*
%{_prefix}/lib/sysusers.d/rdma.conf
+%if 0%{?dma_coherent}
+# cxi_launcher ships with the CXI provider: CXI client programs cannot run without it
+%{_bindir}/cxi_launcher
+%endif
%files -n libibnetdisc%{ibnetdisc_major}
%{_libdir}/libibnetdisc.so.*
@@ -737,6 +754,9 @@ done
%files -n %bnxt_re_lname
%{_libdir}/libbnxt_re*.so.*
+%files -n %cxiverbs_lname
+%{_libdir}/libcxiverbs*.so.*
+
%files -n %efa_lname
%{_libdir}/libefa*.so.*
@@ -759,6 +779,9 @@ done
%files -n libibverbs-utils
%{_bindir}/ibv_*
+%if 0%{?dma_coherent}
+%{_bindir}/cxi_telem
+%endif
%{_mandir}/man1/ibv_*
%files -n ibacm
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 12/12] libibverbs: port RU examples to explicitly granted resources
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
` (10 preceding siblings ...)
2026-10-31 19:26 ` [PATCH 11/12] cxiverbs: wire and package the CXI verbs provider and tests Doug Ledford
@ 2026-10-31 19:26 ` Doug Ledford
11 siblings, 0 replies; 13+ messages in thread
From: Doug Ledford @ 2026-10-31 19:26 UTC (permalink / raw)
To: linux-rdma, slingshot-os-team; +Cc: linux-kernel, Doug Ledford, Iraimani P
Teach ibv_ru_pingpong and ibv_ru_rma to run on a Slingshot device.
CXI has no implicit resources and the service and job grant that
authorise them can only be created by root. On a Slingshot transport
a program that finds no grant (UET_JOB_FD unset) runs itself again
under cxi_launcher, which creates the grant and then runs the program
as the sudo user. The second run finds the grant, allocates its LNI,
PD and PID from it, imports the job and runs the test. A user
starts it with "sudo ibv_ru_pingpong -d DEV ..." and, as with
ibv_ru_rma, may choose the JobID (the VNI) with -j. The launcher
is found next to the program or in the install bindir, never through
PATH. Other transports use the existing code path.
The programs no longer create a service of their own. The SGE count
is checked against the device maximum instead of a fixed constant,
and devinfo reports the Slingshot transport and GID type names.
The Slingshot path uses the cxidv API. It, and the link against
libcxiverbs, is built only when the CXI provider is, which requires
HAVE_COHERENT_DMA; elsewhere the examples build without it.
UET ABI decision needed: this keeps the RU examples, and the generic
pyverbs.ru module, available on platforms without coherent DMA. If
UET, and by extension the RU queue pair type, is not expected to
support such platforms, the RU examples and pyverbs.ru should instead
be built only when HAVE_COHERENT_DMA is set, as the mlx5 and efa
pyverbs modules are.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
libibverbs/examples/CMakeLists.txt | 10 +++
libibverbs/examples/devinfo.c | 2 +
libibverbs/examples/ru_cxi_launch.h | 138 ++++++++++++++++++++++++++++++++++++
libibverbs/examples/ru_pingpong.c | 126 ++++++++++++++++++++++++++++----
libibverbs/examples/ru_rma.c | 112 +++++++++++++++++++++++++----
5 files changed, 361 insertions(+), 27 deletions(-)
diff --git a/libibverbs/examples/CMakeLists.txt b/libibverbs/examples/CMakeLists.txt
index a3e5c26ac190..e2134f3e963c 100644
--- a/libibverbs/examples/CMakeLists.txt
+++ b/libibverbs/examples/CMakeLists.txt
@@ -25,6 +25,16 @@ target_link_libraries(ibv_ru_pingpong LINK_PRIVATE ibverbs ibverbs_tools)
rdma_executable(ibv_ru_rma ru_rma.c)
target_link_libraries(ibv_ru_rma LINK_PRIVATE ibverbs ibverbs_tools)
+# CXI is only built with coherent DMA. The examples run themselves again
+# under cxi_launcher on Slingshot devices.
+if (HAVE_COHERENT_DMA)
+ foreach(ru_example ibv_ru_pingpong ibv_ru_rma)
+ target_link_libraries(${ru_example} LINK_PRIVATE cxiverbs)
+ target_compile_definitions(${ru_example} PRIVATE HAVE_CXIVERBS
+ CXI_LAUNCHER_BINDIR="${CMAKE_INSTALL_FULL_BINDIR}")
+ endforeach()
+endif()
+
rdma_executable(ibv_srq_pingpong srq_pingpong.c)
target_link_libraries(ibv_srq_pingpong LINK_PRIVATE ibverbs ibverbs_tools)
diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
index c10c8e21f64a..eb87b3c40d1d 100644
--- a/libibverbs/examples/devinfo.c
+++ b/libibverbs/examples/devinfo.c
@@ -72,6 +72,7 @@ static const char *transport_str(enum ibv_transport_type transport)
case IBV_TRANSPORT_USNIC: return "usNIC";
case IBV_TRANSPORT_USNIC_UDP: return "usNIC UDP";
case IBV_TRANSPORT_UNSPECIFIED: return "unspecified";
+ case IBV_TRANSPORT_SLINGSHOT: return "Slingshot";
default: return "invalid transport";
}
}
@@ -173,6 +174,7 @@ static const char *gid_type_str(enum ibv_gid_type_sysfs type)
case IBV_GID_TYPE_SYSFS_ROCE_V2: return "RoCE v2";
case IBV_GID_TYPE_SYSFS_UET_UDP: return "UET UDP";
case IBV_GID_TYPE_SYSFS_UET_IP: return "UET IP";
+ case IBV_GID_TYPE_SYSFS_SLINGSHOT_UFH: return "SLINGSHOT UFH";
default: return "Invalid gid type";
}
}
diff --git a/libibverbs/examples/ru_cxi_launch.h b/libibverbs/examples/ru_cxi_launch.h
new file mode 100644
index 000000000000..ba87a6cd506d
--- /dev/null
+++ b/libibverbs/examples/ru_cxi_launch.h
@@ -0,0 +1,138 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+/* Copyright 2026 Hewlett Packard Enterprise Development LP */
+
+/*
+ * Slingshot (CXI) devices need a service and job grant that only root can
+ * create. cxi_launcher creates them and runs a command under the grant. A
+ * program that finds no grant calls ru_cxi_relaunch() to run itself again
+ * under the launcher; the second run finds UET_JOB_FD and carries on.
+ */
+
+#ifndef RU_CXI_LAUNCH_H
+#define RU_CXI_LAUNCH_H
+
+#include <errno.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#ifndef CXI_LAUNCHER_BINDIR
+#define CXI_LAUNCHER_BINDIR "/usr/bin"
+#endif
+
+#define RU_CXI_MAX_ARGS 256
+
+/* Returns 0 if already running under a grant, -1 on error; else never returns. */
+static inline int ru_cxi_relaunch(const char *devname, uint32_t job_id, int port, int gidx,
+ uint32_t max_addr_entries)
+{
+ char exe[PATH_MAX], launcher[PATH_MAX + 16], cmdline[16384];
+ const char *args[RU_CXI_MAX_ARGS + 16];
+ char idbuf[16], portbuf[16], gidbuf[16], addrbuf[16];
+ ssize_t len, total;
+ size_t n = 0, i;
+ int fd;
+
+ if (getenv("UET_JOB_FD"))
+ return 0;
+ if (geteuid() != 0) {
+ fprintf(stderr,
+ "Slingshot jobs are set up by cxi_launcher, which must run as root; use sudo\n");
+ return -1;
+ }
+
+ len = readlink("/proc/self/exe", exe, sizeof(exe) - 1);
+ if (len < 0 || (size_t)len == sizeof(exe) - 1) {
+ if (len >= 0)
+ errno = ENAMETOOLONG;
+ perror("readlink /proc/self/exe");
+ return -1;
+ }
+ exe[len] = 0;
+
+ len = snprintf(launcher, sizeof(launcher), "%s/cxi_launcher", CXI_LAUNCHER_BINDIR);
+ if (len < 0 || (size_t)len >= sizeof(launcher)) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ fd = open("/proc/self/cmdline", O_RDONLY | O_CLOEXEC);
+ if (fd < 0) {
+ perror("open /proc/self/cmdline");
+ return -1;
+ }
+ total = 0;
+ while ((len = read(fd, cmdline + total, sizeof(cmdline) - 1 - total)) > 0)
+ total += len;
+ if ((size_t)total == sizeof(cmdline) - 1) {
+ char extra;
+
+ len = read(fd, &extra, sizeof(extra));
+ if (len > 0) {
+ close(fd);
+ errno = E2BIG;
+ fprintf(stderr, "command line exceeds launcher capacity\n");
+ return -1;
+ }
+ }
+ close(fd);
+ if (len < 0 || total <= 0) {
+ fprintf(stderr, "couldn't read the command line\n");
+ return -1;
+ }
+ if (cmdline[total - 1] != '\0') {
+ errno = E2BIG;
+ return -1;
+ }
+ cmdline[total] = 0;
+
+ snprintf(idbuf, sizeof(idbuf), "%u", job_id);
+ args[n++] = launcher;
+ args[n++] = "-d";
+ args[n++] = devname;
+ args[n++] = "--vni";
+ args[n++] = idbuf;
+ if (port > 0) {
+ snprintf(portbuf, sizeof(portbuf), "%d", port);
+ args[n++] = "-i";
+ args[n++] = portbuf;
+ }
+ if (gidx >= 0) {
+ snprintf(gidbuf, sizeof(gidbuf), "%d", gidx);
+ args[n++] = "-g";
+ args[n++] = gidbuf;
+ }
+ if (max_addr_entries) {
+ snprintf(addrbuf, sizeof(addrbuf), "%u", max_addr_entries);
+ args[n++] = "--max-addr-entries";
+ args[n++] = addrbuf;
+ }
+ /* Run as the sudo caller; a plain root login runs the job as root. */
+ if (!getenv("SUDO_UID")) {
+ args[n++] = "--uid";
+ args[n++] = "0";
+ }
+ args[n++] = "--";
+ args[n++] = exe;
+ /* Skip argv[0] of the original command line. */
+ i = strlen(cmdline) + 1;
+ while (i < (size_t)total && n < RU_CXI_MAX_ARGS) {
+ args[n++] = cmdline + i;
+ i += strlen(cmdline + i) + 1;
+ }
+ if (i < (size_t)total) {
+ fprintf(stderr, "too many arguments\n");
+ return -1;
+ }
+ args[n] = NULL;
+
+ execv(launcher, (char *const *)args);
+ fprintf(stderr, "couldn't run %s: %s\n", launcher, strerror(errno));
+ return -1;
+}
+
+#endif
diff --git a/libibverbs/examples/ru_pingpong.c b/libibverbs/examples/ru_pingpong.c
index 21cc068f2f5b..21a467715a0e 100644
--- a/libibverbs/examples/ru_pingpong.c
+++ b/libibverbs/examples/ru_pingpong.c
@@ -51,8 +51,14 @@
#include <time.h>
#include <inttypes.h>
#include <endian.h>
+#include <stdbool.h>
#include "pingpong.h"
+#ifdef HAVE_CXIVERBS
+#include <infiniband/cxidv.h>
+
+#include "ru_cxi_launch.h"
+#endif
#include <ccan/minmax.h>
@@ -92,6 +98,11 @@ struct pingpong_context {
union ibv_gid gid;
struct ibv_comp_channel *channel;
struct ibv_pd *pd;
+#ifdef HAVE_CXIVERBS
+ struct cxidv_lni *cxi_lni;
+ uint32_t cxi_svc_id;
+#endif
+ uint32_t job_id;
struct ibv_mr *mr;
struct ibv_job *job;
struct ibv_job_key *job_key;
@@ -439,13 +450,10 @@ static int pp_check_dev_caps(struct ibv_context *context)
return -1;
}
- /* The scatter/gather buffer array is sized at PP_MAX_SGE; make sure
- * the device can actually accept that many SGEs per WR.
- */
- if (attr.orig_attr.max_sge < PP_MAX_SGE) {
+ if (use_sge > attr.orig_attr.max_sge) {
fprintf(stderr,
- "PP_MAX_SGE (%d) exceeds device max_sge (%d)\n",
- PP_MAX_SGE, attr.orig_attr.max_sge);
+ "Requested SGEs (%d) exceed device max_sge (%d)\n",
+ use_sge, attr.orig_attr.max_sge);
return -1;
}
@@ -510,7 +518,39 @@ static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size,
ctx->channel = NULL;
}
- ctx->pd = ibv_alloc_pd(ctx->context);
+ ctx->job_id = DEFAULT_JOB_ID;
+ if (getenv("UET_JOB_ID"))
+ ctx->job_id = strtoul(getenv("UET_JOB_ID"), NULL, 0);
+#ifdef HAVE_CXIVERBS
+ if (ib_dev->transport_type == IBV_TRANSPORT_SLINGSHOT) {
+ const char *service = getenv("UET_SERVICE_ID");
+ uint32_t pid;
+ int ret;
+
+ if (!service) {
+ fprintf(stderr, "No service granted; run under cxi_launcher\n");
+ goto clean_comp_channel;
+ }
+ ctx->cxi_svc_id = strtoul(service, NULL, 0);
+ ret = cxidv_alloc_lni(ctx->context, ctx->cxi_svc_id, &ctx->cxi_lni);
+ if (ret) {
+ fprintf(stderr, "Couldn't allocate LNI: %s\n", strerror(ret));
+ goto clean_comp_channel;
+ }
+ ctx->pd = cxidv_alloc_pd(ctx->cxi_lni);
+ if (!ctx->pd)
+ goto clean_comp_channel;
+ ret = cxidv_alloc_pid(ctx->pd, 0, &pid);
+ if (ret) {
+ fprintf(stderr, "Couldn't bind PD PID: %s\n", strerror(ret));
+ goto clean_pd;
+ }
+ pid_on_fep = pid;
+ } else
+#endif
+ {
+ ctx->pd = ibv_alloc_pd(ctx->context);
+ }
if (!ctx->pd) {
fprintf(stderr, "Couldn't allocate PD\n");
goto clean_comp_channel;
@@ -522,13 +562,20 @@ static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size,
IBV_JOB_ATTR_MAX_ADDR_ENTRIES |
IBV_JOB_ATTR_PORT_NUM |
IBV_JOB_ATTR_SGID_INDEX),
- .id = DEFAULT_JOB_ID,
+ .id = ctx->job_id,
.max_addr_entries = DEFAULT_ADDR_ENTRIES,
.port_num = port,
.sgid_index = gidx,
};
- ctx->job = ibv_alloc_job(ctx->context, &job_attr, NULL);
+ if (getenv("UET_JOB_FD")) {
+ int fd = strtol(getenv("UET_JOB_FD"), NULL, 0);
+
+ if (ibv_import_job(ctx->context, fd, &ctx->job))
+ ctx->job = NULL;
+ } else {
+ ctx->job = ibv_alloc_job(ctx->context, &job_attr, NULL);
+ }
if (!ctx->job) {
fprintf(stderr, "Couldn't allocate job\n");
goto clean_pd;
@@ -692,6 +739,10 @@ clean_pd:
ibv_dealloc_pd(ctx->pd);
clean_comp_channel:
+#ifdef HAVE_CXIVERBS
+ if (ctx->cxi_lni)
+ cxidv_destroy_lni(ctx->cxi_lni);
+#endif
if (ctx->channel)
ibv_destroy_comp_channel(ctx->channel);
@@ -709,6 +760,8 @@ clean_ctx:
static int pp_close_ctx(struct pingpong_context *ctx)
{
+ int ret = 0;
+
if (ibv_destroy_qp(ctx->qp)) {
fprintf(stderr, "Couldn't destroy QP\n");
return 1;
@@ -747,8 +800,16 @@ static int pp_close_ctx(struct pingpong_context *ctx)
if (ibv_dealloc_pd(ctx->pd)) {
fprintf(stderr, "Couldn't deallocate PD\n");
- return 1;
+ ret = 1;
}
+#ifdef HAVE_CXIVERBS
+ if (ctx->cxi_lni && cxidv_destroy_lni(ctx->cxi_lni)) {
+ fprintf(stderr, "Couldn't destroy LNI\n");
+ ret = 1;
+ }
+#endif
+ if (ret)
+ return ret;
if (ctx->channel) {
if (ibv_destroy_comp_channel(ctx->channel)) {
@@ -1044,6 +1105,8 @@ static void usage(const char *argv0)
printf(" -p, --port <port> listen on/connect to port <port> (default 18515)\n");
printf(" -d, --ib-dev <dev> use IB device <dev> (default first device found)\n");
printf(" -i, --ib-port <port> use port <port> of IB device (default 1)\n");
+ printf(" -j, --job-id <id> JobID (Slingshot VNI) for this side (default %d)\n",
+ DEFAULT_JOB_ID);
printf(" -s, --size <size> size of message to exchange (default 4096)\n");
printf(" -m, --mtu <size> path MTU (default 1024, same on both sides)\n");
printf(" -r, --rx-depth <dep> number of receives to post at a time (default 500)\n");
@@ -1099,6 +1162,7 @@ int main(int argc, char *argv[])
static struct option long_options[] = {
{ .name = "port", .has_arg = 1, .val = 'p' },
{ .name = "ib-dev", .has_arg = 1, .val = 'd' },
+ { .name = "job-id", .has_arg = 1, .val = 'j' },
{ .name = "ib-port", .has_arg = 1, .val = 'i' },
{ .name = "size", .has_arg = 1, .val = 's' },
{ .name = "mtu", .has_arg = 1, .val = 'm' },
@@ -1117,7 +1181,7 @@ int main(int argc, char *argv[])
{}
};
- c = getopt_long(argc, argv, "p:d:i:s:m:r:n:eg:cNQI:S:L",
+ c = getopt_long(argc, argv, "p:d:i:j:s:m:r:n:eg:cNQI:S:L",
long_options, NULL);
if (c == -1)
@@ -1163,6 +1227,9 @@ int main(int argc, char *argv[])
case 'g':
gidx = strtol(optarg, NULL, 0);
break;
+ case 'j':
+ setenv("UET_JOB_ID", optarg, 1);
+ break;
case 'c':
validate_buf = 1;
break;
@@ -1245,6 +1312,19 @@ int main(int argc, char *argv[])
}
}
+#ifdef HAVE_CXIVERBS
+ if (ib_dev->transport_type == IBV_TRANSPORT_SLINGSHOT) {
+ const char *job = getenv("UET_JOB_ID");
+
+ if (ru_cxi_relaunch(ibv_get_device_name(ib_dev),
+ job ? strtoul(job, NULL, 0) : DEFAULT_JOB_ID,
+ ib_port, gidx, 0)) {
+ ibv_free_device_list(dev_list);
+ return 1;
+ }
+ }
+#endif
+
ctx = pp_init_ctx(ib_dev, size, rx_depth, ib_port, gidx, use_event,
pid_on_fep, resource_index);
if (!ctx)
@@ -1289,8 +1369,11 @@ int main(int argc, char *argv[])
rem_dest = pp_server_exch_dest(ctx, ib_port, mtu, port, 0,
&my_dest, gidx);
- if (!rem_dest)
+ if (!rem_dest) {
+ pp_close_ctx(ctx);
+ ibv_free_device_list(dev_list);
return 1;
+ }
inet_ntop(AF_INET6, &rem_dest->gid, gid, sizeof(gid));
printf(" remote address: LID 0x%04x, QPN 0x%06x, PSN 0x%06x, GID %s\n",
@@ -1298,8 +1381,12 @@ int main(int argc, char *argv[])
if (servername) {
if (pp_connect_ctx(ctx, ib_port, my_dest.psn, mtu, 0,
- rem_dest, gidx))
+ rem_dest, gidx)) {
+ pp_close_ctx(ctx);
+ ibv_free_device_list(dev_list);
+ free(rem_dest);
return 1;
+ }
}
ctx->pending = PINGPONG_RECV_WRID;
@@ -1408,11 +1495,22 @@ int main(int argc, char *argv[])
iters, usec / 1000000., usec / iters);
if ((!servername) && (validate_buf)) {
+ int invalid = 0;
+
for (int i = 0; i < size; i += page_size) {
- if (ctx->buf[i] != i / page_size % sizeof(char))
+ if (ctx->buf[i] != i / page_size % sizeof(char)) {
printf("invalid data in page %d\n",
i / page_size);
+ invalid = 1;
+ }
+ }
+ if (invalid) {
+ pp_close_ctx(ctx);
+ ibv_free_device_list(dev_list);
+ free(rem_dest);
+ return 1;
}
+ printf("validate: buffer verified\n");
}
}
diff --git a/libibverbs/examples/ru_rma.c b/libibverbs/examples/ru_rma.c
index ba3f3d1ea198..bd78d9383dbc 100644
--- a/libibverbs/examples/ru_rma.c
+++ b/libibverbs/examples/ru_rma.c
@@ -52,8 +52,14 @@
#include <time.h>
#include <inttypes.h>
#include <endian.h>
+#include <sys/random.h>
#include "pingpong.h"
+#ifdef HAVE_CXIVERBS
+#include <infiniband/cxidv.h>
+
+#include "ru_cxi_launch.h"
+#endif
#include <ccan/minmax.h>
@@ -151,6 +157,7 @@ struct ru_cfg {
uint64_t imm_data64;
int use_event;
int validate_buf;
+ bool mtu_set;
enum ibv_mtu mtu;
};
@@ -162,6 +169,10 @@ struct ru_exchange_info {
};
struct ru_context {
+#ifdef HAVE_CXIVERBS
+ struct cxidv_lni *cxi_lni;
+ uint32_t cxi_svc_id;
+#endif
struct ru_cfg cfg;
struct ibv_job *job;
struct ibv_job_key *job_key;
@@ -243,6 +254,10 @@ static void ru_free_res(struct ru_context *ctx)
ibv_destroy_qp(ctx->qp);
ctx->qp = NULL;
}
+ if (ctx->ah) {
+ ibv_destroy_ah(&ctx->ah->ah_base);
+ ctx->ah = NULL;
+ }
if (ctx->cq) {
ibv_destroy_cq(ctx->cq);
@@ -286,6 +301,15 @@ static void ru_free_res(struct ru_context *ctx)
ibv_dealloc_pd(ctx->pd);
ctx->pd = NULL;
}
+#ifdef HAVE_CXIVERBS
+ if (ctx->cxi_lni) {
+ int ret = cxidv_destroy_lni(ctx->cxi_lni);
+
+ if (ret)
+ RU_ERR("Couldn't destroy LNI: %s", strerror(ret));
+ ctx->cxi_lni = NULL;
+ }
+#endif
if (ctx->channel) {
ibv_destroy_comp_channel(ctx->channel);
@@ -338,6 +362,8 @@ static int ru_init_cfg(int argc, char *argv[], struct ru_context *ctx)
ctx->cfg.do_rma_ex = false;
ctx->cfg.do_rma_ex64 = true; /* default to rma_ex64 */
ctx->cfg.job_id = RU_DEFAULT_JOB_ID;
+ if (getenv("UET_JOB_ID"))
+ ctx->cfg.job_id = strtoul(getenv("UET_JOB_ID"), NULL, 0);
while (1) {
int c;
@@ -402,6 +428,7 @@ static int ru_init_cfg(int argc, char *argv[], struct ru_context *ctx)
RU_USAGE(argv[0]);
return RU_ERR_RC;
}
+ ctx->cfg.mtu_set = true;
break;
case 'r':
ctx->cfg.rx_depth = strtoul(optarg, NULL, 0);
@@ -540,12 +567,9 @@ static int ru_check_dev_caps(struct ru_context *ctx)
return RU_ERR_RC;
}
- /* the local SGE array is sized at RU_MAX_SGE; the device must accept
- * that many SGEs per WR.
- */
- if (attr.orig_attr.max_sge < RU_MAX_SGE) {
- RU_ERR("RU_MAX_SGE (%d) exceeds device max_sge (%d)",
- RU_MAX_SGE, attr.orig_attr.max_sge);
+ if (ctx->cfg.sge > attr.orig_attr.max_sge) {
+ RU_ERR("Requested SGEs (%d) exceed device max_sge (%d)",
+ ctx->cfg.sge, attr.orig_attr.max_sge);
return RU_ERR_RC;
}
@@ -574,7 +598,7 @@ static int ru_init_ctx(struct ru_context *ctx)
ib_dev = *dev_list;
if (!ib_dev) {
RU_ERR("No IB devices found");
- return RU_ERR_RC;
+ goto err_free_devices;
}
} else {
int i;
@@ -588,16 +612,24 @@ static int ru_init_ctx(struct ru_context *ctx)
ib_dev = dev_list[i];
if (!ib_dev) {
RU_ERR("IB device %s not found", ctx->cfg.ib_devname);
- return RU_ERR_RC;
+ goto err_free_devices;
}
}
+#ifdef HAVE_CXIVERBS
+ if (ib_dev->transport_type == IBV_TRANSPORT_SLINGSHOT &&
+ ru_cxi_relaunch(ibv_get_device_name(ib_dev), ctx->cfg.job_id,
+ ctx->cfg.ib_port, ctx->cfg.gidx,
+ ctx->cfg.addr_table ? RU_ADDR_ENTRIES : 0))
+ goto err_free_devices;
+#endif
+
page_size = sysconf(_SC_PAGESIZE);
ctx->buf = memalign(page_size, ctx->cfg.msg_size);
if (!ctx->buf) {
RU_ERR("Couldn't allocate buffer");
- return RU_ERR_RC;
+ goto err_free_devices;
}
if (ctx->cfg.client)
@@ -636,8 +668,48 @@ static int ru_init_ctx(struct ru_context *ctx)
}
memcpy(&ctx->src_id, &ctx->gid.raw[12], sizeof(ctx->src_id));
+ if (ctx->context->device->transport_type == IBV_TRANSPORT_SLINGSHOT &&
+ (ctx->cfg.write32 || ctx->cfg.read32) && !ctx->cfg.user_rkey) {
+ uint32_t key;
+
+ if (getrandom(&key, sizeof(key), 0) != sizeof(key)) {
+ RU_PRINT_ERRNO("Couldn't generate narrow remote key");
+ goto err_exit;
+ }
+ ctx->cfg.user_rkey = true;
+ ctx->cfg.user_rkey_val = key | (1U << 31);
+ }
+
+#ifdef HAVE_CXIVERBS
+ if (ctx->context->device->transport_type == IBV_TRANSPORT_SLINGSHOT) {
+ const char *service = getenv("UET_SERVICE_ID");
+ uint32_t pid;
+ int ret;
- ctx->pd = ibv_alloc_pd(ctx->context);
+ if (!service) {
+ RU_ERR("No service granted; run under cxi_launcher");
+ goto err_exit;
+ }
+ ctx->cxi_svc_id = strtoul(service, NULL, 0);
+ ret = cxidv_alloc_lni(ctx->context, ctx->cxi_svc_id, &ctx->cxi_lni);
+ if (ret) {
+ RU_ERR("Couldn't allocate LNI: %s", strerror(ret));
+ goto err_exit;
+ }
+ ctx->pd = cxidv_alloc_pd(ctx->cxi_lni);
+ if (!ctx->pd)
+ goto err_exit;
+ ret = cxidv_alloc_pid(ctx->pd, ctx->cfg.absolute ? CXIDV_PID_ABSOLUTE : 0, &pid);
+ if (ret) {
+ RU_ERR("Couldn't bind PD PID: %s", strerror(ret));
+ goto err_exit;
+ }
+ ctx->cfg.pid_on_fep = pid;
+ } else
+#endif
+ {
+ ctx->pd = ibv_alloc_pd(ctx->context);
+ }
if (!ctx->pd) {
RU_PRINT_ERRNO("Couldn't allocate protection domain");
goto err_exit;
@@ -654,9 +726,16 @@ static int ru_init_ctx(struct ru_context *ctx)
.sgid_index = ctx->cfg.gidx,
};
- ctx->job = ibv_alloc_job(ctx->context, &job_attr, NULL);
+ if (getenv("UET_JOB_FD")) {
+ int fd = strtol(getenv("UET_JOB_FD"), NULL, 0);
+
+ if (ibv_import_job(ctx->context, fd, &ctx->job))
+ ctx->job = NULL;
+ } else {
+ ctx->job = ibv_alloc_job(ctx->context, &job_attr, NULL);
+ }
if (!ctx->job) {
- RU_ERR("Couldn't allocate job");
+ RU_PRINT_ERRNO("Couldn't allocate job");
goto err_exit;
}
@@ -816,7 +895,11 @@ static int ru_init_ctx(struct ru_context *ctx)
memset(&qp_attr, 0, sizeof(struct ibv_qp_attr));
qp_attr.path_mtu = ctx->cfg.mtu;
qp_init_attr_ex.qp_attr = &qp_attr;
- qp_init_attr_ex.qp_attr_mask = IBV_QP_PATH_MTU;
+ qp_init_attr_ex.qp_attr_mask = ctx->cfg.mtu_set ? IBV_QP_PATH_MTU : 0;
+ if (ctx->context->device->transport_type == IBV_TRANSPORT_SLINGSHOT) {
+ qp_attr.port_num = ctx->cfg.ib_port;
+ qp_init_attr_ex.qp_attr_mask |= IBV_QP_PORT;
+ }
memset(&semantics, 0, sizeof(struct ibv_qp_semantics));
@@ -893,12 +976,15 @@ static int ru_init_ctx(struct ru_context *ctx)
}
ctx->mr_attached = true;
+ ibv_free_device_list(dev_list);
/* the RU QP is created directly in RTS (no INIT/RTR modify) */
return RU_SUCCESS_RC;
err_exit:
ru_free_res(ctx);
+err_free_devices:
+ ibv_free_device_list(dev_list);
return RU_ERR_RC;
}
--
2.56.0
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-10-31 19:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
2026-10-31 19:25 ` [PATCH 01/12] libibverbs: add ibv_read_counters_ex() Doug Ledford
2026-10-31 19:25 ` [PATCH 02/12] libibverbs: permit jobs without an address table Doug Ledford
2026-10-31 19:25 ` [PATCH 03/12] libibverbs: support provider completion channels and Slingshot transport Doug Ledford
2026-10-31 19:25 ` [PATCH 04/12] cxiverbs: add the synchronized native hardware and verbs headers Doug Ledford
2026-10-31 19:25 ` [PATCH 05/12] cxiverbs: define the native direct-verbs resource interface Doug Ledford
2026-10-31 19:25 ` [PATCH 06/12] cxiverbs: encode list entries and VNI-isolated remote keys Doug Ledford
2026-10-31 19:26 ` [PATCH 07/12] cxiverbs: add the provider and device discovery Doug Ledford
2026-10-31 19:26 ` [PATCH 08/12] cxiverbs: implement UET verbs with explicit native ownership Doug Ledford
2026-10-31 19:26 ` [PATCH 09/12] cxiverbs: cover identity isolation and polling and event traffic Doug Ledford
2026-10-31 19:26 ` [PATCH 10/12] cxiverbs: launch Slurm-style exact VNI TC and resource grants Doug Ledford
2026-10-31 19:26 ` [PATCH 11/12] cxiverbs: wire and package the CXI verbs provider and tests Doug Ledford
2026-10-31 19:26 ` [PATCH 12/12] libibverbs: port RU examples to explicitly granted resources Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®