[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250630-test_vsock-v5-1-2492e141e80b@redhat.com>
Date: Mon, 30 Jun 2025 18:33:03 +0200
From: Luigi Leonardi <leonardi@...hat.com>
To: Stefano Garzarella <sgarzare@...hat.com>, Michal Luczaj <mhal@...x.co>
Cc: virtualization@...ts.linux.dev, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Luigi Leonardi <leonardi@...hat.com>
Subject: [PATCH net-next v5 1/2] 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@...hat.com>
Signed-off-by: Luigi Leonardi <leonardi@...hat.com>
---
tools/testing/vsock/util.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/vsock/util.h b/tools/testing/vsock/util.h
index 71895192cc02313bf52784e2f77aa3b0c28a0c94..fdd4649fe2d49f57c93c4aa5dfbb37b710c65918 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,
--
2.50.0
Powered by blists - more mailing lists