diff options
| author | Luigi Leonardi <leonardi@redhat.com> | 2025-06-30 19:33:03 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-03 01:05:22 +0300 |
| commit | e84b20b25d37622641953568ac54f0c63c409fef (patch) | |
| tree | 4764b3417c158d7b1bf1ebdd571b15bad1e70a7b | |
| parent | 6d359cf464f40baadf5e5595613c38a12f5829ef (diff) | |
| download | linux-e84b20b25d37622641953568ac54f0c63c409fef.tar.xz | |
vsock/test: Add macros to identify transports
Add three new macros: TRANSPORTS_G2H, TRANSPORTS_H2G and
TRANSPORTS_LOCAL.
They can be used to identify the type of the transport(s) loaded when
using the `get_transports()` function.
Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20250630-test_vsock-v5-1-2492e141e80b@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | tools/testing/vsock/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h index 71895192cc02..fdd4649fe2d4 100644 --- a/tools/testing/vsock/util.h +++ b/tools/testing/vsock/util.h @@ -33,6 +33,10 @@ static const char * const transport_ksyms[] = { static_assert(ARRAY_SIZE(transport_ksyms) == TRANSPORT_NUM); static_assert(BITS_PER_TYPE(int) >= TRANSPORT_NUM); +#define TRANSPORTS_G2H (TRANSPORT_VIRTIO | TRANSPORT_VMCI | TRANSPORT_HYPERV) +#define TRANSPORTS_H2G (TRANSPORT_VHOST | TRANSPORT_VMCI) +#define TRANSPORTS_LOCAL (TRANSPORT_LOOPBACK) + /* Tests can either run as the client or the server */ enum test_mode { TEST_MODE_UNSET, |
