Files
versitygw/cuwrapper/rc/vendor-ops.h
T
Jihyeon Gim efa0309da4 rdma: port the hipObject v2 RC session core
Port the hipObject v2 reliable-connection session core into
cuwrapper/rc: the session table and state machine, the wire
codec for the hipobj-rc-v2 headers, request parsing, the
injectable clock and randomness sources, the transport layer
(QP/CQ lifecycle, RTR/RTS transitions, staging registration),
the data phase (RDMA write with immediate for GET, receive with
immediate for PUT), the RDMA token codec, and the dynamically
loaded ibverbs shim (ibv-core.h plus the dlopen host binding).

The sources are a port of the upstream hipObject v2 core, kept
close to the original so the two trees can be diffed during
review. Nothing links against them yet; a Makefile rule builds
the objects into rdma/librcserver.a for the ABI layer that
follows.

Signed-off-by: Jihyeon Gim <potatogim@potatogim.net>
2026-08-30 00:00:29 +09:00

52 lines
1.0 KiB
C++

/* Copyright (c) Advanced Micro Devices, Inc. All rights reserved.
*
* SPDX-License-Identifier: MIT
*/
/* RDMA vendor/provider identification */
#pragma once
#include <cstdint>
#include <string>
#include "ibv-core.h"
namespace hipObj {
enum class Provider : uint8_t {
BNXT = 0,
IONIC = 2,
UNKNOWN = 0xFF,
};
constexpr uint32_t VENDOR_ID_BROADCOM = 0x14E4;
constexpr uint32_t VENDOR_ID_PENSANDO = 0x1DD8;
inline const char* provider_name(Provider p) {
switch (p) {
case Provider::BNXT:
return "bnxt";
case Provider::IONIC:
return "ionic";
default:
return "unknown";
}
}
inline Provider provider_from_string(const std::string& s) {
if (s == "bnxt" || s == "bnxt_re")
return Provider::BNXT;
if (s == "ionic" || s == "pensando")
return Provider::IONIC;
return Provider::UNKNOWN;
}
bool isBnxtDevice(uint32_t vendorId);
bool isIonicDevice(uint32_t vendorId);
int configureBnxtQp(struct ibv_qp_attr* attr);
int configureIonicQp(struct ibv_qp_attr* attr);
} // namespace hipObj