select_gid encodes a RoCE preference order: skip zero and link-local
entries, prefer a RoCEv2 non-IPv4-mapped GID, fall back to IPv4-mapped
v2 and then v1. That order has nothing to pick on a native InfiniBand
port. The only populated entry is index 0, the port GID formed from the
subnet prefix and the port GUID, and it is link-local by construction
(fe80::/10), so the loop discards it and the session fails with "no
usable GID found ... set VGWRDMA_GID_INDEX", even though index 0 is the
one and only correct choice. Every IB user has to hard-code
VGWRDMA_GID_INDEX=0.
Check port_attr.link_layer, which ibv_query_port already returns here,
and take index 0 on IBV_LINK_LAYER_INFINIBAND before the RoCE scan.
RoCE ports are unaffected. Reword the failure message so it no longer
tells IB users to look for a "RoCE GID index", and update the env var
documentation in cuobjclient.
Verified on a ConnectX-6 native IB port (GID table: index 0 =
fe80::…, 1-3 zero): the host client now auto-selects index 0 and
PUT/GET complete against a hipobj/cuObject gateway without the env var;
unpatched it fails at session init with the message above.
The unsupported-platform cuObject stubs returned freshly constructed error
values, which let staticcheck prove caller error checks were always true on
non-Linux builds. Return shared package-level errors instead so the stubs
keep the same runtime behavior without triggering SA4023.
Gate native RDMA, cuObject, and cuobjclient implementations behind the
rdma build tag while keeping fallback stubs available for standard builds.
Preserve the separate cuobjclient_host configuration, clarify unsupported
platform errors, and update Makefile RDMA targets to pass the required tags
and disable VCS stamping.
Co-authored-by: Ben McClelland <ben.mcclelland@versity.com>