Add a specific error to report that a netlink response had
NLM_F_DUMP_INTR set, indicating that the set of results may be
incomplete or inconsistent.
unix.EINTR was previously returned (with no results) when the
NLM_F_DUMP_INTR flag was set. Now, errors.Is(err, unix.EINTR) will
still work. But, this will be a breaking change for any code that's
checking for equality with unix.EINTR.
Return results with ErrDumpInterrupted. Results may be incomplete
or inconsistent, but give the caller the option of using them.
Look for NLM_F_DUMP_INTR in more places:
- linkSubscribeAt, neighSubscribeAt, routeSubscribeAt
- can do an initial dump, which may report inconsistent results
-> if there's an error callback, call it with ErrDumpInterrupted
- socketDiagXDPExecutor
- makes an NLM_F_DUMP request, without using Execute()
-> give it the same behaviour as functions that do use Execute()
Signed-off-by: Rob Murray <rob.murray@docker.com>
- Add RdmaLinkList() method that retrieves RDMA devices
in the system.
- Modify RdmaLinkByName() to use RdmaLinkList() to avoid code
duplication.
- Add unit test that demonstrates how to use RdmaLinkList()
Signed-off-by: Adrian Chiris <adrianc@mellanox.com>
Add an API to change the RDMA subsystem network namespace mode as either
shared or exclusive similar to
$ rdma system set netns { shared | exclusive }
Signed-off-by: Parav Pandit <parav@mellanox.com>
RDMA subsystem can be running in shared or exclusive mode with regards
to sharing RDMA device sharing among multiple network namespaces.
Add and API to query such mode of kernel similar to iproute2 command
$ rdma system show netns
Signed-off-by: Parav Pandit <parav@mellanox.com>
This patch adds very basic support for getting information about RDMA
networking device; starting with device index, name, firmware version,
node GUID and system image GUID.
This is done through RDMA netlink socket.
RDMA devices are some what similar to Ethernet devices.
However there are few major differences between them.
RDMA devices usually have one or two ports, unlike Ethernet devices.
Each port has its own attributes, state and network addresses which are
different than Ethernet devices (Link and LinkAttrs). They almost don't
overlap with Link and LinkAttrs.
Therefore it doesn't derive Link and LinkAttrs structure; instead they
are represented using RdmaLink and RdmaLinkAttrs.
RdmaLink represents a RDMA device containing its attributes.
All Rdma device communication occurs through rdma subsystem's netlink
socket.
Signed-off-by: Parav Pandit parav@mellanox.com